Create directly
createEvaluator() without a kernel performs the same selection.
Custom WASM URL
wasmUrl on the first initialization in each realm;
an explicit URL after a default initialization also fails. A failed
initialization, such as a missing asset or a network error, is not cached, so a
later call can retry with the same or a corrected URL.
Capabilities
The 0.2 adapter supports:- box, cylinder/cone, and sphere primitives
- extrude and revolve
- union, subtraction, and intersection
- translation, rotation, scale, and mirror
- twist/top-scale extrusion
- mesh extraction, native measurements, and exact per-component mesh genus
- binary/ASCII STL and OBJ through shared exporters
1e10) of
the sketch origin in both sketch axes. Manifold’s 2D polygon engine stores
coordinates as scaled 64-bit integers and fails just above 2^34 mm, so a larger
profile fails before any native work with a KERNEL_ERROR that names the
ceiling. The exact OCCT kernel has no such ceiling for ordinary extents.
Precision model
Manifold computes robust solids internally, but its public mesh carries Float32 vertex positions. Measurement methods call native Manifold volume, surface-area, bounding-box, and tolerance functions. The center of mass and inertia tensor come from integrating the Float32 mesh about its bounding-box center and rescaling to the native volume. That integration is accepted only when its volume matches the native volume within a bound that includes Float32 rounding of the recentered positions, so slender, thin-walled, or widely separated geometry measures normally, and tensor precision is limited by Float32 coordinates relative to the whole shape’s bounding box. Genus is evaluated on every fresh component returned bydecompose(), validated as a
nonnegative safe integer, safe-summed, and cleaned up transactionally. That
claim is exact for the Manifold mesh representation, not an assertion about a
source B-Rep.
A public mesh round-trip is not a lossless native shape codec. InvariantCAD
therefore does not advertise shape-artifact persistence for Manifold 3.5.1.
Resource ownership
Each adapter shape wraps its own native Manifold object, and every kernel call returns a fresh shape that the caller disposes independently, includingtransform with an empty operation list. Feature intermediates and evaluated
output shapes are deleted by the owning evaluation. A kernel instance accepts
only shapes it created: passing a shape from another createManifoldKernel()
instance throws a TypeError and leaves the shape with its owner. Disposing
the kernel releases every remaining live adapter shape; if a native release
fails, the others are still released before the error is rethrown. A
successfully initialized Manifold module remains cached for the lifetime of the
JavaScript realm; a failed initialization is discarded.