/PillBox

Configurable OpenSCAD fully Configurable Pillbox

Primary LanguageOpenSCAD

PillBox

The PillBox is a compact, space-saving solution that allows you to store and organize your medication easily. Its slim design takes up minimal space, making it perfect for use at home or on the go. Say goodbye to cluttered medicine cabinets and hello to a more organized and efficient way of storing your medication with the PillBox.

This box is a fully configurable OpenSCAD model.

Various options can be used,e.g.:

pills = [ ["B", 11, 6 ,3.8],
["B", 10, 7 ,5 ], ]

Normal "Box size" holes will be defined with Vectors, "B" indicates box, followed by length, width and deepness. img1

["B", 11, 6 ,3.8],  
["B", 10, 7 ,5  ],  
["B", 10, 7 ,5  ],  

more medication nedded? just add another row. The rest will allign img2

["C", 7.7 ,3.8],  
["B", 11,6 ,3.8],  

Any of the medis round? Use "C" for circel, followed by diameter and deepness. img3

["C", 6 ,3.8], ["B", 11,6 ,3.8],

Since round pills tend to be bigger, more space is needed To compensate that, the layout will be "zig-zagged". The geometries will be be allign perfectly to the given sizes img4

["C", 5 ,3.8], ["B", 11,6 ,3.8],

if there is enough space, a straight line will be used. img5

["C", 7.7 ,3.8],
["C", 7.7 ,3.8], ["B", 11,6 ,3.8],

if several cirlce lines are used, the lines do a kerning into each other. img6

["S", 7.7 ,3.8], ["B", 11,6 ,3.8], ´

Does the circle look to ugly? How about a pattern using square rhombs insted? img7

["S", 7.7 ,3.8], ["S", 7.7 ,3.8], ["B", 11,6 ,3.8], ´

several of this rhombs fit perfectly into each other. (took me >10h to get it right). img8

Additional parameters to set: size = 7; // Nr of pills

innerwallthickness = 1; // Size of the inner wall between pills outerwallthickness = 1.5; // Size of the outer wall between pills coverthickness=1; // Size of the cover

coveroffset=0.0; // offset between box and cover, depends on printer quality :-)

chamfer = outerwallthickness*1.5; //Chamfer on the bottom to hold the cover in case of odd ratios you might want to give a fixed number

pillroundoverfactor=0.3; // Values between 0=box and 0.5=halfround for roundig up the "B" Cavities

$fs = 0.01; // Set this to 0.01 for higher definition curves (renders slower) or to 0.15 (faster)

If you never used OpenSCAD, it is relatively straight forward:

  • Download and install the latest version of OpenSCAD from the official website: https://www.openscad.org/downloads.html. Choose the appropriate version for your operating system and follow the installation instructions.

  • After installation, launch OpenSCAD and click on the "File" menu, then select "Open" and navigate to the location where you saved the "PillBox.scad" file. Open the file.

  • Configure your pillbox as described above

  • To generate an STL file, click on the "Design" menu, then select "Compile and Render (F6)". This will compile the model and generate a preview.

  • If the preview looks correct, click on the "File" menu, then select "Export" and choose "STL file" from the list of options. You can choose a name and location for the STL file and then click "Save".

  • The STL file is now ready to be imported into a 3D printing software or sliced for printing on a 3D printer.