Center of any shape

Hey there!

Is it possible to find the center of any shape with grasshopper?

Hello.

Depends on what exactly you mean with “center”, but normally you can use Area for 2D and Volume for 3D objects and it will give you the center (of the bounding box).

You can use DeBrep (Deconstruct Brep) and then use the Average of the ‘V’ (Vertices) output, as I did yesterday here:

Hej guys,

Thank you for your reply basically this is what I’m trying to do. I am creating a model that has to be printed in concrete so I am making a loft between 3 different rectangles and creating a “infill” (zig zag shape). The idea is to align the 3 rectangles in the Z axis. The off set is so the extrusion of the zig zag does not meet the outher diameter.

This is how the grasshopper file looks like and the offset mesh is just for visualisation and it is acording to the nozzle we are using.

Rectangle_infill_v1.gh (46.0 KB)

Hey again,

This is what I came out with :slight_smile: