step-examples/12-3a-shells/Tsh159.stp
Sources
- synthesized — no external source cited
Description
ShapeFix_Shell.FixFaceOrientation tetrahedron-flipped
Reproducer recipe
Expected kernel behavior
Live oracle measurement: OCCT crashes (SIGSEGV) reading this file, on both the heal-on and heal-off path. Of the tetrahedron's four faces, three (base, front, right) carry same_sense=.T. and the fourth (left, sharing edges with both base and right) carries .F., while all six edges are shared correctly (no free edges). A kernel must never crash on this input, and resolving orientation from only immediate pairwise adjacency is not sufficient: the propagation must continue until every face's orientation has been checked against all of its neighbours, not just the first one visited, or a single dissenting face like this one can be missed.
Expected validation
occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Tsh159 - ShapeFix_Shell.FixFaceOrientation tetrahedron-flipped 3 * Defect: A tetrahedron shell with one face mis-oriented. Orientation propagation 4 * around triangular faces needs all-pairs comparison but uses only adjacency, 5 * missing the flipped face when propagating consistency. */ 6HEADER; 7FILE_DESCRIPTION(('Tsh159 test case','Tetrahedron with flipped face'),'2;1'); 8FILE_NAME('Tsh159.stp','2026-06-15T00:00:00',(''),(''),'auto-generated','',''); 9FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 10ENDSEC; 11DATA; 12#1=APPLICATION_CONTEXT('automotive_design'); 13#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1); 14/* Tetrahedron vertices */ 15#100=CARTESIAN_POINT('v0',(0.0,0.0,0.0)); 16#101=CARTESIAN_POINT('v1',(1.0,0.0,0.0)); 17#102=CARTESIAN_POINT('v2',(0.5,0.866,0.0)); 18#103=CARTESIAN_POINT('v3',(0.5,0.289,0.816)); 19#110=VERTEX_POINT('',#100); 20#111=VERTEX_POINT('',#101); 21#112=VERTEX_POINT('',#102); 22#113=VERTEX_POINT('',#103); 23/* Tetrahedron edges */ 24#200=DIRECTION('',(1.0,0.0,0.0)); 25#201=VECTOR('',#200,1.0); 26#202=DIRECTION('',(0.0,0.866,0.0)); 27#203=VECTOR('',#202,1.0); 28#204=DIRECTION('',(0.0,0.289,0.816)); 29#205=VECTOR('',#204,1.0); 30#210=LINE('',#100,#201); #211=EDGE_CURVE('e01',#110,#111,#210,.T.); 31#212=LINE('',#100,#202); #213=EDGE_CURVE('e02',#110,#112,#212,.T.); 32#214=LINE('',#101,#202); #215=EDGE_CURVE('e12',#111,#112,#214,.T.); 33#216=LINE('',#100,#205); #217=EDGE_CURVE('e03',#110,#113,#216,.T.); 34#218=LINE('',#101,#204); #219=EDGE_CURVE('e13',#111,#113,#218,.T.); 35#220=LINE('',#102,#204); #221=EDGE_CURVE('e23',#112,#113,#220,.T.); 36/* Face 1: (0,1,2) - base, outward normal -z */ 37#300=ORIENTED_EDGE('',*,*,#211,.T.); 38#301=ORIENTED_EDGE('',*,*,#215,.T.); 39#302=ORIENTED_EDGE('',*,*,#213,.F.); 40#303=EDGE_LOOP('',(#300,#301,#302)); 41#304=FACE_OUTER_BOUND('',#303,.T.); 42#305=AXIS2_PLACEMENT_3D('',#100,#202,#200); 43#306=PLANE('base',#305); 44#310=ADVANCED_FACE('f_base',(#304),#306,.T.); 45/* Face 2: (0,1,3) - front face */ 46#320=ORIENTED_EDGE('',*,*,#211,.T.); 47#321=ORIENTED_EDGE('',*,*,#219,.T.); 48#322=ORIENTED_EDGE('',*,*,#217,.F.); 49#323=EDGE_LOOP('',(#320,#321,#322)); 50#324=FACE_OUTER_BOUND('',#323,.T.); 51#325=AXIS2_PLACEMENT_3D('',#100,#204,#200); 52#326=PLANE('front',#325); 53#330=ADVANCED_FACE('f_front',(#324),#326,.T.); 54/* Face 3: (1,2,3) - right face */ 55#340=ORIENTED_EDGE('',*,*,#215,.T.); 56#341=ORIENTED_EDGE('',*,*,#221,.T.); 57#342=ORIENTED_EDGE('',*,*,#219,.F.); 58#343=EDGE_LOOP('',(#340,#341,#342)); 59#344=FACE_OUTER_BOUND('',#343,.T.); 60#345=AXIS2_PLACEMENT_3D('',#101,#205,#202); 61#346=PLANE('right',#345); 62#350=ADVANCED_FACE('f_right',(#344),#346,.T.); 63/* Face 4: (0,2,3) - left face - FLIPPED for defect */ 64#360=ORIENTED_EDGE('',*,*,#213,.T.); 65#361=ORIENTED_EDGE('',*,*,#221,.F.); 66#362=ORIENTED_EDGE('',*,*,#217,.T.); 67#363=EDGE_LOOP('',(#360,#361,#362)); 68#364=FACE_OUTER_BOUND('',#363,.T.); 69#365=AXIS2_PLACEMENT_3D('',#100,#205,#202); 70#366=PLANE('left',#365); 71#370=ADVANCED_FACE('f_left',(#364),#366,.F.); 72#400=OPEN_SHELL('tetrahedron_flipped',(#310,#330,#350,#370)); 73#9000=PRODUCT_CONTEXT('',#1,'mechanical'); 74#9001=PRODUCT('Tsh159','Tsh159','',(#9000)); 75#9002=PRODUCT_DEFINITION_FORMATION('','',#9001); 76#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design'); 77#9004=PRODUCT_DEFINITION('','',#9002,#9003); 78#9005=PRODUCT_DEFINITION_SHAPE('','',#9004); 79#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 80#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 81#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 82#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value',''); 83#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D')); 84#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#400)); 85#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010); 86#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022); 87ENDSEC; 88END-ISO-10303-21;