Grasshopper

generative modeling for Rhino

what is the easiest way to draw multiple lines normal to a curve through its division points?

Views: 1638

Reply to This

Replies to This Discussion

Create curve frames (not horizontal of vertical planes), decompose the plane, create an Start/Direction/Length Line with the origin of the plane as the start and the Y vector as the direction

thanks a lot , damien.
i made a small change, because i need all the lines point to the same direction of the curve, so i used a perp frame component instead.
the rest is perfect.
still, i thought this would be easier. maybe a component, called line perp, constrained to a plane (which i was missing)

cheers roberto
There are two other ways. I think the easiest one for me is the "Curvature" component. It points the lines to one side so no conditional statements are needed. Also very handy is the centre points it gives, making a line between the curvature points and the original points on your curve and making those lines proprtionally as long as the factor of curvature at the originating point.
great! thank you.
i always need this on closed planar curves.
is there an easy way to make the lines point outwards?
Where relavent make the direction negative. For example for the "SDL line" component right click on input "D" (where the vector comes in) and in expresion write "-(d)" and it will reverse the lines.
Sorry to revive an old thread, but how would one implement the "curvature" component in this instance. I have a similar issue to OP but have a closed curve and wish to place the lines on the exterior of the curve. Most place there but there are some that are located on the inside and I'm not sure why, or how to fix this. Any help would be gratefully appreciated!
Unfortunately for my particular grasshopper definition that method does not work. The reason being that I have randomly shattered my closed curve prior to creation of the perp planes. In so doing the perp plane component returns at least 2 planes for each of the post-shatter curves (at start and end of curve - I only need one, so have used a list component to filter). Unfortunately some of these planes are oriented inconsistently, I'm not sure why. I'm thinking the best way to solve this would be to centre the original curve on the origin, and process the planes by quadrant with conditional statements
and how about evalute the crv at the randomly shattered startingpoints and use the t as input for horizontal planes? or am I mssunderstanding something here?
I've managed to resolve it, many thanks for your help though. The issue was that in constructing my original curve there were points where the curve flattened out (2 consecutive points had the same x-coordinates). I've moved a couple of CPs to make sure the curvature is continuous. It was something to do with inflection though.
if you are attempting to create lines oriented the same direction, you will need to include a conditional statement that deals with the inflection point of the curve. (seen in damien's image.) this should test, for your specific curve, where the vectors are changing direction.

RSS

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2013   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service