Forum archiveIssue archiveModeling Data and Algorithms

Archived discussion

Linear interpolation of points and curves

Modeling Data and AlgorithmsThu, 12/15/2016 - 02:167 replies

Browse this forum
QuestionAuthor

I would like to do a simple linear interpolation of points to create a curve or a linear interpolation of section curves to create a surface. I was able to use GeomAPI_PointsToBSpline with min_degree=max_degree=1, but this fails with GeomFill_AppSurf. It generates a Standard_OutOfRange RuntimeError.

I use the GeomFill_SectionGenerator to make sure all the curves are compatible (same degree and knot vector) and GeomFill_Line(NbPoints = # of curves in section generator). It works for most cases but fails when trying to do a linear interpolation.

Is there another tool to use or some changes I can make to my process?

Thanks.

Discussion

7 archived replies

Posts are displayed in their archived order.

01Commenter-1

have you solve the problem? I have the same question.

02Author

Not entirely. To create a polyline I can use GeomAPI_PointsToBSpline with a min/max degree set to 1. But I haven't solved the surface case yet. I ended up writing my own surface interpolation starting from "The NURBS Book"...

03Commenter-1

I want to obtain a line by some points ,have you any ideal?

04Author
05Commenter-1

Hi,

I only get a polyline  not a line using GeomAPI_PointsToBSpline. I want to get one line by points,do you know how to nInterpolate it?

thanks!

06Author

I guess I don't understand what you need. You have multiple points and you want to generate a 1st degree curve between them? Do you only have two points and you want a simple line between the two? Do you want a Geom_Line or Geom_BSplineCurve? The Geom_Line is an infinite line.

Try using the GeomAPI_PointsToBSpline with min/max degree = 1, if you want a finite Geom_BSplineCurve.

07Author

You oculd use gce_MakeLin to create a gp_Lin between two points.

https://www.opencascade.com/doc/occt-7.1.0/refman/html/classgce___make_l...