Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Get centerpoint or Center of mass


Björn Samuelsson
 Share

Recommended Posts

I am developing functions for Mastercam with Mastercam SDK.

What I am looking for is the marked area in picture below. I want to get the center of mass programaticaly with C# and the SDK.

Below is in swedish, but it is the center of mass I am after. Is there a command or function to get it? I have been able to get all points out of a 2D shape. But now I want the center of the shape.

If someone has the answer I would be very happy! 

image.png.fab178cb1876876bcddc9c88109403c4.png

Link to comment
Share on other sites
4 hours ago, Björn Samuelsson said:

I am developing functions for Mastercam with Mastercam SDK.

What I am looking for is the marked area in picture below. I want to get the center of mass programaticaly with C# and the SDK.

Below is in swedish, but it is the center of mass I am after. Is there a command or function to get it? I have been able to get all points out of a 2D shape. But now I want the center of the shape.

If someone has the answer I would be very happy! 

image.png.fab178cb1876876bcddc9c88109403c4.png

If you re-post this on the main Mastercam<dot>com forum I would be happy to provide some insight on how this can be done using the API.

Link to comment
Share on other sites
On 10/8/2021 at 8:29 AM, Björn Samuelsson said:

I am developing functions for Mastercam with Mastercam SDK.

What I am looking for is the marked area in picture below. I want to get the center of mass programaticaly with C# and the SDK.

Below is in swedish, but it is the center of mass I am after. Is there a command or function to get it? I have been able to get all points out of a 2D shape. But now I want the center of the shape.

If someone has the answer I would be very happy! 

image.png.fab178cb1876876bcddc9c88109403c4.png

Thanks!

I have posted there, it 's waiting for approval.

https://mastercamforums.com/OfftopicForum/viewtopic.php?f=6&amp;t=931

Link to comment
Share on other sites
4 hours ago, Björn Samuelsson said:

Thanks!

I have posted there, it 's waiting for approval.

https://mastercamforums.com/OfftopicForum/viewtopic.php?f=6&amp;t=931

Hi,

I replied to your post on the other site,

sorry for the confusion, MastercamForums.com is my organizations support and discussion forum, the official forum is on -> Mastercam.com .

You will need a log in there to access the documentation for building add-ins for mastercam.

Link to comment
Share on other sites

Björn,

What version of Mastercam?

Are you wanting to do this with a C-Hook or NET-Hook type add-in?

*You cannot do it directly  using the the NET-Hook API, but with a C++/CLI interop DLL, a NET-Hook "client" add-in can obtain this information.

image.png.aa07e46b4c6f553c272d419f7b1f5c00.png

 

 

 

Edited by Roger Martin from CNC Software
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...