Version 0.59.0

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 )
  •   extrusion( sketch outline, vector origin2d, vector dir2d, 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.

For constructors (2), (4), (6) and (8), the terminal planes are automatically aligned orthogonally to the direction of the path at its two ends. Constructors (3), (5), (7) and (9) allow to align the terminal planes at the beginning and at the end of the path 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 occur when the sketch exceeds over the bending radius of path.

Return value

A solid that is created by extrusion of the outline sketch.

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

An direction in the sketch plane that is used for orienting the extrusion. The resulting solid has the sketch oriented in such a way at the beginning of the extrusion path that this direction is either coaligned with parameter dir3d or, if this is not present, with the curver orientation at that point.

dir3d

An orientation direction in 3d space that is used for orienting the extrusion. The resulting solid has the sketch oriented in such a way that the direction given as dir2d is coalinged with dir3d at the beginning of the extrusion path. If this parameter is not, present the orientation of the curve at this point is used.

See also

🗙

Search results for