step-examples/12-11-adversarial/Ad138.stp
Sources
- occt-coverage `exchange/problems.json` `stp-transfer-exception-to-fail` (`StepToTopoDS_Builder::Init(GeometricSet)`, `StepToTopoDS_Builder.cxx:700-709` — per-element curve conversion wrapped in try/catch, element skipped on exception
- the skipped element is then reported at `:781`). The class cites FOUR distinct catch boundaries
- Ad043 covers the per-root one (`STEPControl_ActorRead::TransferShape`, `STEPControl_ActorRead.cxx:1414-1480`), Xp008 the per-edge one (`StepToTopoDS_TranslateEdgeLoop::Init`, `:307-326`), Ad137 the per-segment one (`StepToTopoDS_TranslateCompositeCurve::Init`, `:188-211,243-249`) — this one had no live fixture. Verified from OCCT source at `bd2a789f15235755ce4d1a3b07379a2e062fdc2e` that the curve-construction helper this call site invokes contains no try/catch of its own (the only one in that file guards surface construction), so the exception genuinely propagates out to the cited boundary.
Description
A bare curve set — the shape representation's own item, and therefore a real translation root — holds two `B_SPLINE_CURVE_WITH_KNOTS` elements that are structurally identical and differ only in their knot vector. `good_bspline_element` has monotonically increasing knots `(0.0, 1.0)`. `throwing_bspline_element` has DECREASING knots `(1.0, 0.5)`: schema-legal Part-21 bytes, but numerically invalid geometry — a B-spline constructor requires a non-decreasing knot sequence and raises a construction error on violation rather than returning an error code. The receiver must contain that exception at the individual element, log the loss, and carry on with the set's other elements.
Reproducer recipe
`#3=B_SPLINE_CURVE_WITH_KNOTS('good_bspline_element',1,(#1,#2),.UNSPECIFIED.,.F.,.F.,(2,2),(0.0,1.0),.UNSPECIFIED.);` and `#6=B_SPLINE_CURVE_WITH_KNOTS('throwing_bspline_element',1,(#4,#5),.UNSPECIFIED.,.F.,.F.,(2,2),(1.0,0.5),.UNSPECIFIED.);` — identical apart from the knots — listed together in `#7=GEOMETRIC_CURVE_SET('ad138_element_catch_set',(#3,#6));` inside a `MANIFOLD_SURFACE_SHAPE_REPRESENTATION`.
Expected kernel behavior
catch the construction exception at the individual set element, log that element as not mapped, and still emit the surviving element's edge into the output compound — rather than aborting the set, the representation, or the whole read.
Notes
**See also**: Ad043, Xp008, Ad137 (the three coarser/sibling catch boundaries of this same class), M051, Xp017 (bare-curve-set siblings with non-geometric and empty item lists). Live-verified (2026-07-31, this worktree, OCP/OCCT 7.8.1): the transfer check list carries exactly ONE message, the warning " Entity not mapped to TopoDS", and the transferred shape is a compound holding exactly ONE edge — the good element's. Independently confirmed that the decreasing knot vector does raise (constructing the same degree-1 B-spline directly from the same poles/knots/multiplicities fails with "BSpline curve: Knots interval values too close"). Perturbation control: flipping the bad element's knots to `(0.0,1.0)` — a one-token byte change, nothing else — makes the warning disappear and the edge count go 1 → 2, so the observable is caused by the knot bytes and not by the surrounding scaffold. Synonyms: "geometric set element throws", "per-element try catch geometric curve set", "bad knot vector element skipped", "one bad curve doesn't sink the curve set", "element not mapped to TopoDS". Provenance tier: bytes-sufficient.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(3) ifc=schema_n/a
Byte assertions
contains(b'good_bspline_element')contains(b'throwing_bspline_element')count_entity_def(b'B_SPLINE_CURVE_WITH_KNOTS') == 2contains(b'GEOMETRIC_CURVE_SET')
Tier-3 assertions
shape_null == Falsen_edges_total == 1
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Ad138: GEOMETRIC_CURVE_SET (the shape representation's own item, a real translation root) with TWO B_SPLINE_CURVE_WITH_KNOTS elements of identical structure differing only in their knot vector: 'good_bspline_element' with monotonically increasing knots (0.0,1.0) and 'throwing_bspline_element' with DECREASING knots (1.0,0.5) which Geom_BSplineCurve's constructor rejects by raising Standard_ConstructionError; the per-element try/catch around the geometric-set element's own curve construction IS the mechanism under test -- the throwing element must be logged and skipped while the good element still produces its edge in the output compound; both curves ARE elements of the root GEOMETRIC_CURVE_SET, never orphaned */ 3HEADER; 4FILE_DESCRIPTION(('Ad138'),'2;1'); 5FILE_NAME('Ad138.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=CARTESIAN_POINT('',(1.0,0.0,0.0)); 12#3=B_SPLINE_CURVE_WITH_KNOTS('good_bspline_element',1,(#1,#2),.UNSPECIFIED.,.F.,.F.,(2,2),(0.0,1.0),.UNSPECIFIED.); 13#4=CARTESIAN_POINT('',(0.0,1.0,0.0)); 14#5=CARTESIAN_POINT('',(1.0,1.0,0.0)); 15#6=B_SPLINE_CURVE_WITH_KNOTS('throwing_bspline_element',1,(#4,#5),.UNSPECIFIED.,.F.,.F.,(2,2),(1.0,0.5),.UNSPECIFIED.); 16#7=GEOMETRIC_CURVE_SET('ad138_element_catch_set',(#3,#6)); 17#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 18#9051=PRODUCT('Ad138','Ad138','',(#9050)); 19#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 20#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 21#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 22#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 23#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 24#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 25#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 26#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 27#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 28#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#7),#9060); 29#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 30ENDSEC; 31END-ISO-10303-21;