Piercing holes and data managment

I am making a perforated screen using image sampler. I have the following questions.

Why does simplify does not move the data to a branch with a single level of branching? I had to use trim tree in order to do so.

Grasshopper takes few minutes to perform the creation of a surface with pierced holes as well as the final extrusion, even though they are performed separately, one step at a time. Is there a way to optimize the script so that it works faster?

HEXAGONAL IMAGE MAPPING_SACHIN.gh (1.5 MB)

This script uses meshedit and weaverbird plugins.

https://www.giuliopiacentino.com/weaverbird/

you can also just flatten the output of the join curves component or use the ‘suirify’ component

if you want to make this (a lot) faster, use meshes instead, see attached:
(it uses NGon plugin Unweld Mesh component)
HEXAGONAL IMAGE MAPPING_SACHIN_SG_faster.gh (1.5 MB)

Wow! Computation happens at a lightning speed in your script!:zap: Thanks a lot! The script opened in a snap! I hope someday Grasshopper becomes as fast in nurbs processing.

One thing I realized now that I have to manually adjust the x and y divisions of the hexagonal grid by trial and error in order to avoid distortion of the aspect ration of the image. Any method that to calculate the aspect ratio of the image and give the resultant numbers automatically in the x and y divisions of the hexa grid?


although you will need to load that image into the first component then as well

1 Like

Okay. I did exactly the same. The output gets slightly squeezed along the x axis.

HEXAGONAL IMAGE MAPPING_DIMENSIONS.gh (1.3 MB)

I guess that’s because the hex grid X/Y is not 1

try this instead:

1 Like

Yeah. That’s what I was also wondering. How did you calculate the C factor here? By measuring the height to width ratio separately of a hexagon? I’ll surely try out this method and reply back.

If you bake a standard hexgrid to Rhino and measure, you get the two dimensions I entered in the panel