M145 — AP210 fixed-side reference inverts top/bottom semantics

§12.8 mixed (sub-class: AP210 layer-side reference)

P1 — silent data loss

spec-violation

Sources

Sender

deduced — ECAD exporter that wrote `fixed_side` from a numeric layer index using inverted top/bottom conventions

Description

A board with stackup top -> top_signal -> .. -> bottom is exported with the `top_signal` ply annotated as `fixed_side = 'BOTTOM'`. Components placed by the assembly using `fixed_side` to disambiguate top/bottom land on the wrong PCB face. Bug-reporter language: "PCB top side mirrored", "AP210 fixed-side reference inverted".

Reproducer recipe

a `LAMINATE_OR_PLY_DEFINITION` named 'top_signal' with a `PROPERTY_DEFINITION('layer_side_reference','..',ply)` and `DESCRIPTIVE_REPRESENTATION_ITEM('fixed_side','BOTTOM')`.

Expected kernel behavior

validate `fixed_side` against the ply's position in the LAMINATE_TABLE; reject or warn.

Notes

Synonyms: "PCB top/bottom inverted", "AP210 side reference flipped", "fixed_side semantic wrong", "stackup top labeled BOTTOM". Synonyms: "PCB top/bottom inverted", "AP210 side reference flipped".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* M145: AP210 fixed-side reference inverts top/bottom semantics */
3/* DEFECT: 'top_signal' ply is 2nd from top in LAMINATE_TABLE */
4/* but DESCRIPTIVE_REPRESENTATION_ITEM annotates it fixed_side='BOTTOM' */
5/* Components using fixed_side to resolve placement land on the wrong PCB face */
6/* Per ISO 10303-210 §5 fixed_side must match ply position in stackup */
7/* Byte assertion: contains(b'ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN') */
8/* Byte assertion: contains(b'fixed_side') */
9/* Byte assertion: contains(b"'BOTTOM'") */
10HEADER;
11FILE_DESCRIPTION(('M145: AP210 fixed-side reference inverts top/bottom'),'2;1');
12FILE_NAME('M145.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','','');
13/* Byte assertion: contains(b'ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN') */
14FILE_SCHEMA(('ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN { 1 0 10303 210 3 1 0 }'));
15ENDSEC;
16DATA;
17#1=APPLICATION_CONTEXT('electronic_assembly_interconnect_and_packaging_design');
18#2=APPLICATION_PROTOCOL_DEFINITION('international standard',
19  'electronic_assembly_interconnect_and_packaging_design',2014,#1);
20/* Standard unit context (mm) */
21#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
22#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
23#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
24#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10,
25  'distance_accuracy_value','maximum model space distance between geometric entities');
26#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3)
27  GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
28  GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12))
29  REPRESENTATION_CONTEXT('pcb','3D'));
30/* Four-ply stackup (top to bottom) */
31#100=LAMINATE_OR_PLY_DEFINITION('top_copper',$,$,$,LENGTH_MEASURE(0.035));
32/* top_signal is the 2nd ply — physically near the top face of the board */
33#101=LAMINATE_OR_PLY_DEFINITION('top_signal',$,$,$,LENGTH_MEASURE(0.035));
34#102=LAMINATE_OR_PLY_DEFINITION('core',$,$,$,LENGTH_MEASURE(0.2));
35#103=LAMINATE_OR_PLY_DEFINITION('bot_copper',$,$,$,LENGTH_MEASURE(0.035));
36/* LAMINATE_TABLE: physical order is top_copper -> top_signal -> core -> bot_copper */
37#110=LAMINATE_TABLE('stackup',(#100,#101,#102,#103));
38/* PROPERTY_DEFINITION records the layer side reference for top_signal ply */
39#120=PROPERTY_DEFINITION('layer_side_reference','PCB side annotation',#101);
40/* Byte assertion: contains(b'fixed_side') */
41/* Byte assertion: contains(b"'BOTTOM'") */
42/* DEFECT: top_signal (2nd from top) labelled fixed_side='BOTTOM' — inverted */
43/* Correct value for the 2nd-from-top ply would be 'TOP' */
44#121=DESCRIPTIVE_REPRESENTATION_ITEM('fixed_side','BOTTOM');
45#130=REPRESENTATION('side_ref',(#121),#14);
46#122=PROPERTY_DEFINITION_REPRESENTATION(#120,#130);
47/* GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty */
48#300=GEOMETRIC_CURVE_SET('ap210-fixed-side-reference-inverts-top-bottom-semantics',
49  (#100,#101,#102,#103,#110,#120,#121,#130,#122));
50/* Product chain */
51#400=APPLICATION_CONTEXT('mechanical design');
52#401=PRODUCT_CONTEXT('',#400,'mechanical');
53#402=PRODUCT('M145','M145','M145',(#401));
54#403=PRODUCT_DEFINITION_FORMATION('','',#402);
55#404=PRODUCT_DEFINITION_CONTEXT(#400,'design');
56#405=PRODUCT_DEFINITION('','',#403,#404);
57#406=PRODUCT_DEFINITION_SHAPE('','',#405);
58#407=SHAPE_REPRESENTATION('',(#300),#14);
59#408=SHAPE_DEFINITION_REPRESENTATION(#406,#407);
60ENDSEC;
61END-ISO-10303-21;