step-examples/12-3b-wires/Twi151.stp
Sources
- synthesized — no external source cited
Description
Cubic B-spline whose control polygon is strictly x-monotonic, so neither claimed cusp exists: splitting it is a false positive
Reproducer recipe
Expected kernel behavior
The edge's curve is a degree-3 B-spline whose five control points have strictly increasing x (-2, -1, 0, 1, 2), so its derivative never vanishes and the curve is x-monotone: it has no cusp and no self-crossing, even though its control polygon dips below the chord. Locate cusp candidates by subdividing the curve and evaluating the derivative, and refuse to split at any parameter where the derivative is non-zero — the correct outcome is to leave this edge intact. Two `VECTOR` entities in the file are also written with two attributes and an inline coordinate list where a direction reference and a magnitude are required, and must be rejected rather than default-filled.
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/* Twi151 - ShapeFix_Wire.FixSelfIntersectingEdge cusp-cusp 3 * Defect: single edge with a cusp (zero-derivative point) coincidence; 4 * FixSelfIntersectingEdge tries to split at cusp but the parameter is undefined 5 * due to the degenerate nature of the singularity. 6 */ 7HEADER; 8FILE_DESCRIPTION(('Twi151 test case','ShapeFix_Wire.FixSelfIntersectingEdge cusp-cusp'),'2;1'); 9FILE_NAME('Twi151.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 a self-intersecting edge that has a cusp. 24 A parabolic curve y=x^2 from x=-2 to x=2 forms a cusp at x=0 when traced 25 back and forth, or equivalently, a curve with zero derivative at its apex. */ 26 27#100=CARTESIAN_POINT('',(-2.0,4.0,0.0)); 28#101=VERTEX_POINT('',#100); 29 30#102=CARTESIAN_POINT('',(0.0,0.0,0.0)); 31#103=VERTEX_POINT('',#102); 32 33#104=CARTESIAN_POINT('',(2.0,4.0,0.0)); 34#105=VERTEX_POINT('',#104); 35 36#106=CARTESIAN_POINT('',(1.0,5.0,0.0)); 37#107=VERTEX_POINT('',#106); 38 39/* Edge 1: B-spline curve with cusp at parameter t where derivative is zero. 40 Approximated as a circle/parabolic arc from (-2,4) through (0,0) to (2,4) */ 41#120=CARTESIAN_POINT('',(-2.0,4.0,0.0)); 42#121=CARTESIAN_POINT('',(-1.0,0.5,0.0)); 43#122=CARTESIAN_POINT('',(0.0,-0.5,0.0)); 44#123=CARTESIAN_POINT('',(1.0,0.5,0.0)); 45#124=CARTESIAN_POINT('',(2.0,4.0,0.0)); 46#125=VECTOR('',(1.0,0.0,0.0)); 47#126=VECTOR('',(1.0,0.0,0.0)); 48#130=B_SPLINE_CURVE_WITH_KNOTS('',3,(#120,#121,#122,#123,#124),.UNSPECIFIED.,.F.,.F.,(4,1,4),(0.0,0.5,1.0),.UNSPECIFIED.); 49#131=EDGE_CURVE('',#101,#105,#130,.T.); 50 51/* Edge 2: from (2,4) to (1,5) */ 52#132=DIRECTION('',(-0.707106781186547,0.707106781186547,0.0)); 53#133=LINE('',#104,#132); 54#134=EDGE_CURVE('',#105,#107,#133,.T.); 55 56/* Edge 3: from (1,5) back to (-2,4) */ 57#135=DIRECTION('',(-1.0,-0.333333333333333,0.0)); 58#136=LINE('',#106,#135); 59#137=EDGE_CURVE('',#107,#101,#136,.T.); 60 61/* Edge loop with self-intersecting cusp edge */ 62#140=ORIENTED_EDGE('',*,*,#131,.T.); 63#141=ORIENTED_EDGE('',*,*,#134,.T.); 64#142=ORIENTED_EDGE('',*,*,#137,.T.); 65#143=EDGE_LOOP('',(#140,#141,#142)); 66#144=FACE_OUTER_BOUND('',#143,.T.); 67#145=ADVANCED_FACE('',(#144),#20,.T.); 68#8000=OPEN_SHELL('',(#145)); 69 70/* PRODUCT CHAIN - Mandatory */ 71#9000=PRODUCT_CONTEXT('',#1,'mechanical'); 72#9001=PRODUCT('Twi151','Twi151','',(#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;