Gs203 — B-spline curve closed only within 3D tolerance (not formally `.Closed`) forces `UpdateParam3d`'s near-loop wrong-end reinterpretation

§12.2c surfaces (sub-class: edge-curve parameter range, fills `stp-edge-curve-param-range`'s missing tolerance-closed-B-spline subvariant)

P2 — spec deviation (no data loss)

geometry

Sources

Description

A single `ADVANCED_FACE` on a `PLANE` has one boundary edge whose 3D curve is a clamped, non-periodic degree-3 `B_SPLINE_CURVE_WITH_KNOTS` (4 poles) shaped as a near-loop: its start pole `(0,0,0)` and end pole `(5e-8,0,0)` are only `5e-8` apart — BELOW the fixture's own declared `UNCERTAINTY_MEASURE_WITH_UNIT` of `1e-7` (so the curve is "closed" for all practical modeling purposes) but ABOVE `Geom_BSplineCurve::IsClosed()`'s own much tighter internal `~1e-8` test (so OCCT's own geometric-closure flag reports `False` — this is genuinely the "not formally flagged Closed" case). The edge's `edge_start` vertex sits at the curve's exact MIDPOINT (parameter 0.5, an unambiguous on-curve point, live-computed via `Geom_BSplineCurve::Value(0.5)`); `edge_end` sits at the curve's exact START pole `(0,0,0)` (projects exactly to parameter 0). Naive projection therefore yields `w1=0.5 > w2=0.0` on a curve that is neither periodic nor formally closed — the scenario the packet spec's "closed only within 3D tolerance" subvariant names.

Reproducer recipe

`B_SPLINE_CURVE_WITH_KNOTS('name',3,(p0,p1,p2,p3),.UNSPECIFIED.,.F.,.F.,(4,4),(0.0,1.0),.UNSPECIFIED.)` with `p3` positioned `5e-8` from `p0` (a near-loop); `VERTEX_POINT`s at the curve's exact midpoint (edge_start) and exactly at `p0` (edge_end).

Expected kernel behavior

Because the curve is near-closed within the model's own declared tolerance but not periodic and not formally `.Closed.`, a receiver must NOT treat `w2=0.0` (which naively equals the curve's own first parameter) at face value; it must recognize that a point this close to the curve's near-coincident start/end poles could legitimately be intended as the curve's LAST parameter instead, and re-target `w2` to `cl` (here `1.0`) — producing a well-formed, non-degenerate `[0.5, 1.0]` parameter range — rather than either leaving `w1>w2` unresolved or collapsing both parameters to the same value.

Notes

Live-verified directly against the fixture's own bytes (default read — this parameter-range repair runs unconditionally as part of ordinary edge translation): the resulting edge's 3D curve reports parameter range `(0.49999999999999994, 1.0)` — NOT the naive/raw `(0.5, 0.0)`, confirming `w2` was correctly re-targeted from the curve's first parameter to its TRUE last parameter; evaluating the curve at `w2=1.0` gives `(5e-08, 0.0, 0.0)` — the curve's real end pole, only `5e-8` from the file's stated `edge_end` vertex coordinates `(0,0,0)`, well within the declared `1e-7` tolerance; the resulting face closes as a valid triangle (curved + 2 straight sides), area `13.8`, `shape_null=False`. Fills `stp-edge-curve-param-range`'s previously-missing "B-spline curve closed only within 3D tolerance" subvariant (the last of 3 missing; see also Gs201, Gs202 — the class is now fully covered, 6 of 6 subvariants demonstrated across Gs029/Gp171/Twi017/Twi086/Gs201/Gs202/Gs203). Synonyms: "B-spline near-loop closed within tolerance not formally Closed", "edge-parameter-range repair's near-closed-curve wrong-end reinterpretation", "start end poles close but the tight geometric-closure test fails", "start/end-pole distance below model uncertainty but above the tight closure threshold", "near-coincident poles reinterpreted as curve's true last parameter".

Expected validation

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

Byte assertions

Tier-3 assertions

Cross-references

Gs201, Gs202, Gs029, Gp171, Twi017, Twi086

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Gs203: PLANE IS ADVANCED_FACE.face_geometry; defect EDGE_CURVE curve_3d IS a clamped, NON-
3   periodic degree-3 B_SPLINE_CURVE_WITH_KNOTS (4 poles) whose start pole (0,0,0) and end pole
4   (5e-8,0,0) are close only WITHIN 3D tolerance (gap 5e-8, below the fixture's own declared
5   UNCERTAINTY_MEASURE_WITH_UNIT of 1e-7) but NOT formally .Closed. (Geom_BSplineCurve::IsClosed's
6   own tight 1e-8 test reports False); edge_start sits at the curve's exact MIDPOINT (t=0.5,
7   unambiguous), edge_end sits at the curve's exact START pole (0,0,0, projects exactly to t=0);
8   this yields w1=0.5 > w2=0.0 on a curve that is NOT periodic and NOT formally closed, but IS
9   closed within 3D tolerance -- StepToTopoDS_GeometricTool::UpdateParam3d's B-spline
10   near-closed-tolerance branch (distinct from Gs202's ordinary-curve reversal fallback) must
11   reinterpret w2 as landing on the wrong (near) end of the near-loop and re-target it to the
12   curve's TRUE last parameter (1.0) instead */
13HEADER;
14FILE_DESCRIPTION(('Gs203'),'2;1');
15FILE_NAME('Gs203.stp','2026-07-13T00:00:00',(''),(''),'cad-research-suite','','');
16FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
17ENDSEC;
18DATA;
19#9000=APPLICATION_CONTEXT('mechanical design');
20#1=CARTESIAN_POINT('',(0.0,0.0,0.0));
21#2=DIRECTION('',(0.0,0.0,1.0));
22#3=DIRECTION('',(1.0,0.0,0.0));
23#4=AXIS2_PLACEMENT_3D('gs203_ax',#1,#2,#3);
24#5=PLANE('gs203_plane',#4);
25#6=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D'));
26#7=CARTESIAN_POINT('',(0.0,0.0,0.0));
27#8=CARTESIAN_POINT('',(-2.0,4.0,0.0));
28#9=CARTESIAN_POINT('',(2.0,4.0,0.0));
29#10=CARTESIAN_POINT('',(0.00000005,0.0,0.0));
30#11=B_SPLINE_CURVE_WITH_KNOTS('gs203_near_loop',3,(#7,#8,#9,#10),.UNSPECIFIED.,.F.,.F.,(4,4),(0.0,1.0),.UNSPECIFIED.);
31#12=CARTESIAN_POINT('',(6.250000017526958E-09,3.0,0.0));
32#13=VERTEX_POINT('',#12);
33#14=CARTESIAN_POINT('',(0.0,0.0,0.0));
34#15=VERTEX_POINT('',#14);
35#16=CARTESIAN_POINT('',(0.0,0.0));
36#17=CARTESIAN_POINT('',(-2.0,4.0));
37#18=CARTESIAN_POINT('',(2.0,4.0));
38#19=CARTESIAN_POINT('',(0.00000005,0.0));
39#20=B_SPLINE_CURVE_WITH_KNOTS('gs203_near_loop_pc',3,(#16,#17,#18,#19),.UNSPECIFIED.,.F.,.F.,(4,4),(0.0,1.0),.UNSPECIFIED.);
40#21=DEFINITIONAL_REPRESENTATION('pcdef_e0',(#20),#6);
41#22=PCURVE('pc_e0',#5,#21);
42#23=SURFACE_CURVE('sc_e0',#11,(#22),.PCURVE_S1.);
43#24=EDGE_CURVE('ec_e0',#13,#15,#23,.T.);
44#25=CARTESIAN_POINT('',(0.0,0.0,0.0));
45#26=DIRECTION('',(0.7071067811865475,-0.7071067811865475,0.0));
46#27=VECTOR('',#26,14.142135623730951);
47#28=LINE('',#25,#27);
48#29=CARTESIAN_POINT('',(0.0,0.0));
49#30=DIRECTION('',(0.7071067811865475,-0.7071067811865475));
50#31=VECTOR('',#30,14.142135623730951);
51#32=LINE('',#29,#31);
52#33=DEFINITIONAL_REPRESENTATION('pcdef1',(#32),#6);
53#34=PCURVE('pc1',#5,#33);
54#35=SURFACE_CURVE('sc1',#28,(#34),.PCURVE_S1.);
55#36=CARTESIAN_POINT('',(10.0,-10.0,0.0));
56#37=VERTEX_POINT('',#36);
57#38=EDGE_CURVE('ec1',#15,#37,#35,.T.);
58#39=CARTESIAN_POINT('',(10.0,-10.0,0.0));
59#40=DIRECTION('',(-0.6097107606102846,0.79262398928876,0.0));
60#41=VECTOR('',#40,16.401219463046033);
61#42=LINE('',#39,#41);
62#43=CARTESIAN_POINT('',(10.0,-10.0));
63#44=DIRECTION('',(-0.6097107606102846,0.79262398928876));
64#45=VECTOR('',#44,16.401219463046033);
65#46=LINE('',#43,#45);
66#47=DEFINITIONAL_REPRESENTATION('pcdef2',(#46),#6);
67#48=PCURVE('pc2',#5,#47);
68#49=SURFACE_CURVE('sc2',#42,(#48),.PCURVE_S1.);
69#50=EDGE_CURVE('ec2',#37,#13,#49,.T.);
70#51=ORIENTED_EDGE('',$,$,#24,.T.);
71#52=ORIENTED_EDGE('',$,$,#38,.T.);
72#53=ORIENTED_EDGE('',$,$,#50,.T.);
73#54=EDGE_LOOP('',(#51,#52,#53));
74#55=FACE_OUTER_BOUND('',#54,.T.);
75#56=ADVANCED_FACE('',(#55),#5,.T.);
76#57=OPEN_SHELL('',(#56));
77#58=SHELL_BASED_SURFACE_MODEL('',(#57));
78#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
79#9051=PRODUCT('Gs203','Gs203','',(#9050));
80#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
81#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
82#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
83#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
84#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
85#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
86#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
87#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
88#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
89#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#58),#9060);
90#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
91ENDSEC;
92END-ISO-10303-21;