SimplifiedLogic / creoson

OpenSource Automation using JSON Transactions for PTC's CREO Parametric
http://www.creoson.com
MIT License
79 stars 23 forks source link

Returning center of gravity as part of return value of file:massprops #69

Closed iincer closed 2 years ago

iincer commented 3 years ago

The "mass properties" computed by Creo include items like total mass, volume, several inertia values, center of gravity, etc. Currently, the file:massprops function returns a subset of these values, namely volume, mass, density, surface_area, ctr_grav_inertia_tensor, coord_sys_inertia, and coord_sys_inertia_tensor. The center of gravity is a very useful parameter of a device, and should be part of the value returned by file:massprops.

adama2000 commented 3 years ago

Should be able to add that, there is a PTC function GetGravityCenter() which returns "The center of gravity with respect to coordinate frame" as a 3D matrix.

On Mon, Jun 28, 2021 at 5:36 PM Inigo Incer @.***> wrote:

The "mass properties" computed by Creo include items like total mass, volume, several inertia values, center of gravity, etc. Currently, the file:massprops function returns a subset of these values, namely volume, mass, density, surface_area, ctr_grav_inertia_tensor, coord_sys_inertia, and coord_sys_inertia_tensor. The center of gravity is a very useful parameter of a device, and should be part of the value returned by file:massprops.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SimplifiedLogic/creoson/issues/69, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANPKPCKVRT5JNEOYO2ZTQDTVDTOXANCNFSM47OZZ6VQ .

iincer commented 3 years ago

Sounds perfect. Thank you. I implemented this in a local copy of the code and can open a pull request for your review.

adama2000 commented 3 years ago

Sure, but I won't be able to look at it for a couple of days due to going out of town.

Adam

On Mon, Jun 28, 2021 at 6:06 PM Inigo Incer @.***> wrote:

Sounds perfect. Thank you. I implemented this in a local copy of the code and can open a pull request for your review.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SimplifiedLogic/creoson/issues/69#issuecomment-870076776, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANPKPCNJKOKSP57STHMIHDTVDW7BANCNFSM47OZZ6VQ .

adama2000 commented 2 years ago

I was wrong about what it returned, it returns a 3D point, not a 3D matrix. Good enough?

adama2000 commented 2 years ago

Checked in code, will be released with next release.