step-examples/12-2b-nurbs/Gn179.stp
Sources
- OCCT `ShapeCustom_SweptToElementary::NewSurface` (`src/ShapeCustom/ShapeCustom_SweptToElementary.cxx:88-126`: `:99-107` loads the basis curve into a `GeomAdaptor_Curve`/`GeomAdaptor_SurfaceOfRevolution` and switches on `AS.GetType()`
- `:118-122` the `GeomAbs_Cylinder` case, `S = new Geom_CylindricalSurface(AS.Cylinder())
- `) and the gating `IsToConvert` helper (`:58-80`, requiring the surface to genuinely be a `Geom_SweptSurface` kind — `Geom_SurfaceOfRevolution` or `Geom_SurfaceOfLinearExtrusion`, optionally wrapped in `Geom_RectangularTrimmedSurface`/`Geom_OffsetSurface`) @ `bd2a789f15235755ce4d1a3b07379a2e062fdc2e` (verified against source at this commit). Public entry point `ShapeCustom::SweptToElementary` (`ShapeCustom.hxx`).
Description
A single `ADVANCED_FACE` on a `SURFACE_OF_REVOLUTION` (quarter-wedge boundary) sweeps a straight `LINE` (offset radius 3.0, direction parallel to the revolution axis) about that same axis — a genuinely SWEPT authoring of a cylinder, not a B-spline that merely happens to resemble one. This is the missing subvariant the packet spec calls out: N030 (quarter cylinder stored as a B-spline) and Gn015 (rational B-spline that is exactly a surface of revolution) both demonstrate canonical-form recovery from B-SPLINE sources; neither encodes the surface via the actual generic-sweep `SURFACE_OF_REVOLUTION`+`LINE` entity pair that this class's mechanism (classifying the swept adaptor curve by its underlying analytic type) is specifically built to recognize.
Reproducer recipe
`AXIS1_PLACEMENT` at the origin along Z; `LINE` at `(3.0,0.0,0.0)` with direction `(0.0,0.0,1.0)` (parallel to the revolution axis, offset by the target cylinder radius); `SURFACE_OF_REVOLUTION('name', line, axis1_placement)` as `ADVANCED_FACE.face_geometry`; boundary a 4-edge quarter-wedge loop (two `TRIMMED_CURVE`-over-`CIRCLE` isoparametric arcs at the two axial extremes, both radius 3.0, and two straight `LINE` isoparametric edges at u=0 and u=π/2 parallel to the axis).
Expected kernel behavior
A receiver targeting canonical elementary-surface representation must recognize that the swept generatrix (a straight line parallel to the revolution axis) produces exactly a cylinder, and rebuild the face on a `CYLINDRICAL_SURFACE` rather than leaving the generic `SURFACE_OF_REVOLUTION` wrapper in place — an exact, lossless re-expression (same point set), not an approximation.
Notes
Live-verified directly against the fixture's own bytes (the reader loads the face, then the swept-to-elementary recognition healer is invoked directly on it — matching the established convention of driving the healer directly since it is not part of the default read): raw read is 1 face, a surface of revolution, face area `28.274333882308202` (exactly the quarter-cylinder lateral-area formula `θ·R·H = (π/2)·3·6 = 9π`, confirming the exact geometry); after `SweptToElementary`, the result is 1 face, `Geom_CylindricalSurface` with `Radius()==3.0` and IDENTICAL face area `28.274333882308202` (bit-for-bit — an exact analytic re-expression) — confirming genuine, lossless swept-to-elementary recognition from a truly swept (not B-spline) source. Fills `seq-swept-to-elementary`'s previously-missing "swept-source direction" subvariant; N030/Gn015 cover the B-spline-source direction of the same class. Inverse direction of Gn178 (elementary-to-revolution). Synonyms: "swept cylinder recognized as elementary surface", "swept-adaptor-curve type classification recovers elementary form", "SURFACE_OF_REVOLUTION LINE generatrix parallel to axis", "generic sweep authored cylinder canonical-form recovery", "genuinely swept source not B-spline disguise".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a
Byte assertions
contains(b'SURFACE_OF_REVOLUTION')contains(b'AXIS1_PLACEMENT')count_entity_def(b'ADVANCED_FACE') == 1count_entity_def(b'LINE') >= 5
Tier-3 assertions
load == "ok"shape_null == Falsen_faces_total == 1
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/* Gn179: SURFACE_OF_REVOLUTION whose swept curve is a straight LINE parallel to the revolution 3 axis (offset radius 3.0) -- an exact cylinder authored via the generic swept-surface entity 4 rather than CYLINDRICAL_SURFACE; a consumer requiring canonical elementary-surface form cannot 5 recognize this as a cylinder without conversion; exercises ShapeCustom_SweptToElementary's 6 SurfaceOfRevolution+Line->Geom_CylindricalSurface branch; the inverse direction of Gn178 and 7 the genuinely-swept-source variant that N030/Gn015 (B-spline generatrix sources) don't cover */ 8HEADER; 9FILE_DESCRIPTION(('Gn179'),'2;1'); 10FILE_NAME('Gn179.stp','2026-07-13T00:00:00',(''),(''),'cad-research-suite','',''); 11FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 12ENDSEC; 13DATA; 14#9000=APPLICATION_CONTEXT('mechanical design'); 15#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 16#2=DIRECTION('',(0.0,0.0,1.0)); 17#3=AXIS1_PLACEMENT('gn179_rev_axis',#1,#2); 18#4=CARTESIAN_POINT('',(3.0,0.0,0.0)); 19#5=DIRECTION('',(0.0,0.0,1.0)); 20#6=VECTOR('',#5,1.0); 21#7=LINE('gn179_generatrix',#4,#6); 22#8=SURFACE_OF_REVOLUTION('gn179_swept_cyl',#7,#3); 23#9=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 24#10=CARTESIAN_POINT('',(0.0,0.0,0.0)); 25#11=DIRECTION('',(0.0,0.0,1.0)); 26#12=DIRECTION('',(1.0,0.0,0.0)); 27#13=AXIS2_PLACEMENT_3D('',#10,#11,#12); 28#14=CIRCLE('gn179_bottom_circle',#13,3.0); 29#15=CARTESIAN_POINT('',(3.0,0.0,0.0)); 30#16=VERTEX_POINT('',#15); 31#17=CARTESIAN_POINT('',(0.0,3.0,0.0)); 32#18=VERTEX_POINT('',#17); 33#19=TRIMMED_CURVE('gn179_bottom_arc',#14,(PARAMETER_VALUE(0.0)),(PARAMETER_VALUE(1.5707963267949)),.T.,.PARAMETER.); 34#20=CARTESIAN_POINT('',(0.0,0.0)); 35#21=DIRECTION('',(1.0,0.0)); 36#22=VECTOR('',#21,1.5707963267949); 37#23=LINE('',#20,#22); 38#24=DEFINITIONAL_REPRESENTATION('pcdef',(#23),#9); 39#25=PCURVE('pc',#8,#24); 40#26=SURFACE_CURVE('sc',#19,(#25),.PCURVE_S1.); 41#27=EDGE_CURVE('gn179_edge_bottom_arc',#16,#18,#26,.T.); 42#28=CARTESIAN_POINT('',(0.0,3.0,0.0)); 43#29=DIRECTION('',(0.0,0.0,1.0)); 44#30=VECTOR('',#29,6.0); 45#31=LINE('',#28,#30); 46#32=CARTESIAN_POINT('',(1.5707963267949,0.0)); 47#33=DIRECTION('',(0.0,1.0)); 48#34=VECTOR('',#33,6.0); 49#35=LINE('',#32,#34); 50#36=DEFINITIONAL_REPRESENTATION('pcdef',(#35),#9); 51#37=PCURVE('pc',#8,#36); 52#38=SURFACE_CURVE('sc',#31,(#37),.PCURVE_S1.); 53#39=CARTESIAN_POINT('',(0.0,3.0,6.0)); 54#40=VERTEX_POINT('',#39); 55#41=EDGE_CURVE('gn179_edge_side_u90',#18,#40,#38,.T.); 56#42=CARTESIAN_POINT('',(0.0,0.0,6.0)); 57#43=DIRECTION('',(0.0,0.0,1.0)); 58#44=DIRECTION('',(1.0,0.0,0.0)); 59#45=AXIS2_PLACEMENT_3D('',#42,#43,#44); 60#46=CIRCLE('gn179_top_circle',#45,3.0); 61#47=TRIMMED_CURVE('gn179_top_arc',#46,(PARAMETER_VALUE(0.0)),(PARAMETER_VALUE(1.5707963267949)),.T.,.PARAMETER.); 62#48=CARTESIAN_POINT('',(3.0,0.0,6.0)); 63#49=VERTEX_POINT('',#48); 64#50=CARTESIAN_POINT('',(1.5707963267949,6.0)); 65#51=DIRECTION('',(-1.0,0.0)); 66#52=VECTOR('',#51,1.5707963267949); 67#53=LINE('',#50,#52); 68#54=DEFINITIONAL_REPRESENTATION('pcdef',(#53),#9); 69#55=PCURVE('pc',#8,#54); 70#56=SURFACE_CURVE('sc',#47,(#55),.PCURVE_S1.); 71#57=EDGE_CURVE('gn179_edge_top_arc',#40,#49,#56,.F.); 72#58=CARTESIAN_POINT('',(3.0,0.0,6.0)); 73#59=DIRECTION('',(0.0,0.0,-1.0)); 74#60=VECTOR('',#59,6.0); 75#61=LINE('',#58,#60); 76#62=CARTESIAN_POINT('',(0.0,6.0)); 77#63=DIRECTION('',(0.0,-1.0)); 78#64=VECTOR('',#63,6.0); 79#65=LINE('',#62,#64); 80#66=DEFINITIONAL_REPRESENTATION('pcdef',(#65),#9); 81#67=PCURVE('pc',#8,#66); 82#68=SURFACE_CURVE('sc',#61,(#67),.PCURVE_S1.); 83#69=EDGE_CURVE('gn179_edge_side_u0',#49,#16,#68,.T.); 84#70=ORIENTED_EDGE('',$,$,#27,.T.); 85#71=ORIENTED_EDGE('',$,$,#41,.T.); 86#72=ORIENTED_EDGE('',$,$,#57,.T.); 87#73=ORIENTED_EDGE('',$,$,#69,.T.); 88#74=EDGE_LOOP('',(#70,#71,#72,#73)); 89#75=FACE_OUTER_BOUND('',#74,.T.); 90#76=ADVANCED_FACE('',(#75),#8,.T.); 91#77=OPEN_SHELL('',(#76)); 92#78=SHELL_BASED_SURFACE_MODEL('',(#77)); 93#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 94#9051=PRODUCT('Gn179','Gn179','',(#9050)); 95#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 96#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 97#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 98#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 99#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 100#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 101#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 102#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 103#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 104#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#78),#9060); 105#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 106ENDSEC; 107END-ISO-10303-21;