I’m trying to update this ancient VB script (from 2011) to work in Grasshopper v1.
I get six errors saying
“Error (BC30471): Expression is not an array or a method, and cannot have an argument list.”
The first line with this error reads:
pt1 = dir.PointAt(-x, -Math.Tan(twist(0)) * x, 0)
Does anyone know what I need to do to fix it?
Thanks in advance!
Rest of code here:
MN-tapeworm-script-2020.ghx (174.3 KB)
try unflattening the inputs for bend and twist, and set them both to list access.
Thanks a lot Chris! That worked perfectly!
would you mind sharing the updated file?
Thank you, it works perfectly.
I was playing a bit with it and i was wandering if it might solve my problem. Maybe you might give me some clue.
I have planar surface with 2 parallel edges (i.e. a rectangle 10x100 cm), I have modified it (twist and bend) in kangaroo.
Now I need to do a reverse process: I should get the position of the rulings on this curved surface and map them to the initial planar surface.
In other words I need to unroll the curved and twisted surface into a planar surface and extrapolate the position of the rulings.
it is something very close to what you did here
I’m glad it works! To unroll the surface use the UnrollSrf command, and of course that only works for sufaces (not meshes).
but how could i find the rulings of my curved surface from your algorithm?
You have some inputs (direction, bend, twist, gain) wich i dont know how to substitute starting from my curved surface. If that it possible at all.
(maybe i should post in another topic ?)
I’m not sure you can use Tapeworm for this. I think you either need to rebuild your Kangaroo surface from scratch with Tapeworm or you need to manually place the ruling lines. (Are you sure the Kangaroo Surface is developable by the way?) To find ruling lines you need to connect points on the two rail curves that have coplanar tangents. This means that the directions of the rails (at those two points) lie in the same imaginary plane.