BetaBetaBetaBuilds each root of a recipe as a solid placed by its matrix, in root order.
Shared nodes are built once. An invalid recipe throws before anything is built; a root the
kernel cannot build, such as an open mesh, throws naming its node unless emptyWhenFailed is
set. Circles get circularSegments sides; tolerance and millimetresPerUnit are not applied.
The recipe, how finely circles are divided, and whether Z turns into Y
One solid per root, in root order
BetaBuilds a recipe into the meshes its roots draw, each step several roots place meshed once in its own coordinates, and gives every root a placement: its mesh, its matrix and its tag.
Turns and moves fold into the placements, so a door type placed a hundred times is one mesh;
normals split at edges sharper than minSharpAngle.
The recipe, how finely circles are divided, whether Z turns into Y, whether failures are skipped, and where normals split
The meshes and one placement per root, in root order
BetaGives the roots of a recipe made of triangle meshes alone as meshes, placed as build places
its solids, without building anything.
build gives an open mesh back empty, since it cannot be a solid; this gives it as the surface
it is, its openings left uncut. A root holding any other step comes back as an empty mesh.
The recipe, which roots to read, and whether Z turns into Y
One mesh per asked root, in the order asked, ready to draw
const solids = await bitbybit.manifold.recipes.build({ recipe, adjustZtoY: true, emptyWhenFailed: true });
const meshes = await bitbybit.manifold.manifold.manifoldsToMeshes({ manifolds: solids });
const open = meshes.flatMap((mesh, index) => mesh.triVerts.length === 0 ? [index] : []);
const surfaces = await bitbybit.manifold.recipes.surfaceMeshes({ recipe, roots: open, adjustZtoY: true });
Building recipes: solids described as data - polygons, circles, extrusions, turns and lofts, cuts, unions, openings, transforms and triangle meshes - by a package that does not build geometry itself, such as one that reads building models. Every result is a watertight mesh solid, so walls with their openings cut and roofs clipped come back ready to draw or to combine further.
Experimental: the recipe format may still change before it is declared stable.