pub struct StepOccurrence {
pub edge_ref: usize,
pub parent: usize,
pub child: usize,
pub designator: String,
pub placement: [f64; 16],
pub rigid: bool,
pub color: Option<ImportedColor>,
pub body_colors: Vec<Option<ImportedColor>>,
}Expand description
One occurrence: a placement of child inside parent, from a NAUO edge or a
mapped item.
Fields§
§edge_ref: usizeThe entity that IS this occurrence: a NEXT_ASSEMBLY_USAGE_OCCURRENCE, or
the MAPPED_ITEM that placed a shared representation (mapped.rs). Part 21
ids are unique per file, so this identifies the occurrence either way, and
consumers order sibling occurrences by it for determinism.
parent: usizeIndex into StepAssembly::products.
child: usizeIndex into StepAssembly::products.
designator: StringThe instance label (“bolt-3”) — see edge_designator for which of a
NAUO’s several label attributes wins, and what a mapped item contributes.
placement: [f64; 16]child-local → parent-local, row-major affine, translations in MILLIMETRES
(scaled by the PARENT representation’s unit, which is the frame the
placement is expressed in). NOT a world transform: the caller composes
these down from StepAssembly::roots.
rigid: boolRᵀR = I and det R = +1 within 1e-9 — i.e. the placement is a pure
rotation + translation, representable as a translate/rotate component
pose. A mirrored or scaled occurrence has no such representation and its
non-rigid factor must be baked into a distinct part by the caller, which
is what BREP_render’s assembly intake does. A MAPPED_ITEM through a
CARTESIAN_TRANSFORMATION_OPERATOR_3D is the placement that makes this
false today (mapped.rs).
color: Option<ImportedColor>This instance’s own colour, where the file styles the occurrence apart
from its part (a STEP CONTEXT_DEPENDENT_OVER_RIDING_STYLED_ITEM in the
occurrence’s context or a style on its MAPPED_ITEM, an IGES 408’s
colour). It colours every body the instance places, over the part’s own
body colour; None leaves the part’s colours as they are.
body_colors: Vec<Option<ImportedColor>>The colour this instance gives each of its child’s OWN bodies, parallel
to that product’s bodies, where the file styles them in this
occurrence’s context (None for a body it leaves as the part has it).
Empty when it styles none of them.