extrusion

Creates a solid by extrusion of a curve or sketch.

Signatures

  • extrusion( sketch outline, vector span )
  • extrusion( sketch outline, curve path )
  • extrusion( sketch outline, curve path, vector normBegin, vector normEnd )
  • extrusion( sketch outline, vector origin2d, curve path )
  • extrusion( sketch outline, vector origin2d, curve path, vector normBegin, vector normEnd )
  • extrusion( sketch outline, vector origin2d, vector dir2d, curve path, vector dir3d )
  • extrusion( sketch outline, vector origin2d, vector dir2d, curve path, vector dir3d, vector normBegin, vector normEnd )

Details

The function creates a solid object from a 2d sketch (i.e. a sketch in the x/y plane) by applying an extrusion operation.

Constructors (2), (4) and (6) the, the sketch is automatically aligned orthogonally to the beginning and the end of the path. Constructors (3), (5) and (7) allow to orient the sketch at the begin an at the end manually.

Example

 curve star
 for( int i = 0; i < 36; ++i )
 {
   float rad = ( i % 2 ) ? 2.0 : 3.0
   star ->= rad * <[ cos( rad( i * 10 ) ), sin( rad( i * 10 ) ) ]>
 }
 star = star -><-
 make extrusion( star, <[0.0, 0.0, 1.0]> )
 

A simple star created as an extruded curve.

Note

The current version does not check for self-intersections that may turn up when the sketch exceeds over the bending radius of path.

Parameters

outline

The 2-dimensional sketch that gets extruded. If this is not closed, it will be closed before extrusion.

span

A vector that defines the extrusion.

path

A curve that defines the extrusion.

normBegin

A vector that determines the plane normal of the sketch at the beginning of the path extrusion.

normEnd

A vector that determines the plane normal of the sketch at the end of the path extrusion.

origin2d

A point on the sketch that serves as origin of the curve extrusion. Default value is the origin of the coordinate system (0,0).

dir2d

A direction in sketch that can be used to orient the extrusion.

dir3d

A direction in 3d space that is used for orienting the extrusion. The extrusion is rotated around the curve path in such a way that the directions given as dir2d and dir3d are coaligned as much as possible at the first point of the extrusion curve.

Return value

A solid object that gets creating by spanning the curve or sketch.

See also