Skip to main content

Module offset

Module offset 

Source
Expand description

Constant-distance offset and shelling of planar-faced solids (#78).

§Which offset this is

Offsetting by a sphere rounds every convex edge, which introduces curved faces and leaves the planar family this crate refuses to leave. What is implemented is the MITER offset: each face plane is pushed along its normal by the distance, and the faces are extended until they meet again. A cube offset outward by d becomes a cube of edge a + 2d, which is the identity #78 verifies against.

§Why vertices, not faces

Pushing each face and re-deriving the solid works for convex operands and silently fails for concave ones: at a reflex edge the pushed neighbours overlap instead of meeting. Offsetting the VERTICES instead – each moved to the common point of its own incident pushed planes – gives the miter point in both cases, and preserves topology exactly, so the result has the same face structure as its input and needs no re-assembly.

Enums§

OffsetDirection
Which way an offset moves the boundary.

Functions§

offset_solid
Offset a planar-faced solid by a constant distance.
shell_solid
Hollow a solid to a stated wall thickness.