Twi138 — ShapeAnalysis_Wire.CheckSmall edge-length comparison

§12.3b

crash topology

Sources

Description

ShapeAnalysis_Wire.CheckSmall edge-length comparison

Reproducer recipe

Expected kernel behavior

The edge's curve is declared degree 3 with knots (0.0, 1.0) at multiplicities (4,4) — eight knots — but carries only three control points, where a clamped cubic needs four; the identity knot-count = control-point-count + degree + 1 fails. Validate that identity before evaluating any B-spline and reject the curve with a diagnostic naming the entity, rather than reading past the end of the control-point array. Only once a curve is valid may an edge-smallness test run, and that test must measure 3D arc length, or endpoint-and-midpoint coincidence, never the width of the parameter range — a narrow parameter range can carry an arbitrarily long arc.

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/* Twi138 - ShapeAnalysis_Wire.CheckSmall edge-length comparison
3 * Defect: ShapeAnalysis_Wire.CheckSmall edge-length comparison
4 */
5HEADER;
6FILE_DESCRIPTION(('Twi138 test case','ShapeAnalysis_Wire.CheckSmall edge-length comparison'),'2;1');
7FILE_NAME('Twi138.stp','2026-06-15T00:00:00',(''),(''),'cad-research-suite','','');
8FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }'));
9ENDSEC;
10DATA;
11#1=APPLICATION_CONTEXT('automotive_design');
12#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1);
13#10=CARTESIAN_POINT('',(0.0,0.0,0.0));
14#11=DIRECTION('',(0.0,0.0,1.0));
15#12=DIRECTION('',(1.0,0.0,0.0));
16#13=AXIS2_PLACEMENT_3D('',#10,#11,#12);
17
18#20=PLANE('',#13);
19/* Wire with a tiny edge below threshold: parameter-diff small but arc-length matters */
20#100=CARTESIAN_POINT('',(0.0,0.0,0.0));
21#101=VERTEX_POINT('',#100);
22#102=CARTESIAN_POINT('',(1.0,0.0,0.0));
23#103=VERTEX_POINT('',#102);
24
25/* Degenerate BSpline curve: passes through only 2 points with tiny parameter range */
26#110=B_SPLINE_CURVE_WITH_KNOTS('',3,(#100,#102,#102),
27  .UNSPECIFIED.,.F.,.F.,(4,4),(0.0,1.0),
28  .UNSPECIFIED.);
29/* Edge with this curve: tiny parameter range but substantial 3D arc */
30#111=EDGE_CURVE('',#101,#103,#110,.T.);
31
32/* Second edge to complete wire */
33#120=CARTESIAN_POINT('',(2.0,0.0,0.0));
34#121=VERTEX_POINT('',#120);
35#122=LINE('',#102,#12);
36#123=EDGE_CURVE('',#103,#121,#122,.T.);
37
38#140=ORIENTED_EDGE('',*,*,#111,.T.);
39#141=ORIENTED_EDGE('',*,*,#123,.T.);
40#142=EDGE_LOOP('',(#140,#141));
41#143=FACE_OUTER_BOUND('',#142,.T.);
42#144=ADVANCED_FACE('',(#143),#20,.T.);
43#8000=OPEN_SHELL('',(#144));
44
45/* PRODUCT CHAIN - Mandatory */
46#9000=PRODUCT_CONTEXT('',#1,'mechanical');
47#9001=PRODUCT('Twi138','Twi138','',(#9000));
48#9002=PRODUCT_DEFINITION_FORMATION('','',#9001);
49#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design');
50#9004=PRODUCT_DEFINITION('','',#9002,#9003);
51#9005=PRODUCT_DEFINITION_SHAPE('','',#9004);
52#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
53#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
54#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
55#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value','');
56#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D'));
57#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#8000));
58#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010);
59#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022);
60ENDSEC;
61END-ISO-10303-21;