DiscussionsIssue archiveOther usage issues

Archived discussion

revolved curves from rotational surfaces

Other usage issuesWed, 06/04/2008 - 14:392 replies

Browse this forum
QuestionAuthor

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

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

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();
}

02Author

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