/whoop-box

A box system to store tiny-whoops.

Primary LanguageOpenSCADGNU General Public License v3.0GPL-3.0

whoop-box

A printable box system to store tiny-whoops.

At a glance

The project contains designs for a box system for storing tiny-whoop quadcopters. The parts are designed using a scripting language, processed by OpenSCAD. There is no ready to use 3D model files in the source code. If you are interested in such files, please look at the released versions which contains 3D model files built with default parameters. However, if you want to customize these parts, tailoring them with your measures, you should rather download the source code and then tweak the configuration files before generating your own 3D model files.

At that time, the project proposes 3 sets of boxes. The dimensions and the number of cells can be set from the configuration.

The size is defined by (in millimeters):

  • The distance between motors, on the diagonal.
  • The diameter of ducts.
  • The height of ducts.
  • The overall height of the whoop.
  • The padding added between the box wall and the whoop.

A box is also available for enclosing a set of batteries. Its size can be configured too (millimeters):

The number of cells for each box is also configurable:

Several presets are available out of the box in the file config/presets.scad. The currently selected preset is configured through the variable preset in the file config/config.scad.

When using the render script, all presets can be rendered at once using the option -a. See the section Render the parts. Otherwise, only one single preset is rendered at a time.

Whoop boxes

A second iteration on the project added simple boxes with padding inside to better wrap the tiny-whoop. Instead of multiple shells made of several materials, it only relies on a single box and its container.

simple box set

This version proposes several variants of the box:

  • A padded box to contain a tiny-whoop

padded box

  • A box for spare parts

spare part box

  • A box for propellers

propellers box

  • A container for one or more boxes with respect to the configuration

container

Batteries' box

Aside the boxes for containing tiny-whoops, the project also proposes a parametric box for containing the batteries. The size of the batteries and the number per boxes can be configured.

batteries box

This box is made of two parts:

  • A batteries' container, with separators:

batteries container

  • A box cover:

box cover

Angled boxes

Initially, the project was based on a set of wrapped boxes, to be printed in various materials (TPU, PLA, PET). The set was made modular, in order to either have a simple box to protect a tiny-whoop or to properly store several of them in a cupboard.

angled box set

The proposed boxes are:

  • A rounded box to contain a tiny-whoop

rounded box

  • An angled box to contain the rounded box

angled box

  • A drawer to contain one or more angled boxes with respect to the configuration

angled drawer

  • A cupboard to contain drawers with one or more angled boxes with respect to the configuration

angled cupboard

Install and requirements

To properly use the project you first need to do some installations steps.

OpenSCAD

First of all you need OpenSCAD to be installed. To do so, please go to the OpenSCAD download page, an get the version suitable for your operating system.

Source code

The source code is hosted on a Git repository. To get it you can either download a zip file, or clone the repository locally.

Download the zip file

The source code can be downloaded from the GitHub repository.

You can download it as zip file from this link.

As the project is using a shared library, that is not supplied with the package, you will need to also download it.

Download the zip file from this link.

Then extract its content inside the folder lib/camelSCAD. Please make sure the folder directly contains the library and not an intermediate folder like lib/camelSCAD/camelSCAD-main. If this is the case, please move the content one folder up and delete the extra folder.

Note: the easiest way is to call the init.sh script, that will take care of this for you.

Get the code from the repository

A git tool is needed if you intend to get the source code from the git repository. You can download one either from the main git website, or from GitHub.

Once you have your git tool installed, open a console window, select a project folder (create it if needed), then run the following commands:

git clone https://github.com/jsconan/whoop-box.git
cd whoop-box
git submodule init
git submodule update

The source code should have been downloaded, as well as the libraries.

Note: you can also use a graphical interface tool. In this case, please make it can also install the submodules.

Note 2: the easiest way is to call the init.sh script, that will take care of this for you.

Configuration

The configuration may be changed locally. To not collide with changes in the main implementation, the configuration files are not versioned. Instead, you will find -dist files that contain a copy of the typical configuration.

From a fresh copy of the project, you will need first to create these configuration files. The easiest way is to call the init.sh script, that will take care of this for you. The configuration files will also be checked and created if needed each time the render.sh script is called.

This initial creation of the configuration files could also be done manually. Here is how:

  1. Go to the config folder

  2. Copy any of the files having a -dist suffix in their name to a file without this suffix.

    Example: copy config-dist.scad to config.scad

Render the parts

The parts are all located into the parts folder. They can all be opened separately in OpenSCAD and rendered.

However, it is possible to render all parts in batch. The script render.sh takes care of this.

This is a command-line tool, which accept several parameters. By default, it will render the preset selected in the config.

It is possible to select another preset, as well as set a different number of cells for the containers.

The parameter -h make it show the help.

Running the command render.sh -h will show this message:

Renders OpenSCAD files
  Usage:
	./render.sh [command] [-h|--help] [-o|--option value] files

  a,   all            Render all elements (default)
  n,   angled         Render the sets of angled boxes
  w,   whoop          Render the sets of whoop boxes
  b,   battery        Render the sets of battery boxes
  -h,  --help         Show this help
  -p   --preset       Set the preset to apply
  -a,  --all          Render all presets
  -x,  --line         Set the number of boxes per lines in the container (X-axis)
  -y   --column       Set the number of boxes per columns in the container (Y-axis)
  -z   --depth        Set The number of boxes per lines and columns in the container (Z-axis)
  -b   --batteries    Set The number of batteries per boxes
  -f   --format       Set the output format
  -p   --parallel     Set the number of parallel processes
  -s   --slice        Slice the rendered files using the default configuration
  -c   --clean        Clean up the output folder before rendering

All presets can be rendered at once by calling the command render.sh -a.

The STL files are rendered to the dist/stl folder.

If the slicer PrusaSlicer is installed, running the command render.sh -s will produce the G-code from the rendered STL files and using the setting from the file config/config.ini. Out of the box, it is produce instruction for PETG and a 0.2mm layer height.

Post-scripts

When using the built-in script to render/slice the models in batch, you can also add custom post-processing scripts. There is one for render.sh and one for slice.sh. They are respectively named post-render.sh and post-slice.sh.

As these script can be defined locally, they are not part of the versioned content. Instead, you can find sample files at post-render-dist.sh and post-slice-dist.sh. To use them, you need to:

  • copy the dist file to a local file, for example: cp post-render-dist.sh post-render.sh.
  • you need to make sure the file is executable: chmod +x post-render.sh.
  • finally, add you own commands to the copy.

As an example:

  • The script used to zip the rendered files:
# Bootstrap the script
scriptpath=$(dirname $0)
source "${scriptpath}/lib/camelSCAD/scripts/utils.sh"

# Script config
project=$(pwd)
stlpath="${project}/dist/stl/"
zippath="stl.zip"
logpath="${project}/dist/zip.log"

# Post process the rendered files
printmessage "${C_MSG}==========================================="
printmessage "${C_MSG}Post-render script: zip files"
dummy=$(
    cd "${stlpath}"
    rm *.zip > /dev/null
    zip -r "${zippath}" *
)
printmessage "${C_MSG}==========================================="
  • The script used to copy the sliced files to a SD-card:
# Bootstrap the script
scriptpath=$(dirname $0)
source "${scriptpath}/lib/camelSCAD/scripts/utils.sh"

# Script config
project=$(pwd)
gcodepath="${project}/dist/gcode/"
sdcardpath="/PATH/TO/SD/CARD"
logpath="${project}/dist/gcode-sync.log"

# Post process the sliced files
printmessage "${C_MSG}==========================================="
printmessage "${C_MSG}Post-slice script: copy Gcode to the SDcard"
date > ${logpath}
createpath "${sdcardpath}"
rsync -ahvt --no-links --delete --partial --force --modify-window=1 --exclude=.DS_Store --log-file=${logpath} "${gcodepath}" "${sdcardpath}"
printmessage "${C_MSG}==========================================="