I need to rotate one of them along the torus axis so that they just touch each other at a single point. Something like this (which I have manually rotated - this is definitely not an exact solution, solely for the purpose of depicting).
Heed
The Curve Proximity component can’t find the touching point because it detects the closest points between curves in 3D space. This means that the proximity point would change during the rotation of a curve. Presumably, the proximity should be found along the UV of the torus, but I don’t know how to implement this. Are there any other solutions to get a precise rotation to the touching point? Any thoughts are welcome!
Just my thoughts
Perhaps the solution can be found by implementing a recursive function that makes multiple incremental rotations of one of the curves until the intersection event becomes false. The last successful intersection can then return an approximation of the touch point. However, there may already be a ready-made solution. Rotation.gh (7.7 KB)
Unfortunately, such a method doesn’t detect the touch point. It should be a single point, but here we get an intersection of two curves at two points. This is happening, since we actually can’t use a random height for the intersection plane, as you did in your solution. It must be an exact height I supose.
Get torus, Define a Plane at axis. Rotate it (option). Get the Ccx events (2 Crvs as circles). Define a point p at each (if using t in 0-1 set their Domain to 0-1). Using CrossProduct define the section planes. Get the Ccx events VS torus. If the result is 2 Crvs get the prox Crv to p else get the first Crv. Sample it in a List. Clone and Mirror the prox Crv and sample it into the List. So we have 4 Crvs in total.