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

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8988
    • View Profile
Re: Finding center of mass
« Reply #15 on: January 14, 2013, 11:16:38 am »
Hmmmm????  Same error, exactly.  I was careful to remove the old instance of centroid.dll before installing the new one, and its new help file.


and, confirming from the error details:
----------------------------------------
Centroid
    Assembly Version: 1.2.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/Program%20Files/CamBam%20plus%200.9.8/plugins/Centroid.dll
----------------------------------------

LLoyd
« Last Edit: January 14, 2013, 11:22:05 am by lloydsp »
"Pyro for Fun and Profit for More Than Fifty Years"

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8988
    • View Profile
Re: Finding center of mass
« Reply #16 on: January 14, 2013, 11:52:59 am »
PS...
CamBam.info just came back up.  I downloaded rc7, and it works with centroid 1.2.

I'm guessing the change you intended didn't get into 1.2, after all.

LLoyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Rodneyk

  • Droid
  • **
  • Posts: 65
    • View Profile
Re: Finding center of mass
« Reply #17 on: January 14, 2013, 14:27:40 pm »
PS...
CamBam.info just came back up.  I downloaded rc7, and it works with centroid 1.2.

I'm guessing the change you intended didn't get into 1.2, after all.

LLoyd


Darn, I think I understand. The exception is coming up before it even gets to the code that uses the method. So my fix does not have a chance to work.  I could remove the reference to Remove Arcs altogehter and just depend on my own function (I wanted to avoid that because my function does not enter uniform data points and cambam's does).  If there is a demand for this on R6 I will do just that...



Offline Rodneyk

  • Droid
  • **
  • Posts: 65
    • View Profile
Re: Finding center of mass
« Reply #18 on: January 17, 2013, 06:22:59 am »
IF using RC 6 is important to anyone I think I can make it work by removing the dependancy on the method in cambam.  Code is written but it no one wants it I will not release it...

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8988
    • View Profile
Re: Finding center of mass
« Reply #19 on: January 17, 2013, 12:11:01 pm »
I think rc7 is at least as stable as rc6.  It fixed a few bugs, added some features, and didn't seem to create any new 'undocumented features'.

LLoyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline nifty1a

  • Ewok
  • *
  • Posts: 31
    • View Profile
Polite request Re: Finding center of mass
« Reply #20 on: December 03, 2018, 21:47:31 pm »
Is there any chance that someone could recompile the Centroid plugin for CB+ v1.0 please?

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7422
    • View Profile
    • Cambam V1.0 French Doc
Re: Polite request Re: Finding center of mass
« Reply #21 on: December 03, 2018, 22:26:52 pm »
Is there any chance that someone could recompile the Centroid plugin for CB+ v1.0 please?

Hello

It is working on V1 too ; no need to recompile.

++
David

Offline nifty1a

  • Ewok
  • *
  • Posts: 31
    • View Profile
Re: Finding center of mass
« Reply #22 on: December 05, 2018, 13:51:48 pm »
Thanks David..

OK... it was my inexperience with Windows 10 on my new laptop...
The cause of my issue was that the .dll file I had dropped into the plugins folder was 'blocked'...
The error message in CamBam (How do I copy and paste from that window?) said something about network location, sandboxing, version of .NET framework and CAS policy..

All sorted now, thanks again...


Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7422
    • View Profile
    • Cambam V1.0 French Doc
Re: Finding center of mass
« Reply #23 on: December 05, 2018, 15:24:11 pm »
Hello

Ah yes, the "security"  ::)

more info here (and the problem exist also on W7, not only on W10)

http://www.cambam.co.uk/forum/index.php?topic=6294.0

Fortunately, I never had this problem because I unzip my files with "Winrar" that have the good idea to automatically unblock the unziped files ...

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: Finding center of mass
« Reply #24 on: March 26, 2020, 19:32:59 pm »
Updated version attached for CamBam 64bit.

v1.2.0.1 attached

David, please update the plugins page
Filmed in Supermarionation

Offline ubiquity

  • Droid
  • **
  • Posts: 64
    • View Profile
Re: Finding center of mass
« Reply #25 on: October 04, 2021, 17:35:13 pm »
Just downloaded this plugin in the hope of using it's output in some calculations and hence be able to move a compound object to a specified position.
Initially had some issues that resolved when I made sure the compound shape of Polyline 30 (Curve layer from Model Rail.cb attached) was set to closed.
My comment is that the placement of the centroid for all the shapes produced using arcs and circles is slightly different from the position given by the Show Extrema plugin, which appears to calculate the centroid in the same way as CamBam natively places the yellow x at the centroid upon selection of an object. For my purposes this difference is not critical but I imagine for others that might not be the case.
I assume the algorithm used by the two plugins is different but wonder if Centroid could be adjusted to match the output from Show Extrema.
Cheers
Paul
CamBam plus [1.0] rc-3 Linux
Copyright © 2019 HexRay Ltd

CamBam.CAD : 1.0.7233.21741
CamBam : 1.0.7233.21743
Build Date : 21/10/2019 1:04:42 PM
Framework Version : 4.0.30319.42000
Licenced To : Howrah Men's Shed Inc

Linux Mint 19.3 Tricia Cinnamon Version 4.4.8 Kernel  5.4.0-81-generic

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7422
    • View Profile
    • Cambam V1.0 French Doc
« Last Edit: October 04, 2021, 21:05:13 pm by dh42 »

Offline ubiquity

  • Droid
  • **
  • Posts: 64
    • View Profile
Re: Finding center of mass
« Reply #27 on: October 04, 2021, 21:43:07 pm »
 :) Yes it's a drawing exercise for my students and for our CNC

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5269
  • Made in England
    • View Profile
Re: Finding center of mass
« Reply #28 on: October 05, 2021, 07:20:46 am »
Extrema and Centroid are two different things.
Filmed in Supermarionation

Offline ubiquity

  • Droid
  • **
  • Posts: 64
    • View Profile
Re: Finding center of mass
« Reply #29 on: October 05, 2021, 07:55:25 am »
Thank you David for the links that are fun, informative and useful.
And thank you too Eddy for your reply. I appreciate that the extrema and centroid are two different things.

My question about the different calculations for the centroid's given by the Centroid and Show Extrema plugins remains.
For the curve track in Model Rail.cb (previously attached) the
Centroid plugin gives me a centroid position of -3.329323352, 187.688996172; while
Show Extrema plugin gives me a centroid position of -3.785, 185.309 which agrees with the position given by CamBam's Get Object Extremas tool (calculating the difference between extremas of x and y manually).
x = (-89.6030703701006+82.0337773860007)÷2 = −3.784646492
y = (211.99995943616−158.61856546735)÷2+158.61856546735 = 185.309262452

I am suggesting that the algorithm for calculating centroid in the Centroid plugin may be in error.

As I said, for my application the difference, (−0.4556 in x and 2.3797 in y), is not crucial but may be important for other situations.
Regards,
Paul