Building CLOSED Surface from BSpline (Points)

I am working on a project and want to create a closed Surface from a number of splines, which are parrallel to each other (spline 1 at z=5, spline 2 at z=10 etc.). I tried to use the functionality of GeomAPI_PointsToBSplineSurface but that doesnt for me. Has someone any hints... some methods which could work for my scenario???? thankfull for any kind of help...

In some modeller programms like 3D max a sweep, or loft - functionality exist. Is there something comparable in OpenCascade which works with an undefinded number of splines???

StefanKunze's picture

Hi Stefan...
maybe u should take a look to the TopologyPrimitives-Example and the Class BRepOffsetAPI_ThruSections. I guess it should to the trick.

StefanKunze's picture

THX Stefan.. it works great for me.

Another question: Whats the best way to approximate a given spline (with f.e. 12 controlpoints) to with another one (which should finally have lets say 5 controlpoints). A class name or keyword would satisfy me.
Thx in advance....

Roman Lygin's picture

Try to look at implementation of ShapeCustom_BSplineRestriction which has some parameters to re-approximate existing B-Splines (or other geometries). Perhaps you will get a clue how to do what you need.
Perhaps you may simply call it with your shape and it will does all the work for you. Example of its use you will find in ShapeProcess.

Good luck!

Roman Lygin's picture

Hi Stefan,
If all your B-Splines are really parallel, why don't you try direct creation of Geom_SurfaceOfLinearExtrusion specifying one as a profile and computing a vector ?

Regarding another questions about sweeps and lofts - Open CASCADE does offer multiple algorithms. Look for some examples here on their web -


StefanKunze's picture

Hi Roman.... thx for u help.
maybe my description wasn´t precisly. Therefore lets try again:
I have a defined number of curves defined as CLOSED bsplines with a different number of controlpoints. The bsplines are parallel to there z-values. Moreover the curves are normally not the same kind of outline (so that the Geom_SurfaceOfLinearExtrusion would work for that scenario).

The demo page can be helpfull to see whats possible. Unfortanetly the source code for the demos is not available.

Best regards - Stefan

Roman Lygin's picture

I see. Then go with BRepOffsetAPI_ThruSections as suggested above.
I believe the demo at (4th row, 1st column) is built with it.