step-examples/12-8-mixed/M088.stp
Sources
- deduced from AP210 §4.3 measurement contexts
- AP210 supports etherometric (sheet-relative normalized) and metric contexts
Sender
deduced — ECAD exporter writing schematic-sheet coordinates into the layout context
Description
A PCB stackup has ply outline coordinates that look like etherometric (sheet-normalized 0.1) values, but the file's `representation_context` is the global Cartesian one with mm `LENGTH_UNIT`. Consumed as mm, the ply outline collapses from a 100mm board to a 1mm speck. Bug-reporter language: "PCB outline tiny on import", "AP210 board shrunk to 1mm", "etherometric vs metric confusion".
Reproducer recipe
A `POLYLINE` with corner coordinates (0,0)(1,0) (1,1)(0,1) used as a `PLY_BOUNDARY_REPRESENTATION` in a context whose `LENGTH_UNIT` is mm.
Expected kernel behavior
Warn and accept: validate that the coordinate magnitudes are plausible for the declared unit; warn on suspiciously small footprints, or reject (require an explicit conversion) when crossing context kinds.
Notes
Synonyms: "PCB units wrong", "outline scale 100x off", "AP210 etherometric vs metric mismatch", "stackup coordinates 0.1 but unit is mm", "PCB outline collapses to speck".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(2) ifc=schema_n/a
Byte assertions
contains(b'ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN')contains(b'PLY_BOUNDARY_REPRESENTATION')contains(b'LAMINATE_OR_PLY_DEFINITION')
Tier-3 assertions
shape_null == Falsen_edges_total == 1n_vertices_total == 6
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M088: AP210 etherometric vs metric measurement context confusion */ 3/* DEFECT: PLY_BOUNDARY_REPRESENTATION has etherometric (0..1) coords in mm context */ 4/* Consumed as mm, the 100mm PCB board collapses to a 1mm speck */ 5/* Byte assertion: contains(b'ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN') */ 6/* Byte assertion: contains(b'PLY_BOUNDARY_REPRESENTATION') */ 7/* Byte assertion: contains(b'LAMINATE_OR_PLY_DEFINITION') */ 8HEADER; 9FILE_DESCRIPTION(('M088: AP210 etherometric vs metric context confusion'),'2;1'); 10FILE_NAME('M088.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','',''); 11/* Byte assertion: contains(b'ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN') */ 12FILE_SCHEMA(('ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN { 1 0 10303 210 3 1 0 }')); 13ENDSEC; 14DATA; 15#1=APPLICATION_CONTEXT('electronic_assembly_interconnect_and_packaging_design'); 16#2=APPLICATION_PROTOCOL_DEFINITION('international standard', 17 'electronic_assembly_interconnect_and_packaging_design',2014,#1); 18/* Unit context declares mm â but coordinates below are etherometric (0..1) */ 19/* This context mismatch is the defect: etherometric in metric context */ 20#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 21#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 22#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 23#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 24 'distance_accuracy_value','maximum model space distance between geometric entities'); 25#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) 26 GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 27 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) 28 REPRESENTATION_CONTEXT('pcb','3D')); 29/* DEFECT: ply outline uses etherometric (sheet-normalized) unit-square coords */ 30/* In etherometric space these represent a 100mm x 100mm board corner locations */ 31/* Parsed as mm, the outline is only 1mm x 1mm â 100x too small */ 32/* Etherometric unit square corners: (0,0), (1,0), (1,1), (0,1) */ 33#20=CARTESIAN_POINT('bl',(0.0,0.0,0.0)); 34#21=CARTESIAN_POINT('br',(1.0,0.0,0.0)); 35#22=CARTESIAN_POINT('tr',(1.0,1.0,0.0)); 36#23=CARTESIAN_POINT('tl',(0.0,1.0,0.0)); 37/* Closed POLYLINE outline (etherometric unit square â wrong in mm context) */ 38#25=POLYLINE('ply_outline',(#20,#21,#22,#23,#20)); 39/* Byte assertion: contains(b'LAMINATE_OR_PLY_DEFINITION') */ 40/* Stackup ply definition â references the mismatched boundary representation */ 41#100=LAMINATE_OR_PLY_DEFINITION('stackup_ply',$,$,$,LENGTH_MEASURE(0.2)); 42/* Byte assertion: contains(b'PLY_BOUNDARY_REPRESENTATION') */ 43/* DEFECT: PLY_BOUNDARY_REPRESENTATION uses etherometric coords (0..1) in mm context */ 44/* Receiver parsing this file treats coords as mm: 1mm board instead of 100mm */ 45#101=PLY_BOUNDARY_REPRESENTATION('ply_boundary',(#25),#14); 46/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 47#300=GEOMETRIC_CURVE_SET('ap210-etherometric-vs-metric-context-confusion', 48 (#25,#100,#101,#20,#21,#22,#23)); 49/* Product chain */ 50#400=APPLICATION_CONTEXT('mechanical design'); 51#401=PRODUCT_CONTEXT('',#400,'mechanical'); 52#402=PRODUCT('M088','M088','M088',(#401)); 53#403=PRODUCT_DEFINITION_FORMATION('','',#402); 54#404=PRODUCT_DEFINITION_CONTEXT(#400,'design'); 55#405=PRODUCT_DEFINITION('','',#403,#404); 56#406=PRODUCT_DEFINITION_SHAPE('','',#405); 57#407=SHAPE_REPRESENTATION('',(#300),#14); 58#408=SHAPE_DEFINITION_REPRESENTATION(#406,#407); 59ENDSEC; 60END-ISO-10303-21;