Geometry on hexagonal matrix

unhandled

#1

Hi!

I’m new to Grasshopper, so far I’ve read the Grasshopper Primer v3.
I’m trying to create a matrix that has a certain geometry (circled in black) located at the center of each hexagon. Control on the geometry size is also needed.
So far I know how to create the matrix, and I know that the Points output of the Matrix has the coordinates for the center of each hexagon, but I can’t get past that.
Any thoughts?
Thanks!


(Matt Gaydon) #2

Without your file, I can only really give you a quick example of one way to do it using Orient Component. The little code I posted works with a closed curve as the first item in the list but this easy to edit if required.

You may also want to consider building the module at the centre or each hex module than just orienting a single set of data to each point as it will give you more control over each module later.

Simple Orient.gh (15.2 KB)


#3

sorry! here are the files!

I’ll try your code as soon as I can.
thanks a lot!

unnamed.gh (2.8 KB)
Model.3dm (412.8 KB)


(Matt Gaydon) #4

The module you wanted to put on the hex grid does not match exactly the grid. See overlaps Image.

One option is to make the module parametric also with the same input radius slider and orient this another is what I have done for you below is build the module in-place instead of orient it. See new Code below.

Thinking about it you could also replace the hex grid with a single hex to make the parametric one and then orient it after to the main hex grid.

Module in-place.gh (27.8 KB)

Ps Try to name you GH file Unnamed as that is the default file name as Untilted in Rhino as this may cause you issues with autosave etc.


#5

Thanks Matt!
Regarding the orientation, it was slightly rotated (my bad!) but if oriented correctly and scaled it can create a beautiful pattern
I’ll try your first option, using the orient and adding some scaling for the module.

Later, the challenge will be to offset and create further patterns (hopefully i’ll figure it out by myself!

thanks a lot in advance for your help!


(Matt Gaydon) #6

The pattern you have posted though can be built from a hexagon outline is not on a Hexagon Grid but on a Triangle/Rhombus Grid.

This was done manually so no new code but was easy its way to test/explain it.


#7

Hey Matt!

Just wanted to upload my version, based on your recommendations. I sticked to the geometry and played with the scale factors to adjust it the way I wanted.

patron.gh (9.2 KB)
Pattern.3dm (372.5 KB)


(Matt Gaydon) #8

Nice one thanks, though you did not internalise the geometry so not working here, thought the code looks good all the same.


#9

My bad, i edited my original post to include the Rhino file


(Matt Gaydon) #10

In Grasshopper if you right click and click on Internalise Data on the input Parameter you will be able to internalise you data/geo etc into the grasshopper file so no need to always post the linked Rhino file unless its required. Note this does break the link to the rhino geometry so you would need to select it again if you changed it.

Easy way to check its worked is open you Grasshopper code in a new blank rhino and if the code runs your all set to post.