step-examples/12-2c-surfaces/Gs026.stp
Sources
- R027, G073
Description
When a 3D helix on a `CYLINDRICAL_SURFACE` is projected to the surface's parametric domain, the projection ought to yield an analytic 2D `LINE` segment — the helix unwraps cleanly onto a straight UV path. The actual translator either emits an empty `SURFACE_CURVE.associated_geometry` list (no pcurve at all on a non-trivial helical 3D `B_SPLINE_CURVE_WITH_KNOTS` `EDGE_CURVE`), or emits a BSpline approximation with poor accuracy — losing the analytic-line representation and inflating tolerance budgets downstream.
Reproducer recipe
Edge whose 3D curve is helix on cylinder, no pcurve attached; reference from face on `CYLINDRICAL_SURFACE`.
Expected kernel behavior
detect that the projected pcurve is collinear in UV and emit it as a 2D `LINE` pcurve, or reject as a translation-quality issue. A normal-distance closeness check is sufficient for the elementary-surface family.
Notes
Cross-oracle: pure-Python Part-21 validator accepts (`accept`); OCCT crashes (`signal(11)`). The crash is on the kernel side; the file is spec-conformant Part-21.
Expected validation
occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a
Byte assertions
contains(b'CYLINDRICAL_SURFACE(')contains(b'B_SPLINE_CURVE_WITH_KNOTS(')matches(rb'SURFACE_CURVE\([^)]*\(\),\.PCURVE_S1\.\)')
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Gs026 - Helix on cylinder mis-projected (analytic line lost) 3 * 4 * Sources: R027, G073 5 * Originally also catalogued as: Gp009, Gn006 6 * 7 * Defect: When a 3D helix is projected to the parametric space of its hosting 8 * cylinder, projection should yield an analytic 2D line segment. OCCT's 9 * ShapeConstruct_ProjectCurveOnSurface instead returned a BSpline approximation 10 * with poor accuracy. BRepAdaptor_Surface UV bounds also recomputed unnecessarily 11 * on cylinder query. 12 * 13 * Reproducer: Edge whose 3D curve is helix on cylinder, no pcurve attached; 14 * reference from face on CYLINDRICAL_SURFACE. 15 * 16 * Expected kernel behavior: 17 * heal - detect line-on-elementary-surface case; emit a 2D LINE pcurve. Add 18 * closeness-to-line check using normal-distance for C1 surfaces. */ 19HEADER; 20FILE_DESCRIPTION(('Gs026 test case','Helix on cylinder, missing analytic pcurve'),'2;1'); 21FILE_NAME('Gs026.stp','2026-04-26T00:00:00',(''),(''),'auto-generated','',''); 22FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }')); 23ENDSEC; 24DATA; 25#1=APPLICATION_CONTEXT('automotive_design'); 26#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1); 27#10=CARTESIAN_POINT('',(0.0,0.0,0.0)); 28#11=DIRECTION('',(0.0,0.0,1.0)); 29#12=DIRECTION('',(1.0,0.0,0.0)); 30#13=AXIS2_PLACEMENT_3D('',#10,#11,#12); 31#20=CYLINDRICAL_SURFACE('',#13,5.0); 32/* 3D helix as a B_SPLINE_CURVE approximation (one helical pitch) */ 33#30=CARTESIAN_POINT('',(5.0,0.0,0.0)); 34#31=CARTESIAN_POINT('',(5.0,5.0,2.5)); 35#32=CARTESIAN_POINT('',(0.0,5.0,5.0)); 36#33=CARTESIAN_POINT('',(-5.0,5.0,7.5)); 37#34=CARTESIAN_POINT('',(-5.0,0.0,10.0)); 38#35=B_SPLINE_CURVE_WITH_KNOTS('',3, 39 (#30,#31,#32,#33,#34), 40 .UNSPECIFIED.,.F.,.F., 41 (4,1,4),(0.0,0.5,1.0), 42 .UNSPECIFIED.); 43#40=VERTEX_POINT('',#30); 44#41=VERTEX_POINT('',#34); 45/* Defect: SURFACE_CURVE on a cylinder has empty associated_geometry where an 46 * analytic 2D LINE pcurve should appear (helix maps to straight line in (U,V)). */ 47#50=SURFACE_CURVE('',#35,(),.PCURVE_S1.); 48#60=EDGE_CURVE('',#40,#41,#50,.T.); 49#61=ORIENTED_EDGE('',*,*,#60,.T.); 50#62=EDGE_LOOP('',(#61)); 51#63=FACE_OUTER_BOUND('',#62,.T.); 52#64=ADVANCED_FACE('',(#63),#20,.T.); 53ENDSEC; 54END-ISO-10303-21;