Lock rotation of poly line curve / Kangaroo 2

Hello Rhino community!

I’m trying to lock the rotation of a polyline curve, while keeping a certain transformation, and maintaining collision goals with other geometry.

In the attached GH-File (LockRotation), the “Spikey” polyline can be moved around in every direction, and also collides with the circle. The idea is that the polyline stays aligned with the longer line. Any time it collides with the circle however, it rotates around its centroid, which it shouldn’t. I tried many different ways using the angle goal in combination with the “Box Corners” node, to have something to define an angle upon. Unfortunately without success so far.

I found an GH example by Daniel Piker, where boxes are pulled along a line and changing their orientation along the way. I attached this file as well, but it’s missing something, and I couldn’t get it to work.

Does someone have an idea how to solve this problem?

Thanks a lot!

LockRotation.gh (17.7 KB)
boxrail2.gh (17.6 KB)

Nobody having an answer? Maybe @DanielPiker Mr. Piker?

Help is very much appreciated!

I don’t really understand the desired result here.
Maybe a sketch would help.

I see you have the circle (Item 0 in your list) locked in all axes with the Support.
If you want to lock the rotation of the other spikey curve, then you need a Support for that with X and Y False, but all the other inputs True.

Thanks for your quick reply and suggestion!

I believe we’re almost there. The spikey curve is now locked around the z-axis in the main (global) coordinate system. However, I need is the spikey curve’s rotation locked in relation to the longer line. I added a sketch which I hope makes it a bit more understandable.


LockRotation.gh (15.2 KB)

Thanks for your help!