step-examples/12-2a-pcurves/Gp189.stp
Sources
- occt-coverage GAP audit, work packet D2 item `stp-missing-pcurve-projection`, `exchange/problems.json` `stp-missing-pcurve-projection` (`StepToTopoDS_TranslateEdgeLoop::Init`, `StepToTopoDS_TranslateEdgeLoop.cxx:475-479,539-557` — pcurve in the `associated_geometry` list fails to translate → `hasPcurve=False`, `aTool.ComputePCurve(True)` defers to projection
- `:690-708` — `ShapeFix_EdgeProjAux` projects
- pcurve removed if projection fails).
Sender
deduced — OCCT uncovered-class sweep, work packet D2.
Description
A half-cylinder face (u in `[0,pi]`, v in `[0,1]`), the same 4-edge idiom as Gp035. The left seam edge's `SURFACE_CURVE` carries a correct 3D `LINE` plus a real, non-null `PCURVE` in `associated_geometry` — but that `PCURVE`'s `DEFINITIONAL_REPRESENTATION` `items` list references a `LINE` built from 3-coordinate (3D) `CARTESIAN_POINT`/`DIRECTION` entities instead of the 2-coordinate ones a pcurve's UV-space `LINE` requires — a wrong-dimensionality item, the kind of bug a producer's export code genuinely commits when it accidentally wires a 3D curve builder into a 2D pcurve slot. The other three edges (bottom arc, right seam, top arc) are correct `SURFACE_CURVE`s.
Reproducer recipe
Left seam `SURFACE_CURVE` wraps a correct 3D `LINE` plus one `PCURVE` whose `DEFINITIONAL_REPRESENTATION` item is `LINE('wrong_dim_pcurve_item', <3D point>, <3D vector>)` instead of a 2D `LINE`.
Expected kernel behavior
the malformed pcurve item fails its per-item conversion; the edge-loop translation stage defers the edge and computes a correct pcurve by projecting the already-built 3D edge onto the face's surface.
Notes
**See also**: Gp001, Gp035, Gp042 (the "no pcurve entity at all" trigger mode — already solid). Gp012 (struck as a bogus citation for this class per prior audit: its `SEAM_CURVE associated_geometry` contains `(#pc,$)`, a null `$` slot, which is the SAME "absent pcurve" mode as Gp001/Gp035/Gp042, not "a real pcurve reference that fails to translate"). This fixture is the first to encode the latter. **Empirical finding (live-verified, decisive; includes a discarded unsafe attempt)**: the obvious first construction — a `DEFINITIONAL_REPRESENTATION` item that is a totally wrong entity TYPE (a bare `CARTESIAN_POINT` standing in for a curve) — was built and tested first. It reads and transfers-roots without a caught Python exception, but SEGFAULTS OCCT 7.8.1 (OCP) once that malformed edge sits inside a closed 4-edge loop next to other pcurve'd edges (confirmed reproducible: a single-edge, non-looped minimal repro of the identical item does NOT crash; the same item inside a 4-edge closed loop crashes 100% of the time, under both `healing=True` and `healing=False`). A segfault is not a Python-catchable outcome — it kills the interpreter — so that construction was DISCARDED as unsafe for this corpus's live harness/CI and never shipped. The wrong-dimensionality `LINE` shipped here was verified safe (no crash under either healing profile) and, via `BRep_Tool::CurveOnSurface` on the translated shape, decisively confirmed to demonstrate the intended mechanism: the left seam edge's malformed pcurve item is silently dropped, and OCCT supplies a freshly-computed pcurve instead — sampled at `t=0.0,0.25,0.5,0.75,1.0`, the recovered pcurve is `u=0.0` constant with `v` running `0.0→1.0`, exactly the correct projected result for that physical edge (matching the healthy right-seam edge's own pcurve shape in Gp035).
Expected validation
occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a
Byte assertions
contains(b'wrong_dim_pcurve_item')contains(b'left_malformed_pc')count_entity_def(b'PCURVE') == 4
Tier-3 assertions
shape_null == Falsen_faces_total == 1n_edges_total == 4n_vertices_total == 8face[0].surface_type == "cylinder"
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/* Gp189: Left seam EDGE_CURVE on CYLINDRICAL_SURFACE: SURFACE_CURVE wraps a correct 3D LINE plus a real (non-null) PCURVE in associated_geometry, but that PCURVE's DEFINITIONAL_REPRESENTATION items list references a LINE built from 3-coordinate (3D) point/direction entities -- wrong dimensionality for a 2D pcurve item -- so OCCT's pcurve-specific conversion fails and drops it while the 3D LINE stays intact; verified live that OCCT then supplies a projected pcurve instead (u=0 constant, v: 0->1) -- 'listed pcurve fails to translate' mode (contrast Gp012's null $ slot and Gp035's fully absent pcurve) */ 3HEADER; 4FILE_DESCRIPTION(('Gp189'),'2;1'); 5FILE_NAME('Gp189.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=CYLINDRICAL_SURFACE('',#4,1.0); 15#6=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 16#7=CARTESIAN_POINT('',(1.0,0.0,0.0)); 17#8=CARTESIAN_POINT('',(-1.0,0.0,0.0)); 18#9=CARTESIAN_POINT('',(1.0,0.0,1.0)); 19#10=CARTESIAN_POINT('',(-1.0,0.0,1.0)); 20#11=VERTEX_POINT('',#7); 21#12=VERTEX_POINT('',#8); 22#13=VERTEX_POINT('',#9); 23#14=VERTEX_POINT('',#10); 24#15=DIRECTION('',(0.0,0.0,1.0)); 25#16=VECTOR('',#15,1.0); 26#17=LINE('',#7,#16); 27#18=CARTESIAN_POINT('',(0.3,0.0,0.0)); 28#19=DIRECTION('',(0.0,1.0,0.0)); 29#20=VECTOR('',#19,1.0); 30#21=LINE('wrong_dim_pcurve_item',#18,#20); 31#22=DEFINITIONAL_REPRESENTATION('bad_def',(#21),#6); 32#23=PCURVE('left_bad_pc',#5,#22); 33#24=SURFACE_CURVE('left_seam_malformed_pc',#17,(#23),.PCURVE_S1.); 34#25=EDGE_CURVE('left_malformed_pc',#11,#13,#24,.T.); 35#26=LINE('',#8,#16); 36#27=CARTESIAN_POINT('',(3.14159265359,0.0)); 37#28=DIRECTION('',(0.0,1.0)); 38#29=VECTOR('',#28,1.0); 39#30=LINE('',#27,#29); 40#31=DEFINITIONAL_REPRESENTATION('pc_right',(#30),#6); 41#32=PCURVE('right_seam',#5,#31); 42#33=SURFACE_CURVE('right_seam',#26,(#32),.PCURVE_S1.); 43#34=EDGE_CURVE('right_seam',#12,#14,#33,.T.); 44#35=CARTESIAN_POINT('',(0.0,0.0,0.0)); 45#36=DIRECTION('',(0.0,0.0,1.0)); 46#37=DIRECTION('',(1.0,0.0,0.0)); 47#38=AXIS2_PLACEMENT_3D('',#35,#36,#37); 48#39=CIRCLE('',#38,1.0); 49#40=CARTESIAN_POINT('',(0.0,0.0)); 50#41=DIRECTION('',(1.0,0.0)); 51#42=VECTOR('',#41,3.14159265359); 52#43=LINE('',#40,#42); 53#44=DEFINITIONAL_REPRESENTATION('pc_bot',(#43),#6); 54#45=PCURVE('bot_arc',#5,#44); 55#46=SURFACE_CURVE('bot_arc',#39,(#45),.PCURVE_S1.); 56#47=EDGE_CURVE('bot_arc',#11,#12,#46,.T.); 57#48=CARTESIAN_POINT('',(0.0,0.0,1.0)); 58#49=AXIS2_PLACEMENT_3D('',#48,#36,#37); 59#50=CIRCLE('',#49,1.0); 60#51=CARTESIAN_POINT('',(0.0,1.0)); 61#52=DIRECTION('',(1.0,0.0)); 62#53=VECTOR('',#52,3.14159265359); 63#54=LINE('',#51,#53); 64#55=DEFINITIONAL_REPRESENTATION('pc_top',(#54),#6); 65#56=PCURVE('top_arc',#5,#55); 66#57=SURFACE_CURVE('top_arc',#50,(#56),.PCURVE_S1.); 67#58=EDGE_CURVE('top_arc',#13,#14,#57,.T.); 68#59=ORIENTED_EDGE('',$,$,#47,.T.); 69#60=ORIENTED_EDGE('',$,$,#34,.T.); 70#61=ORIENTED_EDGE('',$,$,#58,.F.); 71#62=ORIENTED_EDGE('',$,$,#25,.F.); 72#63=EDGE_LOOP('',(#59,#60,#61,#62)); 73#64=FACE_OUTER_BOUND('',#63,.T.); 74#65=ADVANCED_FACE('',(#64),#5,.T.); 75#66=OPEN_SHELL('',(#65)); 76#67=SHELL_BASED_SURFACE_MODEL('',(#66)); 77#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 78#9051=PRODUCT('Gp189','Gp189','',(#9050)); 79#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 80#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 81#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 82#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 83#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 84#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 85#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 86#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 87#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 88#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#67),#9060); 89#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 90ENDSEC; 91END-ISO-10303-21;