Twi191 — ShapeFix_Wire.FixIntersectingEdges parameter-monotonicity

§12.3b

topology

Sources

Description

ShapeFix_Wire.FixIntersectingEdges parameter-monotonicity

Reproducer recipe

Expected kernel behavior

Verify each edge's pcurve actually spans its own edge's 3D extent, not whether five unrelated local parameter ranges happen to sort monotonically: edge 0's 3D LINE has length 2.0 (from (0,0,0) to (2,0,0)) but its pcurve LINE has length only 0.2 — a 10x scale mismatch — and the same under-scaled pattern repeats for edges 1-4 (3D lengths ~2.24-2.83, pcurve lengths only 0.3 each). Since these are five independent PLANE-local pcurve LINEs, not points on one shared periodic axis, comparing their arbitrary u-ranges to each other carries no topological meaning; a kernel must instead check that each edge's own pcurve, evaluated over its own range, reaches 3D positions matching that edge's real geometry, and rebuild any pcurve whose scale doesn't match.

Expected validation

occt=empty/empty gmsh=empty 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/* Twi191: GEOMETRIC_CURVE_SET containing EDGE_LOOP with 5 edges on PLANE; PLANE: normal +Z, origin (0,0,0); 5 short line edges forming a closed pentagon with non-monotonic 2D params; param_e0: A(0,0)->B(2,0) pcurve u=0.0..0.2; param_e1: B(2,0)->C(3,2) pcurve u=0.5..0.8; param_e2: C(3,2)->D(1,3) pcurve u=0.1..0.4; param_e3: D(1,3)->E(-1,2) pcurve u=0.7..1.0; param_e4: E(-1,2)->A(0,0) pcurve u=0.3..0.6; non-monotonic parameter sequence [0.0,0.5,0.1,0.7,0.3] IS mechanism; FixIntersectingEdges IS mechanism — sorts by u-start, reorders to [param_e0,param_e2,param_e4,param_e1,param_e3], breaking wire topology; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty; all EDGE_CURVEs ARE wired into EDGE_LOOP; never orphaned */
3HEADER;
4FILE_DESCRIPTION(('Twi191'),'2;1');
5FILE_NAME('Twi191.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('',(2.0,0.0,0.0));
18#9=VERTEX_POINT('',#8);
19#10=CARTESIAN_POINT('',(3.0,2.0,0.0));
20#11=VERTEX_POINT('',#10);
21#12=CARTESIAN_POINT('',(1.0,3.0,0.0));
22#13=VERTEX_POINT('',#12);
23#14=CARTESIAN_POINT('',(-1.0,2.0,0.0));
24#15=VERTEX_POINT('',#14);
25#16=CARTESIAN_POINT('',(0.0,0.0,0.0));
26#17=DIRECTION('',(1.0,0.0,0.0));
27#18=VECTOR('',#17,2.0);
28#19=LINE('',#16,#18);
29#20=CARTESIAN_POINT('',(0.0,0.0));
30#21=DIRECTION('',(1.0,0.0));
31#22=VECTOR('',#21,0.2);
32#23=LINE('',#20,#22);
33#24=DEFINITIONAL_REPRESENTATION('',(#23),#*);
34#25=PCURVE('',#5,#24);
35#26=SURFACE_CURVE('',#19,(#25),.PCURVE_S1.);
36#27=EDGE_CURVE('param_e0',#7,#9,#26,.T.);
37#28=ORIENTED_EDGE('',*,*,#27,.T.);
38#29=CARTESIAN_POINT('',(2.0,0.0,0.0));
39#30=DIRECTION('',(0.4472135955,0.894427191,0.0));
40#31=VECTOR('',#30,2.2360679775);
41#32=LINE('',#29,#31);
42#33=CARTESIAN_POINT('',(0.5,0.0));
43#34=DIRECTION('',(1.0,0.0));
44#35=VECTOR('',#34,0.3);
45#36=LINE('',#33,#35);
46#37=DEFINITIONAL_REPRESENTATION('',(#36),#*);
47#38=PCURVE('',#5,#37);
48#39=SURFACE_CURVE('',#32,(#38),.PCURVE_S1.);
49#40=EDGE_CURVE('param_e1',#9,#11,#39,.T.);
50#41=ORIENTED_EDGE('',*,*,#40,.T.);
51#42=CARTESIAN_POINT('',(3.0,2.0,0.0));
52#43=DIRECTION('',(-0.894427191,0.4472135955,0.0));
53#44=VECTOR('',#43,2.2360679775);
54#45=LINE('',#42,#44);
55#46=CARTESIAN_POINT('',(0.1,0.0));
56#47=DIRECTION('',(1.0,0.0));
57#48=VECTOR('',#47,0.3);
58#49=LINE('',#46,#48);
59#50=DEFINITIONAL_REPRESENTATION('',(#49),#*);
60#51=PCURVE('',#5,#50);
61#52=SURFACE_CURVE('',#45,(#51),.PCURVE_S1.);
62#53=EDGE_CURVE('param_e2',#11,#13,#52,.T.);
63#54=ORIENTED_EDGE('',*,*,#53,.T.);
64#55=CARTESIAN_POINT('',(1.0,3.0,0.0));
65#56=DIRECTION('',(-0.894427191,-0.4472135955,0.0));
66#57=VECTOR('',#56,2.2360679775);
67#58=LINE('',#55,#57);
68#59=CARTESIAN_POINT('',(0.7,0.0));
69#60=DIRECTION('',(1.0,0.0));
70#61=VECTOR('',#60,0.3);
71#62=LINE('',#59,#61);
72#63=DEFINITIONAL_REPRESENTATION('',(#62),#*);
73#64=PCURVE('',#5,#63);
74#65=SURFACE_CURVE('',#58,(#64),.PCURVE_S1.);
75#66=EDGE_CURVE('param_e3',#13,#15,#65,.T.);
76#67=ORIENTED_EDGE('',*,*,#66,.T.);
77#68=CARTESIAN_POINT('',(-1.0,2.0,0.0));
78#69=DIRECTION('',(0.4472135955,-0.894427191,0.0));
79#70=VECTOR('',#69,2.2360679775);
80#71=LINE('',#68,#70);
81#72=CARTESIAN_POINT('',(0.3,0.0));
82#73=DIRECTION('',(1.0,0.0));
83#74=VECTOR('',#73,0.3);
84#75=LINE('',#72,#74);
85#76=DEFINITIONAL_REPRESENTATION('',(#75),#*);
86#77=PCURVE('',#5,#76);
87#78=SURFACE_CURVE('',#71,(#77),.PCURVE_S1.);
88#79=EDGE_CURVE('param_e4',#15,#7,#78,.T.);
89#80=ORIENTED_EDGE('',*,*,#79,.T.);
90#81=EDGE_LOOP('',(#28,#41,#54,#67,#80));
91#82=GEOMETRIC_CURVE_SET('',(#81));
92#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
93#9051=PRODUCT('Twi191','Twi191','',(#9050));
94#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
95#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
96#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
97#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
98#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
99#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
100#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
101#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
102#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
103#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#82),#9060);
104#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
105ENDSEC;
106END-ISO-10303-21;