step-examples/12-3a-shells/Tsh221.stp
Sources
- synthesized — no external source cited
Description
context_null_initialize
Reproducer recipe
Expected kernel behavior
Both faces (A at Z=0, B at Z=1, connected by shared vertical edges) carry same_sense=.F. and both need to be flipped to .T. to be consistently outward-facing. An orientation-fix operation invoked a second time on an already-corrected shell must start from the shell's current, already-fixed state and detect that both faces are now correctly oriented; it must not reapply a set of flip operations recorded during the first invocation and flip both faces back to .F..
Expected validation
occt=shape(1)/shape(1) gmsh=shape(18) ifc=schema_n/a
Tier-3 assertions
n_faces_total == 2
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Tsh221: OPEN_SHELL with TWO ADVANCED_FACEs both having same_sense=False IS the context_null_initialize trigger; face A IS a unit-square at Z=0 with same_sense=False â IS the first misoriented face; face B IS a unit-square at Z=1 with same_sense=False â IS the second misoriented face; both faces share vertical edges (A top/B bottom) â IS the connected topology; first Perform() call: FixFaceOrientation fixes face A to same_sense=True, face B to same_sense=True â IS correct fix; context accumulates reshape map from first Perform() â IS the stale-context state; second Perform() call reuses stale context without null-initialize â IS the context_null_initialize defect; stale reshape map re-applies to already-fixed faces: face A flips back to same_sense=False â IS the double-fix; face B also re-flipped â IS the double-fixing outcome; fix: Perform() must null-initialize (clear) context before each call; emit E_CONTEXT_NULL_INITIALIZE when stale reshape map detected on Perform() re-entry */ 3HEADER; 4FILE_DESCRIPTION(('Tsh221'),'2;1'); 5FILE_NAME('Tsh221.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=VERTEX_POINT('',#1); 12#3=CARTESIAN_POINT('',(1.0,0.0,0.0)); 13#4=VERTEX_POINT('',#3); 14#5=CARTESIAN_POINT('',(1.0,1.0,0.0)); 15#6=VERTEX_POINT('',#5); 16#7=CARTESIAN_POINT('',(0.0,1.0,0.0)); 17#8=VERTEX_POINT('',#7); 18#9=CARTESIAN_POINT('',(0.0,0.0,1.0)); 19#10=VERTEX_POINT('',#9); 20#11=CARTESIAN_POINT('',(1.0,0.0,1.0)); 21#12=VERTEX_POINT('',#11); 22#13=CARTESIAN_POINT('',(1.0,1.0,1.0)); 23#14=VERTEX_POINT('',#13); 24#15=CARTESIAN_POINT('',(0.0,1.0,1.0)); 25#16=VERTEX_POINT('',#15); 26#17=DIRECTION('',(1.0,0.0,0.0)); 27#18=VECTOR('',#17,1.0); 28#19=LINE('',#1,#18); 29#20=EDGE_CURVE('',#2,#4,#19,.T.); 30#21=DIRECTION('',(0.0,1.0,0.0)); 31#22=VECTOR('',#21,1.0); 32#23=LINE('',#3,#22); 33#24=EDGE_CURVE('',#4,#6,#23,.T.); 34#25=DIRECTION('',(-1.0,0.0,0.0)); 35#26=VECTOR('',#25,1.0); 36#27=LINE('',#5,#26); 37#28=EDGE_CURVE('',#6,#8,#27,.T.); 38#29=DIRECTION('',(0.0,-1.0,0.0)); 39#30=VECTOR('',#29,1.0); 40#31=LINE('',#7,#30); 41#32=EDGE_CURVE('',#8,#2,#31,.T.); 42#33=DIRECTION('',(1.0,0.0,0.0)); 43#34=VECTOR('',#33,1.0); 44#35=LINE('',#9,#34); 45#36=EDGE_CURVE('',#10,#12,#35,.T.); 46#37=DIRECTION('',(0.0,1.0,0.0)); 47#38=VECTOR('',#37,1.0); 48#39=LINE('',#11,#38); 49#40=EDGE_CURVE('',#12,#14,#39,.T.); 50#41=DIRECTION('',(-1.0,0.0,0.0)); 51#42=VECTOR('',#41,1.0); 52#43=LINE('',#13,#42); 53#44=EDGE_CURVE('',#14,#16,#43,.T.); 54#45=DIRECTION('',(0.0,-1.0,0.0)); 55#46=VECTOR('',#45,1.0); 56#47=LINE('',#15,#46); 57#48=EDGE_CURVE('',#16,#10,#47,.T.); 58#49=ORIENTED_EDGE('',$,$,#20,.T.); 59#50=ORIENTED_EDGE('',$,$,#24,.T.); 60#51=ORIENTED_EDGE('',$,$,#28,.T.); 61#52=ORIENTED_EDGE('',$,$,#32,.T.); 62#53=EDGE_LOOP('',(#49,#50,#51,#52)); 63#54=DIRECTION('',(0.0,0.0,-1.0)); 64#55=DIRECTION('',(1.0,0.0,0.0)); 65#56=AXIS2_PLACEMENT_3D('',#1,#54,#55); 66#57=PLANE('',#56); 67#58=FACE_OUTER_BOUND('',#53,.T.); 68#59=ADVANCED_FACE('',(#58),#57,.F.); 69#60=ORIENTED_EDGE('',$,$,#36,.T.); 70#61=ORIENTED_EDGE('',$,$,#40,.T.); 71#62=ORIENTED_EDGE('',$,$,#44,.T.); 72#63=ORIENTED_EDGE('',$,$,#48,.T.); 73#64=EDGE_LOOP('',(#60,#61,#62,#63)); 74#65=DIRECTION('',(0.0,0.0,-1.0)); 75#66=DIRECTION('',(1.0,0.0,0.0)); 76#67=AXIS2_PLACEMENT_3D('',#9,#65,#66); 77#68=PLANE('',#67); 78#69=FACE_OUTER_BOUND('',#64,.T.); 79#70=ADVANCED_FACE('',(#69),#68,.F.); 80#71=OPEN_SHELL('',(#59,#70)); 81#72=SHELL_BASED_SURFACE_MODEL('',(#71)); 82#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 83#9051=PRODUCT('Tsh221','Tsh221','',(#9050)); 84#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 85#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 86#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 87#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 88#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 89#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 90#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 91#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 92#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 93#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#72),#9060); 94#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 95ENDSEC; 96END-ISO-10303-21;