03-28-2024, 10:23 PM
Hi,
Let's call Spline A the one used for the blue band, and Spline B the one used for the gray one.
If I understand you correctly, you want to automatically extend the length of Spline A so that it snaps on Snap B, while keeping the Spline A as a circle, right?
Assuming this what you want, this feature needs two things:
I will start with 2:
The API method CurvySpline.GetNearestPoint allows you to find the nearest point on Spline B from the end of Spline A. You can use it to snap the control point. This method can be used via API, or by attaching to your object the script Nearest Spline Point
About point 1:
You will have to place the control points and their Bezier handles in a way that form a circle or circular arc. You can use the implementation of CSPie and CsCircle for this.
Combining points 1 and 2:
If I had to do what you want to do, I would gradually make the circular spline longer, and check if spline B is close enough, and if yes i would position the last control point of Spline A to its nearest point on Spline B.
I hope this helped.
Have a nice day
Let's call Spline A the one used for the blue band, and Spline B the one used for the gray one.
If I understand you correctly, you want to automatically extend the length of Spline A so that it snaps on Snap B, while keeping the Spline A as a circle, right?
Assuming this what you want, this feature needs two things:
- The automatic extension of Spline A while staying a cirlcle.
- The snap on Spline B.
I will start with 2:
The API method CurvySpline.GetNearestPoint allows you to find the nearest point on Spline B from the end of Spline A. You can use it to snap the control point. This method can be used via API, or by attaching to your object the script Nearest Spline Point
About point 1:
You will have to place the control points and their Bezier handles in a way that form a circle or circular arc. You can use the implementation of CSPie and CsCircle for this.
Combining points 1 and 2:
If I had to do what you want to do, I would gradually make the circular spline longer, and check if spline B is close enough, and if yes i would position the last control point of Spline A to its nearest point on Spline B.
I hope this helped.
Have a nice day
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance workâfeel free to reach out.
Available for freelance workâfeel free to reach out.