step-examples/12-4-tolerance/N021.stp
Sources
- 22-niche-forums Y002 (KiCad #23235)
Sender
KiCad pcbnew (VRML vs STEP exporters)
Description
KiCad VRML export places Z=0 at the board *center*; STEP export places Z=0 at the board *bottom*. Downstream tools mixing the two formats see components shifted by half-board-thickness, even though both come from the same producer.
Reproducer recipe
For a 1.6 mm board, export both VRML and STEP from the same KiCad project. Inspect the bounding box and assembly origin in each.
Expected kernel behavior
heal; when a producer with known origin-convention drift is detected (via `FILE_DESCRIPTION` heuristics), warn and offer re-anchoring.
Notes
Synonyms: "VRML uses board center, STEP uses board bottom", "Z=0 differs between formats from same producer", "components shifted by half board thickness across formats".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'1.0E-5')count_entity_def(b'EDGE_CURVE') == 1
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* N021: VRML Z=0 at board center; STEP Z=0 at board bottom; 1.6 mm board means 0.8 mm shift; EDGE_CURVE at z=0.8 encodes board-bottom-origin convention; GEOMETRIC_CURVE_SET â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('N021'),'2;1'); 5FILE_NAME('N021.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#1=CARTESIAN_POINT('p0_board_center_z',(0.0,0.0,0.8)); 10#2=CARTESIAN_POINT('p1_board_center_z',(10.0,0.0,0.8)); 11#3=VERTEX_POINT('v0',#1); 12#4=VERTEX_POINT('v1',#2); 13#5=DIRECTION('',(1.0,0.0,0.0)); 14#6=VECTOR('',#5,10.0); 15#7=LINE('edge_at_board_center',#1,#6); 16#8=EDGE_CURVE('edge',#3,#4,#7,.T.); 17#9=GEOMETRIC_CURVE_SET('board_conv',(#8)); 18#10=APPLICATION_CONTEXT('automotive_design'); 19#11=PRODUCT_CONTEXT('',#10,'mechanical'); 20#12=PRODUCT('N021','N021','',(#11)); 21#13=PRODUCT_DEFINITION_FORMATION('','',#12); 22#14=PRODUCT_DEFINITION_CONTEXT('part definition',#10,'design'); 23#15=PRODUCT_DEFINITION('','',#13,#14); 24#16=PRODUCT_DEFINITION_SHAPE('','',#15); 25#17=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 26#18=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 27#19=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 28#20=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-5),#17,'distance_accuracy_value','kicad_step_precision'); 29#21=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#20))GLOBAL_UNIT_ASSIGNED_CONTEXT((#17,#18,#19))REPRESENTATION_CONTEXT('ctx','3D')); 30#22=GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION('',(#9),#21); 31#23=SHAPE_DEFINITION_REPRESENTATION(#16,#22); 32ENDSEC; 33END-ISO-10303-21;