VARKON Version 1.15 1997-10-24

> ## sur_sweep - Geometric procedure

> Creates a surface
> Description
> Creates a surface by sweeping a "base" profile along a spine. The profile and the spine may be any line, arc or curve and they do not need to be planar. To create a surface by sweeping, do the following:
> 1. Create a basic profile in the XY-plane of the BASIC coordinate system.
> 2. Create the actual spine.
> 3. Use sur_sweep() to sweep the profile along the spine.
> For a given point on the spine VARKON uses the shape of the profile but moves it from its original position so that the origin of the BASIC coordinate system is made equal to the point on the spine and the BASIC Z-direction is equal to the spine tangent. If the spine is a true planar curve the plane normal is used as the BASIC Y-direction. For a non planar spine a temporary plane is automatically created and its normal is used for the Y-direction. In any case an optional dir parameter may be supplied and will then be used instead of the plane normal to control the Y-axis.
> The function of sur_sweep() makes it possible to use the same basic profile to sweep along many different spines.
> Syntax
> sur_sweep(id, profile, spine, reverse, dir:attributes);

> REF | id;
> REF | profile;
> REF | spine;
> INT | reverse;
> VECTOR | dir;

> Principal parameters

> id | - Local identity
> profile | - Identity of line, arc or curve
> spine | - Identity of line, arc or curve

> Optional parameters

> reverse | - Controls the parametric directions of the resulting surface
> | 1 = No reversal of input (default)
> | -1 = The profile curve (U-direction) is reversed
> | 2 = The spine curve (V-direction) is reversed
> | 3 = The profile and the spine are both reversed
> dir | - Controls the direction of the Y-axis, Default = plane normal.

> Attributes

> PEN | - Pen or colour number
> LEVEL | - Level number
> BLANK | - Visible(0) or invisible(1)
> SDASHL | - Dashlength

> Example
> sur_sweep(#3, #1, #2);
> Creates a surface by sweeping a copy of #1 along #2.
> sur_sweep(#3,#1,#2,-1);
> Geometrically the same surface but parametrisation reversed in U-direction.
> Comments
> The parameter of the profile becomes the U-direction of the surface and the parameter of the spine becomes the V-direction. The optional "reverse" parameter can be used to alter this.
> Remember that profiles should be defined in the BASIC coordinate system and that the same profile can be used for different spines. One way to accomplish this is to set the system in BASIC mode before the profile is created and another way is to create the profile in a module with attribute BASIC.

VARKON Homepage | Index