VARKON Version 1.15 1997-10-24

> ## getseg - Procedure

> Get curve segment from GM
> Description
> Reads a geometric or graphic curve segment from GM.
> Syntax
> getseg(curve_id, segnum, rep, segdata, offset, type, subtype, surfid_1, surfid_2)

> REF | curve_id;
> INT | segnum;
> INT | rep;
> FLOAT | segdata(4,4);
> FLOAT | offset;
> INT | type;
> INT | subtype;
> REF | surfid_1;
> REF | surfid_2;

> Principal parameters

> id | - Global identity of a curve
> segnum | - The segment to read, first segment = 1
> rep | - 0 = Read geometric segment, 1 = Read graphic segment
> segdata | - A 4 by 4 matrix with polynomial coefficients
> offset | - Offset
> type | - 1 = Rational cubic segment, 2 = UV-segment

> Optional parameters

> subtype | - Always 0 for a rational cubic segment. 1 for an UV-segment that lies on one surface
> | 2 for an UV-segment that lies on two surfaces (intersect curve)
> surfid_1 | - Identity of first surface if subtype = 1 or 2
> surfid_2 | - Identity of second surface if subtype = 2

> Comments
> Each segment is a rational cubic with 0 to 1 parametrisation and the coefficients ordered as follows:
> k0x k0y k0z k0w
> k1x k1y k1z k1w
> k2x k2y k2z k2w
> k3x k3y k3z k3w
> Se for example Faux and Pratt, "Computational Geometry for design and manufacture", page 144 for a further discussion on rational cubic parametric segments.
> Graphical segments and geometric segments can be the same thing since many curves use their geometric representation also for graphics. In that case an attempt to read graphical segment number n will simply return geometrical segment number n.

VARKON Homepage | Index