step-examples/12-5-units/U050.stp
Sources
- synthesized — closes exchange coverage GAP `seq-xsalgo-unit-mismatch` (occt-coverage/exchange audit, 2026-07-01
- VERDICT_AUDIT.md overturn #10, 2026-07-01/02): a corpus-wide sweep found ZERO shell-bearing fixtures anywhere in the corpus that declare a non-millimetre length unit, so `XSAlgo_AlgoContainer::PrepareForTransfer` (installs the target length unit before each transfer) and `STEPControl_ActorRead::Transfer`'s unit-scaling of both translated geometry and repair tolerances were structurally unexercised. The five previously-cited fixtures (U001/U002/U003/Wr044/Wr045) are all faceless `GEOMETRIC_CURVE_SET` scaffolds with `occt=empty/empty` — none reach a live `TopoDS_Shape`.
Description
A minimal 2-face `OPEN_SHELL` (same sewing-pair skeleton as N152/N153: two coplanar unit squares sharing one `PLANE`, free boundaries facing each other) whose `GEOMETRIC_REPRESENTATION_CONTEXT` declares its length unit as `CONVERSION_BASED_UNIT('INCH', LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(25.4), <mm-basis SI_UNIT>))` — a genuine, schema-legal inch unit on the SAME context that wires the shape (unlike A038, whose `.INCH.` unit sits on an unused `CONSTRUCTIVE_GEOMETRY_REPRESENTATION` side-context while the shape itself stays in mm). Coordinates are authored in inch-scale: Face A is a 1×1 unit square (y∈[0,1]); Face B is a 1×1 unit square at y∈[1.001,2.001] on the same `PLANE`, leaving a raw 0.001 gap between the two faces' facing free-boundary edges.
Reproducer recipe
`(CONVERSION_BASED_UNIT('INCH',#lmwu)LENGTH_UNIT()NAMED_UNIT(*))` where `#lmwu=LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(25.4),#mm)`, wired into the `GLOBAL_UNIT_ASSIGNED_CONTEXT` of the `GEOMETRIC_REPRESENTATION_CONTEXT` that backs a real `MANIFOLD_SURFACE_SHAPE_REPRESENTATION`/`OPEN_SHELL`/`ADVANCED_FACE` chain (not a `GEOMETRIC_CURVE_SET`).
Expected kernel behavior
`STEPControl_Reader` must scale every transferred coordinate by the declared 25.4 factor (1-inch-scale input becomes a 25.4mm-scale shape) AND scale the reading precision by the same factor before healing/tolerance checks run, per `XSAlgo_AlgoContainer::PrepareForTransfer`.
Notes
Provenance_tier: bytes-sufficient. Live-verified 2026-07-12 (OCP 7.8.1 `STEPControl_Reader`, local oracle harness — not mirrored/guessed): `Bnd_Box` on the transferred shape spans x=[0, 25.4mm], y=[0, 50.8254mm] — the reader genuinely applies the 25.4× factor to every coordinate (raw 1.0 → 25.4mm, raw 2.001 → 50.8254mm), confirming the unit-scaling mechanism runs on this fixture. The interesting repair interaction: the raw 0.001 gap, if a receiver forgot to rescale-by-unit before comparing against `Precision::Confusion` (~1e-7 in target-unit "mm"), would read as a trivially sub-tolerance, auto-mergeable gap; correctly scaled it is a real 0.0254mm crack between the two free boundaries — exactly the class of tolerance-scaling defect `PrepareForTransfer`/`IGESToBRep_Reader::TransferRoots` (precision multiplied by the file's unit factor before `ProcessShape`) exist to get right. `validate2` (2026-07-12, live, not mirrored) reports `occt_heal_on`/`occt_heal_off` both `shape(1)` with `shape_counts` vertex=16 edge=8 wire=2 face=2 shell=2 solid=0 compound=1 — the identical topology signature to N152/N153's 2-face sewing pair, now genuinely unit-scaled. `tier3_geometric.geometric_report` (live): shape_null=False, n_faces_total=2, n_edges_total=8, n_vertices_total=16. Structural linter: historically reported `UNITS_INCONSISTENT` here as a known false positive (the mm-basis unit feeding the `INCH` conversion factor was counted as a second reachable length unit, same accepted-FP class as U006/A038); fixed 2026-08-09 — the linter now excludes a conversion-based unit's mandatory SI basis, so this fixture lints `ok` and correctly carries no `**Structural assertion**` line. Synonyms: "inch-declared STEP shell", "CONVERSION_BASED_UNIT on live geometry", "unit-scaled tolerance gap", "XSAlgo unit mismatch on shell-bearing fixture", "STEP inch unit real shape scaling".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(18) ifc=schema_n/a
Byte assertions
contains(b"CONVERSION_BASED_UNIT('INCH'")matches(rb'LENGTH_MEASURE\(25\.4\)')
Tier-3 assertions
shape_null == Falsen_faces_total == 2n_edges_total == 8n_vertices_total == 16
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* U050: unit-scaling mechanism â CONVERSION_BASED_UNIT('INCH',...) on a live 2-face shell */ 3/* seq-xsalgo-unit-mismatch: XSAlgo_AlgoContainer::PrepareForTransfer installs target length */ 4/* unit before transfer; the file declares INCH, geometry authored in inch-scale (~1.0 extent) */ 5/* so the mm-converted model is ~25.4mm; a 0.001-inch (0.0254mm) free-boundary gap between the */ 6/* two faces demonstrates the tolerance-scaling interaction: at raw face value the gap (0.001) */ 7/* reads as sub-Precision::Confusion if a reader forgot to rescale, but the true post-conversion */ 8/* gap (0.0254mm) is a genuine, healing-relevant crack once units are correctly applied. */ 9HEADER; 10FILE_DESCRIPTION(('U050: unit-scaling mechanism (INCH-declared 2-face shell)'),'2;1'); 11FILE_NAME('U050.stp','2026-07-12T00:00:00',(''),(''),'cad-research-suite','',''); 12FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 13ENDSEC; 14DATA; 15#9000=APPLICATION_CONTEXT('mechanical design'); 16#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 17#2=DIRECTION('',(0.0,0.0,1.0)); 18#3=DIRECTION('',(1.0,0.0,0.0)); 19#4=AXIS2_PLACEMENT_3D('',#1,#2,#3); 20#5=PLANE('',#4); 21#6=CARTESIAN_POINT('',(0.0,0.0,0.0)); 22#7=CARTESIAN_POINT('',(1.0,0.0,0.0)); 23#8=CARTESIAN_POINT('',(1.0,1.0,0.0)); 24#9=CARTESIAN_POINT('',(0.0,1.0,0.0)); 25#10=VERTEX_POINT('',#6); 26#11=VERTEX_POINT('',#7); 27#12=VERTEX_POINT('',#8); 28#13=VERTEX_POINT('',#9); 29#14=DIRECTION('',(1.0,0.0,0.0)); 30#15=VECTOR('',#14,1.0); 31#16=LINE('',#6,#15); 32#17=EDGE_CURVE('',#10,#11,#16,.T.); 33#18=DIRECTION('',(0.0,1.0,0.0)); 34#19=VECTOR('',#18,1.0); 35#20=LINE('',#7,#19); 36#21=EDGE_CURVE('',#11,#12,#20,.T.); 37#22=DIRECTION('',(-1.0,0.0,0.0)); 38#23=VECTOR('',#22,1.0); 39#24=LINE('',#8,#23); 40#25=EDGE_CURVE('',#12,#13,#24,.T.); 41#26=DIRECTION('',(0.0,-1.0,0.0)); 42#27=VECTOR('',#26,1.0); 43#28=LINE('',#9,#27); 44#29=EDGE_CURVE('',#13,#10,#28,.T.); 45#30=ORIENTED_EDGE('',$,$,#17,.T.); 46#31=ORIENTED_EDGE('',$,$,#21,.T.); 47#32=ORIENTED_EDGE('',$,$,#25,.T.); 48#33=ORIENTED_EDGE('',$,$,#29,.T.); 49#34=EDGE_LOOP('',(#30,#31,#32,#33)); 50#35=FACE_OUTER_BOUND('',#34,.T.); 51#36=ADVANCED_FACE('',(#35),#5,.T.); 52#37=CARTESIAN_POINT('',(0.0,1.001,0.0)); 53#38=CARTESIAN_POINT('',(1.0,1.001,0.0)); 54#39=CARTESIAN_POINT('',(1.0,2.001,0.0)); 55#40=CARTESIAN_POINT('',(0.0,2.001,0.0)); 56#41=VERTEX_POINT('',#37); 57#42=VERTEX_POINT('',#38); 58#43=VERTEX_POINT('',#39); 59#44=VERTEX_POINT('',#40); 60#45=DIRECTION('',(1.0,0.0,0.0)); 61#46=VECTOR('',#45,1.0); 62#47=LINE('',#37,#46); 63#48=EDGE_CURVE('',#41,#42,#47,.T.); 64#49=DIRECTION('',(0.0,1.0,0.0)); 65#50=VECTOR('',#49,1.0); 66#51=LINE('',#38,#50); 67#52=EDGE_CURVE('',#42,#43,#51,.T.); 68#53=DIRECTION('',(-1.0,0.0,0.0)); 69#54=VECTOR('',#53,1.0); 70#55=LINE('',#39,#54); 71#56=EDGE_CURVE('',#43,#44,#55,.T.); 72#57=DIRECTION('',(0.0,-1.0,0.0)); 73#58=VECTOR('',#57,1.0); 74#59=LINE('',#40,#58); 75#60=EDGE_CURVE('',#44,#41,#59,.T.); 76#61=ORIENTED_EDGE('',$,$,#48,.T.); 77#62=ORIENTED_EDGE('',$,$,#52,.T.); 78#63=ORIENTED_EDGE('',$,$,#56,.T.); 79#64=ORIENTED_EDGE('',$,$,#60,.T.); 80#65=EDGE_LOOP('',(#61,#62,#63,#64)); 81#66=FACE_OUTER_BOUND('',#65,.T.); 82#67=ADVANCED_FACE('',(#66),#5,.T.); 83#68=OPEN_SHELL('',(#36,#67)); 84#69=SHELL_BASED_SURFACE_MODEL('',(#68)); 85#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 86#9051=PRODUCT('U050','U050','',(#9050)); 87#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 88#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 89#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 90#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 91#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 92#9057=LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(25.4),#9056); 93#9058=(CONVERSION_BASED_UNIT('INCH',#9057)LENGTH_UNIT()NAMED_UNIT(*)); 94#9059=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 95#9060=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 96#9061=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9058,'distance_accuracy_value',''); 97#9062=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9061))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9058,#9059,#9060))REPRESENTATION_CONTEXT('','3D')); 98#9063=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#69),#9062); 99#9064=SHAPE_DEFINITION_REPRESENTATION(#9055,#9063); 100ENDSEC; 101END-ISO-10303-21;