step-examples/12-3a-shells/Tsh160.stp
Sources
- synthesized — no external source cited
Description
ShapeAnalysis_Shell.CheckOrientedShells inverted-trace
Reproducer recipe
Expected kernel behavior
All six faces of this unit cube carry same_sense=.F., and every one of the 12 edges is still shared correctly between exactly two faces with opposite traversal — the shell is locally self-consistent everywhere, just globally inside-out. A shared-edge traversal-direction check (each interior edge used once forward, once reversed, by its two faces) finds no inconsistency here, since that test is relative and this shell is uniformly, consistently wrong. Confirm absolute orientation using a signed-volume or centroid-relative-normal test in addition to the relative shared-edge check, and flip every face when the computed enclosed volume comes out negative.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(26) ifc=schema_n/a
Tier-3 assertions
n_faces_total == 6
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Tsh160: SIX ADVANCED_FACEs forming unit cube in CLOSED_SHELL, all same_sense=.F. â IS the inverted-trace mechanism; Bottom face (z=0) IS wired with same_sense=.F. â normal points inward (+z); Top face (z=1) IS wired with same_sense=.F. â normal points inward (-z); Front face (y=0) IS wired with same_sense=.F. â normal points inward (+y); Back face (y=1) IS wired with same_sense=.F. â normal points inward (-y); Left face (x=0) IS wired with same_sense=.F. â normal points inward (+x); Right face (x=1) IS wired with same_sense=.F. â normal points inward (-x); shared edges between all 6 faces ARE consistently oriented â no free edges; global inversion IS wired as same_sense=False on every face â IS the mechanism; CheckOrientedShells traces orientation and finds locally consistent cycle; absolute inside-out inversion is NOT detected by relative consistency check; fix: compute outward normal direction from solid centroid; detect globally inverted shells; emit E_CHECK_ORIENTED_GLOBALLY_INVERTED when all face normals point inward */ 3HEADER; 4FILE_DESCRIPTION(('Tsh160'),'2;1'); 5FILE_NAME('Tsh160.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 11#2=CARTESIAN_POINT('',(1.0,0.0,0.0)); 12#3=CARTESIAN_POINT('',(1.0,1.0,0.0)); 13#4=CARTESIAN_POINT('',(0.0,1.0,0.0)); 14#5=CARTESIAN_POINT('',(0.0,0.0,1.0)); 15#6=CARTESIAN_POINT('',(1.0,0.0,1.0)); 16#7=CARTESIAN_POINT('',(1.0,1.0,1.0)); 17#8=CARTESIAN_POINT('',(0.0,1.0,1.0)); 18#9=VERTEX_POINT('',#1); 19#10=VERTEX_POINT('',#2); 20#11=VERTEX_POINT('',#3); 21#12=VERTEX_POINT('',#4); 22#13=VERTEX_POINT('',#5); 23#14=VERTEX_POINT('',#6); 24#15=VERTEX_POINT('',#7); 25#16=VERTEX_POINT('',#8); 26#17=DIRECTION('',(1.0,0.0,0.0)); 27#18=VECTOR('',#17,1.0); 28#19=LINE('',#1,#18); 29#20=EDGE_CURVE('',#9,#10,#19,.T.); 30#21=DIRECTION('',(0.0,1.0,0.0)); 31#22=VECTOR('',#21,1.0); 32#23=LINE('',#2,#22); 33#24=EDGE_CURVE('',#10,#11,#23,.T.); 34#25=DIRECTION('',(1.0,0.0,0.0)); 35#26=VECTOR('',#25,1.0); 36#27=LINE('',#4,#26); 37#28=EDGE_CURVE('',#12,#11,#27,.T.); 38#29=DIRECTION('',(0.0,1.0,0.0)); 39#30=VECTOR('',#29,1.0); 40#31=LINE('',#1,#30); 41#32=EDGE_CURVE('',#9,#12,#31,.T.); 42#33=DIRECTION('',(1.0,0.0,0.0)); 43#34=VECTOR('',#33,1.0); 44#35=LINE('',#5,#34); 45#36=EDGE_CURVE('',#13,#14,#35,.T.); 46#37=DIRECTION('',(0.0,1.0,0.0)); 47#38=VECTOR('',#37,1.0); 48#39=LINE('',#6,#38); 49#40=EDGE_CURVE('',#14,#15,#39,.T.); 50#41=DIRECTION('',(1.0,0.0,0.0)); 51#42=VECTOR('',#41,1.0); 52#43=LINE('',#8,#42); 53#44=EDGE_CURVE('',#16,#15,#43,.T.); 54#45=DIRECTION('',(0.0,1.0,0.0)); 55#46=VECTOR('',#45,1.0); 56#47=LINE('',#5,#46); 57#48=EDGE_CURVE('',#13,#16,#47,.T.); 58#49=DIRECTION('',(0.0,0.0,1.0)); 59#50=VECTOR('',#49,1.0); 60#51=LINE('',#1,#50); 61#52=EDGE_CURVE('',#9,#13,#51,.T.); 62#53=DIRECTION('',(0.0,0.0,1.0)); 63#54=VECTOR('',#53,1.0); 64#55=LINE('',#2,#54); 65#56=EDGE_CURVE('',#10,#14,#55,.T.); 66#57=DIRECTION('',(0.0,0.0,1.0)); 67#58=VECTOR('',#57,1.0); 68#59=LINE('',#3,#58); 69#60=EDGE_CURVE('',#11,#15,#59,.T.); 70#61=DIRECTION('',(0.0,0.0,1.0)); 71#62=VECTOR('',#61,1.0); 72#63=LINE('',#4,#62); 73#64=EDGE_CURVE('',#12,#16,#63,.T.); 74#65=DIRECTION('',(0.0,0.0,1.0)); 75#66=DIRECTION('',(1.0,0.0,0.0)); 76#67=AXIS2_PLACEMENT_3D('',#1,#65,#66); 77#68=PLANE('',#67); 78#69=ORIENTED_EDGE('',$,$,#20,.T.); 79#70=ORIENTED_EDGE('',$,$,#24,.T.); 80#71=ORIENTED_EDGE('',$,$,#28,.F.); 81#72=ORIENTED_EDGE('',$,$,#32,.F.); 82#73=EDGE_LOOP('',(#69,#70,#71,#72)); 83#74=FACE_OUTER_BOUND('',#73,.T.); 84#75=ADVANCED_FACE('',(#74),#68,.F.); 85#76=DIRECTION('',(0.0,0.0,-1.0)); 86#77=DIRECTION('',(1.0,0.0,0.0)); 87#78=AXIS2_PLACEMENT_3D('',#5,#76,#77); 88#79=PLANE('',#78); 89#80=ORIENTED_EDGE('',$,$,#36,.T.); 90#81=ORIENTED_EDGE('',$,$,#40,.T.); 91#82=ORIENTED_EDGE('',$,$,#44,.F.); 92#83=ORIENTED_EDGE('',$,$,#48,.F.); 93#84=EDGE_LOOP('',(#80,#81,#82,#83)); 94#85=FACE_OUTER_BOUND('',#84,.T.); 95#86=ADVANCED_FACE('',(#85),#79,.F.); 96#87=DIRECTION('',(0.0,-1.0,0.0)); 97#88=DIRECTION('',(1.0,0.0,0.0)); 98#89=AXIS2_PLACEMENT_3D('',#1,#87,#88); 99#90=PLANE('',#89); 100#91=ORIENTED_EDGE('',$,$,#20,.T.); 101#92=ORIENTED_EDGE('',$,$,#56,.T.); 102#93=ORIENTED_EDGE('',$,$,#36,.F.); 103#94=ORIENTED_EDGE('',$,$,#52,.F.); 104#95=EDGE_LOOP('',(#91,#92,#93,#94)); 105#96=FACE_OUTER_BOUND('',#95,.T.); 106#97=ADVANCED_FACE('',(#96),#90,.F.); 107#98=DIRECTION('',(0.0,1.0,0.0)); 108#99=DIRECTION('',(1.0,0.0,0.0)); 109#100=AXIS2_PLACEMENT_3D('',#4,#98,#99); 110#101=PLANE('',#100); 111#102=ORIENTED_EDGE('',$,$,#28,.T.); 112#103=ORIENTED_EDGE('',$,$,#60,.T.); 113#104=ORIENTED_EDGE('',$,$,#44,.F.); 114#105=ORIENTED_EDGE('',$,$,#64,.F.); 115#106=EDGE_LOOP('',(#102,#103,#104,#105)); 116#107=FACE_OUTER_BOUND('',#106,.T.); 117#108=ADVANCED_FACE('',(#107),#101,.F.); 118#109=DIRECTION('',(-1.0,0.0,0.0)); 119#110=DIRECTION('',(0.0,1.0,0.0)); 120#111=AXIS2_PLACEMENT_3D('',#1,#109,#110); 121#112=PLANE('',#111); 122#113=ORIENTED_EDGE('',$,$,#32,.T.); 123#114=ORIENTED_EDGE('',$,$,#64,.T.); 124#115=ORIENTED_EDGE('',$,$,#48,.F.); 125#116=ORIENTED_EDGE('',$,$,#52,.F.); 126#117=EDGE_LOOP('',(#113,#114,#115,#116)); 127#118=FACE_OUTER_BOUND('',#117,.T.); 128#119=ADVANCED_FACE('',(#118),#112,.F.); 129#120=DIRECTION('',(1.0,0.0,0.0)); 130#121=DIRECTION('',(0.0,1.0,0.0)); 131#122=AXIS2_PLACEMENT_3D('',#2,#120,#121); 132#123=PLANE('',#122); 133#124=ORIENTED_EDGE('',$,$,#24,.T.); 134#125=ORIENTED_EDGE('',$,$,#60,.T.); 135#126=ORIENTED_EDGE('',$,$,#40,.F.); 136#127=ORIENTED_EDGE('',$,$,#56,.F.); 137#128=EDGE_LOOP('',(#124,#125,#126,#127)); 138#129=FACE_OUTER_BOUND('',#128,.T.); 139#130=ADVANCED_FACE('',(#129),#123,.F.); 140#131=CLOSED_SHELL('',(#75,#86,#97,#108,#119,#130)); 141#132=SHELL_BASED_SURFACE_MODEL('',(#131)); 142#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 143#9051=PRODUCT('Tsh160','Tsh160','',(#9050)); 144#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 145#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 146#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 147#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 148#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 149#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 150#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 151#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 152#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 153#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#132),#9060); 154#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 155ENDSEC; 156END-ISO-10303-21;