Builds a filled 2D shape from the outline points, taken in order and closed back to the first.
Only X and Y are used, Z is dropped; repeated consecutive points are removed and at least three distinct points are needed. Counter-clockwise order gives a normal shape, clockwise gives a negative one.
The 2D shape
Builds a filled 2D shape from the points of a polyline, closed back to the first point whatever the polyline says.
Only X and Y are used, Z is dropped; repeated consecutive points are removed and at least three distinct points are needed.
The polyline
The 2D shape
Builds a filled 2D shape from a NURBS curve by sampling it into points and closing the outline.
Only X and Y of the sampled points are used, Z is dropped.
The 2D shape
This takes a verb-nurbs curve, and verb is deprecated for removal in the next major, so this goes with it. It is also the one method here that converts between two different CAD kernels, which belongs above a kernel-specific package rather than inside one. Build the polygon from points or from a polyline instead.
Builds a filled 2D shape from the points of a 2D path, closed back to the first point.
Repeated consecutive points are removed and at least three distinct points are needed; a 2D shape or a solid throws an error.
The 2D path
The 2D shape
Builds a filled circle of the given radius around a 2D center; segments is the number
of straight sides that approximate it.
The circle as a 2D shape
Builds a filled ellipse around a 2D center, with radius holding the X and Y half-sizes;
segments is the number of straight sides that approximate it.
The center, the two radii and the segment count
The ellipse as a 2D shape
Builds a filled rectangle around a 2D center, with width along X and length along Y.
The center, the width and the length
The rectangle as a 2D shape
Builds a filled rectangle with its four corners rounded by roundRadius, around a 2D
center with width along X and length along Y.
roundRadius must be less than half of the smaller side or an error is thrown; segments
sets how smoothly each corner is faceted.
The center, the rounding radius, the segment count, the width and the length
The rounded rectangle as a 2D shape
Builds a filled square of side size around a 2D center, with its sides parallel to the
axes.
The square as a 2D shape
Builds a filled star with vertices tips around a 2D center, the tips at outerRadius and
the notches between them at innerRadius.
startAngle in degrees turns the first tip away from the X axis. density matters only when
innerRadius is 0: the notch radius is then derived from it, as in a pentagram with density
2.
The star as a 2D shape
Building flat JSCAD shapes, the filled 2D regions that booleans combine and extrusions turn into solids. They lie in the XY plane: a shape made from points or a curve keeps only the X and Y coordinates, and the circle, ellipse, rectangle, square and star primitives take a 2D center. List outline points counter-clockwise.