I have a panel with numerous perforations in in. I would like to be able to scale these up and down using the centre of each one as the point of scale. I have never used grasshopper before and am really struggling from the word go. There doesn’t seem to be a lot of advice online regarding using an already created object.
the problem with that is that it would often lead to invalid meshes.
you could write a gh script that detects interior naked edge loops, calculate the vertex centers, and scale each loop using its center . but to get the topology of the mesh to remain valid is a hard problem
so the best course of action here is to recreate the panel in grasshopper as a parametric object
Its not a mesh that Im working with but a polysurface
Peg Wall 02.3dm (13.6 MB)
Could you walk through the gh script you mentioned
adjust holes.gh (1.2 MB)
sorry about the confusion, having “polygons” in the title made me associate it with mesh.
nevertheless, I took a look at your file.
the first thing you want to do is to work on only one face, so explode and delete the rest. we can extrude the surface later after we do the modification to get the solid panel. (18mm is the current thickness)
the nice thing in grasshopper is that i can select the naked edges of the surface and turn them into curves that can be joined. (the ones in green)
next i need to join these curves, then separate the outer boundary from the inner perforations
next i need to get the centers of each perforation, and use them to scale the perforations
finally, we need to create a surface form that profile and extrude it in -18mm in the z direction
and here the graashopper file. it should get you on your way. enjoy
Peg Wall 02.gh (230.3 KB)
Thank you so much, this works great.
NB: For some reason your “AREA” command didn’t transfer so I had to add it in myself (may be something to do with software versions).