Those shapes are still almost symmetrical, quite unlike the L in post #28 and the angle bar in post #6, the latter of which may be balanced within the shape.
Actually, the Neanderthal is rather symmetrical, too and therefore an easy one.
A full solution works for any shape, however simple or complex.
The other thing is that to be able to calculate the area Roger's way you have to physically cut the shape in half.
First eyeball it, cut it, measure it, oops not quite right, join it together again, move the line, cut it again.
And the method doesn't work for extreme shapes where the centre of gravity is outside the shape
Divide, select + CadTools menu for area, undo, nudge, divide, cadtools, undo, nudge, divide, cadtools, undo - finished.
It does work for extreme shapes too.
I do this often.
In the past I have requested that CadTools create a centroid point tool.
Jacob & Steve
Isn't this fun...
Some shapes require that my previous method be used recursively to achieve an accurate result - 3 times seems to cover the more difficult instances; I am finding that after a couple of shots, when the accuracy is less than 0.5%, the area values will swap rather than get more nearly equal. That might be due to a limitation in the resolution... maybe the 800.000 dpi shown in the debug pallet.
Other solutions, as below work with great precision on particular shapes.
Here's a couple of solutions for L shapes and triangles: the triangle solution allows that one side must be vertical. As far as I can tell it works for all triangles.
The L shape solution has a second part that determines whether the hang point is on the object; the vertical dashed line must cross the object above the horizontal dashed line - the greater the distance between the horizontal line and the hang point, the more stable will be the object.
I think a single formula to nail every possible shape is not likely.
And just in case you're wondering; no, I don't have anything better to do - not this week or next.
CadTools? Where do you get them from?
Nice one - that is going to be real easy and quick for the average punter to work through.
Certainly. Suggestion A) and B) in post #3 are also for mathematicians that are bored with such easy and quick solutions as the one in post #45.
And for old timers that know how to use it there is also a solution G) with only a few fun calculations:
G1) Print the shape (at a known scale),
G2) Make a run with a mechanical integrator (or a few runs to make sure, some less steady handed users need that),
G3) Apply the relevant factors, depending on model (and where you place the drawing), and transfer the result to the drawing in Illy.
I was stuck with the same dilemma and wrote a script that places a small hole at the center of gravity of an irregular polygon. It worked great! After this iteration, I also added a few snippets to create the hole just above the center of gravity to ensure that the part balanced well when suspended from just that one point.
Downloadable script: CentroidFinder.js · GitHub
Thanks for your contribution.