how to create a Geom_BSplineSurface

Hi All,
I was trying to get the Geom_BSplineSurface to generate a B-Spline surface by putting inputs as the control points/ poles, u and v knot, u and v degree.

I do not know how to input knots, as in if it is [0 0 0 1 2 3 3 3] (just an example),
how do I type that in the Geom_BSplineSurface .
Secondly if the knots are as above then is my surface periodic or non periodic.
Thirdly, what would be the multiplicity and how would I write them for the above example.

Thanks a lot in advance
Hope to see some replies soon

God Bless

Pawel's picture

Hi Jomy,

maybe this helps:


jomyfrancis19's picture

Thank You

I was successful in creating compiling the Geom_BSplineSurface,
but I do not know how to display the final B_SplineSurface.

I am attaching the code.
This code has 48control points.
8 along U and 6 along V direction.
The degrees in U and V are same = 3

Thanks in Advance
God Bless

Patrik Mueller's picture


take a look at BRepBuilderAPI_MakeFace(). After generating the TopoDS_Face you can use AIS to display your surface.

Best regards,


jomyfrancis19's picture

Thanks a lot.
I was also searching for some function that would give me all the bunch of points that are involved in forming the Geom_BSplineSurface.

Surely the number of points will depend on the u and v intervals that I give, but I require these list or data of all the points in order so that I can further perform other operations using them.

Thanks in Advance
God Bless

jomyfrancis19's picture


I had one more difficulty in display.
It requires for me to change the Geom_BSplineSurface into elementary surfaces which it can detect. Only after which I can apply the functions of BRepBuilderAPI_MakeFace() and TopoDS_Face.

God Bless

Sandy Garcia Santos's picture

Hi , i have been looking at your code and you needed to put these lines 

Geom_BSplineSurface *Surf= new Geom_BSplineSurface(poles,UKnots1,VKnots1,UMults,VMults,3,3,Standard_False,Standard_False);
TopoDS_Shape shape= BRepBuilderAPI_MakeShell(Handle_Geom_BSplineSurface(Surf)).Shape();