Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

pcb enclosure library

by JSuzineau, published

pcb enclosure library by JSuzineau Dec 2, 2017



Design Tools


Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

329Views 129Downloads Found in Electronics


2018 February 3d:

Update of this library published in thing ( https://www.thingiverse.com/thing:2781023) on the occasion of the release of KUMAN 7" LCD enclosure (https://www.thingiverse.com/thing:2781063), mainly better support for screws to fix the pcb and the lid.


This thing is mainly a refactoring from the very good library OpenSCAD-Arduino-Mounting-Library / arduino.scad from kellyegan ( https://www.thingiverse.com/thing:64008 )
This library uses tbuser's pin library for the pin mounts: http://www.thingiverse.com/thing:10541

At first I used it to print boxes for arduinos. Then I began to add designs to the library to make boxes for Grove shields. After four or five additions, it began fastidious to add to new designs to the global variables of the main file of the library.

This lead me to do this refactoring.

Custom PCB

Now you can add a new design without modifying the library, just creating a new file for your new design.
Just duplicate one of the original designs, for example 11_ETHERNET.scad as MyCustomPCB.scad.
Then with the search and replace functionnality of a text editor, replace all occurences of "ETHERNET" into "MyCustomPCB".
Then adjust the global variables
to the geometry of you PCB.

While making boxes for SeeedStudio Grove shields I've made a very rudimentary tool in FreePascal to facilitate import of the geometry from Eagle files:
This tool is not perfect, the data is not always at the same path in the xml Eagle file.
It's likely you'll have to modify and recompile it in Lazarus ( http://www.lazarus-ide.org/ ) for use with your own Eagle files.
I don't know if this is possible, but the top would be to be have a plugin in Eagle software with a source code generator which can produce this scad file.

Custom Screw housings

I added the capability of adding custom screw housings.
You can decide which corner needs to be screwed using parameter _lid_screws.
For example if you want screw housings on corners 2, 3 and 4, pass the parameter _lid_screws= "234".
If a connector is too close to the screw, you can move a screw towards the outside of the box with the parameter _lid_screws_outer .
For example if you want to move screw housings outside on corners 3 and 4, pass the parameter _lid_screws_outer="34".

Custom Screw Shape

You can customize the shape of the screws by changing Lid_screw.scad.
This file is a kind of alias to a type of screw defined in another file like vis_M3_5_x_16.scad or vis_ronde_M3_5_x_15.scad.
For example you can duplicate vis_ronde_M3_5_x_15.scad to MyScrew.scad, search and replace vis_ronde_M3_5_x_15 to MyScrew in MyScrew.scad and Lid_screw.scad, and adapt MyScrew.scad to the geometry of the screws you have on hand.

Lid_screw_vis_M3_5_x_16.scad is a copy of Lid_screw.scad which points to vis_M3_5_x_16.scad.


The original library is under MIT Licence so I kept this license for the refactored code.
I usually use GNU LGPL Licence for my work so I kept this license for my personal libraries used in this refactoring that are already published elsewhere.


08_YUN.scad, 09_INTELGALILEO.scad and 10_TRE.scad are just place-holders, they are not implemented.

More from Electronics

view more

File Name



All Apps

Upgrade this Thing with Thingiverse Apps

No results.

Published KUMAN 7" LCD enclosure (https://www.thingiverse.com/thing:2781063) .
I added a better support for screws to fix the pcb and the lid.
To avoid the risk of breaking some code, I published the modified library in a new thing ( https://www.thingiverse.com/thing:2781063 )

KUMAN 7" LCD enclosure

Published Box for Grove-RJ45, https://www.thingiverse.com/thing:2684696

GROVE-RJ45 enclosure
  • Modified pcb_enclosure.scad, extracting a "function enclosure_height( _Board_Dimensions, _wall, _heightExtension)" needed to compute height when combining several enclosures in module SEEEDUINO_LOTUS_with_RJ45_enclosure in thing SEEEDUINO_LOTUS (that I'm about to publish).
  • Modified Test.scad to add pictures
  • Added pictures (openscad image exports) for all designs.

Yes, of course.
In fact, I've only a few minutes left for this evening, I'm in a hurry to publish several other designs based on this library, including box for a seeduino lotus with 3 RJ45 ...

would you include pictures for all if its not too much trouble ....either way this is freaking awsome