VARKON Version 1.17 1997-12-06


tform_comp - Geometric procedure

Creates a transformation


Description

Creates a 3D composite transformation with simultaneous translation and rotation.

Syntax

tform_comp(id, p1, v2, v3, p4, v5, v6:attributes);

REF id;
VECTOR p1;
VECTOR v2;
VECTOR v3;
VECTOR p4;
VECTOR v5;
VECTOR v6;


Principal parameters

id - Local identity
p1 - Position in original plane and original base position
v2 - First vector in original plane
v3 - Second vector in original plane
p4 - Position in transformed plane and new base position
v5 - First vector in transformed plane
v6 - Second vector in transformed plane


Optional parameters

None.


Attributes

PEN - Pen or colour number
LEVEL - Level number
BLANK - Visible(0) or invisible(1)


Example

Coordinates for three points (VECTOR p1, p2, p3) are known in a part (a CAD model). Assume that the three points have been measured (VECTOR p1_m, p2_m, p3_m) and that is of interest to calculate how the part shall be moved to get into the right position. i.e. to calculate the transformation matrix that will move the part so that new measurements will result in p1_m=p1, p2_m=p2 and p3_m=p3.

tform_comp(#1,p1, p2-p1, p3-p1, p1_m, p2_m-p1_m, p3_m-p1_m);

The above statement will calculate the transformation matrix. Note that function gettrf can be used to retrieve the matrix.

Comment

tform_comp may only be used in a 3D module.


VARKON Homepage Index