Shapemetry API / Shell
Class: Shell
Defined in: nurbsBrep/topo/Shell.ts:20
A connected set of faces forming one closed (or open) surface boundary.
Constructors
Constructor
new Shell(
faces):Shell
Defined in: nurbsBrep/topo/Shell.ts:24
Parameters
faces
Face[]
Returns
Shell
Properties
index
readonlyindex:number
Defined in: nurbsBrep/topo/Shell.ts:21
faces
faces:
Face[]
Defined in: nurbsBrep/topo/Shell.ts:22
Methods
equals()
equals(
other):boolean
Defined in: nurbsBrep/topo/Shell.ts:34
Identity comparison: two references denote the same shell.
Parameters
other
Shell
Returns
boolean
edges()
edges():
Edge[]
Defined in: nurbsBrep/topo/Shell.ts:39
Distinct edges across all faces of the shell.
Returns
Edge[]
edgeFaceMap()
Defined in: nurbsBrep/topo/Shell.ts:54
Map from each edge to the faces that border it (distinct faces).
Returns
edgeUseCount()
edgeUseCount():
Map<Edge,number>
Defined in: nurbsBrep/topo/Shell.ts:74
Count how many oriented-edge uses each edge has across every face wire in the shell. One OrientedEdge instance is one use, so a seam edge that appears twice within a single face's wire (once forward, once reverse) contributes two uses to that one edge — exactly like an edge bordered by two distinct faces. This is the correct manifold metric: a closed two-manifold shell has every edge used by exactly two oriented edges.
Returns
Map<Edge, number>
manifoldReport()
manifoldReport():
ManifoldReport
Defined in: nurbsBrep/topo/Shell.ts:92
Classify the shell's edges by how many oriented-edge uses they have. A closed, two-manifold shell has every edge used exactly twice — whether by two different faces (a box edge) or twice within one face's wire (a periodic seam edge). Free edges have a single use; non-manifold edges three or more.
Returns
ManifoldReport
isClosedManifold()
isClosedManifold():
boolean
Defined in: nurbsBrep/topo/Shell.ts:108
True when every edge is bordered by exactly two faces.
Returns
boolean
boundingBox()
boundingBox():
BoundingBox
Defined in: nurbsBrep/topo/Shell.ts:117
Axis-aligned bounding box enclosing the shell, sampled from its face surfaces and boundary edges (a curved face bulges beyond its vertices). Empty when the shell has no faces.
Returns
toTriangleMesh()
toTriangleMesh(
deflection?):TriangleMesh
Defined in: nurbsBrep/topo/Shell.ts:129
Triangulate the shell to a TriangleMesh within deflection (the maximum chord error). When deflection is omitted it defaults to the shell's bounding-box diagonal / 1000, so the mesh density scales with the model. A closed shell tessellates watertight; an open shell meshes each face with its shared boundaries welded. Every face meshes its shared edges from the one memoized edge discretization, so adjacent faces emit identical seam samples.
Parameters
deflection?
number
Returns
toJSON()
toJSON():
ShellBrepJson
Defined in: nurbsBrep/topo/Shell.ts:144
Serialize this shell and its closure (faces, wires, edges, vertices) to a ShellBrepJson document — the same entity tables a solid emits, rooted at this shell. Round-trips with Shell.fromJSON.
Returns
fromJSON()
staticfromJSON(data):Shell
Defined in: nurbsBrep/topo/Shell.ts:149
Reconstruct a shell (and its closure) from a ShellBrepJson document.
Parameters
data
Returns
Shell