user-img

GrzegorzSz

  • 13 Projects
  • 3 Followers
  • Jul 22,2026
+ Follow

Printable enclosure generator for electronic devices

The generator allows you to create STL files for 3D printing a fully customizable electronic enclosure. By changing the parameters in the source file, you can adjust the enclosure’s properties and adapt it to the specific requirements of your DIY project. The parametric generator is based on an OpenSCAD file in which you can modify parameters such as the enclosure dimensions, the position of the feet, the size and placement of ventilation openings, wall thickness, corner radius, and many other features. As the final output, the generator produces separate STL files for the top and bottom parts of the enclosure, ready for 3D printing.

Printable enclosure generator for electronic devices
 
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
 

Tools, APP Software Used etc.

  • OpenSCAD, a 3D modeling programming language

    Open Source

Story

Parametric 3D-Printed Electronics Enclosure Generator

Short description: An OpenSCAD generator for creating fully customizable, professional-looking 3D-printed electronics enclosures with slide-in PCB or acrylic front and rear panels, configurable ventilation, and a hidden internal PCB mounting system.

Project Introduction

This project is a parametric OpenSCAD generator for two-part electronics enclosures. Instead of redesigning a case from the beginning for every device, you can change a set of clearly described parameters and generate a new top and bottom enclosure ready for 3D printing.

The enclosure is designed for electronic instruments, controllers, power supplies, audio devices, test equipment, IoT projects, prototypes, and other custom electronics. The generated model combines practical internal mounting features with a clean external appearance.

Professional Front and Rear Panels

The front and rear panels slide into dedicated channels in the enclosure. They can be manufactured from standard FR-4 PCB laminate, acrylic, or another suitable sheet material.

Using PCB laminate for the panels makes it possible to add professional silkscreen labels, symbols, connector descriptions, logos, scales, and other graphics directly during PCB production. Connector cutouts and mounting details can be designed in a PCB CAD tool, while the printed enclosure provides the surrounding mechanical structure.

The panel width, height, thickness, channel clearance, visible opening, side capture, edge lips, corner radius, and external bevel can all be adjusted. The default panel-slot clearance is linked to panel thickness to provide a close sliding fit.

Hidden PCB Mounting

The bottom half contains a raised internal PCB mounting platform positioned above the enclosure floor. The board is placed on this platform, its mounting-hole positions are marked, and pilot holes are drilled into the plastic. The PCB is then fastened from above with self-tapping screws for plastic.

The PCB mounting screws remain inside the closed enclosure, so no PCB fasteners are visible on the outside. This gives the finished device a cleaner and more professional appearance. The elevated platform also separates the electronics from the external bottom surface and can be reinforced with ribs. ( please see the picture above )

  1. Place the PCB on the raised platform.
  2. Mark the PCB mounting-hole locations.
  3. Remove the PCB and drill suitable pilot holes into the platform.
  4. Return the PCB to the platform.
  5. Fasten the PCB from above using self-tapping screws for plastic.

Main Customizable Features 

  • External dimensions: enclosure width, length, and total height.
  • Two-part construction: bottom-half height, top-half height, floor thickness, and roof thickness.
  • Front and rear panels: panel width, height, thickness, fit clearance, channel lips, visible opening, edge capture, corner radius, and bevel.
  • Top ventilation: enable or disable the grille; configure hole diameter, rows, columns, pitch, margins, offset, and an optional alternate checkerboard hole size.
  • Bottom ventilation: an independent grille with its own hole size, rows, columns, pitch, margins, offset, and alternate-hole settings.
  • Enclosure assembly bosses: screw pilot diameter, clearance diameter, counterbore size, boss diameter, and boss positions.
  • Structural reinforcement: optional ribs for screw bosses and long side walls, including rib thickness, length, count, spacing, height, embed depth, and collision clearances.
  • Bottom feet: enable or disable four ring-shaped feet and configure their diameter, hollow center, height, and X/Y spacing from the enclosure edges.
  • External appearance: rounded-corner radius, edge chamfer, external corner cylinders, and surface smoothness.
  • Top-cover marking: optional embossed or engraved text with configurable content, font, size, height, position, rotation, and alignment.
  • PCB mounting platform: enable or disable the platform and configure its elevation, thickness, wall margins, and perimeter frame.
  • Platform surface: choose a solid platform with an engraved guide grid or a perforated platform with a configurable hole pattern.
  • Platform reinforcement: configure support-rib dimensions, rib counts, and ventilation holes in the long support ribs.
  • Top and bottom alignment: tongue-and-groove depth, height, assembly clearance, and entry chamfer.

Why Use This Generator?

  • One verified generator can produce many enclosure sizes and configurations.
  • The most important settings are collected in one clearly documented parameter file.
  • The mechanical generator code is separated from the user customization parameters.
  • PCB-laminate panels can combine mechanical cutouts with high-quality printed labels.
  • Internal PCB screws are hidden after assembly.
  • Independent top and bottom ventilation can be adapted to the heat generated by the electronics.
  • Reinforcement ribs, feet, bosses, and platform supports can be adapted to the printer, material, and application.
  • Both enclosure halves can be exported as production-ready STL files.

How to Customize the Enclosure

To use and change the scad file you need to install OpenSCAD software and change the parameters in editor. 

F5 key in OpenSCAD give you a quick review of your changes. 

Open Enclosure_customized_params.scad in OpenSCAD and edit the required variables. The file includes the generator implementation from _CODE_.scad, which normally does not need to be modified.

The show_mode variable selects the required view:

  • assembled - complete assembled preview.
  • split - separated top and bottom preview.
  • bottom - bottom printable part only.
  • top - top printable part only.
  • debug_panels - panel-fit diagnostic view.

Generating the STL Files

To export manually, set show_mode to top, perform a full F6 render, and export the result as STL. Then set show_mode to bottom, perform another F6 render, and export the second STL.

The project also includes generate_final_STL_for_3D_print.sh. On Linux, this script renders the top and bottom production STL files in parallel and stores them in the TO_production directory.

Manufacturing Options

  • 3D print the top and bottom enclosure halves.
  • Manufacture the front and rear panels as FR-4 PCBs with silkscreen descriptions and accurately placed cutouts.
  • Alternatively, laser-cut the panels from acrylic or another flat material.
  • Drill the internal mounting platform to match the actual PCB mounting holes.

Open Source License

The generator is released under the MIT License. You can use, study, modify, and redistribute it according to the license terms included with the project.

Code
  • Enclosure generator code

    Enclosure_generator_6366246326a6092f1c5349.zip
    Download(0)

Printable enclosure generator for electronic devices

The generator allows you to create STL files for 3D printing a fully customizable electronic enclosure. By changing the parameters in the source file, you can adjust the enclosure’s properties and adapt it to the specific requirements of your DIY project. The parametric generator is based on an OpenSCAD file in which you can modify parameters such as the enclosure dimensions, the position of the feet, the size and placement of ventilation openings, wall thickness, corner radius, and many other features. As the final output, the generator produces separate STL files for the top and bottom parts of the enclosure, ready for 3D printing.

6
 
0
0
0

Share your project on social media to expand its influence! Get more people to support it.

  • Comments( 0 )
  • Like( 0 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All
Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Country: Shipping Way:
Assembly Cost: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Item Price Qty Subtotal Delete
Total: US $0.00
Certified Product | Guaranteed Purchase: Full techsupport