5  Identity: The Product Chain

Eight records that say “there is a part called BLOCK” — and why a CAD file needs the version-and-view structure of a product lifecycle system to say it.

Strip the geometry out of the block file and what remains is this:

#1 = APPLICATION_PROTOCOL_DEFINITION('international standard',
  'automotive_design',2000,#2);
#2 = APPLICATION_CONTEXT(
  'core data for automotive mechanical design processes');
#3 = SHAPE_DEFINITION_REPRESENTATION(#4,#10);
#4 = PRODUCT_DEFINITION_SHAPE('','',#5);
#5 = PRODUCT_DEFINITION('design','',#6,#9);
#6 = PRODUCT_DEFINITION_FORMATION('','',#7);
#7 = PRODUCT('BLOCK','block 60x20x10','',(#8));
#8 = PRODUCT_CONTEXT('',#2,'mechanical');
#9 = PRODUCT_DEFINITION_CONTEXT('part definition',#2,'design');
#170 = PRODUCT_RELATED_PRODUCT_CATEGORY('part',$,(#7));
Referred to above: 160 records from block.step
#10 = ADVANCED_BREP_SHAPE_REPRESENTATION('',(#11,#15),#165);
#11 = AXIS2_PLACEMENT_3D('',#12,#13,#14);
#12 = CARTESIAN_POINT('',(0.,0.,0.));
#13 = DIRECTION('',(0.,0.,1.));
#14 = DIRECTION('',(1.,0.,-0.));
#15 = MANIFOLD_SOLID_BREP('',#16);
#16 = CLOSED_SHELL('',(#17,#57,#97,#119,#141,#153));
#17 = ADVANCED_FACE('',(#18),#52,.F.);
#18 = FACE_BOUND('',#19,.F.);
#19 = EDGE_LOOP('',(#20,#30,#38,#46));
#20 = ORIENTED_EDGE('',*,*,#21,.F.);
#21 = EDGE_CURVE('',#22,#24,#26,.T.);
#22 = VERTEX_POINT('',#23);
#23 = CARTESIAN_POINT('',(0.,0.,0.));
#24 = VERTEX_POINT('',#25);
#25 = CARTESIAN_POINT('',(0.,0.,10.));
#26 = LINE('',#27,#28);
#27 = CARTESIAN_POINT('',(0.,0.,0.));
#28 = VECTOR('',#29,1.);
#29 = DIRECTION('',(0.,0.,1.));
#30 = ORIENTED_EDGE('',*,*,#31,.T.);
#31 = EDGE_CURVE('',#22,#32,#34,.T.);
#32 = VERTEX_POINT('',#33);
#33 = CARTESIAN_POINT('',(0.,20.,0.));
#34 = LINE('',#35,#36);
#35 = CARTESIAN_POINT('',(0.,0.,0.));
#36 = VECTOR('',#37,1.);
#37 = DIRECTION('',(0.,1.,0.));
#38 = ORIENTED_EDGE('',*,*,#39,.T.);
#39 = EDGE_CURVE('',#32,#40,#42,.T.);
#40 = VERTEX_POINT('',#41);
#41 = CARTESIAN_POINT('',(0.,20.,10.));
#42 = LINE('',#43,#44);
#43 = CARTESIAN_POINT('',(0.,20.,0.));
#44 = VECTOR('',#45,1.);
#45 = DIRECTION('',(0.,0.,1.));
#46 = ORIENTED_EDGE('',*,*,#47,.F.);
#47 = EDGE_CURVE('',#24,#40,#48,.T.);
#48 = LINE('',#49,#50);
#49 = CARTESIAN_POINT('',(0.,0.,10.));
#50 = VECTOR('',#51,1.);
#51 = DIRECTION('',(0.,1.,0.));
#52 = PLANE('',#53);
#53 = AXIS2_PLACEMENT_3D('',#54,#55,#56);
#54 = CARTESIAN_POINT('',(0.,0.,0.));
#55 = DIRECTION('',(1.,0.,0.));
#56 = DIRECTION('',(0.,0.,1.));
#57 = ADVANCED_FACE('',(#58),#92,.T.);
#58 = FACE_BOUND('',#59,.T.);
#59 = EDGE_LOOP('',(#60,#70,#78,#86));
#60 = ORIENTED_EDGE('',*,*,#61,.F.);
#61 = EDGE_CURVE('',#62,#64,#66,.T.);
#62 = VERTEX_POINT('',#63);
#63 = CARTESIAN_POINT('',(60.,0.,0.));
#64 = VERTEX_POINT('',#65);
#65 = CARTESIAN_POINT('',(60.,0.,10.));
#66 = LINE('',#67,#68);
#67 = CARTESIAN_POINT('',(60.,0.,0.));
#68 = VECTOR('',#69,1.);
#69 = DIRECTION('',(0.,0.,1.));
#70 = ORIENTED_EDGE('',*,*,#71,.T.);
#71 = EDGE_CURVE('',#62,#72,#74,.T.);
#72 = VERTEX_POINT('',#73);
#73 = CARTESIAN_POINT('',(60.,20.,0.));
#74 = LINE('',#75,#76);
#75 = CARTESIAN_POINT('',(60.,0.,0.));
#76 = VECTOR('',#77,1.);
#77 = DIRECTION('',(0.,1.,0.));
#78 = ORIENTED_EDGE('',*,*,#79,.T.);
#79 = EDGE_CURVE('',#72,#80,#82,.T.);
#80 = VERTEX_POINT('',#81);
#81 = CARTESIAN_POINT('',(60.,20.,10.));
#82 = LINE('',#83,#84);
#83 = CARTESIAN_POINT('',(60.,20.,0.));
#84 = VECTOR('',#85,1.);
#85 = DIRECTION('',(0.,0.,1.));
#86 = ORIENTED_EDGE('',*,*,#87,.F.);
#87 = EDGE_CURVE('',#64,#80,#88,.T.);
#88 = LINE('',#89,#90);
#89 = CARTESIAN_POINT('',(60.,0.,10.));
#90 = VECTOR('',#91,1.);
#91 = DIRECTION('',(0.,1.,0.));
#92 = PLANE('',#93);
#93 = AXIS2_PLACEMENT_3D('',#94,#95,#96);
#94 = CARTESIAN_POINT('',(60.,0.,0.));
#95 = DIRECTION('',(1.,0.,0.));
#96 = DIRECTION('',(0.,0.,1.));
#97 = ADVANCED_FACE('',(#98),#114,.F.);
#98 = FACE_BOUND('',#99,.F.);
#99 = EDGE_LOOP('',(#100,#106,#107,#113));
#100 = ORIENTED_EDGE('',*,*,#101,.F.);
#101 = EDGE_CURVE('',#22,#62,#102,.T.);
#102 = LINE('',#103,#104);
#103 = CARTESIAN_POINT('',(0.,0.,0.));
#104 = VECTOR('',#105,1.);
#105 = DIRECTION('',(1.,0.,0.));
#106 = ORIENTED_EDGE('',*,*,#21,.T.);
#107 = ORIENTED_EDGE('',*,*,#108,.T.);
#108 = EDGE_CURVE('',#24,#64,#109,.T.);
#109 = LINE('',#110,#111);
#110 = CARTESIAN_POINT('',(0.,0.,10.));
#111 = VECTOR('',#112,1.);
#112 = DIRECTION('',(1.,0.,0.));
#113 = ORIENTED_EDGE('',*,*,#61,.F.);
#114 = PLANE('',#115);
#115 = AXIS2_PLACEMENT_3D('',#116,#117,#118);
#116 = CARTESIAN_POINT('',(0.,0.,0.));
#117 = DIRECTION('',(0.,1.,0.));
#118 = DIRECTION('',(0.,0.,1.));
#119 = ADVANCED_FACE('',(#120),#136,.T.);
#120 = FACE_BOUND('',#121,.T.);
#121 = EDGE_LOOP('',(#122,#128,#129,#135));
#122 = ORIENTED_EDGE('',*,*,#123,.F.);
#123 = EDGE_CURVE('',#32,#72,#124,.T.);
#124 = LINE('',#125,#126);
#125 = CARTESIAN_POINT('',(0.,20.,0.));
#126 = VECTOR('',#127,1.);
#127 = DIRECTION('',(1.,0.,0.));
#128 = ORIENTED_EDGE('',*,*,#39,.T.);
#129 = ORIENTED_EDGE('',*,*,#130,.T.);
#130 = EDGE_CURVE('',#40,#80,#131,.T.);
#131 = LINE('',#132,#133);
#132 = CARTESIAN_POINT('',(0.,20.,10.));
#133 = VECTOR('',#134,1.);
#134 = DIRECTION('',(1.,0.,0.));
#135 = ORIENTED_EDGE('',*,*,#79,.F.);
#136 = PLANE('',#137);
#137 = AXIS2_PLACEMENT_3D('',#138,#139,#140);
#138 = CARTESIAN_POINT('',(0.,20.,0.));
#139 = DIRECTION('',(0.,1.,0.));
#140 = DIRECTION('',(0.,0.,1.));
#141 = ADVANCED_FACE('',(#142),#148,.F.);
#142 = FACE_BOUND('',#143,.F.);
#143 = EDGE_LOOP('',(#144,#145,#146,#147));
#144 = ORIENTED_EDGE('',*,*,#31,.F.);
#145 = ORIENTED_EDGE('',*,*,#101,.T.);
#146 = ORIENTED_EDGE('',*,*,#71,.T.);
#147 = ORIENTED_EDGE('',*,*,#123,.F.);
#148 = PLANE('',#149);
#149 = AXIS2_PLACEMENT_3D('',#150,#151,#152);
#150 = CARTESIAN_POINT('',(0.,0.,0.));
#151 = DIRECTION('',(0.,0.,1.));
#152 = DIRECTION('',(1.,0.,0.));
#153 = ADVANCED_FACE('',(#154),#160,.T.);
#154 = FACE_BOUND('',#155,.T.);
#155 = EDGE_LOOP('',(#156,#157,#158,#159));
#156 = ORIENTED_EDGE('',*,*,#47,.F.);
#157 = ORIENTED_EDGE('',*,*,#108,.T.);
#158 = ORIENTED_EDGE('',*,*,#87,.T.);
#159 = ORIENTED_EDGE('',*,*,#130,.F.);
#160 = PLANE('',#161);
#161 = AXIS2_PLACEMENT_3D('',#162,#163,#164);
#162 = CARTESIAN_POINT('',(0.,0.,10.));
#163 = DIRECTION('',(0.,0.,1.));
#164 = DIRECTION('',(1.,0.,0.));
#165 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3) 
GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#169)) GLOBAL_UNIT_ASSIGNED_CONTEXT
((#166,#167,#168)) REPRESENTATION_CONTEXT('Context #1',
  '3D Context with UNIT and UNCERTAINTY') );
#166 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );
#167 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );
#168 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() );
#169 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-07),#166,
  'distance_accuracy_value','confusion accuracy');

The complete file

Two of these (#3, #4) are the bridge to geometry and belong to Chapter 7. The rest are the product chain: the records that establish what thing the file is about. Every STEP file has this structure, once per product, and it is the same in AP203, AP214 and AP242.

5.1 The three-level core

The chain has a spine of three records, and understanding why there are three rather than one is most of the chapter.

#7 = PRODUCT('BLOCK','block 60x20x10','',(#8));
#6 = PRODUCT_DEFINITION_FORMATION('','',#7);
#5 = PRODUCT_DEFINITION('design','',#6,#9);
Referred to above: 3 records from block.step
#2 = APPLICATION_CONTEXT(
  'core data for automotive mechanical design processes');
#8 = PRODUCT_CONTEXT('',#2,'mechanical');
#9 = PRODUCT_DEFINITION_CONTEXT('part definition',#2,'design');

The complete file

PRODUCT is the thing as a catalogue item: a part number and a name, and nothing else. Not a version, not a shape. id is 'BLOCK'; name is 'block 60x20x10'; the optional description is empty; frame_of_reference points at a PRODUCT_CONTEXT. Schema:

ENTITY product;
  id                 : identifier;
  name               : label;
  description        : OPTIONAL text;
  frame_of_reference : SET [1:?] OF product_context;
END_ENTITY;

PRODUCT_DEFINITION_FORMATION is a version of that product. “Formation” is the standard’s word for revision. It has an id (the revision letter or number), a description, and a reference to the product it is a version of. This exporter has left both strings empty — it does not know about revisions — and pointed at #7.

ENTITY product_definition_formation;
  id          : identifier;
  description : OPTIONAL text;
  of_product  : product;
END_ENTITY;

PRODUCT_DEFINITION is that version as seen from one discipline or life-cycle stage. The id here is 'design'; the frame_of_reference points at a PRODUCT_DEFINITION_CONTEXT that names the stage. The same version of the same part could have a second PRODUCT_DEFINITION for manufacturing, with different geometry hanging off it — stock material, no chamfers, tapped holes shown as drilled — and a third for inspection.

ENTITY product_definition;
  id                 : identifier;
  description        : OPTIONAL text;
  formation          : product_definition_formation;
  frame_of_reference : product_definition_context;
END_ENTITY;

So the three levels are item → revision → view. This is the data model of a product lifecycle management (PLM) system, and it is in the file because the integrated resources were designed to serve PLM systems as much as CAD exporters. A CAD tool writing a single part fills two of the three levels with empty strings and moves on; the structure is there for someone else.

NoteEngineering background: Item, revision, view

In a manufacturing organisation a part number identifies a design intent — “the bracket.” A revision identifies a specific released state of that design — “bracket, rev C” — and revisions are not interchangeable: rev C may have a different hole spacing from rev B, and a drawing or an assembly refers to a specific one. A view (or definition) is the same revision described for a purpose: the design view carries nominal geometry and tolerances; the manufacturing view carries the as-machined model, stock, and process notes; the as-built view carries what was actually made. PLM systems track all three levels and the relationships between them. STEP inherits the model so that a file can carry, say, an assembly whose components are at specific revisions, or a manufacturing definition alongside a design definition, without inventing new structure. Most CAD exports use none of this, which is why the middle level is nearly always blank.

5.2 The contexts

Two records exist only to anchor the chain in a domain:

#8 = PRODUCT_CONTEXT('',#2,'mechanical');
#9 = PRODUCT_DEFINITION_CONTEXT('part definition',#2,'design');
Referred to above: 1 record from block.step
#2 = APPLICATION_CONTEXT(
  'core data for automotive mechanical design processes');

The complete file

PRODUCT_CONTEXT says what discipline the product belongs to; its discipline_type is 'mechanical' and its frame_of_reference is the application context #2. PRODUCT_DEFINITION_CONTEXT says what life-cycle stage the definition is in; life_cycle_stage is 'design', again pointing at #2. Both strings are convention rather than rule. AP203 and AP242 fix them on the subtypes MECHANICAL_CONTEXT and DESIGN_CONTEXT, which both schemas list as deprecated and no exporter writes; AP214, the schema of this file, does not define those subtypes at all, and leaves both values as unconstrained labels. What AP214 does say runs the other way: a definition whose context is named 'part definition' or 'part occurrence' must belong to a product categorised 'part', 'raw material' or 'tool'. Both records are boilerplate that you will learn to skim. Some exporters write one pair per product, as OCCT does; others share one pair across every product in the file. Both are legal.

5.3 The category

The last non-geometric record in the file classifies the product:

#170 = PRODUCT_RELATED_PRODUCT_CATEGORY('part',$,(#7));
Referred to above: 3 records from block.step
#2 = APPLICATION_CONTEXT(
  'core data for automotive mechanical design processes');
#7 = PRODUCT('BLOCK','block 60x20x10','',(#8));
#8 = PRODUCT_CONTEXT('',#2,'mechanical');

The complete file

A PRODUCT_RELATED_PRODUCT_CATEGORY has a name, an optional description, and a list of the products in the category. The name is an unconstrained string, but the APs constrain it from outside, and differently. AP214 requires every product to carry exactly one category named from a fixed list: 'part', 'raw material', 'tool', 'document', and five more for requirements, functions, concepts, alternative solutions and physically realised products. AP203 and AP242 impose no such list; they tie particular names to particular kinds of definition — 'assembly' on a product whose definition is declared an assembly definition, 'part', 'raw material' or 'tool' on a part occurrence, and a handful more for collections and support structures. Either way the category does not tell a leaf from an assembly: OCCT writes 'part' for the assembly as well as for its components. The assembly structure is in the NEXT_ASSEMBLY_USAGE_OCCURRENCE records of Chapter 8, and nowhere else.

Notice the reference direction: the category points at the product. A product does not know its own category; you find it by looking for categories that list it. This is the pattern from Chapter 2 again — specific to general — and it will recur every time a classification, a property or a style is attached to something.

5.4 What exporters put where

The schema says what the slots are for. It does not say what a CAD system should write in them, and they differ. What follows is what these exporters have been seen to write, not what their vendors promise.

  • product.id is meant to be the part number. OCCT writes whatever name it was given; SolidWorks writes the document’s filename without extension; NX and Creo write the part name, which in a well-run shop is the part number; CATIA writes the part number field from the part’s properties, which is often the same string as the name.
  • product.name is meant to be the human name. Most exporters write the same string as id. OCCT, if given only one name, duplicates it, which is why unedited OCCT files say PRODUCT('Open CASCADE STEP translator 7.9 1','Open CASCADE STEP translator 7.9 1', ...).
  • product_definition_formation.id is the revision. It is empty in almost every CAD export. When PLM-integrated systems write it, it holds 'A', 'B', '01'.
  • product_definition.id is nearly always 'design', sometimes '', occasionally the part name again.

The practical rule for finding “the name of this part” is: product.name, falling back to product.id, falling back to the filename. The practical rule for finding the part number is product.id, and it is only as good as the exporter’s mapping.

WarningIn the wild: Formations with a source

All three protocols define a subtype, PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE, which adds a make_or_buy enumeration: .MADE., .BOUGHT. or .NOT_KNOWN.. AP203’s first edition required it; its second edition and AP242 both list it as deprecated, which is why it turns up in AP203 exports and almost nowhere else. It is written mostly in AP203 exports, almost always with .NOT_KNOWN., so a file’s formation records look like PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE('','',#7,.NOT_KNOWN.). It is the same record with one more attribute, and a reader should treat it as a formation.

5.5 Several products in one file

A single-part file has one chain. An assembly file has one chain per product — the assembly and each distinct component — each with its own PRODUCT, formation, definition and category, and usually its own pair of contexts. The clamp assembly in Chapter 8 has three: CLAMP-ASSY, bracket and pin-1. What connects them is not in the product chain at all; it is a separate set of records that relate one PRODUCT_DEFINITION to another. The chain establishes that things exist. Structure is layered on top.

One more thing the chain does not do: it does not point at geometry. #5, the design definition of the block, knows its version and its context and nothing else. The shape is attached from the other side, by records that point at #5, and that is the subject of Chapter 7.

ImportantIn brief

PRODUCT → PRODUCT_DEFINITION_FORMATION → PRODUCT_DEFINITION is item → revision → view, the PLM model built into the format. Each level points at the one above. PRODUCT_CONTEXT and PRODUCT_DEFINITION_CONTEXT anchor the chain in a discipline and life-cycle stage with conventional strings. PRODUCT_RELATED_PRODUCT_CATEGORY classifies the product and points at it, not the other way round, and it does not tell you whether the product is an assembly.