Grasshopper

algorithmic modeling for Rhino

Very easy question for you (close a sort of perimeter)

Hi guys

I have a sort of "perimeter" (this perimeter could be different, with more openings instead of 3 of the image). I would close these "openings", but without the Extend command (these openings could have different length). Is there someone that could help me?

Views: 3209

Attachments:

Replies to This Discussion

Hi,

if you want to calculate the total length of your curves try this

Hi Raul

Nope, I don't wanna calculate the length, I need to close these "openings". When I tried to do it, this was the result (see the image).

Attachments:

Provided all the gaps are under a certain distance, the attached definition should work. It is essentially pulling out all the polyline control points, extracting those control points which are either at the start or end of the curve, using "cull duplicates" to find an average point between all end points that are closer than a certain distance, and then putting those new points back into the overall structure to recompose the polylines. 

Attachments:

I can't open your files, I don't know why. I try to do what you did in your attachments ;-)

I can't do it ... I don't have CULLPT, I have a later version :-(

what about this solution?

This was just a quick test but it seems to work.

nevermind, I drew the lines "in order", that's why it worked.  if they are not drawn in order, you would have to apply some sort of sorting logic as andrew describes.

Thank U Chris, now it works (but I put number 2 in the Shift Battery).

It is very kind of you to help me!! 

Thanks to Andrew and Raul's replies!! ;-)

mmmm ... problem recurs!! If I modify geometry, I can't close openings.

I don't know hoy to integrate the Andrew's study also because I have a later version of GSH. Any idea??

i think the main problem is that you need a kind of panel search. BUT: you cant find panels on broken lines (separate geometries). It is very important to know the orientation of your lines (clock-/counterclock). Without this information you will never know witch point is the next.

One idea is to aproximate the gravity centre with the point coordinates. Connect the points with G, then calculate the angles and reorder the points. At the ent draw polyline from points.

I don't know how to solve it :-(

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service