Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Shape factory
Shape gallery
What's new
System requirements
Download Center
Public license
Getting started
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
Home / Developer Corner / Forums / Usage issues / create face from curves/wires

create face from curves/wires

create face from curves/wires
Marco 2013/01/26 14:13

I have the following situation. I load some points which describes closed curves. I give the points to the PointsToBSpline algorithm to get the curve.

TColgp_Array1OfPnt arr(0,points.size()-1);
     for(unsigned int i = 0;i < points.size();++i)

     auto spline = GeomAPI_PointsToBSpline(arr,3,8,GeomAbs_C2,0.00001);
     return spline;

Here I have a first question. Is it necessary that the last point is identical to the first point so that opencascade really makes a closed curve?

Then I create egdes and wires from the b spline curves. That works fine.

And now the more import question for me. I want co create a face (and later a solid) from these curves, the first step is to create a face which are limited by two of such closed curves. The MakeFace algorithm doesn't work because it works with planar edges.
SO, how can create a face from two given closed b spline curves?

Best regards

You have to be logged in to download the attached file
Marco 2013/01/28 13:35
Any suggestions?
Mauro Mariotti 2013/01/28 18:27
1. For sure to have a closed spline, the last point must be coincident with the first.

2. Maybe you can use BRepFill_Filling with the outer wire to create a face and then split it with the inner one, using BRepFeat_SplitShape.

Marco 2013/01/28 20:51
I tested a little bit with BRepFill_Filling, but it crashes.
Is there really no algorithm to get a surface from two curves? I read the pdf's from the documentation folder and also found nothing :(
Any other suggestions?
Marco 2013/01/28 22:34
So, I tested it with GeomFill_BSplineCurves, that alorithm works better (see attached image)
As you can see there are some errors at the connecting line.
One problem is still left: the algorithm only works if the flag SetPeriodic isn't set.
If I use "spline.Curve()->SetPeriodic();" than the allgorithm crashes during runtime! Therefore, my resulting faces are not really periodic. It looks only so.

That is the code for the spline creation:

TColgp_Array1OfPnt arr(0,points.size()-1);
for(unsigned int i = 0;i < points.size();++i)

auto spline = GeomAPI_PointsToBSpline(arr,2,7,GeomAbs_C1,0.00001);

First and last point in the array are identical! Did I something wrong?
You have to be logged in to download the attached file
Marco 2013/02/05 17:20

still unsolved
Alexander Luger 2013/07/09 17:03
I always used GeomAPI_Interpolate for my splines. The constructor of this class takes a periodic flag!
Timo 2013/07/12 13:43
For creating a face from 2 curves you can also use

BRepFill.Face(const TopoDS_Edge &Edge1, const TopoDS_Edge &Edge2)

You might also have a look at BRepOffsetAPI_ThruSections.
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map