- Make countersink and counterbore on metric holes freely definable by user.
- Fixed the Naming of M1.6, M2, M2.5 and M3.5
- Added constructor for custom enums from Enums to PropertyEnumeration
- Put definitions of cut-types (counterbore/countersink) for screwtypes into json-files for easy modification.
- Allow users to put its own definitions in json-files in [UserDir]/Mod/PartDesign/Resources/Hole
- Contains several examples of cut-type definition json-files that are propably not production-ready.
This uses a local copy of nlohmann::json¹ to read json-files.
__________
¹ This is a very nice, header-only C++ library under the MIT License (https://github.com/nlohmann/json). I copied the single-file-version and the forward-declaration-header into …/PartDesign/App/ so no new dependencies arise.
PR #3999 [PartDesign] Dynamic hole cut-types
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
PR #3999 [PartDesign] Dynamic hole cut-types
Last edited by rynn on Sun Oct 25, 2020 9:43 pm, edited 1 time in total.
Re: PR #3999 [PartDesign] Dynamic hole cut-types
In Path workbench e.g. Mod/Path/PathScripts/PathToolLibraryManager.py uses json ,as well. I think it would be sensible to use the same libraries, for various reasons such as less additional libraries, easier to understand the code , ...
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: PR #3999 [PartDesign] Dynamic hole cut-types
As far as I can see it uses the python json lib¹, which is part of the Python Standard Library².
PartDesign is C++.
__________
¹ https://docs.python.org/3/library/json.html
² https://docs.python.org/3.8/library/index.html
Re: PR #3999 [PartDesign] Dynamic hole cut-types
You are right, of course; sorry for the noise.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.