Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
05 ArchiCAD 11 GDL Reference Guide.pdf
Скачиваний:
59
Добавлен:
11.03.2015
Размер:
3.22 Mб
Скачать

COORDINATE TRANSFORMATIONS

This chapter tells you about the types of transformations available in GDL (moving, scaling, rotating the coordinate system) and the way they are interpreted and managed.

About Transformations

In GDL, all the geometric elements are linked strictly to the local coordinate system. GDL uses a right-handed coordinate system. For example, one corner of a block is in the origin and its sides are in the x-y, x-z and y-z planes.

Placing a geometric element in the desired position requires two steps. First, move the coordinate system to the desired position. Second, generate the element. Every movement, rotation or stretching of the coordinate system along or around an axis is called a transformation.

Transformations are stored in a stack; interpretation starts from the last one backwards. Scripts inherit this stack; they can insert new elements onto it but can only delete the locally defined ones. It is possible to delete one, more or all of the transformations defined in the current script. After returning from a script, the locally defined transformations are removed from the stack.

2D TRANSFORMATIONS

These are the equivalents in the 2D space of the ADD, MUL and ROTZ 3D transformations.

ADD2

ADD2 x, y

Example:

ADD2 a, b

Y

Y

X

b

X

a

MUL2

MUL2 x, y

ArchiCAD 11 GDL Reference Guide

25

Coordinate Transformations

ROT2

ROT2 alpha

Example:

ROT2 beta

Y

Y

X

beta

X

3D TRANSFORMATIONS

ADDX

ADDX dx

ADDY

ADDY dy

ADDZ

ADDZ dz

Moves the local coordinate system along the given axis by dx, dy or dz respectively.

26

ArchiCAD 11 GDL Reference Guide

Coordinate Transformations

ADD

ADD dx, dy, dz

Replaces the sequence ADDX dx: ADDY dy: ADDZ dz.

It has only one entry in the stack, thus it can be deleted with DEL 1.

Example:

ADD a,b,c

Z

Y

Z

Y

c

 

X

b

a

X

MULX

MULX mx

MULY

MULY my

MULZ

MULZ mz

Scales the local coordinate system along the given axis. Negative mx, my, mz means simultaneous mirroring.

MUL

MUL mx, my, mz

Replaces the sequence MULX mx: MULY my: MULZ mz. It has only one entry in the stack, thus it can be deleted with DEL 1.

ArchiCAD 11 GDL Reference Guide

27

Coordinate Transformations

ROTX

ROTX alphax

ROTY

ROTY alphay

ROTZ

ROTZ alphaz

Rotates the local coordinate system around the given axis by alphax, alphay, alphaz degrees respectively, counterclockwise.

Example:

Z

Y

Y

X

beta

X

ROTZ beta

ROT

ROT x, y, z, alpha

Rotates the local coordinate system around the axis defined by the vector (x, y, z) by alpha degrees, counterclockwise. It has only one entry in the stack, thus it can be deleted with DEL 1.

XFORM

XFORM a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34

28

ArchiCAD 11 GDL Reference Guide