Return an independently-disposable duplicate of a shape.
downcast is a cast, not a copy: on the occt-wasm arena kernel a
same-type downcast returns the very same handle id, so disposing the
"copy" would free the source. copyShape guarantees a handle that can be
disposed without affecting the source — a real geometric copy where a
primitive exists (occt-wasm k.copy, brepkit copySolid for solids), a
new wrapper over the same id where nothing changes that shape in place
(other brepkit shapes), or the safe existing duplicate on kernels that
never free handles individually (manifold) or share refcounted geometry
(occt Embind).
Downcast a shape to a more specific type (e.g., TopoDS_Shape → TopoDS_Edge).
Optionaltype: ShapeTypeGet edge-to-face adjacency map as JSON.
Compute a hash code for a shape (used for face tracking).
Test if two shapes are geometrically equal (same location + orientation).
Check if a shape handle is null.
Test if two shapes are the same topological entity.
Iterate a TopTools_ListOfShape, calling a callback for each item.
Sew shapes together at shared edges.
Optionaltolerance: numberGet the orientation of a shape (forward, reversed, internal, external).
Get shared edges between two faces.
OptionalsubCount sub-shapes of a type without allocating a handle per sub-shape.
Optional native fast path (occt-wasm >= 3.7.0); absent kernels fall back to
iterating handles. See the topology-layer subShapeCount wrapper.
OptionalsubDeduplicated sub-shape hashes at hashUpperBound, with no per-sub-shape
handle allocation. Hashes agree with hashCode at the same bound.
Optional native fast path (occt-wasm >= 3.7.0). See the topology-layer
subShapeHashes wrapper.
Get faces adjacent to a given face within a shape.