step-examples/12-2a-pcurves/Gp194.stp
Sources
- occt-coverage PARTIAL audit, `tkshhealing/problems.json` `tkshh-nonperiodic-bspline-seamlike-edge` subvariant 3. `ShapeUpgrade_UnifySameDomain::IntUnifyFaces` — `ShapeUpgrade_UnifySameDomain.cxx` @ `bd2a789f15235755ce4d1a3b07379a2e062fdc2e`: `Uperiod` derived from `aBaseSurface->IsUPeriodic()` at `:2946`, seam/like-seam classification at `:3204-3218`, branch gate `myConcatBSplines && !EdgeWith2pcurves.IsNull() && !SeamFound` at `:3221`, `Uperiod == 0.` test at `:3243`, `aBSplineSurface.IsNull()` test at `:3252`, `GeomConvert_ApproxSurface` at `:3258`, `SetUPeriodic`/`SetVPeriodic` at `:3264`/`:3269`.
Description
The CATIA like-seam idiom (a single `EDGE_CURVE` whose `SURFACE_CURVE` carries TWO `PCURVE`s on one and the same host surface, used twice with opposite orientations in one `EDGE_LOOP`) hosted on a `SURFACE_OF_LINEAR_EXTRUSION` swept 1.0 along +Z from a CLOSED but NON-PERIODIC `B_SPLINE_CURVE_WITH_KNOTS` — 9 control points around a unit circle with the first pole equal to the last, degree 2, clamped knots. An extrusion inherits its periodicity from its basis curve, so this host wraps around in U while declaring no period, and it is not a B-spline surface. That combination is precisely what the subvariant names and what none of the existing fixtures can present: Gp013 and Gp181 are B-spline hosts (so no approximation is needed, and the reader has already periodized them by the time a shape exists), and Gp182's `CYLINDRICAL_SURFACE` is inherently periodic, so it can never require the approximation either.
Reproducer recipe
`SURFACE_OF_LINEAR_EXTRUSION('',#closed_nonperiodic_bspline_curve,#vector)` as the surface of an `ADVANCED_FACE`; one `EDGE_CURVE` whose `SURFACE_CURVE` lists TWO `PCURVE`s, both with `basis_surface` = that extrusion, one a 2D line at u=0 and one at u=1; that `EDGE_CURVE` referenced twice, with opposite `ORIENTED_EDGE` senses, in the face's single `EDGE_LOOP`, closed off by the two wrap-around `CIRCLE` edges at v=0 and v=1.
Expected kernel behavior
recognise that the host is closed in U but carries no declared period and cannot be periodized in place because it is not a B-spline; approximate it to a B-spline surface first, declare that surface periodic in U, migrate every pcurve to it, and merge across the like-seam edge — rather than treating the two pcurve banks as an ordinary non-seam duplication.
Notes
Live-verified (2026-07-31, this worktree, OCP/OCCT 7.8.1) against this fixture's own bytes: the face reads back on a a linear-extrusion surface with declares no U period, is closed in U, U bounds [0,1], and the reader does NOT periodize it — the direct contrast with Gp013 (declares a U period straight out of the reader) and Gp181 (declares a V period), both live-rechecked here, and with Gp182's cylinder (declares a U period by construction). **Control**: the byte-identical construction with only the basis curve swapped for a `CIRCLE` reads back on a a linear-extrusion surface with declares a U period, isolating the closed-but-non-periodic basis curve as the sole cause of the missing period. **HONEST LIMITATION — what this fixture does NOT show**: it supplies the input precondition (and is the only fixture in the class that genuinely does), but it does not independently demonstrate the unify-level repair firing, and no STEP file appears able to. That branch additionally needs `faces.Length() > 1` in one same-domain group plus an `EdgeWith2pcurves` — an edge carrying two pcurves on the reference face while NOT being really-closed in that face (`the unify sources (cited in Sources)) — and the two ways a STEP file can produce two pcurves are mutually exclusive with that. Route (a), the true-seam route, requires the same edge to appear TWICE in one `EDGE_LOOP` (the reader's seam-detection helper), which is what makes the reader call the two-pcurve `BRep_Builder::UpdateEdge` overload (the reader's edge-loop translation step, `:621`) — but an edge appearing twice in a face IS really-closed there, so `:3206` classifies it as a seam, `:3218` sets `SeamFound`, and `:3221` disables the branch. Route (b), the like-seam route, requires the edge to appear exactly ONCE (the reader's seam-detection helper) and stores only the SINGLE-pcurve overload per face (the reader's edge-loop translation step, `:625`); with both faces on the same surface and identity location the second call replaces the first, so no `BRep_CurveOnClosedSurface` is ever built and `BRep_Tool::IsClosed(edge, face)` stays false. Live-confirmed: a two-face variant of exactly this idiom (two half-faces on one shared host, the like-seam edge used once in each) was built and read in this worktree and came back with ZERO edges carrying two pcurves on their face, and the same-domain face-unification pass with ConcatBSplines on and off produced identical output. **See also**: Gp013 (U-direction B-spline host), Gp181 (V-direction B-spline host), Gp182 (the earlier non-B-spline attempt, whose cylinder is inherently periodic — this fixture is its corrected successor and does not replace it). Synonyms: "extrusion of closed non-periodic curve", "surface wraps but declares no period", "like-seam on non-bspline host", "two pcurve banks non-periodic extrusion", "CATIA seam surface needs approximation". Provenance tier: bytes-sufficient.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(6) ifc=schema_n/a
Byte assertions
count_entity_def(b'SURFACE_OF_LINEAR_EXTRUSION') == 1count_entity_def(b'B_SPLINE_CURVE_WITH_KNOTS') == 1contains(b'extrusion_like_seam')
Tier-3 assertions
face[0].surface_type == "extrusion"n_faces_total == 1n_edges_total == 4
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/* Gp194: OPEN_SHELL with one ADVANCED_FACE hosted on a SURFACE_OF_LINEAR_EXTRUSION whose basis is a CLOSED but NON-PERIODIC B_SPLINE_CURVE_WITH_KNOTS (9 control points around a unit circle, first == last, degree 2, clamped knots) swept 1.0 along +Z: the surface wraps around in U yet reports no period, and is not a B-spline surface. A single like-seam EDGE_CURVE ('extrusion_like_seam') whose SURFACE_CURVE carries TWO PCURVEs on that same host -- one bank at u=0, one at u=1 -- is used twice with opposite orientations in the face's only EDGE_LOOP, the CATIA idiom. Unlike Gp182's CYLINDRICAL_SURFACE (inherently periodic) and unlike Gp013/Gp181's B-spline hosts (which the reader periodizes on the way in), this host genuinely satisfies both preconditions of the approximate-before-periodize repair: no declared period, and not already a B-spline */ 3HEADER; 4FILE_DESCRIPTION(('Gp194'),'2;1'); 5FILE_NAME('Gp194.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('',(1.0,0.0,0.0)); 11#2=CARTESIAN_POINT('',(0.707106781187,0.707106781187,0.0)); 12#3=CARTESIAN_POINT('',(0.0,1.0,0.0)); 13#4=CARTESIAN_POINT('',(-0.707106781187,0.707106781187,0.0)); 14#5=CARTESIAN_POINT('',(-1.0,0.0,0.0)); 15#6=CARTESIAN_POINT('',(-0.707106781187,-0.707106781187,0.0)); 16#7=CARTESIAN_POINT('',(0.0,-1.0,0.0)); 17#8=CARTESIAN_POINT('',(0.707106781187,-0.707106781187,0.0)); 18#9=CARTESIAN_POINT('',(1.0,0.0,0.0)); 19#10=B_SPLINE_CURVE_WITH_KNOTS('',2,(#1,#2,#3,#4,#5,#6,#7,#8,#9),.UNSPECIFIED.,.F.,.F.,(3,1,1,1,1,1,1,3),(0.0,0.125,0.25,0.375,0.5,0.625,0.75,1.0),.UNSPECIFIED.); 20#11=DIRECTION('',(0.0,0.0,1.0)); 21#12=VECTOR('',#11,1.0); 22#13=SURFACE_OF_LINEAR_EXTRUSION('extrusion_host',#10,#12); 23#14=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 24#15=CARTESIAN_POINT('',(1.0,0.0,0.0)); 25#16=CARTESIAN_POINT('',(1.0,0.0,1.0)); 26#17=VERTEX_POINT('',#15); 27#18=VERTEX_POINT('',#16); 28#19=VECTOR('',#11,1.0); 29#20=LINE('',#15,#19); 30#21=CARTESIAN_POINT('',(0.000000000000,0.000000000000)); 31#22=DIRECTION('',(0.000000000000,1.000000000000)); 32#23=VECTOR('',#22,1.000000000000); 33#24=LINE('',#21,#23); 34#25=DEFINITIONAL_REPRESENTATION('seam_bank_u0',(#24),#14); 35#26=PCURVE('seam_bank_u0',#13,#25); 36#27=CARTESIAN_POINT('',(1.000000000000,0.000000000000)); 37#28=DIRECTION('',(0.000000000000,1.000000000000)); 38#29=VECTOR('',#28,1.000000000000); 39#30=LINE('',#27,#29); 40#31=DEFINITIONAL_REPRESENTATION('seam_bank_u1',(#30),#14); 41#32=PCURVE('seam_bank_u1',#13,#31); 42#33=SURFACE_CURVE('extrusion_like_seam',#20,(#26,#32),.PCURVE_S1.); 43#34=EDGE_CURVE('seam',#17,#18,#33,.T.); 44#35=CARTESIAN_POINT('',(0.0,0.0,0.0)); 45#36=DIRECTION('',(1.0,0.0,0.0)); 46#37=AXIS2_PLACEMENT_3D('',#35,#11,#36); 47#38=CIRCLE('',#37,1.0); 48#39=CARTESIAN_POINT('',(0.000000000000,0.000000000000)); 49#40=DIRECTION('',(1.000000000000,0.000000000000)); 50#41=VECTOR('',#40,1.000000000000); 51#42=LINE('',#39,#41); 52#43=DEFINITIONAL_REPRESENTATION('bot_arc_pc',(#42),#14); 53#44=PCURVE('bot_arc_pc',#13,#43); 54#45=SURFACE_CURVE('bot_arc',#38,(#44),.PCURVE_S1.); 55#46=EDGE_CURVE('bot_arc',#17,#17,#45,.T.); 56#47=CARTESIAN_POINT('',(0.0,0.0,1.0)); 57#48=DIRECTION('',(1.0,0.0,0.0)); 58#49=AXIS2_PLACEMENT_3D('',#47,#11,#48); 59#50=CIRCLE('',#49,1.0); 60#51=CARTESIAN_POINT('',(0.000000000000,1.000000000000)); 61#52=DIRECTION('',(1.000000000000,0.000000000000)); 62#53=VECTOR('',#52,1.000000000000); 63#54=LINE('',#51,#53); 64#55=DEFINITIONAL_REPRESENTATION('top_arc_pc',(#54),#14); 65#56=PCURVE('top_arc_pc',#13,#55); 66#57=SURFACE_CURVE('top_arc',#50,(#56),.PCURVE_S1.); 67#58=EDGE_CURVE('top_arc',#18,#18,#57,.T.); 68#59=ORIENTED_EDGE('',$,$,#46,.T.); 69#60=ORIENTED_EDGE('',$,$,#34,.T.); 70#61=ORIENTED_EDGE('',$,$,#58,.F.); 71#62=ORIENTED_EDGE('',$,$,#34,.F.); 72#63=EDGE_LOOP('',(#59,#60,#61,#62)); 73#64=FACE_OUTER_BOUND('',#63,.T.); 74#65=ADVANCED_FACE('',(#64),#13,.T.); 75#66=OPEN_SHELL('',(#65)); 76#67=SHELL_BASED_SURFACE_MODEL('',(#66)); 77#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 78#9051=PRODUCT('Gp194','Gp194','',(#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;