FreeCAD module for creating boxes / cases suitable for laser cutting.
Installation
Create the installation directory:
mkdir -p ~/.FreeCAD/Mod
Either unzip the downloaded zip file or git clone the repository:
cd ~/.FreeCAD/Mod
unzip ../freecad-boxer.zip # or
git clone https://trygvis.io/git/2016/05/freecad-boxer.git
After restarting FreeCAD you will have a new Boxer workbench available.
Usage
To create a box create a new document and switch to the Boxer workbench. The box configuration side panel will appear which you can use to configure the box and its sides.
Adjust the outer dimmensions of your box and the notch size. Adjust the thickness for the front side and either adjust the thickness for the rest of the sides or apply the thickness to all other sides from the front side.
If you don't want a top side on your box, uncheck the checkbox for the top side.
Click on generate and wait a second or two while the model is generated.
Generated objects
The plugin will generate two groups of objects, one with the main box objects and one with 2D views for creating the cutting DXF files.
The box objects are an extruded part object witch in turn is based on a wire part object.
Modifying the box before cutting
The 3D objects can be further modified, for example with a sketch on a side face to create holes. If you do this, remember to update the corresponding 2D view. Do this by updating the Base property in the data view for the view.
Cutting the box
To preview the objects to be cut, hide the Box group and show the Views group. By selecting them in the object tree and pressing space their visibility will be toggled.
Select all the views and use File->Export to export a file with all the sides in it.
Development
Tips and tricks
When developing this module make sure you have the Python console and report views visible. Enable them under View -> Panels if you don't have them visible.
To reload the module when running:
# This is only needed once
def r():
import Boxer; import BoxerGui; import BoxerDockWidget
reload(Boxer); reload(BoxerGui); reload(BoxerDockWidget)
# Reloads all the modules
r()
Possible new features
Make text labels indicating the box sides:
import Draft
Draft.makeText(["Front"], point = FreeCAD.Vector(50.0,50.0,0.0))