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

Related pages

Linear interpolation of points and curves

Trevor Laughlin's picture

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?


jiang jing's picture

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

Trevor Laughlin's picture

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"...

jiang jing's picture

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

jiang jing's picture


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?


Trevor Laughlin's picture

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.

Trevor Laughlin's picture

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

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.