[Plugin] Center of Gravity
-
It sounds like you may be creating component, but failing to tick the box that replaces the raw geometry with the component.
If there is no bounding box around your object it is just raw geometry, see if the component is in the component browser for you ready to use. -
-
Hi Folks
I just installed this plugin into SketchUp 2017. It doesn't work as expected for me. The find CofG still works fine as far as I can tell but the Composit CofG returns a ruby error:
Error; #<TypeError; reference to deleted Group> /Users/hute/Library/Application Support/SketchUp 2017/SketchUp/Plugins/CofGravity.rb;670;in `entities' /Users/hute/Library/Application Support/SketchUp 2017/SketchUp/Plugins/CofGravity.rb;670;in `block in do_composite' /Users/hute/Library/Application Support/SketchUp 2017/SketchUp/Plugins/CofGravity.rb;669;in `each' /Users/hute/Library/Application Support/SketchUp 2017/SketchUp/Plugins/CofGravity.rb;669;in `do_composite' /Users/hute/Library/Application Support/SketchUp 2017/SketchUp/Plugins/CofGravity.rb;117;in `initialize' /Users/hute/Library/Application Support/SketchUp 2017/SketchUp/Plugins/CofGravity.rb;817;in `new' /Users/hute/Library/Application Support/SketchUp 2017/SketchUp/Plugins/CofGravity.rb;817;in `block in <top (required)>' SketchUp;1;in `call'
Has anybody got a clue how to fix this? It is really a pretty cool plugin and would be a shame if it became unusable.
-
Thanks for the bug-report.
I suspect that this is a glitch in the way v2017 handles exploded entities.
I'll investigate and fix it... -
Here's v2.0 http://sketchucation.com/pluginstore?pln=CofG Its coding is now compatible with v2017 and it is also signed for use in v2016/v2017 in any loading-policy.
-
Outstanding work TIG, thanks that was quick, I can confirm it works after the upgrade of the plug-in.
Cheers
-
-
Your image attachment isn't showing.
An object needs to be a sensibly formed 'solid' - as reported in Entity Info.
Otherwise results can be flaky...
'Hollows' are accounted for, if it's a proper solid...If you attach your SKP we can look at it...
-
Hello All, hello TIG,
I want to calculate the center of gravity of a small magnet, but the calculation always report volume = 0 and eventully weight = 0.The plugin works perfectly on my pc with larger objects, the density is 7.6 g/cm3, I'm a newbie with sketchup in general, I'm probably doing something wrong
Luca
-
It must be a rounding issue.
The object looks like it has no volume to SketchUp, therefore no weight.I'll investigate...
-
Yes, I see it.
It was never intended for such small objects.
It rounds to the nearest cu", so your small object appears to have no volume !
I'll look at a way of adjusting it... -
Wow, very interesting. Thank you very much!
-
Here's v3.0 https://sketchucation.com/pluginstore?pln=CofG It now reports the Volume/Weight of very small objects with more dp etc...
-
Thank you very much, I will use it tomorrow!
Luca
-
-
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
-
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
-
Must be a glitch somewhere in the 'rounding'...
I'll fix it... -
Here's v3.1 https://sketchucation.com/pluginstore?pln=CofG 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. -
It works!
Thank you very much,
Luca
Advertisement