[Plugin] Center of Gravity

Re: [Plugin] Center of Gravity

Postby lsorrentino » Tue Aug 22, 2017 9:00 am

:(

Other little thing I can't understand.

The little magnets of my previous post goes attached to a wood base that according to sketchup is 4500 mm3, but calculated by CoG is 4000.

The volume of the magnet is ok regardless is far little than the wood base.

Bye,
Luca
0

lsorrentino 
 

Re: [Plugin] Center of Gravity

Postby lsorrentino » Tue Aug 22, 2017 9:17 am

My feeling is that if the volume is only mantissa, ie 0.04555 cm3 works good, when volume is ie 4.75 cm3 decimal part is truncated.

Luca
0

lsorrentino 
 

Re: [Plugin] Center of Gravity

Postby TIG » Tue Aug 22, 2017 12:45 pm

Must be a glitch somewhere in the 'rounding'...
I'll fix it...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby TIG » Tue Aug 22, 2017 2:40 pm

Here's v3.1

Download

The rounding glitch on some small values is now fixed.
The Volume/Weight now shown with between 1dp and 4dp, suppressing trailing zeros beyond .0 as necessary.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby lsorrentino » Wed Aug 23, 2017 1:22 pm

It works!

Thank you very much,
Luca
0

lsorrentino 
 

Re: [Plugin] Center of Gravity

Postby sketchartist023 » Wed Jan 17, 2018 10:53 pm

Mine does not show up with the added component information. It just turnes the solid into a bunch of layers (horizontal lining). SU 8 Pro windows 7 64bit
0
User avatar
sketchartist023 
 

Re: [Plugin] Center of Gravity

Postby TIG » Wed Jan 17, 2018 11:44 pm

Version 8 is by now pretty much unsupported, but it should still work.
If you have the Ruby Console open what errors do you see when it fails ?
It's clearly doing its temporary slicing to get the centroid... but not completing...

How big is this object ?

Can you upload the SKP you are having issues with...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby sketchartist023 » Thu Jan 18, 2018 12:11 am

TIG wrote:Version 8 is by now pretty much unsupported, but it should still work.
If you have the Ruby Console open what errors do you see when it fails ?
It's clearly doing its temporary slicing to get the centroid... but not completing...

How big is this object ?

Can you upload the SKP you are having issues with...



TY for the quick response :)
So, the console shows in the attachment.
It initializes, goes through the steps, and gets to call.
Or looks like ruby reads up maybe idk :P

The skp is attached also :) Thank you for helping! I notice the ruby icon is not right also, so is it possible it is a ruby issue with SU8 atm?
0
User avatar
sketchartist023 
 

Re: [Plugin] Center of Gravity

Postby TIG » Thu Jan 18, 2018 1:03 pm

Can you please post the top half of the error message [or even better expand the RC window and attach the whole error].
Without all of it, the cryptic second half is somewhat useless...

PS: I confirm that your SKP works fine in v2017/v2018 so it's probably a v8 glitch where making it compatible for the last half dozen updates generated an error in very old ones, like v8.
Unfortunately I don't have v8 loaded any more, but I can try and see what the RC error is, make some tweaks that maintain the current versions' usage and PM you that fixed RB to try and see if that works for you...
If so I'll then republish it...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby TIG » Thu Jan 18, 2018 1:56 pm

PS: I'd still like to see the full v8 error, but I've also PM'd you an older version of the RB, which I am hopeful will work in v8 for you...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby zstadel » Sun May 13, 2018 2:26 am

TIG please help!

The Center of Gravity tool works great, but I can't get Composite C of G to work.

I select two C of G groups,
then I go to Extensions>C of G...>Composite C of G
and it looks as though another group is generated, but it's empty

Running SketchUp Pro 17.2.2554 on MacOS 10.13.4

Thanks for any help you can offer
Zack
0

zstadel 
 

Re: [Plugin] Center of Gravity

Postby TIG » Sun May 13, 2018 12:50 pm

Works fine for me !
Your objects are quite small and have a small volume/weight.
I'm wondering if the two CofG's combined have zero values ?
If you retry with the Ruby Console open are there any error messages ?
If you try with more appropriate settings in the dialog does it improve ?
What version of CofG are you using ?
The most up to date one from the PluginStore ??
0
TIG
User avatar
TIG 
Global Moderator
 

Re : [Plugin] Centre de gravité

Postby auvergnemobois » Tue Aug 21, 2018 5:04 am

Capture.JPG
Hello, I have a problem With the same component, I get 2 different volumes and a different center of gravity depending on the position of the component ??

j'ai un soucis. Avec le même composant, j'obtiens 2 volumes différents et un centre de gravité différent suivant la position du composant ??
0

auvergnemobois 
 

Re: [Plugin] Center of Gravity

Postby Dave R » Tue Aug 21, 2018 11:16 am

Change the axes on the rotated component so the blue axis is up. Make it unique before doing this so as not to affect the other one.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby TIG » Tue Aug 21, 2018 12:41 pm

What level of accuracy are you using ?
If it's a solid it has no affect, but if your object is a non-solid [like this one] then it takes a series of horizontal slices through the form, and accumulates those areas to arrive at an approx volume - the more slices the more accuracy, however if it does slices that just miss some parts of some elements, then their assumed volume is less.
It wasn't really intended for 'stick' assemblies, as potentially a significant part of some horizontal sticks could be overlooked.
Laying your non-solid assembly 'flat' on the ground would probably give the most accurate result, since every 'stick' then gets sliced evenly and only a tiny sliver might get missed...
Whereas 'solid' objects will have a set volume or even pseudo-solids will approximate well too...
If you were to explode all of the sub-component parts and intersect them together, and then run a 'solid' tool on the main container, then you should find them to be solid, and the Entity Info volume is then used in CofG...
Such 'solid' fixer tools include my 'SolidSolver' and thomthom's 'SolidInspector' - which are available from the SketchUcation PluginStore...
0
TIG
User avatar
TIG 
Global Moderator
 

Re : [Plugin] Centre de gravité

Postby auvergnemobois » Tue Aug 21, 2018 5:45 pm

i dont understand
0

auvergnemobois 
 

Re: Re : [Plugin] Centre de gravité

Postby TIG » Tue Aug 21, 2018 10:54 pm

auvergnemobois wrote:i dont understand
You don't understand what ?
Anything at all. or something specific ?

Since you seem to be French [?] here's a translation of my previous post...


What level of accuracy are you using ?

If it's a solid it has no affect, but if your object is a non-solid [like this one] then it takes a series of horizontal slices through the form, and accumulates those areas to arrive at an approx volume - the more slices the more accuracy, however if it does slices that just miss some parts of some elements, then their assumed volume is less.

It wasn't really intended for 'stick' assemblies, as potentially a significant part of some horizontal sticks could be overlooked.

Laying your non-solid assembly 'flat' on the ground would probably give the most accurate result, since every 'stick' then gets sliced evenly and only a tiny sliver might get missed...
Whereas 'solid' objects will have a set volume or even pseudo-solids will approximate well too...

If you were to explode all of the sub-component parts and intersect them together, and then run a 'solid' tool on the main container, then you should find them to be solid, and the Entity Info volume is then used in CofG...

Such 'solid' fixer tools include my 'SolidSolver' and thomthom's 'SolidInspector' - which are available from the SketchUcation PluginStore...


Comme tu sembles être français [?] Voici une traduction de mon post précédent ...

Quel niveau de précision utilisez-vous?

Si c'est un solide, cela n'a aucun effet, mais si votre objet est un non-solide [comme celui-ci] alors il faut une série de tranches horizontales à travers le formulaire et accumule ces, pour arriver à un volume approximatif, plus de précision, cependant, si elle fait des tranches qui ne manquent que certaines parties de certains éléments, leur volume supposé est inférieur.

Il n'était pas vraiment destiné aux assemblages de «bâtons», car une partie importante de certains bâtons horizontaux pourrait être négligée.

Si vous posez votre assemblage non-solide à plat sur le sol, vous obtiendrez probablement le résultat le plus précis, car chaque «bâton» est alors tranchée uniformément et seul un petit ruban peut être manqué...

Alors que les objets "solides" auront un volume défini, ou même des pseudo-solides approcheront bien aussi...

Si vous deviez faire exploser toutes les parties du sous-composant et les croiser ensemble, puis exécuter un outil «solide» sur le conteneur principal, vous devriez les trouver solides et le volume d'informations d'entité est ensuite utilisé dans CofG...

Parmi ces outils de correction «solides», par example mon «SolidSolver» ou «SolidInspector» de thomthom, disponibles dans le PluginStore de SketchUcation...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby auvergnemobois » Wed Aug 22, 2018 6:35 pm

Thank you "TIG", indeed I am very "french" !!
I had pretty much understood. I did a flat test (see picture, like this?)
Capture.JPG

and in the normal position. It's about the same.
On the other hand without the high and low frame. Because when they are there, it gives a bad result (597kg instead of 119.7kg !! and CofG bad !!!)
Capture.JPG2.JPG


it does not matter, because the high and low frames are the same weight, so it does not change the center of gravity.Maybe a story with the "z" axis (blue).
1

auvergnemobois 
 

Re: [Plugin] Center of Gravity

Postby sketchartist023 » Mon Oct 29, 2018 3:03 am

Hello TIG and others,

I have a question about the COG. I tried using it to get the COG information for a plane design and it only created a grouped stack of planes on Z axis top to bottom of the solid. I used a simple square solid and same effect. Here is a pic of what it creates. Not sure what I am looking at but I do find this useful too for other ideas Im working on for crafting lol.


Using: Sketchup v8 (i know....google version but I like it)
P.S. I did have this working once before, years ago.


Thanks if you can help :)
0
User avatar
sketchartist023 
 

Re: [Plugin] Center of Gravity

Postby TIG » Mon Oct 29, 2018 10:40 am

It might be a v8 incompatibility: see here: viewtopic.php?p=630803#p630803
Please ensure you are using the latest [compatible] version [perhaps copy it from your last working v8 Plugins folder ? I did PM you an older version at the start of this year ? I re-PM it if I can find it...].

Also run it with the Ruby Console open and report all of the error messages you get...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby TommyWoodbury » Wed May 27, 2020 4:26 pm

Awesome plugin, thanks TIG! Any plans on making it 2019 compatible?
0

TommyWoodbury 
 

Re: [Plugin] Center of Gravity

Postby Dave R » Thu May 28, 2020 12:54 pm

It works just fine in SketchUp 2019. And in SketchUp 2020.

Here's an example done in SU2020.
Screenshot - 5_28_2020 , 7_15_31 AM.png
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby Mare99 » Thu Nov 12, 2020 8:17 pm

Hi, thanks for this plug-in, this is what I was looking for! But it dodn't work for me. I do everything like in your video but mistake "Selection NOT 2 C of G Groups!".
I am sure that I have two Groups (see in apdx). I try do the same with two Components and there is mistake : "Selection is NOT group!".
What I do bad? I have Sketchup 2018.
Thank you for help!
Jirka
0

Mare99 
 

Re: [Plugin] Center of Gravity

Postby TIG » Fri Nov 13, 2020 7:51 pm

@Mare99

Are you sure that the selection is of two groups of CofG text?
Select one and look at Entity Info...

If you have copied one it'll report as two versions of the same thing...

The geometry should be unique instances, as should the text group...

Please edit one of them, make no changes and then close it immediately - this will have the affect of making the two into unique versions - perhaps that's the issue and it'll fix it...

I just tried it and it works OK - provided that they are two unique things...

If not, than please post a simple SKP containing them and I'll investigate further...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Center of Gravity

Postby Dave R » Fri Nov 13, 2020 8:30 pm

From the screen shot it looks like you are selecting the geometry groups, not selecting the CofG groups as the instructions indicate.
Screenshot - 11_13_2020 , 1_29_00 PM.png


Screenshot - 11_13_2020 , 1_29_16 PM.png
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Previous


 

Return to Plugins

Who is online

Users browsing this forum: kimpoy12, maxim bachimov and 14 guests

Visit our sponsors: