Tron/Kits
// HOME / TUTORIALS

Tutorials.
Read once, ship forever.

SHELF · 01 · 2026
FILTER
● OPENSCAD · 3D MODELING ★ ☆ ☆ BEGINNER

🧰 Creating a Simple Box in OpenSCAD

This tutorial shows how to design a basic, parametric box using OpenSCAD. Perfect for 3D printing or as a base for more complex designs.

Set up your parameters

We define variables for the box's size and wall thickness so we can easily tweak it later:

w = 25;     // Outer width of the box
d = 15;     // Outer depth/length of the box
h = 10;     // Outer height of the box
wall = 2;   // Wall thickness

Statements must end with a ; (semicolon).

Create the outer shell

cube([width, length, height]);

If all sides are the same you could do cube(size). You don't need the brackets for a single value.

Hollow out the middle

difference(){
  cube([w, d, h]);
  translate([wall, wall, wall])
  cube([w-2*wall, d-2*wall, h]);
}

difference() removes the second object from the first. translate() moves the second object. The first cube is the outer shell, the second is the hollow part.

Make it a module

module box() {
  difference(){
    cube([w, d, h]);
    translate([wall, wall, wall])
    cube([w-2*wall, d-2*wall, h]);
  }
}

module acts like a function. You must call the module for it to run with box();.

Add a lid

module lid() {
  cube([w, d, wall]);
  translate([wall, wall, wall])
  cube([w-2*wall, d-2*wall, wall]);
}
lid();

Final code

// Simple Box Design
w = 25; d = 15; h = 10; wall = 2;

module box() {
  difference(){
    cube([w, d, h]);
    translate([wall, wall, wall])
    cube([w-2*wall, d-2*wall, h]);
  }
}

module lid() {
  cube([w, d, wall]);
  translate([wall, wall, wall])
  cube([w-2*wall, d-2*wall, wall]);
}

box();
translate([w+5, 0, 0]) { lid(); }
● OPENSCAD · ROUNDED ★ ☆ ☆ BEGINNER

🌀 Creating a Rounded Box in OpenSCAD

Make a box with rounded corners using the offset() technique.

Step 1: Define the rounded rectangle

Create a 2D shape with rounded corners using a two-pass offset technique.

w = 60;
l = 40;
h = 20;
rad = 3;

module rounded_rect() {
  offset(r=rad)
  offset(delta=-rad)
  square([w, l]);
}
rounded_rect();

This offset technique expands then contracts the base shape to create rounded corners.

Step 2: Extrude to 3D

Use linear_extrude() to give the shape depth.

linear_extrude(height=20)
rounded_rect();

Final code

$fn = 100;
w = 60; l = 40; h = 20;
wall_thickness = 2;
lid_thickness = 4;
lid_clearance = 0;
rad = 2;

module outer_rec() {
  linear_extrude(height = h)
  offset(r=rad) offset(delta = -1*rad) square([w, l]);
}

module inner_rec() {
  linear_extrude(height = h)
  offset(r=rad) offset(delta = -1*rad)
  square([w - (wall_thickness*2), l - (wall_thickness*2)]);
}

difference() {
  outer_rec();
  translate([wall_thickness, wall_thickness, wall_thickness])
  inner_rec();
}
Tip: The offset() method is lightweight and efficient — perfect for clean rounded edges without the complexity of minkowski().
● RASPBERRY PI · SERVER ★ ★ ★ ADVANCED

Raspberry Pi Colocation Setup

Node.js Server with Nginx Reverse Proxy (Debian 12 Bookworm).

1. Initial OS Setup

  • Install Raspberry Pi OS Lite (Debian 12 Bookworm) using Raspberry Pi Imager.
  • Enable SSH and set a hostname during imaging.
  • Boot and SSH into the Pi.

2. Disable Wi-Fi and Bluetooth

sudo nano /boot/firmware/config.txt
# Add at the bottom
dtoverlay=disable-wifi
dtoverlay=disable-bt

sudo reboot

3. Update and upgrade

sudo apt update
sudo apt upgrade -y

4. Install Node.js and NPM

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
node -v && npm -v

5. Install project dependencies

cd ~/tronkits
npm install

6. Install OpenSCAD (for STL generation)

sudo apt install -y openscad

7. PM2 process manager

sudo npm install -g pm2
cd ~/tronkits
pm2 start app.js --name tronkits
pm2 save
pm2 startup

8. Nginx reverse proxy

sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/default
server {
  listen 80;
  server_name _;
  location / {
    proxy_pass http://localhost:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}
sudo systemctl restart nginx

9. UFW firewall

sudo apt install ufw
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw limit 22/tcp
sudo ufw logging on
sudo ufw enable
sudo ufw status verbose

10. Static IP for colocation

sudo nmcli con add type ethernet ifname eth0 con-name static-eth0 ipv4.method manual \
  ipv4.addresses 154.9.0.34/30 ipv4.gateway 154.9.0.33 \
  ipv4.dns "8.8.8.8 1.1.1.1" ipv6.method ignore
sudo nmcli con up static-eth0

11. Pre-ship checklist

  • Confirm all services running.
  • Shutdown cleanly: sudo shutdown now
  • Package your Pi securely for shipment.