3D part design with OpenSCAD #160: Stomp Boxer V1

3D part design with OpenSCAD #160: Stomp Boxer V1

Here is a code example to make a "stomp box" type enclosure that is customizable so it can be used to make a console or laid out to have multiple effects in one enclosure. I haven't added any functionality to make holes in it yet which I will be adding in a future version.

//

/*[Enclosure parameters]*/
Show_top=true;
Show_base_plate=true;
width=100;//[1:.01:400]
length=120;//[20:.01:400])
front_height=5.8;//[.1:.01:100]
rear_height=25.4;//[1:.01:100]
top_width=50;//[.1:.01:200]

/*[HollowOut]*/
UseSphere=true;
UseCube=false;
rounding=60;//[3:1:100]
Wall_thickness=3;//[.01:.01:40]

module Shape(){
hull(){
  cube([top_width,width,rear_height]);
  translate([length,0,0])
  cube([1,width,front_height]);
}}

module Hollow_out(){
  render()
difference() {
minkowski() {
  Shape();
if(UseSphere)
  sphere(r=Wall_thickness,$fn=rounding);
if(UseCube)
  cube(Wall_thickness,true);
}
  translate([0,0,-Wall_thickness])
  Shape();
}}

module Base(){
if(UseSphere){
color("red")
translate([.25,.25,-Wall_thickness-.5])
cube([length+.5,width-.5,Wall_thickness]);
}
else{
if(UseCube)
color("red")
translate([.25,.25,-Wall_thickness/2])
cube([length+.5,width-.5,Wall_thickness]);
}}

if (Show_top){
Hollow_out();
}
if (Show_base_plate){
Base();
}

In a previous post I made a module to make a snap ring around the base plate so it wouldn't need screws, I plan on doing some test prints to see how well the base stays on with just the ring or I will add standoffs and screw holes.

3D part design with OpenSCAD#112: Adding a box lid snap ring.
After taking a look at the box maker in the last post I decided I wanted to add some features to it just for fun and one thing that crossed my mind was a way to snap the lid on the box so I wouldn’t need screw holes. A few
//
 
/*[Box lid snap ring]*/
Path_to_STL_File="";
Enable_snapring=false;
Snap_ring_width=1;//[0:.01:2]
Snap_ring_diameter=1;//[0:.01:2]
Move_snap_ring=1;//[0:.01:20]

module Offset(){
if(Enable_snapring)
difference(){
offset(delta=Snap_ring_width/2)
projection(cut=true)
import(Path_to_STL_File);
}}
translate([0,0,Move_snap_ring])
if(Enable_snapring)
minkowski(){
linear_extrude(.01)
Offset();
sphere(Snap_ring_diameter,$fn=40);
}

import(Path_to_STL_File);
//
Path_to_top_stl_File="";
Path_to_base_stl_File="";
Show_BasePlate=false;
AdjustZ_height=0;//[-100:.01:100]


render()
difference(){
translate([0,0,AdjustZ_height])
import(Path_to_top_stl_File,center=true);
import(Path_to_base_stl_File,center=true);
}

if(Show_BasePlate)
import("/home/none4/Desktop/StompBoxerbase2.stl",center=true);

and here are some different varaitions:

I call this one the "Cyber Van"

to make the post header image I just made a smaller version and then added it back in several times to make a wider "console" version, with a few minor modifications it should be pretty easy to make them functional foot switches: