Twi045 — Small-area wire removal on a reversed or located face mis-orients output wires

§12.3b wire-loop

P1 — silent data loss

topology

Sources

Description

When a hole-wire-removal pass runs on a face that has been reversed (its normal points the other way), the rebuilt face emerges with mis-oriented wires; the algorithm rebuilt the face from scratch and lost the original wire-orientation context. A related case: when the face carries a non-identity placement transform, the helper face used to project pcurves is built without preserving the placement and pcurves are dropped.

Reproducer recipe

Reversed face containing a small hole wire (enclosed area 5e-7 mm² vs a 100 mm² face); or the located-face variant. "Small" here is by AREA relative to the face — the wire's ~1.4e-3 mm vertex spacing is well above the file's 1e-7 mm tolerance, so it is not sub-tolerance linearly.

Expected kernel behavior

Heal and accept: a same-shape healing / repair pass preserves face orientation and placement context across the rebuild; wires emerge with the same orientation relative to the face, and pcurves survive.

Notes

**See also**: Twi044. Synonyms: "small wire removal flips orientation on reversed face", "hole removal on located face drops pcurves", "rebuilt face has wrong wire direction after healing", "FixSmallAreaWire mis-orients on reversed face", "small-hole removal loses placement transform".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(15) ifc=schema_n/a

Closure intent

ambiguous — the open shell is an incidental scaffold for a non-closure-related test.

Byte assertions

Cross-references

Twi044

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Twi045: ADVANCED_FACE on a PLANE (10x10 outer square) with same_sense=.F. (reversed face); inner FACE_BOUND hole-wire is a triangle at (5,5,0)→(5.001,5,0)→(5,5.001,0) enclosing ~5e-7 mm²; FixSmallAreaWire rebuilds face from scratch without preserving orientation context — output wires mis-oriented relative to reversed face; OCC crashes (signal 11); compliant kernels must heal, never crash; the .F. same_sense flag IS the orientation-flip mechanism */
3HEADER;
4FILE_DESCRIPTION(('Twi045'),'2;1');
5FILE_NAME('Twi045.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('pad0',(0.0,0.0,0.0));
11#2=CARTESIAN_POINT('pad1',(0.0,0.0,1.0));
12#3=CARTESIAN_POINT('pad2',(0.0,0.0,2.0));
13#4=CARTESIAN_POINT('pad3',(0.0,0.0,3.0));
14#5=CARTESIAN_POINT('pad4',(0.0,0.0,4.0));
15#6=CARTESIAN_POINT('pad5',(0.0,0.0,5.0));
16#7=CARTESIAN_POINT('pad6',(0.0,0.0,6.0));
17#8=CARTESIAN_POINT('pad7',(0.0,0.0,7.0));
18#9=CARTESIAN_POINT('pad8',(0.0,0.0,8.0));
19#10=CARTESIAN_POINT('pad9',(0.0,0.0,9.0));
20#11=CARTESIAN_POINT('pad10',(0.0,0.0,10.0));
21#12=CARTESIAN_POINT('pad11',(0.0,0.0,11.0));
22#13=CARTESIAN_POINT('pad12',(0.0,0.0,12.0));
23#14=CARTESIAN_POINT('pad13',(0.0,0.0,13.0));
24#15=CARTESIAN_POINT('pad14',(0.0,0.0,14.0));
25#16=CARTESIAN_POINT('',(0.0,0.0,0.0));
26#17=DIRECTION('',(0.0,0.0,1.0));
27#18=DIRECTION('',(1.0,0.0,0.0));
28#19=AXIS2_PLACEMENT_3D('',#16,#17,#18);
29#20=PLANE('',#19);
30#21=CARTESIAN_POINT('',(0.0,0.0,0.0));
31#22=CARTESIAN_POINT('',(10.0,0.0,0.0));
32#23=CARTESIAN_POINT('',(10.0,10.0,0.0));
33#24=CARTESIAN_POINT('',(0.0,10.0,0.0));
34#25=VERTEX_POINT('',#21);
35#26=VERTEX_POINT('',#22);
36#27=VERTEX_POINT('',#23);
37#28=VERTEX_POINT('',#24);
38#29=DIRECTION('',(1,0,0.0));
39#30=VECTOR('',#29,10.0);
40#31=LINE('',#21,#30);
41#32=EDGE_CURVE('',#25,#26,#31,.T.);
42#33=DIRECTION('',(0,1,0.0));
43#34=VECTOR('',#33,10.0);
44#35=LINE('',#22,#34);
45#36=EDGE_CURVE('',#26,#27,#35,.T.);
46#37=DIRECTION('',(-1,0,0.0));
47#38=VECTOR('',#37,10.0);
48#39=LINE('',#23,#38);
49#40=EDGE_CURVE('',#27,#28,#39,.T.);
50#41=DIRECTION('',(0,-1,0.0));
51#42=VECTOR('',#41,10.0);
52#43=LINE('',#24,#42);
53#44=EDGE_CURVE('',#28,#25,#43,.T.);
54#45=ORIENTED_EDGE('',$,$,#32,.T.);
55#46=ORIENTED_EDGE('',$,$,#36,.T.);
56#47=ORIENTED_EDGE('',$,$,#40,.T.);
57#48=ORIENTED_EDGE('',$,$,#44,.T.);
58#49=EDGE_LOOP('',(#45,#46,#47,#48));
59#50=FACE_OUTER_BOUND('',#49,.T.);
60#51=CARTESIAN_POINT('',(5.0,5.0,0.0));
61#52=CARTESIAN_POINT('',(5.001,5.0,0.0));
62#53=CARTESIAN_POINT('',(5.0,5.001,0.0));
63#54=VERTEX_POINT('',#51);
64#55=VERTEX_POINT('',#52);
65#56=VERTEX_POINT('',#53);
66#57=DIRECTION('',(1,0,0.0));
67#58=VECTOR('',#57,0.001);
68#59=LINE('',#51,#58);
69#60=EDGE_CURVE('',#54,#55,#59,.T.);
70#61=DIRECTION('',(-0.707106781187,0.707106781187,0.0));
71#62=VECTOR('',#61,0.00141421356237);
72#63=LINE('',#52,#62);
73#64=EDGE_CURVE('',#55,#56,#63,.T.);
74#65=DIRECTION('',(0,-1,0.0));
75#66=VECTOR('',#65,0.001);
76#67=LINE('',#53,#66);
77#68=EDGE_CURVE('',#56,#54,#67,.T.);
78#69=ORIENTED_EDGE('',$,$,#60,.T.);
79#70=ORIENTED_EDGE('',$,$,#64,.T.);
80#71=ORIENTED_EDGE('',$,$,#68,.T.);
81#72=EDGE_LOOP('',(#69,#70,#71));
82#73=FACE_BOUND('',#72,.T.);
83#74=ADVANCED_FACE('',(#50,#73),#20,.F.);
84#75=OPEN_SHELL('',(#74));
85#76=SHELL_BASED_SURFACE_MODEL('',(#75));
86#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
87#9051=PRODUCT('Twi045','Twi045','',(#9050));
88#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
89#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
90#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
91#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
92#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
93#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
94#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
95#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
96#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
97#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#76),#9060);
98#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
99ENDSEC;
100END-ISO-10303-21;