Grasshopper

algorithmic modeling for Rhino

I am trying to build a tessellation within the structure of a triangular Grid.

My difficulty lies in trying to connect certain segments of each Hexagon to its nearest neighbors. I have pictured what I want to do in yellow on the screenshot... not all connections are draw... just a handful to illustrate the idea.

The Proximity 2d component is great and it gives me the correct "neighboring" hex or "cell".  It also gives me the vectors which I am thinking could be used to identify which segments of each hexagon should be used to find groups of 4 points.

I think the data management of the next step is where I am having difficulty.

Maybe it's obvious to some of you out there.  Any help or suggestions are welcome.

Thanks

Views: 1312

Attachments:

Replies to This Discussion

After trying some stuff that didn't quite work, I got this - the data tree structure isn't pretty:

P.S.  Flattening the 'Prox L' output helps but each line is duplicated...  oops.

Attachments:

This version culls the duplicate yellow lines:

You can use 'Join Curves' to connect the polygon segments (after 'Explode') to the yellow lines, like this - useless, really, but looks "right", eh?  ;)

Attachments:

Joseph,

Thank you. That makes much more sense than my strategy of using proximity from the center of the TriGrid.

Thanks again.

Check this as well.

You can try "Brep Topology"

Attachments:

Hyungsoo Kim,

Thank you for showing me a totally different way. I had never used the BrepTopology component or the "Connect Curves" component.  I was also pleased to see that the BoundarySurfaces component doesn't seem to slow things down much at all.

Thank you too.

Here it is with an attractor added.

Very nice work!  Care to share that code?

This (below in blue group) isn't as elegant as Hyungsoo Kim's solution...  A little ridiculous, in fact.  And some of the surfaces are flipped.  I created a 'DupLns' cluster to cull duplicate lines because I needed it a second time.  

Attachments:

Eric's file below shows a curve as attractor... and here is a gradient based on location in the Y axis

Attachments:

connect curves nice Hyungsoo, another approach.

Attachments:

Erik, even simpler... very cool

Wow.  Yes, simple and brilliant.  First time I've ever seen 'Connect Curves'.

No reason for the 'Flip' between 'Connect' and 'Boundary' though, eh?  Only one polyline per branch at that point so 'Flip' does nothing.

Way cool!  Thank you.

P.S.  I see now that 'Connect' => 'Flip' => 'Boundary' came from Hyungsoo Kim?  I only glanced at his code yesterday, deferring a thorough analysis due to its complexity.  Always worthwhile to study his expert solutions.

First time I've ever seen 'Connect Curves'.

me too. very useful, i needed it many times. i would expect to find it in curves/utilities.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service