News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

CG of a complex solid

Started by samdavo, April 06, 2016, 06:09:20 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

samdavo

Things have been a bit quiet on the forum lately, so I'll throw this one in.
Herewith an example of a fairly complex solid, basically a block of steel with a hole through one way (100 mm diam), and a hole of varying diameter (nom  80 mm ) in the other.   And how easy to find the CG with DCAD  (112.2mm  from one face).  Basically you can set a point with "point snap / CG".

I have calculated it longhand, and concur ( albeit 112.6 mm - but maybe the error was mine - (edit) - yes the method mentioned below includes an approximation. ) - more on this next post.
cheers

samdavo

#1
Now to mention how I calculated this longhand.  (And please note that I do not use CG within DCAD to do this manual check) ...
(edit) and also please read the red additions below.

At first glance, (ignoring some chamfers for the time being) you might assume that the block is
a) a (rectangular prism)
b) minus (a nom 80 odd mm cylinder in x dirn)
c) minus (a 100 mm cylinder in the z dirn).   

But that isn't correct, because there is a volume in the centre of the block that is common to both cylinders.   

Hence a more accurate description is :-   
a) a (rectangular prism)
b) minus (a nom 80 odd mm cylinder in x dirn)
c) minus (two 100 mm cylindrical "tiaras" in the z dirn = see jpeg).   

Having sliced and exploded the solid, I have extracted all planes except for the tiara.
I have then
* rotated it to be vertical - to look like a tiara 
* added a plane on the low end ( a requirement of prl's unwrapG2.d3m macro discussed many moons ago)
* run that macro to develop the surface
* found the vector that makes the perimeter (using sandbox technique)
* found the area and more importantly the mean height (by dividing area by length)
* with this mean height, you can calculate the APPROX volume of the "tiara".

(edit) No sooner posted that I suspect (?) - fairly certain lol - that my tiara comparison is an approximation only in this case.   The shape might be a tiara around the circumference,  BUT the real shape is more like a cylindrical top-hat (solid foam) worn by an Army general after an artillery shell took out a massive tubular chunk from the top.   Hence (doh) - the UNWRAP is irrelevant,  What you have to do it find the mean height of the new tophat, hence the volume of the foam.  (2 cents).

Then you can calculate the CG of the complex solid by adding and subtracting these components (2 cents)

PS. prl is a genius :) (although his posts seem to have dried up lately)   The unwrap macro and the sandbox technique are discussed elsewhere. 
cheers
sam

PS unwrapG2.d3m is discussed reply #73 here :- http://forum.designcad.com/index.php?topic=5464.msg40809#msg40809

Sandbox-ing is discussed reply #57 here :- http://forum.designcad.com/index.php?topic=5464.45


samdavo

#2
Final comment
I wanted to check something as follows:-
I exploded the solid into planes,
then without any change whatsoever, I selected the planes and "Ctrl+D" defined them as a solid.
I then repeated the CG exercise, ( CG is one of the Snap toolbox options) -
and again found it at 112.2mm  (unchanged)
Maybe it was a coincidence, but it worked ok this time.

samdavo

Here's another check on DCAD's CG position.  The CG of a pyramid of height H is apparently H/4 above the base.   

The pyramid shown has a height H = 100, hence the CG should be 25.
And sure enough that is what DCAD also comes up with.

I want to add 
a) that the pyramid I have drawn was made from Solid Defining (Ctrl+D) a set of square and triangular planes, and yet the CG calc by DCAD is correct (well done DCAD).   
b) Also if you leave off one of those planes, the CG is totally unreliable / almost random. 

Also
c) I exported that to SketchUp to use their Xray vision, and finally
d) If you want dimensions to show up in SketchUp, it might be necessary to explode the dimension into lines, arrows and numbers (which is what I have done here - at least for the lower pyramid  - the top pyramid should have the same dimensions, but they don't show up after Export from DCAD for some reason (2 cents) 

More to follow, next post.

samdavo

#4
ok, the experimentation continues.  The CG of a cone is also at H/4 in theory.   That is what you get if you draw the cone correctly. 

But suppose you drew the cone by assembling planes, 36 thin triangles for the sides, and a circle at the base with 36 flats to match.   And Solid Defined that (the green one). Sure enough it still gives you the correct CG.  (edit) Clearly you wouldn't draw a cone that way, but it can come up with more complex shapes - and I just thought that this is easier to explain.  Many of you will conclude that this is a red herring I am sure :) or maybe a green one.

Now suppose you made a mistake (the red one), and the circle at the base only had 35 flats, (one missing point), so that the solid "leaked", i.e. the set of planes didn't quite "enclose a sealed volume" before solid defining, - then you find that the CG calculation is (understandably) unreliable. (2 cents)