pub struct StepProduct {
pub pd_ref: usize,
pub name: String,
pub id: String,
pub bodies: Vec<BrepSolid>,
pub appearances: Vec<BodyAppearance>,
pub failed_bodies: usize,
pub pmi: Option<PmiState>,
}Expand description
One node of the file’s product structure: a PRODUCT_DEFINITION, or a
representation that a MAPPED_ITEM instantiates and no product definition owns
(bodies::representation_owner_index).
Fields§
§pd_ref: usizeThe node’s entity id — a PRODUCT_DEFINITION, or the representation that stands in for one. The stable identity and dedup key either way, because Part 21 ids are unique within a file.
name: StringPRODUCT.name, the representation’s name for a node that is one, or
pd#<id> when the file carries neither.
id: StringPRODUCT.id — the vendor part number, for the BOM. May be empty.
The CONSUMER is what makes this durable: the app’s assembly intake
records it as partAttributes.Part_Number on the part document it mints
(BREP_render’s model_io.rs::part_attributes), which is the record
io/step/export_tree.rs reads back out as PRODUCT.id. An intake that
dropped it would silently replace a vendor’s part numbers with our own
file names on the first export -> import -> export.
bodies: Vec<BrepSolid>This product’s OWN solids, in its OWN local frame and at its OWN unit scale. Empty ⇒ a pure assembly node (structure, no geometry).
appearances: Vec<BodyAppearance>The styled colour of each entry of bodies, PARALLEL to it (index i
is body i). Default-filled when the file carries no presentation
entities, so it is always the same length as bodies and a caller can
zip without a length check.
failed_bodies: usizeBodies of this product that did not reconstruct. Graceful degradation: counted, never fatal, and never a reason to reject the file.
pmi: Option<PmiState>The file’s PMI that annotates THIS product’s own geometry, with
references naming the faces / edges / vertices the part document’s
IMPORT3D1 feature will stamp (assembly_pmi.rs).
ONE lift per PART, however many occurrences place it — an annotation on
a part’s face IS an annotation on every instance of that part, which is
the exporter’s rule read backwards (io/step/assembly.rs: two
instances of one part share the part’s ADVANCED_FACEs). PMI the file
pinned to a particular INSTANCE is not here; it rides
StepAssembly::pmi.