Path2d
A set of points most commonly used by Shape2d. When a Shape2d is rendered, the path is assumed to be closed, despite the closed boolean. Therefore, the closed property is only used for such things as extruding a profile along a path.
Paths may self intersect, but such paths should NOT be used to form a Polygon.
Within FooCAD, the direction of the points matters. By convention, holes are ordered clockwise, and non-holes anticlockwise. This is only important when paths are used to create a Polygon. OpenSCAD has no such restriction.
Constructors
Functions
If this path's points are ordered clockwise, then return this path, otherwise return the reverse of this path.
If this path's points are ordered clockwise, then return a reverse of this path. Otherwise, return this path.
Are the points listed in a clockwise direction. For most paths, they should be clockwise. The only exception is when the path is being used to define a hole.
As holes should be ordered clockwise, this is synonymous with isClockwise.
Creates a duplicate of this path with any consecutive duplicated points removed.
Converts a FooCAD Path2d into a jts LineString. If the Path2d is closed, then use Path2d.toJTSPolygon instead.
Convert a FooCAD Path2d into a jts Polygon. If the Path2d is not closed, then use Path2d.toJTSLineString instead.