Grasshopper

algorithmic modeling for Rhino

I have a group of closed curves that I am trying to subdivide into smaller closed curves. I took the midpoint of each edge of the closed curve offset them in both directions and then connected them across so they look like this after I scaled them and trimmed them:

Now I want split the curves into so the outcome results in this:

I've tried to explode and shatter the curves and then cull out the smallest lines but its not working.

Views: 1102

Attachments:

Replies to This Discussion

Hi Ryan,
here's two approaches, one using only native GH components, one using some components by StudioAvW. I filtered out the polylines that don't have four sides first.

Attachments:

Thank you so much Pieter! That's perfect.

Would it be possible to join lots based on the area of the plots? So if there are two small lots next to each other they join to become one larger plot?

Something like that must be possible, but not only based on their areas. Couldn't you try to prevent having to 'join' these (p)lots?

@ Joseph: thanks, clean is key.
I thought this was allready a bit elaborate...

I was thinking that a simpler solution would be to cull lines that are smaller than x meters after they are drawn and way before your step comes in. I'm just not sure how to do it efficiently .

Funny thing: you don't need to be sure before trying something, you can change tactics along the way if you think it's necessary.

Attachments:

Wow, brilliant Pieter, as usual.  I had filtered out the four sided polygons and was working my way through unflattening trees, shifting paths and shattering curves...  Got the outside edges trimmed and "close" to the matching inside edges trimmed but your approach using regions is SO MUCH CLEANER!  I won't bother wasting more time.  Very nice work, sir.

I couldn't help puttering further with the approach I took, even though Pieter's solution is FAR SUPERIOR.  I still don't know why some of the inside edges did not 'Shatter' accurately, so they don't meet in the corners as expected?  And consequently don't form boundary surfaces in many cases.  Some of those that do appear to have their surface normals flipped, which might be a clue, but I can't find it and am out of time for now...  I disabled the group "Join curves don't match" and took a different approach.

The group "Close 4th Side" simply creates a 4th edge from three-segment polylines, which creates boundary surfaces in all cases but as you can see, many are a little skewed from the Rhino lines.

Decided to post it anyway in case Ryan wants to look at it.  This GH code depends on the Rhino file 01_Triple_Choc.3dm in the orignal post.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service