The SketcherShapes Workbench is my attempt to add an “easy” way to insert custom and commonly used shapes. It is an early attempt at a workbench and is not intended for any production or regular use. It is mostly an experiment and a learn to code playground.
Why a Workbench and not just add to a Parts library?
The simple answer is that these are not parts. They are intended to be aides in creating parts. So basically these will always be 2d shapes with loosely defined defaults.
- Rounded Square
- Centered Square
- Linking Bar
- Plus Sign
- Four Holes
- PCB Edge Mount
- Mini USB
Adding New Shapes
New shapes are added via a rudimentary code generator tool. It creates code, tool bar and menu entries and eventually an icon. This feature is not yet exposed. In order to add new shapes to code, it is necessary to add the class to the init_gui.py. An attempt was made, with some success, to iterate a folder for classes. There were some issues, however.
Shapes are edited by adding a shape via Toolbar or menu then re-running the code generator
To remove a shape currently the code for that shape needs to be removed. This would include code in the init_gui.py class.
The icon generator, not even close to working, will attempt to create an SVG from the sketch with a little bit of styling.
You will need to copy the workbench into your FreeCAD/mods directory.