Converting TopoDS_Face to BSplineSurface

Hi,

I am trying to convert faces to BSplineSurfces and run into a problem I do not understand. Imagine a cone. We have two faces, the pointy hat and the closing disk. My code works just fine for the pointy hat but for the disk I get a flat rectangular surface, as if the surface is not constrained.

Here is the outline of the code:

BRepBuilderAPI_NurbsConvert nurb(aFace);
Handle(Geom_Surface) surface = BRepLib_FindSurface(nurb).Surface();
Handle(Geom_BSplineSurface) bsSurface = GeomConvert::SurfaceToBSplineSurface(surface);

from the bsSurface I can then extract the spline data I need. What surprises me is that if I take the faces of the cone and triangulate the I get the forms I expect. It seems like the edge curve of the disk is not respected, but it seems to be present in that face as I can create a correct triangulation of the face.

What am I missing?

Thanks

Update: To better illustrate what I mean I have added a second image that shows the BSplineSurface reconstruction together with the triangulated surface, both of which have been generated from the *same* TopoDS_Face.

Oliver R's picture

In case anyone stumbles over this in the future, it seems this is not how things work. There is an explanation in

https://opencascade.blogspot.com/2009/02/continued.html