For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Problem with GeomPlate_BuildPlateSurface function

SunHongLei's picture
Forums: 

I want to make a surface with scattered points using GeomPlate_BuildPlateSurface ,but there is always a bug in perform function. Here is the code:
//// inital points
TColgp_Array1OfPnt Points(1,25);
for (int i = 1;i {
for(int j = 1;j {
double a,b,c;

a = 1;b = 2;c=3;

gp_Pnt P(i+a,j+b,i+j+c);
Points.SetValue(i*j,P);
}
}

GeomPlate_BuildPlateSurface Henri(3,25,2);

int nbPnt = Points.Length();
for (int i=1; i {
gp_Pnt P = Points.Value(i);

Handle(GeomPlate_PointConstraint) PCont= new GeomPlate_PointConstraint(P,0);

Henri.Add(PCont);
}

Henri.Perform(); /// bug in here ,can not make it

Handle(GeomPlate_Surface) gpPlate = Henri.Surface();

Standard_Integer MaxSeg=9;
Standard_Integer MaxDegree=8;
Standard_Integer CritOrder=0;
Standard_Real dmax, Tol;
dmax = Max(0.0001,10*Henri.G0Error());
Tol=0.01;
GeomPlate_MakeApprox mapp(gpPlate,Tol,MaxSeg,MaxDegree,dmax,CritOrder);
Handle(Geom_BSplineSurface) surf = mapp.Surface();

Is there any problem in my code ?
why always wrong?