Python: SplitCurve with ponts


#1

Hello

I am having some issues with the SplitCurve command in Rhino.

When I try to split a curve using a point as parameter (I have checked with IsPointOnCurve and the point is part of the curve) I have unexpected results.

I have a list of points and I am using one of them to split a curve created with AddInterpCurve.

What am I doing wrong?

Can I use the point’s coordinates directly in the SplitCurve or do I need to convert it to parameter first? If so, how do I do it?

Thank you so much,

Ricardo


#2

Is the curve closed? You can’t split a closed curve at one point, you need to supply two. And yes, you do need to convert the point coordinates to a parameter for splitting, you cannot pass a 3D point directly. Use CurveClosestPoint to get the parameter at the 3D point.

Otherwise, perhaps you can post the curve and the parameter/point you want to split at for testing.

–Mitch


#3

thanks yet again. the use of CurveClosestPoint does work. the curve was not periodic so it got sorted out quite easily.

Ricardo