Grasshopper

algorithmic modeling for Rhino

Hi guys,

I am trying to create a list of perpendicular vectors to faces of extruded polylines. When I am using simple rectangles as input, everything is ok, and all vectors lead outside of my rectangles. But when the input becomes more complicated, e.g. closed polylines, vectors lead to various directions - in or out, as it shown on the screenshot attached.

Could you please advise, what’s wrong with my script? Is it possible for all vectors in the file to show in one direction (outside of base breps)?

Thank you!

Views: 3123

Attachments:

Replies to This Discussion

Hi Peter, you probably drew some polylines in a clockwise direction, and others in counterclockwise direction.

You can redraw them using a consistant direction, or maybe use the FlipCurve component on the appropriate curves as you see fit.

Thank you. Obviously that's why it works with rectangles or copied curves. The problem is I need analyze a masterplan, that could consist a lot of different curves. And to redraw them all does not look like clever grasshopper solution. Maybe I need to try some different approach, like to use the center of the area bounded by the curve and then look for the perpendiculares.

This is a good application to use the stream filter component.  

Attachments:

Thank you, Erik.

The problem is I need to analyze a lot of curves, so to List Item them will be more complicated solution then simple redraw all polylines in one direction.

No Problem. That solution was not parametric enough. Here is a better method where the 'guide' input of the 'flip curve' component is used to define the direction of all curves not oriented in the direction of the guide. This should work with more curves, but I have not tested it as of yet. 

Check out this interesting post on the topic. David Stasiuk explains things much better than I can. 

 http://www.grasshopper3d.com/forum/topics/change-direction-of-a-sur...

Hi Peter, you could use the ClosedCurveOrientation method from the SDK for that, see attachment for an example.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service