For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

convert Geom_Surface in to Geom_BSplineSurface

Anonymous's picture

I work with Linux. I have an compound and i extract the faces. I know the type of faces : BSpline .I want to know the NbUPoles, the NbVPoles,... I do: TopExp_Explorer ex; ex.Init(resultat,TopAbs_FACE);

while (ex.More()){ TopoDS_Face f=TopoDS::Face(ex.Current());

Handle (Geom_Surface) S= BRep_Tool::Surface(f);

//declaration d'une variable b qui est de type surface BSpline

const Handle (Standard_Type )& b=STANDARD_TYPE(Geom_BSplineSurface);

//on verifie que la face extraite est une surface BSpline

if (S->IsKind(b)) {

Handle (Geom_BSplineSurface) b1=S; cout NbUPoles() NbVPoles()

but the type of b1 and S it is not the same . What can i do?

Francois Lauzon's picture

Hello Beatrice, you can do this:

Handle(Geom_BSplineSurface) b1=Handle(Geom_BSplineSurface)::DownCast(S);