generative modeling for Rhino
I'm doing some basic hull form analysis which requires finding the centroid of buoyant volumes. I am cutting slices out of the model which at times creates 2 separate volumes because of the irregular shape of a hull, but still need the centroid of the two volumes combined.
Rhino natively works with multiple volumes, finding their combined weighted centroids (same with area centroids). Analyze -> Mass properties -> Volume Centroid
I found this discussion with a VB script that seems dated. I don't understand VB, so can't trouble shoot much (tried a couple things to no avail).
I could probably put together something that solves it, but it would be very nice if it was part of grasshopper. :D
You could do it by converting each "slice" into a mesh, joining the resulting mesh, and using "Mesh Volume" to get the centroid.
You can also do it by grafting each slice and then taking a weighted average of the volumes in each branch. Multiply the individual centroids by their volumes; calculate the sum of this product and divide it by the sum of the volumes.
centroids for multiple volumes are also possible in the Rhino SDK, I just never implemented them as Components. I'll add them.
Did this get implemented somehow in 8.0050, and I'm just missing it?
Nope, I found they are still missing from the new SDK and then I somehow forgot about them.
I started, but we're having some trouble making all of it work right. Hopefully it will be fixed in a few days.
Is this still on the agenda?
Awesome guys. I'll be using the VB script for now, and eagerly awaiting the new component. I have a half dozen routines that will benefit from it.