Macro to compute center of mass
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Macro to compute center of mass
Should this stay as a macro or be made/integrated in to a workbench ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Macro to compute center of mass
I can try to put it in a tiny workbench but I don't know how to do it at all
(I'll look at the other WB and find "inspiration")
I don't know if it could be integrated with an existing workbench ? Perhaps an assembly or material WB ?
Re: Macro to compute center of mass
I just made a little update to correct a selection problem with features and bodies.
Now, no matter how you select your solid (from the treeview or the 3D view) and the kind of solid, It might work.
I have put the files on github : https://github.com/chupins/FCmacro_CenterOfMass
Now, no matter how you select your solid (from the treeview or the 3D view) and the kind of solid, It might work.
I have put the files on github : https://github.com/chupins/FCmacro_CenterOfMass
-
- Posts: 437
- Joined: Wed Sep 15, 2010 9:38 am
Re: Macro to compute center of mass
The location of the macro on the official repository is https://github.com/FreeCAD/FreeCAD-macr ... nformation. It should be installable with the Addon-Manager from v0.18 but the Addon-Manager of v0.17 doesn't support extra files, so that icons will be missing.
@schupin, please base your future modifications on this version and, at best, delete your repository to avoid confusion. Thanks a lot! Can you please add the appropriate attribution for the icons?
Gaël
@schupin, please base your future modifications on this version and, at best, delete your repository to avoid confusion. Thanks a lot! Can you please add the appropriate attribution for the icons?
Gaël
Re: Macro to compute center of mass
Nice
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Macro to compute center of mass
Thanks Gaël !galou_breizh wrote: ↑Sun Nov 11, 2018 11:03 pm The location of the macro on the official repository is https://github.com/FreeCAD/FreeCAD-macr ... nformation. It should be installable with the Addon-Manager from v0.18 but the Addon-Manager of v0.17 doesn't support extra files, so that icons will be missing.
@schupin, please base your future modifications on this version and, at best, delete your repository to avoid confusion. Thanks a lot! Can you please add the appropriate attribution for the icons?
Gaël
I've deleted my repository. How does it work if I have a new version to push ? Am I allowed to push into this repo ?
On my version, I don't see the macro on the addon manager. Or perhaps it's my eyes ?
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.5235 (Git shallow)
Build type: Release
Branch: (HEAD detached at 2a6655e)
Hash: 2a6655e1768d80e0098d410989ae02c622f2e698
Python version: 2.7.15
Qt version: 5.11.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: French/France (fr_FR)
-
- Posts: 437
- Joined: Wed Sep 15, 2010 9:38 am
Re: Macro to compute center of mass
To submit a newer version of the macro you have to fork the whole repository, make the changes in your fork and submit a pull request.
In order to download macros from git you need the `python-git` package or similarly named.
Gaël
In order to download macros from git you need the `python-git` package or similarly named.
Gaël
Re: Macro to compute center of mass
I thought that the addon-manager checks if python-git is present and uses it, but if not it will use https:// instead ?galou_breizh wrote: ↑Mon Nov 12, 2018 7:26 am In order to download macros from git you need the `python-git` package or similarly named.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Macro to compute center of mass
I don't know how to install the python-git package (or if it's already on my computer ?)
When I put "import git" on the python console I get an error message
(but git is installed on my mac)
Any hint to solve it ?
When I put "import git" on the python console I get an error message
Code: Select all
ImportError: No module named git
Any hint to solve it ?
Re: Macro to compute center of mass
Is it as simple as this?
pip install python-git --upgrade
pip install python-git --upgrade
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs