curve
A curve in 2d or 3d.
Details
Describes a curve, i.e. a one-dimensional line that may be defined either in 2d (in the x/y plane) or in 3d.
Curves are defined by linking curve segments through curve link operators '->'.
Example
curve triangle = <[1.0, 1.0]> -> <[2.0, 1.0]> -> <[1.5, 2.0]> -><-
make extrusion( triangle, <[0.0, 0.0, 1.0]> )
Orientation directions can be added to segments using the curve orientation operator '^':
Example
curve p = <[0,0]>^<[0,0,-1]> -> arc( <[15,0]>, PI )^<[0,0,1]>
Casts To
Members
- vector front()
-
Returns the starting point of the curve, if this is defined. Otherwise it returns <[0.0, 0.0, 0.0]>.
- vector back()
-
Returns the end point of the curve, if this is defined. Otherwise it returns <[0.0, 0.0, 0.0]>.
- float length()
-
Returns the arc length of the curve.
- selectbox min_bbox()
-
Returns the axis-aligned minimum bounding box of the curve.
- vector pos( float s )
-
Returns the position on the curve at an natural parametrization value of s. This means, that the beginning of the curve is at an s value of 0.0 and the end of the curve at an an s value of curve.length().
Optional Open Parameter Attributes
- bool readonly
-
Tells the user interface or frontend to disable the setting of the open parameter.
- string style
-
Specifies some limited styling instructions for the user interface or frontend.