step-examples/12-3a-shells/Tsh123.stp
Sources
- synthesized — no external source cited
Description
ShapeAnalysis_Shell.BadEdges adjacent-face mismatch
Reproducer recipe
Expected kernel behavior
Live oracle measurement: OCCT crashes (SIGSEGV) reading this file, on both the heal-on and heal-off path. Face 1 and Face 2 both reference the same EDGE_CURVE (named 'shared_edge') with ORIENTED_EDGE sense .T. in both faces' loops — a manifold pair must traverse a shared edge in opposite directions, one .T. and one .F., so this is a genuine non-manifold encoding. A kernel must never crash on this input: detect that an edge is used with the same sense by both of its referencing faces and reject with a diagnostic naming the edge and both faces, rather than treating same-direction double use as an ordinary shared edge.
Notes
RUNTIME-VERIFIED 2026-08-09 — this file's recorded `signal(11)` is driven by an inline entity instance written directly inside another entity's argument list (a vector constructor carrying a bare coordinate list where a direction reference belongs). A conforming exchange file may only define entity instances as top-level numbered statements, so the reader cannot bind the inline construct, the attribute resolves to null, and the abort happens during loading — before any repair routine runs. Full census in `BACKLOG.md` (M.18).
Expected validation
occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a
Byte assertions
contains(b'ADVANCED_FACE')
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Tsh123 - ShapeAnalysis_Shell.BadEdges adjacent-face mismatch 3 * Defect: shell where two faces share an edge but their EDGE_LOOP traverses 4 * the edge in the same direction; classic non-manifold but valid AP203 syntax */ 5HEADER; 6FILE_DESCRIPTION(('Tsh123 - non-manifold edge with same-direction traversal','wave 25'),'2;1'); 7FILE_NAME('Tsh123.stp','2026-06-15T00:00:00',(''),(''),'heal coverage','',''); 8FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 9ENDSEC; 10DATA; 11#1=APPLICATION_CONTEXT('automotive_design'); 12#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1); 13 14/* Two faces sharing edge #51; both traverse it in same direction (.T. orientation) */ 15/* Face 1: (0,0,0)-(10,0,0)-(10,10,0)-(0,10,0) uses #51 as .T. */ 16/* Face 2: (0,0,0)-(10,0,0)-(10,0,10)-(0,0,10) also uses #51 as .T. */ 17/* This creates a non-manifold edge (both faces on same side) */ 18 19#10=CARTESIAN_POINT('',(0,0,0)); 20#11=CARTESIAN_POINT('',(10.0,0,0)); 21#12=CARTESIAN_POINT('',(10.0,10.0,0)); 22#13=CARTESIAN_POINT('',(0,10.0,0)); 23#14=CARTESIAN_POINT('',(10.0,0,10.0)); 24#15=CARTESIAN_POINT('',(0,0,10.0)); 25 26#20=VERTEX_POINT('',#10); 27#21=VERTEX_POINT('',#11); 28#22=VERTEX_POINT('',#12); 29#23=VERTEX_POINT('',#13); 30#24=VERTEX_POINT('',#14); 31#25=VERTEX_POINT('',#15); 32 33/* Planes */ 34#30=AXIS2_PLACEMENT_3D('z0_plane',#10,DIRECTION('',(0,0,-1)),DIRECTION('',(1,0,0))); 35#31=PLANE('',#30); 36#32=AXIS2_PLACEMENT_3D('y0_plane',#10,DIRECTION('',(0,-1,0)),DIRECTION('',(1,0,0))); 37#33=PLANE('',#32); 38 39/* Face 1 edges (bottom rectangle) */ 40#50=LINE('',#10,VECTOR('',(1,0,0),10.0)); 41#51=EDGE_CURVE('shared_edge',#20,#21,#50,.T.); 42#52=LINE('',#11,VECTOR('',(0,1,0),10.0)); 43#53=EDGE_CURVE('f1_e2',#21,#22,#52,.T.); 44#54=LINE('',#12,VECTOR('',(-1,0,0),10.0)); 45#55=EDGE_CURVE('f1_e3',#22,#23,#54,.T.); 46#56=LINE('',#13,VECTOR('',(0,-1,0),10.0)); 47#57=EDGE_CURVE('f1_e4',#23,#20,#56,.T.); 48 49/* Face 2 edges - shares #51 with Face 1 */ 50#58=LINE('',#11,VECTOR('',(0,0,1),10.0)); 51#59=EDGE_CURVE('f2_vert1',#21,#24,#58,.T.); 52#60=LINE('',#14,VECTOR('',(-1,0,0),10.0)); 53#61=EDGE_CURVE('f2_e2',#24,#25,#60,.T.); 54#62=LINE('',#15,VECTOR('',(0,0,-1),10.0)); 55#63=EDGE_CURVE('f2_e3',#25,#20,#62,.T.); 56 57/* Face 1 edge loop */ 58#80=ORIENTED_EDGE('',*,*,#51,.T.); 59#81=ORIENTED_EDGE('',*,*,#53,.T.); 60#82=ORIENTED_EDGE('',*,*,#55,.T.); 61#83=ORIENTED_EDGE('',*,*,#57,.T.); 62#84=EDGE_LOOP('f1_loop',(#80,#81,#82,#83)); 63 64/* Face 2 edge loop - PROBLEMATIC: uses #51 with same orientation as Face 1 */ 65/* For a valid manifold, Face 2 should use #51 with .F. orientation */ 66/* By using .T., both faces traverse the shared edge in the same direction */ 67#85=ORIENTED_EDGE('',*,*,#51,.T.); 68#86=ORIENTED_EDGE('',*,*,#59,.T.); 69#87=ORIENTED_EDGE('',*,*,#61,.T.); 70#88=ORIENTED_EDGE('',*,*,#63,.T.); 71#89=EDGE_LOOP('f2_loop',(#85,#86,#87,#88)); 72 73/* Face bounds */ 74#100=FACE_OUTER_BOUND('',#84,.T.); 75#101=FACE_OUTER_BOUND('',#89,.T.); 76 77/* Faces */ 78#110=ADVANCED_FACE('f1',(#100),#31,.T.); 79#111=ADVANCED_FACE('f2',(#101),#33,.T.); 80 81/* Non-manifold shell */ 82#130=OPEN_SHELL('non_manifold_shell',(#110,#111)); 83 84/* Mandatory PRODUCT chain */ 85#9000=PRODUCT_CONTEXT('',#1,'mechanical'); 86#9001=PRODUCT('Tsh123','Tsh123','',(#9000)); 87#9002=PRODUCT_DEFINITION_FORMATION('','',#9001); 88#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design'); 89#9004=PRODUCT_DEFINITION('','',#9002,#9003); 90#9005=PRODUCT_DEFINITION_SHAPE('','',#9004); 91#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 92#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 93#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 94#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value',''); 95#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D')); 96#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#130)); 97#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010); 98#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022); 99ENDSEC; 100END-ISO-10303-21;