step-examples/12-2a-pcurves/Gp180.stp
Sources
- occt-coverage GAP audit, `tkshhealing/problems.json` `tkshh-near-zero-knot-span-thin-patch-filter` (`ShapeUpgrade_ConvertCurve2dToBezier::Compute()` near-zero knot-interval filter, `ShapeUpgrade_ConvertCurve2dToBezier.cxx:188-209`)
- surface-side sibling `ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute()` thin-patch filter (`.cxx:157-191`) is what Gn042 demonstrates.
Sender
Translators that emit a pcurve knot vector with an interior knot one multiplicity short of full (degree), inherited unmodified from an internal B-spline-fitting step.
Description
The standard 4-edge rectangular `PLANE` wire's bottom edge has a healthy 3D `LINE`, but its `PCURVE` is a degree-3 `B_SPLINE_CURVE_WITH_KNOTS` with 6 evenly-spaced, exactly collinear control points along `(0,0)->(10,0)` and Gn042's exact knot pattern: knots `(0.0, 0.5, 1.0)`, multiplicities `(4, 2, 4)` — the interior knot at `0.5` sits at multiplicity 2, one short of the degree-3 full-multiplicity value of 3. Bezier decomposition must insert one more copy of `0.5` to raise it to full multiplicity, producing a knot interval `[0.5, 0.5]` of literally zero width — a degenerate Bezier arc the thin-arc filter is supposed to drop from the decomposed segment set. Because the 6 control points are exactly collinear, the pcurve traces the identical straight path as the healthy 3D curve regardless of the pathological knot vector, isolating the defect to the knot structure alone.
Reproducer recipe
`PCURVE` whose `DEFINITIONAL_REPRESENTATION` item is a `B_SPLINE_CURVE_WITH_KNOTS` (degree 3, knots `(0.0,0.5,1.0)`, multiplicities `(4,2,4)`) on an otherwise-healthy edge (real 3D `LINE`, correctly-matching vertices).
Expected kernel behavior
during Bezier decomposition, detect that raising the interior knot to full multiplicity produces a zero-width span, and drop the resulting degenerate arc from the segment set rather than emitting it.
Notes
**See also**: Gn042 (surface-side sibling: the identical `(4,2,4)`-over-`(0.0,0.5,1.0)` knot pattern on a `B_SPLINE_SURFACE_WITH_KNOTS`'s U direction instead of a 2D pcurve). **OCC behavior**: silent-accept, healed correctly (catalog allowed: {heal}) — OCCT loads a full, correct `shape(1)` rectangle (area exactly `50.0`, 4 edges, 8 vertices); the zero-width Bezier arc is filtered out with no visible artifact, matching the filter's intended behavior. gmsh triangulates to `shape(9)`. Synonyms: "2D pcurve knot vector has near-zero-length span", "interior knot one multiplicity short of full degree", "ConvertCurve2dToBezier zero-width Bezier arc filtered", "Gn042 knot pattern mirrored onto a pcurve instead of a surface", "thin-arc filter drops degenerate Bezier segment".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a
Byte assertions
contains(b'B_SPLINE_CURVE_WITH_KNOTS')contains(b'PLANE')count_entity_def(b'PCURVE') == 4
Tier-3 assertions
shape_null == Falsen_faces_total == 1n_edges_total == 4n_vertices_total == 8face[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/* Gp180: Bottom edge's 2D PCURVE (degree 3, 6 collinear control points along (0,0)->(10,0)) uses Gn042's exact knot pattern -- knots (0.0,0.5,1.0), multiplicities (4,2,4) -- so the interior knot at 0.5 sits one multiplicity short of full (degree=3); Bezier decomposition (ShapeUpgrade_ConvertCurve2dToBezier) must insert one more copy of 0.5, producing a zero-width knot interval [0.5,0.5] the thin-patch filter should drop. The 3D curve is a plain, healthy LINE -- the defect is isolated to the pcurve knots. */ 3HEADER; 4FILE_DESCRIPTION(('Gp180'),'2;1'); 5FILE_NAME('Gp180.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=CARTESIAN_POINT('',(10.0,5.0,0.0)); 19#10=CARTESIAN_POINT('',(0.0,5.0,0.0)); 20#11=VERTEX_POINT('',#7); 21#12=VERTEX_POINT('',#8); 22#13=VERTEX_POINT('',#9); 23#14=VERTEX_POINT('',#10); 24#15=DIRECTION('',(1.0,0.0,0.0)); 25#16=VECTOR('',#15,10.0); 26#17=LINE('',#7,#16); 27#18=CARTESIAN_POINT('',(0.0,0.0)); 28#19=CARTESIAN_POINT('',(2.0,0.0)); 29#20=CARTESIAN_POINT('',(4.0,0.0)); 30#21=CARTESIAN_POINT('',(6.0,0.0)); 31#22=CARTESIAN_POINT('',(8.0,0.0)); 32#23=CARTESIAN_POINT('',(10.0,0.0)); 33#24=B_SPLINE_CURVE_WITH_KNOTS('near_zero_knot_span_pc',3,(#18,#19,#20,#21,#22,#23),.UNSPECIFIED.,.F.,.F.,(4,2,4),(0.0,0.5,1.0),.UNSPECIFIED.); 34#25=DEFINITIONAL_REPRESENTATION('pc_bot_def',(#24),#6); 35#26=PCURVE('bot_pc_thin_patch',#5,#25); 36#27=SURFACE_CURVE('bottom_edge_sc',#17,(#26),.PCURVE_S1.); 37#28=EDGE_CURVE('bottom_edge',#11,#12,#27,.T.); 38#29=DIRECTION('',(0.0,1.0,0.0)); 39#30=VECTOR('',#29,5.0); 40#31=LINE('',#8,#30); 41#32=CARTESIAN_POINT('',(10.0,0.0)); 42#33=DIRECTION('',(0.0,1.0)); 43#34=VECTOR('',#33,5.0); 44#35=LINE('',#32,#34); 45#36=DEFINITIONAL_REPRESENTATION('pc_right',(#35),#6); 46#37=PCURVE('right_pc',#5,#36); 47#38=SURFACE_CURVE('right_edge',#31,(#37),.PCURVE_S1.); 48#39=EDGE_CURVE('right_edge',#12,#13,#38,.T.); 49#40=DIRECTION('',(1.0,0.0,0.0)); 50#41=VECTOR('',#40,10.0); 51#42=LINE('',#10,#41); 52#43=CARTESIAN_POINT('',(0.0,5.0)); 53#44=DIRECTION('',(1.0,0.0)); 54#45=VECTOR('',#44,10.0); 55#46=LINE('',#43,#45); 56#47=DEFINITIONAL_REPRESENTATION('pc_top',(#46),#6); 57#48=PCURVE('top_pc',#5,#47); 58#49=SURFACE_CURVE('top_edge',#42,(#48),.PCURVE_S1.); 59#50=EDGE_CURVE('top_edge',#14,#13,#49,.T.); 60#51=DIRECTION('',(0.0,-1.0,0.0)); 61#52=VECTOR('',#51,5.0); 62#53=LINE('',#10,#52); 63#54=CARTESIAN_POINT('',(0.0,5.0)); 64#55=DIRECTION('',(0.0,-1.0)); 65#56=VECTOR('',#55,5.0); 66#57=LINE('',#54,#56); 67#58=DEFINITIONAL_REPRESENTATION('pc_left',(#57),#6); 68#59=PCURVE('left_pc',#5,#58); 69#60=SURFACE_CURVE('left_edge',#53,(#59),.PCURVE_S1.); 70#61=EDGE_CURVE('left_edge',#14,#11,#60,.T.); 71#62=ORIENTED_EDGE('',$,$,#28,.T.); 72#63=ORIENTED_EDGE('',$,$,#39,.T.); 73#64=ORIENTED_EDGE('',$,$,#50,.F.); 74#65=ORIENTED_EDGE('',$,$,#61,.T.); 75#66=EDGE_LOOP('',(#62,#63,#64,#65)); 76#67=FACE_OUTER_BOUND('',#66,.T.); 77#68=ADVANCED_FACE('',(#67),#5,.T.); 78#69=OPEN_SHELL('',(#68)); 79#70=SHELL_BASED_SURFACE_MODEL('',(#69)); 80#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 81#9051=PRODUCT('Gp180','Gp180','',(#9050)); 82#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 83#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 84#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 85#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 86#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 87#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 88#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 89#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 90#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 91#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#70),#9060); 92#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 93ENDSEC; 94END-ISO-10303-21;