Author Topic: Finding center of mass  (Read 31478 times)

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: Finding center of mass
« Reply #30 on: October 05, 2021, 12:44:46 pm »
Extremas - These show the geometric extents of the selected objects.
Centroid - "Informally, it is the point at which a cutout of the shape could be perfectly balanced on the tip of a pin"

If you have two identical shapes such as a domino block but one has a hole near to an end, their extremas will be identical, but the shape with the hole will have it's centroid offset to the end without a hole as it's centre of gravity will have moved.
Filmed in Supermarionation

Offline ubiquity

  • Droid
  • **
  • Posts: 64
    • View Profile
Re: Finding center of mass
« Reply #31 on: October 05, 2021, 13:47:10 pm »
Thanks Eddy,
I appreciate the difference between the Extremas and the Centroid - myt query is why does the Centroid finder of this plugin give different coordinates from the Centroid display from your Get Extremas plugin.
Are you telling me that the data displayed by your Get Extremas plugin relates to another point that is also called Centroid.

Attached is a screenshot showing the two different points - the red one is the Centroid generated by Centroid plugin and the yellow one is a single pointlist point placed at the coordinates Centroid reported by the Get Extremas plugin - for the same object pictured.
Cheers
Paul


Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: Finding center of mass
« Reply #32 on: October 05, 2021, 18:17:15 pm »
The Centroid plugin was written by, Rodneyk, but since their last visit was 2016 I managed to recompile the code for use with CamBam 64 bit.
Menu item, Tools->Get object Extremas, is a CamBam supplied tool written by the CamBam author.
The ShowExtrema plugin here, http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/ShowExtrema.html, uses internal CamBam functions to get the data.

Using the word "centroid" in the ShowExtrema plugin may have been a bad idea as it only refers to a geometric point of view.

The Centroid plugin was supposed to account for "holes" in the selected shapes thus moving the centre of gravity away from geometric centre.
Filmed in Supermarionation

Offline ubiquity

  • Droid
  • **
  • Posts: 64
    • View Profile
Re: Finding center of mass
« Reply #33 on: October 05, 2021, 21:33:22 pm »
Ahh thank you I now understand the conceptual difference which, I think, also explains the actual difference.
And thank you for the reply in the Get Object Extremas plugin thread.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7422
    • View Profile
    • Cambam V1.0 French Doc
Re: Finding center of mass
« Reply #34 on: October 05, 2021, 21:51:33 pm »
Hello

You can show the "extremas" and the center of those extremas (= the center of the rectangular bounding box of a shape) if you enable the "Show selection corners" in the options.

++
David
« Last Edit: October 05, 2021, 21:55:15 pm by dh42 »

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1833
    • View Profile
Re: Finding center of mass
« Reply #35 on: October 05, 2021, 23:28:41 pm »
Hi Paul\Eddy

I calculated the centroid for several standard shapes from the wiki page and some
with holes as well and then compared the results to the plugin (Centriod)
and it is reporting correctly.

Dave

Offline ubiquity

  • Droid
  • **
  • Posts: 64
    • View Profile
Re: Finding center of mass
« Reply #36 on: October 06, 2021, 06:47:15 am »
Thanks Dave,
Eddy has finally got it into my thick head the difference between the centroid (centre of mass) and the centre of geometry.
Cheers
Paul

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4492
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Finding center of mass
« Reply #37 on: October 18, 2021, 00:17:52 am »
Funny, I just saw this today by chance, and just this morning I was playing with gombocs and tantots and wondering how I could add "features" to them and maintain the same center of mass so they maintain (or nearly maintained) their single static balance point.  I'm not sure what I want to do can be done, but a center of mass feature in ViaCAD would sure help me to make test models.  This forum never (well almost never) fails to be helpful. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com