Skip to content

jitx/shapes/Polyline

Package name: jitx/shapes/Polyline

Summary

Polyline

Polyline

Functions

Function Description
Polyline Create a polyline from a sequence of points, arcs, and/or other nested sequences of points and/or arcs.
outline

Definitions

Polyline

Polyline

public defstruct Polyline <: Shape & HasMetaUtils :
    elements: Tuple<Point|Arc>
    width: Double

  • elements: Tuple<Point|Arc> - Elements along this line's centerline. Must have at least 2 points or 1 arc.

  • width: Double - Thickness of this polyline. Must be non-negative.

A thick polyline consisting of straight line segments and arcs.

Specified with a width (thickness) and a tuple of one or more elements. Each element is either a single point or a circular arc and represents a portion of the centerline of the polyline. The end point of each element (except the last element) is connected to the start point of the next element (a single point is its own start and end point). 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

Polyline

Create a polyline from a sequence of points, arcs, and/or other nested sequences of points and/or arcs.

public defn Polyline (width:Double, elements:Seqable<Shape|Seqable>)

  • elements: Seqable<Shape|Seqable> - The sequence of points, arcs, and/or other nested sequences to make the polyline from.

The sequence is "flattened" first to create the tuple of points and arcs used.

outline

public defn outline (l:Polyline)

Related Packages

Forwarded by packages: jitx/shapes, jitx