Skip to main content

Module shape

Module shape 

Source
Expand description

Recognizing the elementary shapes a NURBS curve or surface can be — a straight line, a circular arc, a plane, a surface of revolution — for whatever needs to know what an entity is, not just where it is: a reference axis built along an edge, a sketch placed on a face.

Every test is a question about the control net, answered with the kernel’s three-valued comparisons: a shape is recognized when the net could be exactly that shape — rounding can’t rule it out — and never because it is merely close to it. A curve that bends by a micron is not a line, however short.

The shapes themselves (Axis, Circle, Arc, Plane) carry the few constructions everything built on them needs: projecting onto them, intersecting them.

Structs§

Arc
A circular arc: the part of circle from start counter-clockwise (seen with circle.normal towards the viewer) to end — all of it when start and end coincide.
Axis
A straight line: through point, along the unit vector direction.
Circle
A circle: around center, in the plane normal to the unit vector normal, of radius.
Plane
A plane: through point, normal to the unit vector normal.