Skip to main content

Module shape

Module shape 

Source
Expand description

The shape triple, orientation, and the identity trichotomy.

docs/DATA_MODEL.md §1, §3 and §4. A Shape is a (topology node, placement, orientation) triple: cheap to copy, with the heavy data (the children, the geometry, the tolerances) living once in an arena behind the node handle. That separation is why boundary representation scales: the same node appears at many placements and orientations without a byte of geometry being copied.

Two consequences run through everything downstream.

Traversal composes. A sub-shape’s effective placement is the product of every placement from the root down, and its effective orientation is the composition of every orientation on that path. An explorer that yields sub-shapes without composing both is wrong in a way that produces plausible-looking garbage rather than an error.

Identity is three questions, not one. See Shape::is_partner, Shape::is_same and Shape::is_equal.

Structs§

PartnerKey
A key that hashes and compares by Shape::is_partner: the node alone.
SameKey
A key that hashes and compares by Shape::is_same: node and placement, ignoring orientation.
Shape
A shape: a topology node, a placement, and an orientation.
TShape
A topology node: the shared, placeless, orientationless part of a shape.

Enums§

Orientation
Which side of a boundary the material is on.
ShapeType
What a topology node is.

Type Aliases§

TShapeId
A handle to a TShape.