> For the complete documentation index, see [llms.txt](https://willadams.gitbook.io/design-into-3d/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://willadams.gitbook.io/design-into-3d/pencil-box-with-fitted-lid.md).

# Box with Fitted Lid

A simple box with fitted lid and optionally divided compartments

Arguably, the simplest project of all is one where all features are cut out from a single piece of stock. The earliest wooden boxes were made thus, characterized as a dug out chest, usually with a single compartment. The development of the electric router brought such designs back into vogue.

As with all projects, we begin by defining the parameters of the design and its display:

![Fitted Pencil Box Parameters](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-MazziFH08WF12INbH94%2F-Mb-NqcpcIvrhZHX8T4e%2Fimage.png?alt=media\&token=bade9b6a-2cec-4096-bdfd-016c9224678a)

Then a module for cutting the desired shapes:

![Fitted Pencil Box module for cutting pockets at specified depth and location](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-MazziFH08WF12INbH94%2F-Mb-Q05UUSgSQ3IoTePn%2Fimage.png?alt=media\&token=8049c4cb-cbdc-473f-85ed-dbb3bd8ad970)

Then modules for cutting each part:

![Fitted Pencil Box top module](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb-Q72aM45M6cZhOFgw%2F-Mb-Rd9BLKosAmQ4FhS8%2Fimage.png?alt=media\&token=56658975-6779-4bee-ba07-b1e82ca831e2)

![Fitted Pencil Box bottom module setup](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb3P4mpHH4IKkUAG0Qz%2F-Mb3S_AdaVU3lwpdm264%2Fimage.png?alt=media\&token=f20bc91f-de0c-46b2-8185-86fbea342373)

![Fitted Pencil Box bottom module loop](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb3P4mpHH4IKkUAG0Qz%2F-Mb3SmPTu_RhCS1kWICM%2Fimage.png?alt=media\&token=79e717c3-267a-41d1-b78a-d9787f3c4e27)

Creating a file for cutting is simply a matter of capturing each elevation of features:

![](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb3P4mpHH4IKkUAG0Qz%2F-Mb3Tg3xqWbycxlv3CoD%2Fimage.png?alt=media\&token=929384ef-e3fc-4f08-92f7-1e22b8a53498)

Available at:

{% embed url="<https://www.blockscad3d.com/community/projects/1213467>" %}

The project can then be exported to OpenSCAD code and modified to use the customizer:

`Width = 8.25;` \
`Depth = 2.625;` \
`Height = 0.625;` \
`Units = 25.4; // [1:Millimeters, 25.4:Inches]` \
`Number_of_Rows = 2;` \
`Number_of_Columns = 3;` \
`Large_Compartment = "Depth-wise"; // [Width-wise, Depth-wise, None]` \
`Corner_Radius = 0.25;` \
`Lid_Proportion = 40;` \
`Stock_Thickness = 0.5625;` \
`Endmill_Diameter = 0.125;` \
`my_3D_Preview = false;` \
`$fn=80;`

![Fitted Pencil Box in OpenSCAD with customization](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb3P4mpHH4IKkUAG0Qz%2F-Mb3crr3JEiK1oQxKW-D%2Fimage.png?alt=media\&token=1bd6a12c-6f40-4fa2-9f12-caa8c61d295c)

Add the command:

`projection()`

to get a flattened view which may be exported to a DXF or SVG and then imported into Carbide Create:

![Fitted Pencil Box in OpenSCAD projection](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb3utdF0QwKETGHD5S8%2F-Mb3xFrBf6UrtrHYScE7%2Fimage.png?alt=media\&token=cb98269b-5bda-4d44-9a85-a214d59fbc0c)

Once imported into Carbide Create it is simply a matter of assigning toolpaths:

![Fitted Pencil Box in Carbide Create](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb3xXwP0i2LshjmpfII%2F-Mb45QLUOo_uDR30X2Po%2Fimage.png?alt=media\&token=4d9faa0b-4fb6-459b-a0a0-098c1f0e8fc2)

Files are available at: <https://community.carbide3d.com/t/fitted-box-design-generator-underway/13437/29>

### One or more variations

The problem with the generator, is that even the most minor change requires re-creating the toolpaths.

One thing which is persistent as regards toolpaths, but which is easily changed is text, so if one had a box design which had for its dividers a character from a single font, one could change the number of dividers as simply as re-typing a number, and still have the product ready to run.

First step is to make a font which has dividers for numbers, so:

![Design into 3D font for round box dividers](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb48ZTEkeNX_-yltuzQ%2F-Mb4OX_JtMngkvEt8UnP%2Fdesigninto3d_font.png?alt=media\&token=190bd622-0ae8-4a94-8d07-ca0595fca372)

This font is available at: <https://community.carbide3d.com/t/fitted-box-design-generator-underway/13437/30>

It works when placed in the Carbide 3D font directory (Help | About | Open Data Directory).

Once installed, load the Carbide Create file, select the center divider, then choose the font tool and replace the number with the number of dividers you want:

![Fitted round box with variable dividers](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb48ZTEkeNX_-yltuzQ%2F-Mb4RAT1tqsNojTDzJfu%2Fimage.png?alt=media\&token=1d21a3ce-ab67-4cfd-bea2-461fd6b457fc)

![Fitted round box with 2 or 7 dividers](https://235206304-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2NwCQrLAFxezOUTC9_%2F-Mb48ZTEkeNX_-yltuzQ%2F-Mb4RJosZ18H7qAIayq0%2FWIN_20190825_11_17_15_Pro.jpg?alt=media\&token=97506430-f05d-432e-b452-73985f8b9764)
