Builds a solid from plain mesh data, the form manifoldToMesh hands out, so a mesh can make
a round trip through other tools.
The mesh must be closed and consistently oriented, or an error is thrown; degenerate triangles and unneeded vertices are removed on the way in.
The mesh data
The solid
Builds a solid from a list of triangles, each given as three points, merging points that coincide.
The triangles must form a closed, consistently oriented surface; entries that are not three points are skipped, and points with missing coordinates throw an error.
The triangles as lists of three points
The solid
Creates a cube solid with the given side length.
With center true the cube is centered on the origin; otherwise its corner sits on the origin
and it extends along the positive axes.
The box solid
Creates a sphere solid of the given radius, centered on the origin.
circularSegments is the number of segments around the sphere; it is rounded up to a
multiple of four, since the sphere is built by refining an octahedron.
The sphere solid
Creates a tetrahedron solid centered on the origin, with one corner at [1, 1, 1] and the
others placed symmetrically.
The tetrahedron solid
Creates a cylinder solid standing along Z, or a cone when the top radius differs from the bottom one.
radiusLow is the bottom radius and must be above 0, radiusHigh the top radius, which may
be 0 for a point; circularSegments sets how round the sides are. center centers the
cylinder on the origin instead of standing it on it.
The height, the bottom and top radii, the number of segments and whether to center it
The cylinder or cone solid
Building Manifold solids: the cube, sphere, cylinder and tetrahedron primitives, and solids from triangle meshes or lists of triangles. The kernel keeps Z as its up axis, so a cylinder stands along Z and a cube's
sizeruns along X, Y and Z; every solid comes back as a closed triangle mesh.