GeomFill_ConstrainedFilling problem

Hello dear OCC users,

Using the class GeomFill_ConstrainedFilling to create a surface bounded by 3 BSpline curves I get a very curved BSplineSurface, which is not what one might expect. I use the following code:

Handle_Geom_BSplineSurface aSurf = NULL;
Handle_Geom_Curve c1=;
Handle_Geom_Curve c2=;
Handle_Geom_Curve c3=;
Standard_Real U1b=, U1e=; //first and last parameter of each curve as they might be trimmed
Standard_Real U2b=, U2e=;
Standard_Real U3b=, U3e=;

Handle_GeomAdaptor_HCurve A1= new GeomAdaptor_HCurve(c1, U1b, U1e);
Handle_GeomAdaptor_HCurve A2= new GeomAdaptor_HCurve(c2, U2b, U2e);
Handle_GeomAdaptor_HCurve A3= new GeomAdaptor_HCurve(c3, U3b, U3e);

Standard_Real tol = 1.e-4;
Handle_GeomFill_SimpleBound B1 = new GeomFill_SimpleBound(A1, tol, Precision::Angular());
Handle_GeomFill_SimpleBound B2 = new GeomFill_SimpleBound(A2, tol, Precision::Angular());
Handle_GeomFill_SimpleBound B3 = new GeomFill_SimpleBound(A3, tol, Precision::Angular());

Standard_Integer max_deg = 8;
Standard_Integer max_seg = 2;
GeomFill_ConstrainedFilling aFill(max_deg, max_seg);
aFill.Init(b1, b2, b3, Standard_False);
aSurf = aFill.Surface();

Is something wrong with the above code? I have tried to bypass this problem by using GeomFill_BSplineCurves with CoonsStyle but this class failed in most cases. My OCC version is 6.3 under MSVS 2008.

I would gratefull for any help.
best regards

Konstantinos Iatridis

Cauchy Ding's picture

Hi Konstantinos,

Would you please attach your testing data file?

Ding

Fotis Sioutis's picture

Kosta,

Without knowing you exact case, GeomFill_ConstrainedFilling can provide a not so "'very curved'" surface by limiting the maximum degree of the resulting surface.So experiment by lowering you 'max_deg' variable.Please provide some test data in case the above will not help !

Fotis