/YAPP_Box

Yet Another Parametric Projectbox Box

Primary LanguageOpenSCADMIT LicenseMIT

YAPP_Box

Yet Another Parametric Projectbox generator

This OpenSCAD project can be used to create extremely comprehensive and customizable project boxes/enclosures using OpenSCAD.

The complete and official documentation gitbook explains the entire API.

You can open Issues here, but please also place them in a comment at one of the following blog posts:


I have done my best, but it can probably be done simpler. If you think you can help, please contact me or make a Pull Request.

How to program your Project Box

It all starts with the dimensions of the PCB going inside your Project Box, as well as a few other dimensions:

printBaseShell      = true;
printLidShell       = true;

// Edit these parameters for your own board dimensions
wallThickness       = 1.0;
basePlaneThickness  = 1.0;
lidPlaneThickness   = 1.0;

// Total height of box = basePlaneThickness + lidPlaneThickness 
//                     + baseWallHeight + lidWallHeight

baseWallHeight      = 7;
lidWallHeight       = 4;

pcbLength           = 88;
pcbWidth            = 49;
pcbThickness        = 1.5;
                            
// padding between pcb and inside wall
paddingFront        = 4;
paddingBack         = 1;
paddingRight        = 1;
paddingLeft         = 1;

// ridge where Base- and Lid- off the box can overlap
// Make sure this isn't less than lidWallHeight
ridgeHeight         = 3;
ridgeSlack          = 0.2;
roundRadius         = 2.0;  // don't make this to big..

//-- How much the PCB needs to be raised from the base
//-- to leave room for solderings and whatnot
standoffHeight      = 5.0;
pinDiameter         = 1.0;
pinHoleSlack        = 0.5;
standoffDiameter    = 4;

You probably want some cutouts in your box for connectors and stuff. For every plane (side) of the Project Box, there is an array that holds the cutouts for that plane.

A picture is worth a thousand words ...

Cutouts in the Right Plane:

YAPP_cutoutsRight

Cutouts in the Left Plane:

YAPP_cutoutsLeft

Cutouts in the Back Plane:

YAPP_cutoutsBack

Cutouts in the Front Plane:

YAPP_cutoutsFront

Cutouts in the Base:

YAPP_cutoutsBase

Cutouts in the Lid:

YAPP_cutoutsLid

Using the angle param (rotate around the x/y corner):

yappRectangle40dgrs

With yappCenter, the rectangle will rotate around its center point:

yappRectangleCenter10dgrs

Base mounts:

Screenshot 2022-01-25 at 11 25 46

pcbStands:

pcbStands fixate the PCB between the base and the lid. YAPP_pcbStands

Connectors between Base and Lid:

YAPP_connectors

ConnectorsPCB between Base and Lid that fixates the PCB:

connectorTypes

YAPP_connector_D

Inserts are great for making a screw connection between the base and the lid. Ruthex-insert-a

Snap Joins:

snapJoins1

snapJoins2

Snap Joins Symmetrical:

snapJoinsSymetric

(more) Base Mounts:

yappBaseStand

yappBaseStand3D

Hooks:

There are two type of "hooks"; at the inside of the box or at the outside of the box

baseHookOutside():

baseHookOutside

baseHookOutside3D

lidHookInside():

lidHooksInside1

lidHooksInside3Db

lidHooksInside3Da


Buy me a coffee (please)!

If you like this project or it saved you time, you can give me a cup of coffee :)

bmc-button-75

Versioning

  • All major releases (v1, v2, v3) are intended to be compatible with all files previously designed for v3 (e.g., the v3.1 release will not remove features or make any breaking changes, compared to v3.0).
  • The filename of the library (e.g., YAPPgenerator_v3.scad) will thus have only the major version in its filename.
  • When a new major version is released, a branch will be created from the main branch at the last commit before work is started on the next major version. This branch can be used to fix bugs and add features to the old release version, if desired. These lineage branches will not be merged to main, and will continue on their own path.
  • All future tagged versions will have GitHub Releases created for them, which will include the changelog for the release. The YAPP_Template_vx.scad and YAPPgenerator_vx.scad files will also be attached to the release.
  • The ISO8601 international standard date format (yyyy-mm-dd) will be used for documenting dates.