Expand description
Primitive solids.
Built from numbers rather than from existing topology, so their history has
nothing to report, but their provenance very much does. Each face gets a
role naming which face of the primitive it is (roles), so a reference to
“the top of that box” survives the box being rebuilt at a different size.
Without it the reference would be to a handle that no longer exists.
Modules§
- roles
- Roles naming which part of a primitive an entity is.
Functions§
- make_
box - Build an axis-aligned box in
frame, spanningsizealong each of its axes from the frame’s origin. - make_
cone - Build a cone or a truncated cone in
frame. - make_
cylinder - Build a cylinder in
frame:radiusabout itsz,heightalong it. - make_
faceted_ solid - A solid from planar rings over shared points, each ring already wound counter-clockwise seen from outside, and its faces in the rings’ order.
- make_
faceted_ solid_ with_ holes make_faceted_solidwith faces holding holes: each face its outer ring, wound counter-clockwise seen from outside, then a ring per hole, wound clockwise seen from outside, every ring of a face on its one plane. A face’s plane inplanesand the errors are as there, every ring of the face counted; a hole names at least three distinct points too.- make_
half_ space - Build the unbounded solid on one side of a face.
- make_
hexahedron - A hexahedron: the solid on eight corners laid out like a box’s, whose
six faces are planar. The corners come in a box’s order: the four of
the bottom face counter-clockwise from the origin corner (
(0,0,0),(1,0,0),(1,1,0),(0,1,0)), then the four above them in the same order. - make_
parallelepiped - A parallelepiped: the solid spanned at
originby three edge vectors. - make_
polyhedron - A convex solid from planar rings over shared points.
- make_
sphere - Build a sphere of
radiuscentred atframe’s origin. - make_
torus - Build a torus in
frame:majorfrom the axis to the tube’s centre,minorthe tube’s own radius. - make_
wedge - Build a wedge: a box whose top face is inset.
- torus_
face_ seamed_ at - A whole torus’s face whose seam round the axis is the parallel at tube
angle
v0rather than the outer equator: its chart spans[0, 2pi]by[v0, v0 + 2pi], and its seam round the tube is the tube’s circle at longitude zero. The face alone, onframemade right-handed asmake_torusmakes it.