A CadQuery fork of the awesome assortment boxes (video here) by Alexandre Chappel.
If you find these boxes useful, please consider supporting Alexandre Chappel by purchasing the original digital download of the box design here.
git clone
cd ...
conda env create -n cadquery-boxes --file environment.yml
conda activate cadquery-boxes
See below for CLI tool usage example. Note that you can customize the unit size and the box height using the respective CLI flags. All box sizes from 1x1 to 4x4 have been prebuilt along with the corresponding tray frames and are available as GitHub release v0.1.
> cd src
> python -m storage_boxes.models --help
Usage: models.py [OPTIONS] OUTPUT_DIR
Arguments:
OUTPUT_DIR [required]
Options:
--unit-extent FLOAT
--height FLOAT
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or
customize the installation.
--help Show this message and exit.
> # Write all box sizes and base frames from 1x1 to 4x4 to specified output directory.
> python -m storage_boxes.models <output_dir>
jupyter-cadquery
Jupyter Lab extension# See https://github.com/bernhard-42/jupyter-cadquery#installation
wget -O jupyter-cadquery-environment.yml https://raw.githubusercontent.com/bernhard-42/jupyter-cadquery/v2.0.0-beta3/environment.yml
wget https://raw.githubusercontent.com/bernhard-42/jupyter-cadquery/v2.0.0-beta3/labextensions.txt
conda env update -n cadquery-boxes --file jupyter-cadquery-environment.yml
jupyter-labextension install --no-build $(cat labextensions.txt)
jupyter lab build --dev-build=False --minimize=False
jupyter lab
The interesting bits of code:
models.main()
: generate all parts from 1x1 to 4x4models.make_storage_tray()
: create a storage tray, customized by BoxParameters
as used to create models.make_storage_box()
: create a box, customized by the same BoxParameters
as models.make_storage_tray()
Licensed under the MIT license.