Change curve seam while selecting curves

I’ve got a script where the user selects curves one by one. What I’d like to do is change the Curve seam to the point closest to where the user clicked to select that curve.

Is there a way to get the location of where you clicked while slecting an object using GetObject?

As an alternative I was thinking of using GetPoint instead and checking which Curve is closest to that point but then I’d have to loop through all curves in the document and that sounds like it quickly might get slow? This also sounds like it requires some extra work to get the same workflow and feedback as you get with selecting using GetObject.

Anybody did something like this before and can share their thoughts/experiences?

You might try GetCurveObject() which returns more information including where the click point was…

For objects other than curves you can use GetObjectEx() or GetObjectsEx()…

1 Like

Ooh, interesting. Learn something new every day. I’ll try this out!

It works, but not as great as I hoped. For instance it’s hard to be precise and click on the corner of a curve. Ideally it would be great if I could use the snap function which GetCurveObject doesn’t seem to support.

Well, if you don’t mind selecting the curve first, you can also use GetPointOnCurve() which does pay attention to object snaps.

Hi, Siemen! I’m also interested in solution, do you have any? =)

I think I tried the solutions mentioned above here but in the end just decided to keep it the way it was and having the user manually change the seam for each curve individually if necessary (Since I couldn’t find a smooth way to have the snapping happen while selecting curves)

1 Like