step-examples/12-3b-wires/Twi147.stp
Sources
- synthesized — no external source cited
Description
A direction whose ratio list nests an aggregate where three reals are required makes the reader abort
Reproducer recipe
Expected kernel behavior
The first edge ends at vertex (5,0,0) and the second begins at a distinct vertex (5.01,0,0): a 0.01 gap on a 10-unit contour, five orders of magnitude above the declared 1.0E-7 accuracy. Close it by changing geometry — extend one edge's line or trim the other to a shared point, and merge the two vertices — rather than by inflating vertex tolerance to 0.01, and re-test the modified edge against every other edge of the wire for newly created crossings or overlaps before committing, backing out or moving the other end if the fix introduces one. The fourth edge's direction entity must be rejected as well: its ratios are written as `(-1.47552825814757,(1.0,0.0))`, a nested aggregate rather than three reals, and must not be guessed at.
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/* Twi147 - ShapeFix_Wire.FixGaps3d edge-replacement 3 * Defect: wire with a gap that FixGaps3d wants to bridge by extending one edge; 4 * the extension creates a self-intersection with another edge in the wire. 5 * The algorithm fails to detect the induced self-intersection before committing the fix. 6 */ 7HEADER; 8FILE_DESCRIPTION(('Twi147 test case','ShapeFix_Wire.FixGaps3d edge-replacement'),'2;1'); 9FILE_NAME('Twi147.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 gap: edge1 ends at (5,0,0), edge2 starts at (5.01,0,0) - small gap 24 Edge1: from (0,0,0) to (5,0,0) horizontal 25 Edge2: from (5.01,0,0) to (10,0,0) horizontal (small gap 0.01) 26 Edge3: from (10,0,0) to (10,5,0) vertical 27 Edge4: from (10,5,0) to (2.5,2.5,0) diagonal (will intersect extended edge1) 28 Edge5: from (2.5,2.5,0) back to (0,0,0) 29*/ 30 31/* Vertex for edge 1 */ 32#100=CARTESIAN_POINT('',(0.0,0.0,0.0)); 33#101=VERTEX_POINT('',#100); 34 35/* Vertex between edge1 and gap */ 36#102=CARTESIAN_POINT('',(5.0,0.0,0.0)); 37#103=VERTEX_POINT('',#102); 38 39/* Vertex after gap (edge2 start) */ 40#104=CARTESIAN_POINT('',(5.01,0.0,0.0)); 41#105=VERTEX_POINT('',#104); 42 43/* Vertex at end of edge2 */ 44#106=CARTESIAN_POINT('',(10.0,0.0,0.0)); 45#107=VERTEX_POINT('',#106); 46 47/* Vertex at top right */ 48#108=CARTESIAN_POINT('',(10.0,5.0,0.0)); 49#109=VERTEX_POINT('',#108); 50 51/* Vertex on diagonal (intersection point) */ 52#110=CARTESIAN_POINT('',(2.5,2.5,0.0)); 53#111=VERTEX_POINT('',#110); 54 55/* Edge 1: horizontal from (0,0,0) to (5,0,0) */ 56#120=DIRECTION('',(1.0,0.0,0.0)); 57#121=LINE('',#100,#120); 58#122=EDGE_CURVE('',#101,#103,#121,.T.); 59 60/* Edge 2: horizontal from (5.01,0,0) to (10,0,0) - starts after gap */ 61#123=LINE('',#104,#120); 62#124=EDGE_CURVE('',#105,#107,#123,.T.); 63 64/* Edge 3: vertical from (10,0,0) to (10,5,0) */ 65#125=DIRECTION('',(0.0,1.0,0.0)); 66#126=LINE('',#106,#125); 67#127=EDGE_CURVE('',#107,#109,#126,.T.); 68 69/* Edge 4: diagonal from (10,5,0) to (2.5,2.5,0) - will intersect extended edge1 */ 70#128=DIRECTION('',(-1.47552825814757,(1.0,0.0))); 71#129=LINE('',#108,#128); 72#130=EDGE_CURVE('',#109,#111,#129,.T.); 73 74/* Edge 5: back to origin from (2.5,2.5,0) to (0,0,0) */ 75#131=DIRECTION('',(-0.707106781186547,-0.707106781186547,0.0)); 76#132=LINE('',#110,#131); 77#133=EDGE_CURVE('',#111,#101,#132,.T.); 78 79/* Edge loop with gap */ 80#140=ORIENTED_EDGE('',*,*,#122,.T.); 81#141=ORIENTED_EDGE('',*,*,#124,.T.); 82#142=ORIENTED_EDGE('',*,*,#127,.T.); 83#143=ORIENTED_EDGE('',*,*,#130,.T.); 84#144=ORIENTED_EDGE('',*,*,#133,.T.); 85#145=EDGE_LOOP('',(#140,#141,#142,#143,#144)); 86#146=FACE_OUTER_BOUND('',#145,.T.); 87#147=ADVANCED_FACE('',(#146),#20,.T.); 88#8000=OPEN_SHELL('',(#147)); 89 90/* PRODUCT CHAIN - Mandatory */ 91#9000=PRODUCT_CONTEXT('',#1,'mechanical'); 92#9001=PRODUCT('Twi147','Twi147','',(#9000)); 93#9002=PRODUCT_DEFINITION_FORMATION('','',#9001); 94#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design'); 95#9004=PRODUCT_DEFINITION('','',#9002,#9003); 96#9005=PRODUCT_DEFINITION_SHAPE('','',#9004); 97#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 98#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 99#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 100#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value',''); 101#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D')); 102#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#8000)); 103#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010); 104#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022); 105ENDSEC; 106END-ISO-10303-21;