
Wed, 06/04/2008 - 14:39
Forums:
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,
Claudia
Wed, 06/04/2008 - 14:53
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();
}
Wed, 06/04/2008 - 15:06
Thanks a lot!
BasisCurve() is exactly the function i was looking for!