Twi180 — ShapeFix_Wire.FixGaps3d 4-edge-gap-chain

§12.3b

topology

Sources

Description

ShapeFix_Wire.FixGaps3d 4-edge-gap-chain

Reproducer recipe

Expected kernel behavior

Four consecutive junctions of this roughly 1x1 contour are each open by 1.0E-6 — ten times the declared 1.0E-7 accuracy — including the wrap-around from the last edge back to the first. Find all four in one pass and close each by moving both sides to a common point, rather than always moving the following edge, which accumulates the correction in one direction and walks the contour off its authored position. Re-measure the whole ring after the repair and require the total deviation from the original geometry to stay within tolerance; if it does not, report the wire instead of emitting a silently distorted boundary.

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/* Twi180: GEOMETRIC_CURVE_SET containing EDGE_LOOP with 4 edges on PLANE; PLANE: normal +Z, origin (0,0,0); 4-edge gap-chain square: each edge endpoint is offset by 1e-6 from the next edge's start, creating 4 tiny independent gaps; P0(0,0)->P1a(1,0) gap P1b(1.000001,0)->P2a(1,1) gap P2b(1,1.000001) ->P3a(0,1) gap P3b(-0.000001,1)->P0b(0.000001,0); gap_chain_edge_0..3 ARE all 4 edges IS the 4-gap-chain mechanism; FixGaps3d IS mechanism — bridges each gap independently, accumulating curvature deviations across the 4-bridge chain; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty; all EDGE_CURVEs ARE wired into EDGE_LOOP; never orphaned */
3HEADER;
4FILE_DESCRIPTION(('Twi180'),'2;1');
5FILE_NAME('Twi180.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('',(1.0,0.0,0.0));
18#9=VERTEX_POINT('',#8);
19#10=CARTESIAN_POINT('',(1.000001,0.0,0.0));
20#11=VERTEX_POINT('',#10);
21#12=CARTESIAN_POINT('',(1.000001,1.0,0.0));
22#13=VERTEX_POINT('',#12);
23#14=CARTESIAN_POINT('',(1.000001,1.000001,0.0));
24#15=VERTEX_POINT('',#14);
25#16=CARTESIAN_POINT('',(0.0,1.000001,0.0));
26#17=VERTEX_POINT('',#16);
27#18=CARTESIAN_POINT('',(-1.0E-06,1.000001,0.0));
28#19=VERTEX_POINT('',#18);
29#20=CARTESIAN_POINT('',(-1.0E-06,0.0,0.0));
30#21=VERTEX_POINT('',#20);
31#22=CARTESIAN_POINT('',(0.0,0.0,0.0));
32#23=DIRECTION('',(1.0,0.0,0.0));
33#24=VECTOR('',#23,1.0);
34#25=LINE('',#22,#24);
35#26=CARTESIAN_POINT('',(0.0,0.0));
36#27=DIRECTION('',(1.0,0.0));
37#28=VECTOR('',#27,1.0);
38#29=LINE('',#26,#28);
39#30=DEFINITIONAL_REPRESENTATION('',(#29),#*);
40#31=PCURVE('',#5,#30);
41#32=SURFACE_CURVE('',#25,(#31),.PCURVE_S1.);
42#33=EDGE_CURVE('gap_chain_edge_0',#7,#9,#32,.T.);
43#34=ORIENTED_EDGE('',*,*,#33,.T.);
44#35=CARTESIAN_POINT('',(1.000001,0.0,0.0));
45#36=DIRECTION('',(0.0,1.0,0.0));
46#37=VECTOR('',#36,1.0);
47#38=LINE('',#35,#37);
48#39=CARTESIAN_POINT('',(1.000001,0.0));
49#40=DIRECTION('',(0.0,1.0));
50#41=VECTOR('',#40,1.0);
51#42=LINE('',#39,#41);
52#43=DEFINITIONAL_REPRESENTATION('',(#42),#*);
53#44=PCURVE('',#5,#43);
54#45=SURFACE_CURVE('',#38,(#44),.PCURVE_S1.);
55#46=EDGE_CURVE('gap_chain_edge_1',#11,#13,#45,.T.);
56#47=ORIENTED_EDGE('',*,*,#46,.T.);
57#48=CARTESIAN_POINT('',(1.000001,1.000001,0.0));
58#49=DIRECTION('',(-1.0,0.0,0.0));
59#50=VECTOR('',#49,1.000001);
60#51=LINE('',#48,#50);
61#52=CARTESIAN_POINT('',(1.000001,1.000001));
62#53=DIRECTION('',(-1.0,0.0));
63#54=VECTOR('',#53,1.000001);
64#55=LINE('',#52,#54);
65#56=DEFINITIONAL_REPRESENTATION('',(#55),#*);
66#57=PCURVE('',#5,#56);
67#58=SURFACE_CURVE('',#51,(#57),.PCURVE_S1.);
68#59=EDGE_CURVE('gap_chain_edge_2',#15,#17,#58,.T.);
69#60=ORIENTED_EDGE('',*,*,#59,.T.);
70#61=CARTESIAN_POINT('',(-1.0E-06,1.000001,0.0));
71#62=DIRECTION('',(0.0,-1.0,0.0));
72#63=VECTOR('',#62,1.000001);
73#64=LINE('',#61,#63);
74#65=CARTESIAN_POINT('',(-1.0E-06,1.000001));
75#66=DIRECTION('',(0.0,-1.0));
76#67=VECTOR('',#66,1.000001);
77#68=LINE('',#65,#67);
78#69=DEFINITIONAL_REPRESENTATION('',(#68),#*);
79#70=PCURVE('',#5,#69);
80#71=SURFACE_CURVE('',#64,(#70),.PCURVE_S1.);
81#72=EDGE_CURVE('gap_chain_edge_3',#19,#21,#71,.T.);
82#73=ORIENTED_EDGE('',*,*,#72,.T.);
83#74=EDGE_LOOP('',(#34,#47,#60,#73));
84#75=GEOMETRIC_CURVE_SET('',(#74));
85#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
86#9051=PRODUCT('Twi180','Twi180','',(#9050));
87#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
88#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
89#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
90#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
91#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
92#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
93#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
94#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
95#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
96#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#75),#9060);
97#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
98ENDSEC;
99END-ISO-10303-21;