11-15-2014, 08:39 AM

Hello all,

I'm trying to build a partial curve from an existing one.Is there an easy way using your library, to get a partial spline of an original one with an offset with tf , but preserving the shape/spline to match the original shape ( but be partial ).

In other words , is there a method that can give me a new spline if i say tf is 0.5 , to return me an exact copy of the original spline but just half of it( or whatever value i pass ).

I already tried to do it manually, but faced problems recalculating the new control points of the newly inserted middle point.

Already checked the method SplitSpline and the InterpolateBezierHandles inside the CurvyUtility class, but I don't think they are usefull enough for me. Checked the source code of the InterpolateBezierhandles method, but it's not suiting my needs. The SplitSpline is also not exactly what i want , because if I have a segment long enough ( or a spline with huge length and only two points ), I'll never be able to split it in half with this method.

I know how to do this in 2d manually , but facing issues when trying to do it manually for 3d. It's fine for me to have a slight/small error that comes from converting a quadratic bezier to a cubic one( that's how I'll do it in 2d ).

Maybe a hidden helper method that you are using somewhere else that i can reuse or maybe i missed something in the documentation ?

Thanks ...

I'm trying to build a partial curve from an existing one.Is there an easy way using your library, to get a partial spline of an original one with an offset with tf , but preserving the shape/spline to match the original shape ( but be partial ).

In other words , is there a method that can give me a new spline if i say tf is 0.5 , to return me an exact copy of the original spline but just half of it( or whatever value i pass ).

I already tried to do it manually, but faced problems recalculating the new control points of the newly inserted middle point.

Already checked the method SplitSpline and the InterpolateBezierHandles inside the CurvyUtility class, but I don't think they are usefull enough for me. Checked the source code of the InterpolateBezierhandles method, but it's not suiting my needs. The SplitSpline is also not exactly what i want , because if I have a segment long enough ( or a spline with huge length and only two points ), I'll never be able to split it in half with this method.

I know how to do this in 2d manually , but facing issues when trying to do it manually for 3d. It's fine for me to have a slight/small error that comes from converting a quadratic bezier to a cubic one( that's how I'll do it in 2d ).

Maybe a hidden helper method that you are using somewhere else that i can reuse or maybe i missed something in the documentation ?

Thanks ...