revolved curves from rotational surfaces

Hi everyone,

I am importing a STEP file containing a solid made of rotational surfaces(Geom_SurfaceOfRevolution).
My question is, how does one extract the revolved curves (which are BSPLINE curves in this case) that generated these surfaces of revolution in the first place?
Any pieces of advice are highly appreciated!

Thanks in advance,


Rob Bachrach's picture

Let's say you have retrieved a the TopoDS_Solid from your STEP geometry and that your have used a TopExp_Explorer or something to get a face...

// get the surface from the face
Handle(Geom_Surface) surface = BRep_Tool(face);

// if this is a surface of revolution
Handle(Geom_SurfaceOfRevolution) rev = Handle(Geom_SurfaceOfRevolution)::DownCast(surface);

if (!rev.IsNull()} {
// get the basis curve
Handle(Geom_Curve) basis = rev->BasisCurve();

Simion Claudia's picture

Thanks a lot!
BasisCurve() is exactly the function i was looking for!