A template for creating a new FreeCAD workbench in Python.
FreeCAD offers great opportunities to create scripted objects. This should be a starting point to create your own workbench.
Note: This is the recommended way to install this workbench.
The Python Workbench Template will be available soon through the builtin FreeCAD Addon Manager.
Once installed all that is needed is to restart FreeCAD and the workbench will be available in the workbench dropdown list menu.
cd ~/FreeCAD/Mod/
git clone https://github.com/chbergmann/PythonWorkbenchTemplate.git
When you restart FreeCAD, "Python Workbench Template" workbench should now show up in the workbench dropdown list.
- Create a new git repository and copy the contents of this project to your new project
- Rename PythonWorkbenchTemplate.py to YourWorkbenchsName.py. Search all files for PythonWorkbenchTemplate and replace with the name of your workbench
- Rename Feature1.py with YourNewFeature.py
- Edit InitGui.py. Delete Feature1 and add your new feature instead. Edit the _title_, _author_, _url_ and _version_ tags.
- Write your new feature and test it well.
- If you need a user interface, create a .ui file with the QT Designer. See Feature1TaskPanel in Feature1.py how to implement it.
- Write a documentation in README.md. Explain the purpose of your workbench. Explain your features and its parameters. Screenshots are great.
- Draw a .svg icon for the workbench and for each feature. You can export FreeCAD designs to .svg.
- Announce your workbench in the FreeCAD forum. Add the link of your new thread in README.md
- Add your workbench to the Addon manager
Creates a copy of a selected object and sets it on top of the original and colorizes it red or green. For demonstration how to write a workbench feature.
- Base: The object to colorize
- Green: if True, the linked object will be colored green, otherwise red.
Please offer feedback or connect with the developer via the dedicated FreeCAD forum thread.
GNU Lesser General Public License v3.0