step-examples/12-3a-shells/Tsh055.stp
Sources
- OCCT MANTIS#0032140
- OCCT MANTIS#0027004 (OCCT MANTIS tracker 502 as of 2026-05-02)
Description
Two faces that should be merged have surface normals pointing in opposite directions (one face is reversed relative to its partner). Same-surface detection compares unsigned surface descriptors and decides to merge; but the merge produces an inverted-orientation face that breaks shell normals.
Reproducer recipe
Two coplanar quads on the same plane; one with outward normal `+Z`, the other reversed (`-Z`). Both faces share an edge along their common boundary. Unify expected to either skip (different orientations) or merge with a single normal.
Expected kernel behavior
Heal and accept: normalize the same-surface check to compare oriented surfaces (normal direction included); opposite-orientation faces are not merged unless the kernel deliberately re-orients first.
Notes
**See also**: Tfa016, Tsh001. Synonyms: "merge of opposite-normal faces returns inverted face", "merging same-plane faces with opposite normals breaks shell", "unifier ignores face direction", "merged face has wrong outward direction", "opposite-orientation faces merged silently".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(15) ifc=schema_n/a
Byte assertions
count_entity_def(b'ADVANCED_FACE') == 2
Tier-3 assertions
n_faces_total == 2
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/* Tsh055: OPEN_SHELL with 2 coplanar ADVANCED_FACEs on the same PLANE (z=0); Face A uses sense=.T. (normal +Z), Face B uses sense=.F. (normal -Z); both share one EDGE_CURVE at x=1 with opposite ORIENTED_EDGE orientations; opposite sense flag IS wired into each ADVANCED_FACE topology; unsigned same-surface check incorrectly merges opposite-normal faces; merge must compare oriented surfaces (direction included) */ 3HEADER; 4FILE_DESCRIPTION(('Tsh055'),'2;1'); 5FILE_NAME('Tsh055.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=DIRECTION('',(0.0,0.0,1.0)); 12#3=DIRECTION('',(1.0,0.0,0.0)); 13#4=AXIS2_PLACEMENT_3D('',#1,#2,#3); 14#5=PLANE('',#4); 15#6=CARTESIAN_POINT('',(0.0,0.0,0.0)); 16#7=CARTESIAN_POINT('',(1.0,0.0,0.0)); 17#8=CARTESIAN_POINT('',(1.0,1.0,0.0)); 18#9=CARTESIAN_POINT('',(0.0,1.0,0.0)); 19#10=CARTESIAN_POINT('',(2.0,0.0,0.0)); 20#11=CARTESIAN_POINT('',(2.0,1.0,0.0)); 21#12=VERTEX_POINT('',#6); 22#13=VERTEX_POINT('',#7); 23#14=VERTEX_POINT('',#8); 24#15=VERTEX_POINT('',#9); 25#16=VERTEX_POINT('',#10); 26#17=VERTEX_POINT('',#11); 27#18=DIRECTION('',(0.0,1.0,0.0)); 28#19=VECTOR('',#18,1.0); 29#20=LINE('',#7,#19); 30#21=EDGE_CURVE('',#13,#14,#20,.T.); 31#22=DIRECTION('',(1.0,0.0,0.0)); 32#23=VECTOR('',#22,1.0); 33#24=LINE('',#6,#23); 34#25=EDGE_CURVE('',#12,#13,#24,.T.); 35#26=DIRECTION('',(-1.0,0.0,0.0)); 36#27=VECTOR('',#26,1.0); 37#28=LINE('',#8,#27); 38#29=EDGE_CURVE('',#14,#15,#28,.T.); 39#30=DIRECTION('',(0.0,-1.0,0.0)); 40#31=VECTOR('',#30,1.0); 41#32=LINE('',#9,#31); 42#33=EDGE_CURVE('',#15,#12,#32,.T.); 43#34=ORIENTED_EDGE('',$,$,#25,.T.); 44#35=ORIENTED_EDGE('',$,$,#21,.T.); 45#36=ORIENTED_EDGE('',$,$,#29,.T.); 46#37=ORIENTED_EDGE('',$,$,#33,.T.); 47#38=EDGE_LOOP('',(#34,#35,#36,#37)); 48#39=FACE_OUTER_BOUND('',#38,.T.); 49#40=ADVANCED_FACE('',(#39),#5,.T.); 50#41=DIRECTION('',(1.0,0.0,0.0)); 51#42=VECTOR('',#41,1.0); 52#43=LINE('',#7,#42); 53#44=EDGE_CURVE('',#13,#16,#43,.T.); 54#45=DIRECTION('',(0.0,1.0,0.0)); 55#46=VECTOR('',#45,1.0); 56#47=LINE('',#10,#46); 57#48=EDGE_CURVE('',#16,#17,#47,.T.); 58#49=DIRECTION('',(-1.0,0.0,0.0)); 59#50=VECTOR('',#49,1.0); 60#51=LINE('',#11,#50); 61#52=EDGE_CURVE('',#17,#14,#51,.T.); 62#53=ORIENTED_EDGE('',$,$,#44,.T.); 63#54=ORIENTED_EDGE('',$,$,#48,.T.); 64#55=ORIENTED_EDGE('',$,$,#52,.T.); 65#56=ORIENTED_EDGE('',$,$,#21,.F.); 66#57=EDGE_LOOP('',(#53,#54,#55,#56)); 67#58=FACE_OUTER_BOUND('',#57,.T.); 68#59=ADVANCED_FACE('',(#58),#5,.F.); 69#60=OPEN_SHELL('',(#40,#59)); 70#61=SHELL_BASED_SURFACE_MODEL('',(#60)); 71#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 72#9051=PRODUCT('Tsh055','Tsh055','',(#9050)); 73#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 74#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 75#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 76#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 77#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 78#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 79#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 80#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 81#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 82#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#61),#9060); 83#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 84ENDSEC; 85END-ISO-10303-21;