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)

1 Like

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

1 Like

I was going through this script again as I wanted to work on image based tesselation. One thing I cannot understand is the reparametrizing of the base surface while finding out the uvpoint.

If we don’t do reparameterization, the final developed screen has zero resemblance with the image. What exactly do we get when we reparametrize the surface calculation domain to ‘0 to 1’?

Surface parameters are most often not 0 to 1 but 0 to some arbitrary number. In your image component you have to specify the uv range. Therefore it’s easier to work with a known range (reparametrized, 0 to 1)

1 Like

I see. So these values you’re talking about I guess?

image

yes that’s it, I wrote uv range, but I meant uv domain

1 Like

Okay. Thanks.:+1:t2::+1:t2: