Lines to Hexagons?

I flowed a simulation in kangaroo with hex pattern but i have no idea how to back to hex pattern in the result I mean a hexagon with its 6 lines sides or the original tree branch help!

back%20to%20hex
back to hexagons.gh (95.6 KB)

1 Like

Most of the line segments are triplicated (3 copies of each). I don’t see much chance of joining line segments to reform hexagons from this.

1 Like

bad news thanks !

@Joseph_Oster made some adusts what about now?

btHex2.gh (50.1 KB)

Hi,

check attached…
What have i done is projecting lines to XY surface and splitted that surface.
In that manner i got hexagons in XY plane. Then tested XandY equality for projected hexagons vertices and existing points in your structure. Then replaced items in hexagon-vertices tree branches with 6 or less members each. Simply created polyline after that.

btHex2_RE.gh (64.8 KB)

4 Likes

Brilliant! Well done. But ‘TreeSloth’ isn’t needed, standard PShift works fine instead.

missing

And warning: it’s SLOW. SrfSplit takes almost six minutes, followed by another ~minute of waiting. Very cool though. I can’t help wondering if there is a more straight forward way to achieve this, such as mapping hexagonal curves onto a surface without losing their integrity?

1 Like

Thanks :slight_smile:
I agree, there is no need for TreeSloth, used it by mistake when was picking from list…
Surface Split isnt that slow, 695 ms on my machine…

very nice !!! in mine 3.5 seconds

Some old code but should work here for the curves projected to a plane, and will speed things up quite a bit.
131111_curve_network.gh (16.7 KB)

1 Like

Here it is together…ideally, though, you’d keep your data structure intact while you’re running your simulation in Kangaroo and avoid having to reverse engineer this at all.

get hexes.gh (124.5 KB)

3 Likes


bloggif_5e9f3f8aa8dc4

2 Likes