step-examples/12-3c-faces/Tfa090.stp
Sources
- synthesized — no external source cited
Description
face-repair.Perform: mode-flag ordering
Reproducer recipe
Expected kernel behavior
Reject with a diagnostic naming the malformed bound: the FACE_INNER_BOUND's EDGE_LOOP has only 3 edges, and its last edge (ending at vertex v_h3) never returns to the loop's starting vertex (v_h0) -- an open, non-closed wire, not a valid bound. Verify that every bound wire closes (its last edge's end vertex coincides with its first edge's start vertex) before building the face; reject an unclosed bound with a diagnostic naming it rather than walking it as if it were closed, and never let an unclosed bound crash the process. The face's separately-encoded reversed outer-bound sense (.F.) is ordinary valid STEP and must still be honored once the malformed inner bound is handled.
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/* Tfa090 - ShapeFix_Face.Perform: mode-flag ordering 3 * Perform runs multiple sub-fixers. The mode flag order determines which 4 * fixes apply. The order can prevent FixNaturalBound from running before 5 * FixOrientation needs it. 6 */ 7HEADER; 8FILE_DESCRIPTION(('Tfa090 test case','Face with orientation-dependent natural-bound fix; mode-flag order prevents proper execution'),'2;1'); 9FILE_NAME('Tfa090.stp','2026-06-15T00:00:00',(''),(''),'cad-research-suite','',''); 10FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }')); 11ENDSEC; 12DATA; 13#1=APPLICATION_CONTEXT('automotive_design'); 14#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1); 15/* Plane at Z=0 */ 16#10=CARTESIAN_POINT('',(0.0,0.0,0.0)); 17#11=DIRECTION('',(0.0,0.0,1.0)); 18#12=DIRECTION('',(1.0,0.0,0.0)); 19#13=AXIS2_PLACEMENT_3D('',#10,#11,#12); 20#14=PLANE('base_plane',#13); 21/* Face that is incomplete/missing natural boundaries and has reversed orientation. 22 FixOrientation should run after FixNaturalBound, but mode-flag ordering 23 can prevent FixNaturalBound from running first. 24*/ 25#20=CARTESIAN_POINT('',(0.0,0.0,0.0)); 26#21=VERTEX_POINT('v0',#20); 27#22=CARTESIAN_POINT('',(5.0,0.0,0.0)); 28#23=VERTEX_POINT('v1',#22); 29#24=CARTESIAN_POINT('',(5.0,5.0,0.0)); 30#25=VERTEX_POINT('v2',#24); 31#26=CARTESIAN_POINT('',(0.0,5.0,0.0)); 32#27=VERTEX_POINT('v3',#26); 33/* Reversed outer boundary (counter-clockwise instead of clockwise) */ 34#30=DIRECTION('',(1.0,0.0,0.0)); 35#31=VECTOR('',#30,1.0); 36#32=LINE('',#20,#31); 37#33=EDGE_CURVE('e_outer_0',#21,#23,#32,.T.); 38#34=DIRECTION('',(0.0,1.0,0.0)); 39#35=VECTOR('',#34,1.0); 40#36=LINE('',#22,#35); 41#37=EDGE_CURVE('e_outer_1',#23,#25,#36,.T.); 42#38=DIRECTION('',(-1.0,0.0,0.0)); 43#39=VECTOR('',#38,1.0); 44#40=LINE('',#24,#39); 45#41=EDGE_CURVE('e_outer_2',#25,#27,#40,.T.); 46#42=DIRECTION('',(0.0,-1.0,0.0)); 47#43=VECTOR('',#42,1.0); 48#44=LINE('',#26,#43); 49#45=EDGE_CURVE('e_outer_3',#27,#21,#44,.T.); 50/* Reversed orientation - edges in CCW instead of CW */ 51#46=ORIENTED_EDGE('',*,*,#33,.F.); 52#47=ORIENTED_EDGE('',*,*,#37,.F.); 53#48=ORIENTED_EDGE('',*,*,#41,.F.); 54#49=ORIENTED_EDGE('',*,*,#45,.F.); 55#50=EDGE_LOOP('reversed_boundary_loop',(#46,#47,#48,#49)); 56#51=FACE_OUTER_BOUND('',#50,.F.); 57/* Inner hole with missing boundary edge */ 58#60=CARTESIAN_POINT('',(1.0,1.0,0.0)); 59#61=VERTEX_POINT('v_h0',#60); 60#62=CARTESIAN_POINT('',(2.0,1.0,0.0)); 61#63=VERTEX_POINT('v_h1',#62); 62#64=CARTESIAN_POINT('',(2.0,2.0,0.0)); 63#65=VERTEX_POINT('v_h2',#64); 64#66=CARTESIAN_POINT('',(1.0,2.0,0.0)); 65#67=VERTEX_POINT('v_h3',#66); 66/* Hole boundary - incomplete (missing one edge) */ 67#70=DIRECTION('',(1.0,0.0,0.0)); 68#71=VECTOR('',#70,1.0); 69#72=LINE('',#60,#71); 70#73=EDGE_CURVE('e_hole_0',#61,#63,#72,.T.); 71#74=DIRECTION('',(0.0,1.0,0.0)); 72#75=VECTOR('',#74,1.0); 73#76=LINE('',#62,#75); 74#77=EDGE_CURVE('e_hole_1',#63,#65,#76,.T.); 75#78=DIRECTION('',(-1.0,0.0,0.0)); 76#79=VECTOR('',#78,1.0); 77#80=LINE('',#64,#79); 78#81=EDGE_CURVE('e_hole_2',#65,#67,#80,.T.); 79/* Missing edge back to start - would be e_hole_3 */ 80#82=ORIENTED_EDGE('',*,*,#73,.T.); 81#83=ORIENTED_EDGE('',*,*,#77,.T.); 82#84=ORIENTED_EDGE('',*,*,#81,.T.); 83#90=EDGE_LOOP('incomplete_hole_loop',(#82,#83,#84)); 84#91=FACE_INNER_BOUND('',#90,.T.); 85/* Face with reversed outer bound and incomplete inner bound 86 FixOrientation must reverse the face, but if FixNaturalBound doesn't run 87 before it, the natural boundary correction for the incomplete hole won't apply. 88*/ 89#100=ADVANCED_FACE('reversed_incomplete_face',(#51,#91),#14,.F.); 90/* Minimal PRODUCT chain */ 91#9000=PRODUCT_CONTEXT('',#1,'mechanical'); 92#9001=PRODUCT('Tfa090','Tfa090','',(#9000)); 93#9002=PRODUCT_DEFINITION_FORMATION('','',#9001); 94#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design'); 95#9004=PRODUCT_DEFINITION('','',#9002,#9003); 96#9005=PRODUCT_DEFINITION_SHAPE('','',#9004); 97#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 98#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 99#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 100#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value',''); 101#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D')); 102#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#9100)); 103#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010); 104#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022); 105#9100=CLOSED_SHELL('shell_for_product',(#100)); 106ENDSEC; 107END-ISO-10303-21;