step-examples/12-8-mixed/M149.stp
Sources
- 16-iso-spec ISO 10303-210 §6 (terminal physical_location ordering)
- bug-reporter language: "AP210 pin order swapped", "PCB pin numbering CCW", "ECAD pin sequence wrong".
Sender
deduced — ECAD exporter that wrote terminal records from a schematic-side index that disagrees with the physical placement order
Description
A 4-pin SOT-23 package declares pins 1, 2, 3, 4 around the package perimeter, but the geometric order of `TERMINAL` placements walks counterclockwise (1, 4, 3, 2) instead of the package datasheet's clockwise order. Soldering follows the geometric placement; the netlist's pin assignment is rotated 180 deg.
Reproducer recipe
four `TERMINAL` entries with names 'pin1' . 'pin4' placed at coordinates that walk CCW instead of CW.
Expected kernel behavior
validate terminal indexing against package datasheet conventions; reject or warn on inconsistent ordering.
Notes
Synonyms: "PCB pin order CCW vs CW", "AP210 pin sequence inverted", "pin numbering CW vs CCW", "package pin geometric order wrong". Synonyms: "PCB pin order CCW vs CW", "AP210 pin sequence inverted".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(4) ifc=schema_n/a
Byte assertions
contains(b'ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN')count_entity_def(b'TERMINAL') >= 4
Tier-3 assertions
shape_null == Falsen_vertices_total == 4
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M149: AP210 component pin numbering doesn't match physical pin sequence */ 3/* DEFECT: SOT-23 TERMINAL placements walk CCW (1,4,3,2) not CW (1,2,3,4) */ 4/* Soldering follows geometric order; netlist pin assignments are rotated 180 deg */ 5/* Per ISO 10303-210 §6 terminal ordering must match package datasheet pin sequence */ 6/* Byte assertion: contains(b'ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN') */ 7/* Byte assertion: count_entity_def(b'TERMINAL') >= 4 */ 8HEADER; 9FILE_DESCRIPTION(('M149: AP210 SOT-23 pin order CCW vs CW'),'2;1'); 10FILE_NAME('M149.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/* Standard unit context (mm) */ 19#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 20#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 21#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 22#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 23 'distance_accuracy_value','maximum model space distance between geometric entities'); 24#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) 25 GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 26 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) 27 REPRESENTATION_CONTEXT('pcb','3D')); 28/* SOT-23 package product */ 29#50=PRODUCT('SOT23','SOT23','4-pin SOT-23 package',(#1)); 30/* Byte assertion: count_entity_def(b'TERMINAL') >= 4 */ 31/* Pin 1: bottom-left corner â correct starting point */ 32#100=CARTESIAN_POINT('pin1_loc',(0.0,0.0,0.0)); 33#101=TERMINAL('pin1',#100); 34/* DEFECT: CCW step 2 is pin4 at bottom-right â CW expects pin2 here */ 35#102=CARTESIAN_POINT('pin4_loc',(0.95,0.0,0.0)); 36#103=TERMINAL('pin4',#102); 37/* DEFECT: CCW step 3 is pin3 at top-right â CW expects pin3 here (coincidence) */ 38#104=CARTESIAN_POINT('pin3_loc',(0.95,2.9,0.0)); 39#105=TERMINAL('pin3',#104); 40/* DEFECT: CCW step 4 is pin2 at top-left â CW expects pin4 here */ 41#106=CARTESIAN_POINT('pin2_loc',(0.0,2.9,0.0)); 42#107=TERMINAL('pin2',#106); 43/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 44#200=GEOMETRIC_CURVE_SET('ap210-pin-numbering-ccw-vs-cw-sot23-package', 45 (#100,#101,#102,#103,#104,#105,#106,#107)); 46/* Product chain */ 47#400=APPLICATION_CONTEXT('mechanical design'); 48#401=PRODUCT_CONTEXT('',#400,'mechanical'); 49#402=PRODUCT('M149','M149','M149',(#401)); 50#403=PRODUCT_DEFINITION_FORMATION('','',#402); 51#404=PRODUCT_DEFINITION_CONTEXT(#400,'design'); 52#405=PRODUCT_DEFINITION('','',#403,#404); 53#406=PRODUCT_DEFINITION_SHAPE('','',#405); 54#407=SHAPE_REPRESENTATION('',(#200),#14); 55#408=SHAPE_DEFINITION_REPRESENTATION(#406,#407); 56ENDSEC; 57END-ISO-10303-21;