Macro to compute center of mass

Show off your FreeCAD projects here!
mario52
Veteran
Posts: 3975
Joined: Wed May 16, 2012 2:13 pm

Re: Macro to compute center of mass

Post by mario52 »

Hi

yes but the original macro:

Code: Select all

__Author__ = 'schupin'
https://github.com/chupins/FreeCAD-macr ... ss.FCMacro

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting. My macros on Gist.github here complete macros Wiki and forum.
schupin
Posts: 475
Joined: Sun Jan 21, 2018 1:43 pm

Re: Macro to compute center of mass

Post by schupin »

The 0.5 released containing all SyProLei improvements has been "officially" merged !

Here is its changelog :
  • New: Code base, Requirement raised to Qt5.12+ and Python3 (FreeCAD 0.19)
  • New: Show mass of each solid
  • New: Start window docked or floating (can be set in Parameter Editor)
  • New: Selection matches up tree view or is sorted by name (can be set in Parameter Editor)
  • New: Option to save densities in document
  • Improved: FreeCAD alike Gui look and feel
  • Improved: Scaled color palette (from green to red) to colorify shapes
  • Improved: Visualising the displacement of centre of mass to the geometry
  • Improved: Internal tracking of units
  • Fix: Handling of groups and group objects
  • Fix: Handling of App::Link
  • Fix: Replaced deprecated Qt class
You can get it by updating the macro through the addon manager.
Last edited by schupin on Thu Apr 07, 2022 7:15 pm, edited 1 time in total.
User avatar
Kunda1
Veteran
Posts: 12733
Joined: Thu Jan 05, 2017 9:03 pm

Re: Macro to compute center of mass

Post by Kunda1 »

Congrats and thank you!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Syres
Veteran
Posts: 1658
Joined: Thu Aug 09, 2018 11:14 am

Re: Macro to compute center of mass

Post by Syres »

schupin wrote: Thu Apr 07, 2022 12:55 pm The 0.5 released containing all SyProLei improvements has been "officially" merged !

Here is its changelog :
  • New: Code base, Requirement raised to Qt5.12+ and Python3 (FreeCAD 0.19)
I would like to point out that 0.20 FC is fully supported using Qt5.9.5 (there's more than just Windows involved) but seeing as the old version of the macro works fine for my requirements it's not a show stopper.
User avatar
chennes
Veteran
Posts: 2244
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Macro to compute center of mass

Post by chennes »

I've just submitted a PR to the FreeCAD-Macros repo -- the __Icon__ metadata points to an invalid URL. See https://github.com/FreeCAD/FreeCAD-macros/pull/127
Chris Hennes
Pioneer Library System
SyProLei
Posts: 5
Joined: Tue Feb 15, 2022 9:43 am

Re: Macro to compute center of mass

Post by SyProLei »

New Release: Version 0.5.8 is officially available.
Here is the changelog, apart from the internal code improvements:
  • Reinserted: Bounding Box
  • New: Setting to color spheres
  • New: Setting to change color maps
  • Rearranged GUI: Update calculation added, Total density added
  • Fix: Message Boxes could not be used when not running FreeCAD on primary screen in a multimonitor setup
  • Fix: More than one Mesh was not calculated correctly
We are part of the technology transfer program for lightweight engineering funded by German Federal Ministry for Economic Affairs and Climate Action.
User avatar
Kunda1
Veteran
Posts: 12733
Joined: Thu Jan 05, 2017 9:03 pm

Re: Macro to compute center of mass

Post by Kunda1 »

SyProLei wrote: Tue Jun 07, 2022 4:24 pm New Release: Version 0.5.8 is officially available.
Nice!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
schupin
Posts: 475
Joined: Sun Jan 21, 2018 1:43 pm

Re: Macro to compute center of mass

Post by schupin »

For moderators : don't you think we could move this topic to "Announcements & Features" ?
chrisb
Veteran
Posts: 43699
Joined: Tue Mar 17, 2015 9:14 am

Re: Macro to compute center of mass

Post by chrisb »

schupin wrote: Wed Jun 08, 2022 9:32 pm For moderators : don't you think we could move this topic to "Announcements & Features" ?
This whole discussion is much more than an announcement, so it is probably better if you make a new announcement with a link hereto where to discuss it.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply