Skip to main content

Module plain

Module plain 

Source
Expand description

Plane geometry in plain numbers: where a tool places what it builds, and where the pointer meets the sketch. Only ever a free choice — a position the solver then makes exact, a suggestion of which piece of a curve is meant — never a result the kernel reasons about: what the sketch is is its design data, and what that means comes from its solver.

Enums§

Plain
A line, circle or arc in plain numbers: what intersections are found on, and where along it a point is.

Functions§

add
angle_between
The counter-clockwise angle from a to b, in (-π, π].
bounds
The box around points: its lowest corner and its highest, or None if there are no points.
cross
The 2-D cross product a.x b.y - a.y b.x: positive where b lies counter-clockwise of a.
distance
How far a is from b.
dot
of
v in plain numbers.
perp
v turned a quarter counter-clockwise.
reflect
p mirrored across the line through a and b.
rotate
v turned counter-clockwise by angle.
scale
segments_cross
Where the segments from a to b and from c to d cross, if they do.
sub
sweep_through
The signed sweep of the arc from s to e through p, by the inscribed angle theorem: counter-clockwise (positive) when p lies right of the chord. Not finite when p is on the chord’s line.
swept
The angle from from round to to, followed on from previous, the sweep it was before (none if zero): within half a turn of it, so that a sweep dragged round goes on past half a turn.
unit
a scaled to unit length, or None if it has no finite, non-zero one.
wrap
angle brought into (-π, π].
xy
Where the sketch point p is drawn.

Type Aliases§

P2
[x, y].