
Mon, 12/14/2015 - 20:06
Hello,
I am having problems with generating a GeomPlate_BuildPlateSurface for a simple example of a plane. See the attached stl file: quadrangle_4x4.stl
First I extracted all the points in the stl file into : Handle_TColgp_HArray1OfPnt result.
Then the following code creates the constraints w.r.t. to the extracted points
Standard_Integer len = result->Length();
//Initialize a BuildPlateSurface
GeomPlate_BuildPlateSurface BPSurf(3, 16, 5);
//extract geometric points from the result object and add them as point constraints
for(Standard_Integer i=1; i<=len; ++i)
{
gp_Pnt pt = result->Value(i);
//std::cout << "i = " << i << std::endl;
//std::cout << pt.X() << ", " << pt.Y() << ", " << pt.Z() << std::endl;
//add point constraint
Handle(GeomPlate_PointConstraint) PCont = new GeomPlate_PointConstraint(pt, 0);
}
//Compute the plate surface
BPSurf.Perform();
The code compiles fine but upon running it, I get the error: "terminate called after throwing an instance of 'Standard_RangeError'"
This error is being created by the Perform() method. Could anyone indicate what the problem could be?
Thanks and Regards,
Sunayana
Wed, 12/16/2015 - 12:19
Hi,
you have to call BPSurf.Add(PCont) in your loop.
Regards
Thorsten
Wed, 12/16/2015 - 12:41
Thanks Thorsten.