step-examples/12-2a-pcurves/Gp183.stp
Sources
- occt-coverage GAP audit, work packet D2 item `bc-invalid-same-range-flag`, `exchange/problems.json` `bc-invalid-same-range-flag` (`BRepCheck_Edge::Blind`/`InContext`, `BRepCheck_Edge.cxx:299,336` — sets `BRepCheck_InvalidSameRangeFlag`).
Sender
deduced — OCCT uncovered-class sweep, work packet D2.
Description
An `EDGE_CURVE` declares `same_range=.T.`, asserting that its 3D-curve parameter range and its pcurve's parameter range are identical, when in fact they genuinely differ: the 3D `LINE` spans `[0,10]` while the paired `PCURVE`'s UV `LINE` spans `[0,5]`. This is Twi082's exact numeric mismatch, but wired into a real `ADVANCED_FACE` on a `PLANE` instead of an orphan `GEOMETRIC_CURVE_SET` — so translation actually binds the pcurve to a face rather than yielding an empty shape.
Reproducer recipe
`PLANE`-hosted `EDGE_CURVE`: 3D `LINE` from `(0,0,0)` along `(1,0,0)` length 10; `PCURVE` UV `LINE` from `(0,0)` along `(1,0)` length 5; `EDGE_CURVE(...,.T.)` — `same_range` asserted true despite the 10-vs-5 range mismatch.
Expected kernel behavior
detect the range mismatch and flag the same-range validity status, or reject/repair with a diagnostic rather than silently trusting the flag.
Notes
**See also**: Twi082 (identical numeric defect, orphan `GEOMETRIC_CURVE_SET`, `occt=empty`). **Empirical finding (live-verified, OCP/OCCT 7.8.1)**: this fixture DOES reach a live face (`occt=shape(1)`, unlike Twi082) — that portion of the packet's ask is achieved. However, `BRep_Tool::Range(edge, face)` on the translated shape reads back `(0.0, 10.0)`, NOT the authored `(0.0, 5.0)` — OCCT's the edge-translation stage unconditionally rescales the pcurve's parameter domain to match the 3D curve during ordinary edge construction (confirmed under both `occt_heal_on` and `occt_heal_off` Interface_Static profiles; `BRep_Tool::SameRange(edge)` still reads `True` post-translation, but the underlying ranges have already been silently reconciled). Consequently the edge validity checker (Blind and `InContext(face)`) reports a no-error verdict, not the same-range validity status, on the final the loaded shape — the lie is healed away before any checker could observe it. This is consistent with the class's own `detect_only: true` tag in `problems.json`: the defect is a genuine, byte-level Part-21 malformation (useful for a static/structural linter) but appears to be structurally unobservable as a live `BRepCheck` finding via the standard STEP import pipeline, regardless of face-hosting. No fixture (this one included) has yet demonstrated a translated shape whose the edge validity checker actually flags `InvalidSameRangeFlag` via the standard reader path; see runtime-scaffold finding below for a direct-construction demonstration. **Runtime-scaffold verification (2026-07-16)**: bypassing the reader/translator entirely — constructing the identical byte-level defect (3D range `[0,10]`, pcurve range `[0,5]`, `SameRange` asserted `True`) directly via `BRep_Builder` — reproduces the lie undisturbed, and `BRepCheck_Edge`/`BRepCheck_Analyzer` genuinely fire `BRepCheck_InvalidSameRangeFlag` (plus `InvalidSameParameterFlag`) on it, live-confirmed. The defect IS genuinely encoded in the DATA-section bytes and IS reachable on a live face; what standard reading cannot observe is the live SameRange-flag-lie status on the as-declared geometry, because the reader's own range-normalization resolves it first — the same "silently heals on import" pattern documented for Twi286/Tfa249. Synonyms: "same_range flag lies", "SameRange assertion violated", "the same-range validity status not observable post-translation".
Expected validation
occt=shape(1)/shape(1) gmsh=reject ifc=schema_n/a
Byte assertions
contains(b'same_range_lie')contains(b"EDGE_CURVE('gp183_edge'")count_entity_def(b'EDGE_CURVE') == 1
Tier-3 assertions
shape_null == Falsen_faces_total == 1n_edges_total == 1n_vertices_total == 2face[0].surface_type == "plane"
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/* Gp183: PLANE-hosted EDGE_CURVE: 3D LINE from (0,0,0) along (1,0,0) length 10 (3D parameter range [0,10]) paired with a PCURVE whose UV LINE runs from (0,0) along (1,0) length 5 (parameter range [0,5]) -- genuinely different ranges -- but same_range=.T.; face-hosted so BRepCheck_Edge actually sees a live edge on a live face (Twi082's identical numeric mismatch lives in an orphan GEOMETRIC_CURVE_SET that OCC translates to empty) */ 3HEADER; 4FILE_DESCRIPTION(('Gp183'),'2;1'); 5FILE_NAME('Gp183.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('',#1,#2,#3); 14#5=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('',(10.0,0.0,0.0)); 18#9=VERTEX_POINT('',#7); 19#10=VERTEX_POINT('',#8); 20#11=DIRECTION('',(1.0,0.0,0.0)); 21#12=VECTOR('',#11,10.0); 22#13=LINE('',#7,#12); 23#14=CARTESIAN_POINT('',(0.0,0.0)); 24#15=DIRECTION('',(1.0,0.0)); 25#16=VECTOR('',#15,5.0); 26#17=LINE('same_range_lie',#14,#16); 27#18=DEFINITIONAL_REPRESENTATION('gp183_def',(#17),#6); 28#19=PCURVE('gp183_uv',#5,#18); 29#20=SURFACE_CURVE('gp183_sc',#13,(#19),.PCURVE_S1.); 30#21=EDGE_CURVE('gp183_edge',#9,#10,#20,.T.); 31#22=ORIENTED_EDGE('',$,$,#21,.T.); 32#23=EDGE_LOOP('',(#22)); 33#24=FACE_OUTER_BOUND('',#23,.T.); 34#25=ADVANCED_FACE('',(#24),#5,.T.); 35#26=OPEN_SHELL('',(#25)); 36#27=SHELL_BASED_SURFACE_MODEL('',(#26)); 37#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 38#9051=PRODUCT('Gp183','Gp183','',(#9050)); 39#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 40#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 41#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 42#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 43#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 44#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 45#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 46#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 47#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 48#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#27),#9060); 49#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 50ENDSEC; 51END-ISO-10303-21;