Drawing cubic spline & normal distance between two splines

Hi,
Currently I am exploring the features of opencascade to understand, whether it will support my need or not. Below are my three primary needs.

a) I am having set of XY points. Using that, can I able to draw cublic spline curve using opencascade?

b) If point(a) is possible, am I able to do interpolation (cublic spline interpolation rather than linear interpolation) ?

c) If I am having two cubic splines, whether opencascade will support to find the normal distance between two splines at every point?

I would appreciate your valuable anwers. Also I would appreciate, if you could provide me some pointers about how can I achieve the above needs.

Thanks,
Karthik

Gerhard Hofmann's picture

Hi Karthik,

there are several ways to do what you want to do:
a) what do you mean with "draw"? Something interactive? The method GeomAPI_Interpolate will always return a nonrational BSpline with the specified maximum degree (3 in your case, you would call that a "cubic spline"). But there are also other approaches.
b) You need points inbetween the given points? Of course: Geom_BSplineCurve::D0 returns these points at any required position.
c) Geom(2d)API_ExtremaCurveCurve does what you need (although I don't understand "at every point" in your question)
best regards
Gerhard