Twi148 — ShapeAnalysis_Wire.CheckClosed degenerate-tolerance

§12.3b

crash topology

Sources

Description

ShapeAnalysis_Wire.CheckClosed degenerate-tolerance

Reproducer recipe

Expected kernel behavior

The wire's last edge ends at (1.0E-7, 0, 0) while its first begins at (0,0,0), so the closure gap is exactly the file's declared distance accuracy of 1.0E-7. Fix one convention for that boundary case and apply it identically in analysis and repair — treating a distance less than or equal to tolerance as coincident is the safe choice, since tolerance means indistinguishable at this accuracy — and then actually merge the two vertices so the wire becomes topologically closed. Reporting closure while leaving two distinct vertices in place is the failure mode: downstream face building still sees an open contour.

Notes

RUNTIME-VERIFIED 2026-08-08 — the recorded crash comes from this file's straight-line direction argument, which references a plain direction where the schema declares a vector carrying a magnitude; repairing that one reference makes the file load, so the titled condition is never reached. See BACKLOG (M).

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/* Twi148 - ShapeAnalysis_Wire.CheckClosed degenerate-tolerance
3 * Defect: wire whose closing distance is exactly equal to the closure tolerance;
4 * non-strict equality leads to false-positive closure validation.
5 * CheckClosed returns true when distance == tolerance, masking a closed wire check failure.
6 */
7HEADER;
8FILE_DESCRIPTION(('Twi148 test case','ShapeAnalysis_Wire.CheckClosed degenerate-tolerance'),'2;1');
9FILE_NAME('Twi148.stp','2026-06-15T00:00:00',(''),(''),'cad-research-suite','','');
10FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
11ENDSEC;
12DATA;
13#1=APPLICATION_CONTEXT('automotive_design');
14#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1);
15#10=CARTESIAN_POINT('',(0.0,0.0,0.0));
16#11=DIRECTION('',(0.0,0.0,1.0));
17#12=DIRECTION('',(1.0,0.0,0.0));
18#13=AXIS2_PLACEMENT_3D('',#10,#11,#12);
19
20/* Plane containing the wire */
21#20=PLANE('',#13);
22
23/* Wire with closure distance exactly equal to tolerance (1.0E-7) */
24#100=CARTESIAN_POINT('',(0.0,0.0,0.0));
25#101=VERTEX_POINT('',#100);
26
27#102=CARTESIAN_POINT('',(10.0,0.0,0.0));
28#103=VERTEX_POINT('',#102);
29
30#104=CARTESIAN_POINT('',(10.0,10.0,0.0));
31#105=VERTEX_POINT('',#104);
32
33#106=CARTESIAN_POINT('',(0.0,10.0,0.0));
34#107=VERTEX_POINT('',#106);
35
36/* Return to start with gap exactly equal to tolerance */
37#108=CARTESIAN_POINT('',(1.0E-7,0.0,0.0));
38#109=VERTEX_POINT('',#108);
39
40/* Edge 1: (0,0,0) to (10,0,0) */
41#120=DIRECTION('',(1.0,0.0,0.0));
42#121=LINE('',#100,#120);
43#122=EDGE_CURVE('',#101,#103,#121,.T.);
44
45/* Edge 2: (10,0,0) to (10,10,0) */
46#123=DIRECTION('',(0.0,1.0,0.0));
47#124=LINE('',#102,#123);
48#125=EDGE_CURVE('',#103,#105,#124,.T.);
49
50/* Edge 3: (10,10,0) to (0,10,0) */
51#126=DIRECTION('',(-1.0,0.0,0.0));
52#127=LINE('',#104,#126);
53#128=EDGE_CURVE('',#105,#107,#127,.T.);
54
55/* Edge 4: (0,10,0) back towards (0,0,0), but stops at (1.0E-7, 0, 0) */
56#129=DIRECTION('',(0.0,-1.0,0.0));
57#130=LINE('',#106,#129);
58#131=EDGE_CURVE('',#107,#109,#130,.T.);
59
60/* Edge loop - appears closed but gap = tolerance exactly */
61#140=ORIENTED_EDGE('',*,*,#122,.T.);
62#141=ORIENTED_EDGE('',*,*,#125,.T.);
63#142=ORIENTED_EDGE('',*,*,#128,.T.);
64#143=ORIENTED_EDGE('',*,*,#131,.T.);
65#144=EDGE_LOOP('',(#140,#141,#142,#143));
66#145=FACE_OUTER_BOUND('',#144,.T.);
67#146=ADVANCED_FACE('',(#145),#20,.T.);
68#8000=OPEN_SHELL('',(#146));
69
70/* PRODUCT CHAIN - Mandatory */
71#9000=PRODUCT_CONTEXT('',#1,'mechanical');
72#9001=PRODUCT('Twi148','Twi148','',(#9000));
73#9002=PRODUCT_DEFINITION_FORMATION('','',#9001);
74#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design');
75#9004=PRODUCT_DEFINITION('','',#9002,#9003);
76#9005=PRODUCT_DEFINITION_SHAPE('','',#9004);
77#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
78#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
79#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
80#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value','');
81#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D'));
82#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#8000));
83#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010);
84#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022);
85ENDSEC;
86END-ISO-10303-21;