Sun, 01/20/2013 - 18:07
Hi,
I habe a lot of points which describe a contour. Now I need to get a wire from the point list.
//
GeomAPI_PointsToBSpline toBSpline(const PointVec& points)
{
TColgp_Array1OfPnt arr(0,points.size()-1);
for(unsigned int i = 0;i
{
arr.SetValue(i,gp_Pnt(points[i].X(),points[i].Y(),points[i].Z()));
}
auto spline = GeomAPI_PointsToBSpline(arr);
spline.Curve()->SetPeriodic();
return spline;
}
OpenCascades creates the curve (testet it with the step export). My problem is the connection between last and first point. There I have a big failure. You can see it in the attached picture. Seems that I do something wrong the make the spline periodic.
I also tested GeomAPI_Interpolate, but there a runtime error occurs.
So, what did I wrong?
Best regards
Pellaeon
Tue, 01/22/2013 - 15:31
Any ideas? :/
Tue, 01/22/2013 - 15:58
Hello Marco,
can't say what the exact reason is but I would try the following out:
- change the tolerance in GeomAPI_PointsToBSpline
- change the min/max degree of the spline to create
Pawel