Solid Union error - inconsistent edge-face relationships

Hi everyone,

I will post some screenshots of the problem I’m facing when trying to get the centroid of a complex solid model. I already saw some similar posts, but maybe by now someone has found a solution.

If not do you recomment any other way to get a centroid of my element?
Is it possible to somehow drop this element out of Revit in some kind of AutoCAD solid and then try to get the centroid there?

I’m a new user obviously and big bosses of dynamo forum decided I can’t post more than 1 pictures so I will use imgur post :

Element is a steel girder.
On some pics (with no error) are the centroids of per 1 solid in element, it works perfecty fine I would say.
And the rest (error images) this is when I try to use solid union node, (shortest lacing) (longest or cross gives the same result as if solid by union wasnt used, also flatten did not ofc make any difference since element solids uses 1 element only) (i tried using both element geometry and element solid).

Thank you very much for reading!

I wonder if you can use the centroids of each of the soilds along with the volume of each solid to act as a weight. For example, if you have a solid with a centroid of (0, 0, 0) with a volume of 9 m3 and another with a centroid of (1, 0, 0) and a volume of 1 m3, the weighted average would be (0.1, 0, 0).

Seems like an idea, how would I do that?

Like this:

centroid calculation.dyn (31.7 KB)

Weights are calculated by dividing the volume of each solid by the total volume of all solids.


Thank you very much, I will try this one as well.

I actually found a way to get Centroid yesterday.It’s pretty short and pretty much matches the one I got in AutoCAD Massprop-from-solid.

Here it is:

Works perfectly. Thank you! Yours runs faster because it works with lists mostly rather than joining solids. Same coordinate also.