Twi231 — Every LINE puts a direction entity in the slot that requires a vector, so the reader aborts before degenerate-edge insertion is reached

§12.3b

crash topology

Sources

Description

Every LINE puts a direction entity in the slot that requires a vector, so the reader aborts before degenerate-edge insertion is reached

Reproducer recipe

Expected kernel behavior

The second edge ends on a vertex at (5,5,0) and the next begins on a separate vertex instance at exactly the same point, leaving the wire disconnected in the middle although nothing geometric is missing. Merge vertices that coincide within tolerance and re-point their incident edges at the survivor, rather than inserting a connecting edge that would necessarily have zero length; only a genuine separation in the surface's parameter space justifies inserting one. Because every line in this file carries a direction in the slot reserved for a vector, curve construction has to fail loudly before any of that is attempted.

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/* Twi231 - ShapeFix_Wire.FixLacking with-existing-wire-degenerate-vertex
3 * Defect: Wire missing an edge where existing wire passes through a
4 * degenerate vertex. FixLacking's insertion logic doesn't account for
5 * degenerate intermediate vertices in edge connectivity.
6 */
7HEADER;
8FILE_DESCRIPTION(('Twi231 test case','FixLacking with-existing-wire-degenerate-vertex — missing edge at degenerate'),'2;1');
9FILE_NAME('Twi231.stp','2026-06-15T00:00:00',('[email protected]'),(''),'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#100=CARTESIAN_POINT('',(0.0,0.0,0.0));
16#101=DIRECTION('',(0.0,0.0,1.0));
17#102=DIRECTION('',(1.0,0.0,0.0));
18#103=AXIS2_PLACEMENT_3D('',#100,#101,#102);
19#104=PLANE('',#103);
20/* Vertices: normal corners and a degenerate middle vertex */
21#110=CARTESIAN_POINT('',(0.0,0.0,0.0));
22#111=CARTESIAN_POINT('',(5.0,0.0,0.0));
23#112=CARTESIAN_POINT('',(5.0,5.0,0.0));
24#113=CARTESIAN_POINT('',(5.0,5.0,0.0));
25#114=CARTESIAN_POINT('',(5.0,10.0,0.0));
26#115=CARTESIAN_POINT('',(0.0,10.0,0.0));
27#120=VERTEX_POINT('',#110);
28#121=VERTEX_POINT('',#111);
29#122=VERTEX_POINT('',#112);
30#123=VERTEX_POINT('',#113);
31#124=VERTEX_POINT('',#114);
32#125=VERTEX_POINT('',#115);
33/* Edge1: normal edge from (0,0) to (5,0) */
34#130=LINE('',#110,#102);
35#131=EDGE_CURVE('',#120,#121,#130,.T.);
36/* Edge2: edge from (5,0) to (5,5) - normal */
37#132=DIRECTION('',(0.0,1.0,0.0));
38#133=LINE('',#111,#132);
39#134=EDGE_CURVE('',#121,#122,#133,.T.);
40/* Edge3: MISSING - should connect (5,5) to degenerate point
41   This edge is intentionally missing, and #123 is degenerate (coincides with #122)
42   FixLacking must detect this gap and insert appropriate correction.
43   But degenerate vertex at #123 confuses the insertion logic.
44*/
45/* Edge4: edge from degenerate vertex (5,5) to (5,10) - zero-length initially
46   This creates a degenerate edge that FixLacking must handle */
47#135=DIRECTION('',(0.0,1.0,0.0));
48#136=LINE('',#113,#135);
49#137=EDGE_CURVE('',#123,#124,#136,.T.);
50/* Edge5: edge from (5,10) to (0,10) */
51#138=DIRECTION('',(-1.0,0.0,0.0));
52#139=LINE('',#114,#138);
53#140=EDGE_CURVE('',#124,#125,#139,.T.);
54/* Edge6: closing edge from (0,10) to (0,0) */
55#141=DIRECTION('',(0.0,-1.0,0.0));
56#142=LINE('',#115,#141);
57#143=EDGE_CURVE('',#125,#120,#142,.T.);
58/* Oriented edges forming incomplete loop */
59#200=ORIENTED_EDGE('',*,*,#131,.T.);
60#201=ORIENTED_EDGE('',*,*,#134,.T.);
61#202=ORIENTED_EDGE('',*,*,#137,.T.);
62#203=ORIENTED_EDGE('',*,*,#140,.T.);
63#204=ORIENTED_EDGE('',*,*,#143,.T.);
64/* Edge loop with missing connection at degenerate vertex */
65#210=EDGE_LOOP('',(#200,#201,#202,#203,#204));
66/* Face */
67#220=FACE_OUTER_BOUND('',#210,.T.);
68#221=ADVANCED_FACE('',(#220),#104,.T.);
69/* Shell and manifold representation */
70#250=CLOSED_SHELL('',(#221));
71#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#250));
72#9000=PRODUCT_CONTEXT('',#1,'mechanical');
73#9001=PRODUCT('Twi231','Twi231','',(#9000));
74#9002=PRODUCT_DEFINITION_FORMATION('','',#9001);
75#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design');
76#9004=PRODUCT_DEFINITION('','',#9002,#9003);
77#9005=PRODUCT_DEFINITION_SHAPE('','',#9004);
78#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
79#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
80#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
81#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value','');
82#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D'));
83#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010);
84#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022);
85ENDSEC;
86END-ISO-10303-21;