algorithmic modeling for Rhino
I`m not too experienced in grasshopper, and would truly appreciate if any one help me through this,
I have this lines with different lengths(Green lines) and my aim is to draw a line perpendicular to each one of them, in a way that it passes through the mid-point of the line and the length is 1/4 the existing ones.
Everything went well until the "Rotate" component where the outputs came out to be on a different Plane! meaning instead of locating them on the Orange surface(same plane as the green lines), they are passing through the surface.
Not sure why is this happening! is there any other way to intersect two lines perpendicularly? or just rotate the lines 90 degree on the same plane?
Thanks!
Tags:
Hi Sameh,
'a line perpendicular to another line' is only possible if we're dealing with 2D lines. In 3D, there's an infinite number of lines that are perpendicular to some base line. However you seem to have a surface which allows you to map this problem to 2-dimensions by specifying the local plane for each line-perpline combo.
What you need to do is rotate your shorter lines 90 degrees (or 0.5*PI radians) around the local normal vector of the surface. To find this normal vector, you'll need to get the UV coordinate on the surface that is closest to the line mid-point, then evaluate the surface at that UV coordinate to get the normal vector. You can then use those vectors to rotate each short line segment in the correct plane.
From your image it seems as though you are using the same rotation vector for each line, but you need to compute the right vector individually.
--
David Rutten
david@mcneel.com
Thank you so much for your reply!.. I tried to do as you said, it works perfectly for a single surface but unfortunately selecting multiple surfaces with different planes makes some complications.
I thought, since I need to make a surface out of the curves (you may find it in the picture-the Gray paddles), another solution would be the Orientation of the paddles on the mesh faces (each 3 paddle on a triangle which is extracted from the mesh faces).
I tried different orientation components but wasn't successful.
would you please give me some ideas and clues in order to do that? it can also be the rotation of the paddle along the paddle center line (the long lines in the previous attachment).
Thank you
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by