jitx/shapes/PolygonWithArcs¶
Package name: jitx/shapes/PolygonWithArcs
Summary¶
PolygonWithArcs¶
Polygon With Arcs
Functions¶
Function | Description |
---|---|
PolygonWithArcs | Create a polygon with arcs from a sequence of points, arcs, and/or other nested sequences. |
outline | Create a polyline which traces the outline of the polygon with arcs. |
Definitions¶
PolygonWithArcs¶
Polygon With Arcs
public defstruct PolygonWithArcs <: Shape & HasMetaUtils :
elements: Tuple<Point|Arc>
elements: Tuple<Point|Arc>
- Elements of this polygon with arc's boundary in counter-clockwise order. Must have at least 3 points or 1 arc.
A polygon which may have sides which are circular arcs instead of line segments.
Specified with a tuple of elements (points or arcs) in counter-clockwise order. Must be non-degenerate (have at least 3 vertices or at least 1 arc) and non-self-intersecting. May be concave. The end point of each element is connected to the start point of the next element (a single point is its own start and end point). The last element is connected to the first element. The start and end points of arcs DO NOT need to also be included as standalone points in the elements tuple, doing so will result in duplicated points.
Functions¶
PolygonWithArcs¶
Create a polygon with arcs from a sequence of points, arcs, and/or other nested sequences.
public defn PolygonWithArcs (elements:Seqable<Shape|Seqable>)
elements: Seqable<Shape|Seqable>
- The sequence of points, arcs, and/or other nested sequences to make the polygon with arcs from.
The sequence is "flattened" first to create the tuple of points and arcs used.
outline¶
Create a polyline which traces the outline of the polygon with arcs.
public defn outline (p:PolygonWithArcs) -> Polyline
p: PolygonWithArcs
- The polygon with arcs to create the outline of.- Returns
Polyline
The polyline has width 0.0
.
Related Packages¶
Forwarded by packages: jitx/shapes, jitx