Skip to main content

Module paths

Module paths 

Source
Expand description

Curves are constructed in continuous database units. Polygon vertices are rounded once, to the nearest DBU (halfway values away from zero).

Structs§

Curve
HobbyOptions
Junction
Endpoints and unit tangent directions passed to custom join/end generators.
PathBuilder
Several layer-tagged tracks with independent widths, offsets and end styles. Append parameterized samples from bezier, arc or parametric.
StrokeSection
One sampled section for a robust, variable-width track.
StrokeStyle
Track
Vec2

Enums§

Cap
Join

Constants§

MAX_SAMPLES

Functions§

arc
Sample an ellipse from its starting point. The two angles are polar directions in the global frame, measured in radians.
bezier
Subdivide a Bézier until its control hull lies within tolerance of the chord.
fillet
Sample a circular fillet between two straight segments. Endpoints are the tangency points on each segment (excluding the original corner).
grid_outline
Snap a continuous outline to DBU and reject a collapsed contour.
hobby_controls
Compute the pair of cubic Bézier control points for every interpolated span. Eliminating each incoming tangent leaves a (cyclic) tridiagonal system.
offset_spine
Compute the (unquantized) spine of a laterally offset track.
on_grid
Round an open vertex sequence to DBU, removing adjacent grid duplicates.
parametric
Sample a continuous user-supplied section including its parameter values. Increase initial_intervals for functions that oscillate faster than the seed grid.
robust_outline
Continuous outline of a curve with rail intersections at section joins.
robust_stroke
Resolve rail intersections across nonsmooth curve sections before snapping.
robust_stroke_bounded
Limit exact rail-intersection tests at each section boundary and side.
stroke
Construct one variable-width, laterally offset track on the integer grid. Offsets are positive to the left of the spine. Profiles specify one value per vertex.
stroke_outline
Continuous outline, for callers that apply a final transform before DBU quantization.
stroke_with
Construct a track with caller-provided outer joins and/or end caps.

Type Aliases§

Sample