Module placement

Module placement 

Source
Expand description

The one home for placement frames and the ObjectPlacement chain (F3b).

  • Axis2Placement / Axis1Placement: the attributes of an IfcAxis2Placement3D / IfcAxis1Placement, read once.
  • [build_axis2_matrix]: the only orthonormalisation of a frame.
  • resolve_chain / resolve_object_placement: the world transform of a placement, walked iteratively up PlacementRelTo with a visited set and no depth cap (D27), memoised on the decoder.
  • chain / validate_chain: the same walk without transforms, for consumers that check a chain against their own rules.

Results are unscaled (file units, the memo’s unit); the caller scales.

Structs§

Axis1Placement
The attributes of an IfcAxis1Placement: Location (0), Axis (1).
Axis2Placement
The attributes of an IfcAxis2Placement3D or IfcAxis2Placement2D: raw Axis and RefDirection ratios (None when $), orthonormalised only by Self::matrix.
ChainPolicy
What a consumer accepts in a chain. All false is the strictest IfcLocalPlacement-only, 3D-only chain.
ChainValidator
A validation session tied to ONE immutable decoder source and ONE policy. A transform-cache entry alone never proves that a consumer’s policy holds. Only whole successful chains enter this session’s private verified suffixes; failures remain uncached and cycles still use the canonical visited walk. Drop the session before changing policy or moving to another decoder.
Link
One placement of a chain.

Enums§

LinkKind
What a placement in a chain is.
PlacementError
Why a placement could not be resolved.

Functions§

chain
The placements from placement up to the root, leaf first, cycle-checked. No transforms are composed and the memo is not consulted.
resolve_chain
The unscaled world transform of placement, composed ((T_root·L_1)·L_2)…·L_leaf up PlacementRelTo.
resolve_chain_relative
placement expressed in the frame of the placement base: base_world⁻¹ · placement_world, unscaled.
resolve_object_placement
The unscaled world transform of product’s ObjectPlacement (attribute 5). Ok(None) iff it is $, * or absent: “genuinely missing” stays the identity at the caller (#2256).
rotation_angle_about_z
The building/site rotation about the world vertical (Z) axis, derived from a resolved column-major 4×4 placement matrix (as returned by crate::GeometryRouter::resolve_scaled_placement). The local X-axis (the placement’s RefDirection, composed through the full parent chain and normalized) is column 0 — elements [0], [1], [2] — so its angle in the world XY plane is atan2(m[1], m[0]).
validate_chain
Walk placement up to the root and check every link against policy. A broken rule is PlacementError::Policy, a consumer’s limit rather than bad input, so it is not counted as a refused record.
validate_spatial_frame
Validate an IfcAxis2Placement3D under the strict spatial policy.

Type Aliases§

PlacementResult
Result of the placement readers.