FreeCAD / FreeCAD-macros

A repository for FreeCAD macros
https://freecad.org/wiki/Macros_recipes
145 stars 134 forks source link

[CenterOfMass] Added support to enter a mass explicitly #133

Closed nexx512 closed 2 years ago

nexx512 commented 2 years ago

Thank you for creating a pull request to contribute to FreeCAD-macros! To integrate your macro please make sure the following steps are complete:

And please remember to update the Wiki with the features added or changed once this PR is merged.
Note: If you don't have wiki access, then please mention your contribution on the 0.19 Changelog Forum Thread.


nexx512 commented 2 years ago

This pull request is a follow up to #130 due to a changed source branch with corrections mentioned in https://github.com/FreeCAD/FreeCAD-macros/pull/130#issuecomment-1113411721

s-quirin commented 2 years ago

Thank you for your contribution! I have a few comments and inconsistencies:

nexx512 commented 2 years ago
nexx512 commented 2 years ago

ok, I tried to refactor my changes but with no luck. The design of this macro is way too complicated to be able to see what is happening. For example the spinDens is taken out of the SolidWidget object and manipulated in many other places. It's very hard to keep track of the paces in the code that need to be considered when a change is made. It's only 1000 lines of code but I wasn't able to find a clear structure, so I gave up. Sorry, but i guess this macro should be refactored with a clear and understandable architecture.