Gn024 — Self-intersecting `B_SPLINE_CURVE_WITH_KNOTS` edge (figure-eight or fold; coincident first/last control points)

§12.2b NURBS/knots

silent-loss geometry

Sources

Description

A 3D curve (typically `B_SPLINE_CURVE_WITH_KNOTS`) crosses itself within the edge's parameter range, or a `COMPOSITE_CURVE` segment doubles back. Common shape: a degree-3 B-spline whose first and last control points are both at the same point (e.g. both (0,0,0)) with a clamped knot vector; a closed figure-eight whose `EDGE_CURVE` has start/end vertices coincident at that same point. Common output of poorly-trimmed offset surfaces or translator re-fitting.

Reproducer recipe

`B_SPLINE_CURVE_WITH_KNOTS` of degree 3 with a control polygon that produces a figure-eight inside `[u_first, u_last]`; reference from an `EDGE_CURVE`.

Expected kernel behavior

heal by re-fitting / sub-setting; reject if the edge cannot be split cleanly; check parameter monotonicity under reprojection.

Notes

**OCC behavior**: accepts and loads shape(1); outside catalog's allowed set ({heal, reject}). Kernel-bug witnessed: catalog allows either heal or reject; OCC silently accepts the bad input without doing either. Synonyms: "B-spline curve self-intersects", "figure-eight B-spline edge with coincident first/last poles", "BSpline edge crosses itself", "self-loop in 3D B-spline curve", "EDGE_CURVE B-spline forms figure eight".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(1) ifc=schema_n/a

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Gn024: B_SPLINE_CURVE_WITH_KNOTS degree-3 6-CP figure-eight; CP[0]=CP[5]=(0,0,0) — coincident first/last control points; CP[1]=(4,4,0), CP[2]=(4,-4,0), CP[3]=(-4,4,0), CP[4]=(-4,-4,0); knots (0.0,1.0) mults (4,4) sum=8=3+4+1 ✓; curve self-intersects at t~0.5 forming a figure-eight; EDGE_CURVE start==end vertex at origin (self-paired); self-intersection IS the structural defect driving shape_null=True */
3HEADER;
4FILE_DESCRIPTION(('Gn024'),'2;1');
5FILE_NAME('Gn024.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('plane_ax',#1,#2,#3);
14#5=PLANE('flat_plane',#4);
15#6=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D'));
16#7=CARTESIAN_POINT('',(0.0,0.0,0.0));
17#8=CARTESIAN_POINT('',(4.0,4.0,0.0));
18#9=CARTESIAN_POINT('',(4.0,-4.0,0.0));
19#10=CARTESIAN_POINT('',(-4.0,4.0,0.0));
20#11=CARTESIAN_POINT('',(-4.0,-4.0,0.0));
21#12=CARTESIAN_POINT('',(0.0,0.0,0.0));
22#13=B_SPLINE_CURVE_WITH_KNOTS('figure_eight',3,(#7,#8,#9,#10,#11,#12),.UNSPECIFIED.,.F.,.F.,(4,2,4),(0.0,0.5,1.0),.UNSPECIFIED.);
23#14=CARTESIAN_POINT('',(0.0,0.0));
24#15=CARTESIAN_POINT('',(4.0,4.0));
25#16=CARTESIAN_POINT('',(4.0,-4.0));
26#17=CARTESIAN_POINT('',(-4.0,4.0));
27#18=CARTESIAN_POINT('',(-4.0,-4.0));
28#19=CARTESIAN_POINT('',(0.0,0.0));
29#20=B_SPLINE_CURVE_WITH_KNOTS('figure_eight_pc',3,(#14,#15,#16,#17,#18,#19),.UNSPECIFIED.,.F.,.F.,(4,2,4),(0.0,0.5,1.0),.UNSPECIFIED.);
30#21=DEFINITIONAL_REPRESENTATION('fig8_pc_def',(#20),#6);
31#22=PCURVE('fig8_pc_ent',#5,#21);
32#23=SURFACE_CURVE('fig8_sc',#13,(#22),.PCURVE_S1.);
33#24=CARTESIAN_POINT('',(0.0,0.0,0.0));
34#25=VERTEX_POINT('',#24);
35#26=EDGE_CURVE('fig8_edge',#25,#25,#23,.T.);
36#27=ORIENTED_EDGE('',$,$,#26,.T.);
37#28=EDGE_LOOP('',(#27));
38#29=FACE_OUTER_BOUND('',#28,.T.);
39#30=ADVANCED_FACE('',(#29),#5,.T.);
40#31=OPEN_SHELL('',(#30));
41#32=SHELL_BASED_SURFACE_MODEL('',(#31));
42#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
43#9051=PRODUCT('Gn024','Gn024','',(#9050));
44#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
45#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
46#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
47#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
48#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
49#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
50#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
51#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
52#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
53#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#32),#9060);
54#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
55ENDSEC;
56END-ISO-10303-21;