step-examples/12-2c-surfaces/Gs201.stp
Sources
- OCCT `StepToTopoDS_GeometricTool::UpdateParam3d` (`src/StepToTopoDS/StepToTopoDS_GeometricTool.cxx:199-239`, specifically `:211-238` the `Geom_BoundedCurve && !IsClosed()` clamp branch: `if (w1 < cf) w1 = cf
- else if (w1 > cl) w1 = cl
- ` and the symmetric check for `w2`) @ `bd2a789f15235755ce4d1a3b07379a2e062fdc2e` (verified against source at this commit). This is the SAME function Gs029 (periodic wrap-wrong-way, `:243-246`) and Twi086 (`w1==w2`, `:339-344`) exercise — this fixture targets its FIRST, distinct branch (out-of-bounds clamp on an ordinary bounded curve, unrelated to periodicity or closure).
Description
A single `ADVANCED_FACE` on a `PLANE` is a 4×4 rectangle; one boundary edge's 3D curve is a `TRIMMED_CURVE` over a `LINE`, with DECLARED bounds `PARAMETER_VALUE(1.5)`..`PARAMETER_VALUE(4.5)` — but the `EDGE_CURVE`'s own `VERTEX_POINT`s sit at `(1.0,0.0,0.0)` and `(5.0,0.0,0.0)`, which project onto the underlying (unbounded) `LINE` at parameters 1.0 and 5.0 — BOTH outside the curve's declared `[1.5, 4.5]` bounded range. STEP's `EDGE_CURVE` never stores explicit trim parameters; OCCT always derives them by projecting the edge's vertex coordinates onto the 3D curve, so a bounded curve whose OWN definition range is narrower than where the vertices actually sit is a well-formed but self-inconsistent file — a real pattern from writers that trim a curve entity conservatively but position vertices from unrelated (looser) tessellation or snapping logic.
Reproducer recipe
`LINE` at the origin, direction `(1,0,0)`; `TRIMMED_CURVE('name',#line,(PARAMETER_VALUE(1.5)),(PARAMETER_VALUE(4.5)),.T.,.PARAMETER.)` as `EDGE_CURVE.edge_geometry`; `VERTEX_POINT`s at `(1.0,0.0,0.0)` and `(5.0,0.0,0.0)` (line-parameters 1.0 and 5.0, both outside `[1.5,4.5]`); the edge is one side of an otherwise-ordinary rectangular `ADVANCED_FACE` boundary loop.
Expected kernel behavior
the edge-parameter-range repair stage must detect that the vertex-projected parameters fall outside the curve's own `[FirstParameter, LastParameter]` and clamp each independently to the nearest bound (`w1<cf → w1=cf`; `w2>cl → w2=cl`), producing an edge whose 3D-curve parameter range is `[1.5, 4.5]` — the curve's own declared domain — rather than the geometrically-implied-but-out-of-range `[1.0, 5.0]`, and rather than crashing or leaving an invalid/unresolvable trim.
Notes
Live-verified directly against the fixture's own bytes (default read — this parameter-range repair runs unconditionally as part of ordinary edge translation, unlike Gn177-Gn179's opt-in healers): the resulting edge's 3D curve reports parameter range `(1.5, 4.5)` — EXACTLY the curve's own declared bounds, confirming both out-of-range parameters were independently clamped (not merely one, and not left at the raw `(1.0, 5.0)` vertex-projected values); the resulting face still closes correctly (area `16.0`, the full 4×4 rectangle, live-verified) — OCCT reconciles the small gap between the clamped curve endpoint `(1.5,0,0)`/`(4.5,0,0)` and the actual vertex coordinates `(1,0,0)`/`(5,0,0)` via edge tolerance rather than leaving an open/invalid boundary. Fills `stp-edge-curve-param-range`'s previously-missing "parameter outside the curve's own bounded definition range → clamped" subvariant (1 of 3 missing; see also Gs202, Gs203). Synonyms: "EDGE_CURVE vertex parameter outside curve bounds clamp", "edge-parameter-range repair clamps a bounded-curve out-of-range projection", "TRIMMED_CURVE declared range narrower than vertex projection", "out-of-range trim parameter clamped to curve FirstParameter LastParameter", "writer trims curve conservatively vertices positioned looser".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a
Byte assertions
contains(b'TRIMMED_CURVE')contains(b'PARAMETER_VALUE(1.5)')contains(b'PARAMETER_VALUE(4.5)')count_entity_def(b'ADVANCED_FACE') == 1
Tier-3 assertions
load == "ok"shape_null == Falsen_faces_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/* Gs201: PLANE IS ADVANCED_FACE.face_geometry; defect EDGE_CURVE curve_3d IS TRIMMED_CURVE over 3 LINE with declared bounds PARAMETER_VALUE(1.5)..PARAMETER_VALUE(4.5), but the edge's own 4 VERTEX_POINTs sit at line-parameter 1.0 and 5.0 -- both OUTSIDE the curve's own bounded 5 definition range; StepToTopoDS_GeometricTool::UpdateParam3d's Geom_BoundedCurve clamp branch 6 must clamp both projected parameters back to the curve's [1.5,4.5] domain rather than leaving 7 an out-of-range trim; distinct from Gs029 (periodic wrap-wrong-way) and Twi086 (w1==w2) */ 8HEADER; 9FILE_DESCRIPTION(('Gs201'),'2;1'); 10FILE_NAME('Gs201.stp','2026-07-13T00:00:00',(''),(''),'cad-research-suite','',''); 11FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 12ENDSEC; 13DATA; 14#9000=APPLICATION_CONTEXT('mechanical design'); 15#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 16#2=DIRECTION('',(0.0,0.0,1.0)); 17#3=DIRECTION('',(1.0,0.0,0.0)); 18#4=AXIS2_PLACEMENT_3D('gs201_ax',#1,#2,#3); 19#5=PLANE('gs201_plane',#4); 20#6=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 21#7=CARTESIAN_POINT('',(0.0,0.0,0.0)); 22#8=DIRECTION('',(1.0,0.0,0.0)); 23#9=VECTOR('',#8,1.0); 24#10=LINE('gs201_line',#7,#9); 25#11=TRIMMED_CURVE('gs201_tc',#10,(PARAMETER_VALUE(1.5)),(PARAMETER_VALUE(4.5)),.T.,.PARAMETER.); 26#12=CARTESIAN_POINT('',(1.0,0.0,0.0)); 27#13=CARTESIAN_POINT('',(5.0,0.0,0.0)); 28#14=CARTESIAN_POINT('',(5.0,4.0,0.0)); 29#15=CARTESIAN_POINT('',(1.0,4.0,0.0)); 30#16=VERTEX_POINT('',#12); 31#17=VERTEX_POINT('',#13); 32#18=VERTEX_POINT('',#14); 33#19=VERTEX_POINT('',#15); 34#20=CARTESIAN_POINT('',(1.0,0.0)); 35#21=DIRECTION('',(1.0,0.0)); 36#22=VECTOR('',#21,4.0); 37#23=LINE('',#20,#22); 38#24=DEFINITIONAL_REPRESENTATION('pcdef_e0',(#23),#6); 39#25=PCURVE('pc_e0',#5,#24); 40#26=SURFACE_CURVE('sc_e0',#11,(#25),.PCURVE_S1.); 41#27=EDGE_CURVE('ec_e0',#16,#17,#26,.T.); 42#28=CARTESIAN_POINT('',(5.0,0.0,0.0)); 43#29=DIRECTION('',(0.0,1.0,0.0)); 44#30=VECTOR('',#29,4.0); 45#31=LINE('',#28,#30); 46#32=CARTESIAN_POINT('',(5.0,0.0)); 47#33=DIRECTION('',(0.0,1.0)); 48#34=VECTOR('',#33,4.0); 49#35=LINE('',#32,#34); 50#36=DEFINITIONAL_REPRESENTATION('pcdef',(#35),#6); 51#37=PCURVE('pc',#5,#36); 52#38=SURFACE_CURVE('sc',#31,(#37),.PCURVE_S1.); 53#39=EDGE_CURVE('ec',#17,#18,#38,.T.); 54#40=CARTESIAN_POINT('',(5.0,4.0,0.0)); 55#41=DIRECTION('',(-1.0,0.0,0.0)); 56#42=VECTOR('',#41,4.0); 57#43=LINE('',#40,#42); 58#44=CARTESIAN_POINT('',(5.0,4.0)); 59#45=DIRECTION('',(-1.0,0.0)); 60#46=VECTOR('',#45,4.0); 61#47=LINE('',#44,#46); 62#48=DEFINITIONAL_REPRESENTATION('pcdef',(#47),#6); 63#49=PCURVE('pc',#5,#48); 64#50=SURFACE_CURVE('sc',#43,(#49),.PCURVE_S1.); 65#51=EDGE_CURVE('ec',#18,#19,#50,.T.); 66#52=CARTESIAN_POINT('',(1.0,4.0,0.0)); 67#53=DIRECTION('',(0.0,-1.0,0.0)); 68#54=VECTOR('',#53,4.0); 69#55=LINE('',#52,#54); 70#56=CARTESIAN_POINT('',(1.0,4.0)); 71#57=DIRECTION('',(0.0,-1.0)); 72#58=VECTOR('',#57,4.0); 73#59=LINE('',#56,#58); 74#60=DEFINITIONAL_REPRESENTATION('pcdef',(#59),#6); 75#61=PCURVE('pc',#5,#60); 76#62=SURFACE_CURVE('sc',#55,(#61),.PCURVE_S1.); 77#63=EDGE_CURVE('ec',#19,#16,#62,.T.); 78#64=ORIENTED_EDGE('',$,$,#27,.T.); 79#65=ORIENTED_EDGE('',$,$,#39,.T.); 80#66=ORIENTED_EDGE('',$,$,#51,.T.); 81#67=ORIENTED_EDGE('',$,$,#63,.T.); 82#68=EDGE_LOOP('',(#64,#65,#66,#67)); 83#69=FACE_OUTER_BOUND('',#68,.T.); 84#70=ADVANCED_FACE('',(#69),#5,.T.); 85#71=OPEN_SHELL('',(#70)); 86#72=SHELL_BASED_SURFACE_MODEL('',(#71)); 87#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 88#9051=PRODUCT('Gs201','Gs201','',(#9050)); 89#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 90#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 91#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 92#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 93#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 94#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 95#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 96#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 97#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 98#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#72),#9060); 99#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 100ENDSEC; 101END-ISO-10303-21;