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

Search the Forums
See All Topics

Problem with GeomPlate_BuildPlateSurface function

Problem with GeomPlate_BuildPlateSurface function
SunHongLei 2012/12/19 05:36
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<=5;i++)
          for(int j = 1;j<=5;j++)
               double a,b,c;
               a = 1;b = 2;c=3;
               gp_Pnt P(i+a,j+b,i+j+c);

     GeomPlate_BuildPlateSurface Henri(3,25,2);

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

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

     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());
     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?
Latest news
  • Open CASCADE CAD Assistant for iOS platform is available!
  • Open CASCADE Technology 6.9.0 is available for download!
  • JT Assistant for Android

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