Skip to main content

Module primitive

Module primitive 

Source
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, spanning size along 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: radius about its z, height along it.
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 origin by three edge vectors.
make_polyhedron
A convex solid from planar rings over shared points.
make_sphere
Build a sphere of radius centred at frame’s origin.
make_torus
Build a torus in frame: major from the axis to the tube’s centre, minor the tube’s own radius.
make_wedge
Build a wedge: a box whose top face is inset.