Twi166 — ShapeFix_Wire.FixSelfIntersectingEdge near-grazing

§12.3b

topology

Sources

Description

ShapeFix_Wire.FixSelfIntersectingEdge near-grazing

Reproducer recipe

Expected kernel behavior

The wire is one large closed contour: a degree-3 B-spline that swings out to (10,4) and returns, plus a 1.0E-4 straight edge closing (0.0001,0,0) back to (0,0,0). Sampling the spline shows no self-crossing — its two endpoints merely come within 1.0E-4 of each other, a thousand times the declared 1.0E-7 accuracy, and that span is already bridged by a real edge — so no split may be made there. Reject any self-intersection split whose resulting sub-edge would be shorter than model tolerance, and snap a split point falling within tolerance of an existing vertex onto that vertex instead.

Expected validation

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

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Twi166: Single ADVANCED_FACE on PLANE in CLOSED_SHELL; outer EDGE_LOOP has 2 edges: E0 degree-3 B-spline from P0=(0,0,0) to P_near=(0.0001,0,0) looping out through (8,6,0) and back — endpoints separated by 0.0001, near-coincident but above Confusion; E1 LINE from P_near=(0.0001,0,0) back to P0=(0,0,0) closes the wire; B-spline near-grazing self-intersection IS the defect; FixSelfIntersectingEdge tries to split at near-degenerate point within Confusion creating topologically invalid sub-edges IS mechanism; EDGE_LOOP IS wired into FACE_OUTER_BOUND -> ADVANCED_FACE in CLOSED_SHELL — never orphaned */
3HEADER;
4FILE_DESCRIPTION(('Twi166'),'2;1');
5FILE_NAME('Twi166.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=VERTEX_POINT('',#6);
17#8=CARTESIAN_POINT('',(0.0001,0.0,0.0));
18#9=VERTEX_POINT('',#8);
19#10=CARTESIAN_POINT('',(0.0,0.0,0.0));
20#11=CARTESIAN_POINT('',(4.0,8.0,0.0));
21#12=CARTESIAN_POINT('',(10.0,4.0,0.0));
22#13=CARTESIAN_POINT('',(6.0,-3.0,0.0));
23#14=CARTESIAN_POINT('',(1.0,0.2,0.0));
24#15=CARTESIAN_POINT('',(0.0001,0.0,0.0));
25#16=B_SPLINE_CURVE_WITH_KNOTS('',3,(#10,#11,#12,#13,#14,#15),.UNSPECIFIED.,.F.,.F.,(4,1,1,4),(0.0,0.25,0.75,1.0),.UNSPECIFIED.);
26#17=EDGE_CURVE('',#7,#9,#16,.T.);
27#18=ORIENTED_EDGE('',$,$,#17,.T.);
28#19=CARTESIAN_POINT('',(0.0001,0.0,0.0));
29#20=DIRECTION('',(-1.0,0.0,0.0));
30#21=VECTOR('',#20,0.0001);
31#22=LINE('',#19,#21);
32#23=EDGE_CURVE('',#9,#7,#22,.T.);
33#24=ORIENTED_EDGE('',$,$,#23,.T.);
34#25=EDGE_LOOP('',(#18,#24));
35#26=FACE_OUTER_BOUND('',#25,.T.);
36#27=ADVANCED_FACE('',(#26),#5,.T.);
37#28=CLOSED_SHELL('',(#27));
38#29=SHELL_BASED_SURFACE_MODEL('',(#28));
39#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
40#9051=PRODUCT('Twi166','Twi166','',(#9050));
41#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
42#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
43#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
44#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
45#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
46#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
47#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
48#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
49#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
50#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#29),#9060);
51#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
52ENDSEC;
53END-ISO-10303-21;