Init Commit: Add Box_Generator and Gear_Generator
This commit is contained in:
commit
c643cb5968
35
Box_Generator.scad
Normal file
35
Box_Generator.scad
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
INNER_X=20;
|
||||||
|
INNER_Y=40;
|
||||||
|
INNER_Z_BOTTOM=60;
|
||||||
|
INNER_Z_TOP=10;
|
||||||
|
INNER_Z_OVERLAP=10;
|
||||||
|
WALLSIZE=4;
|
||||||
|
|
||||||
|
// The main box
|
||||||
|
difference() {
|
||||||
|
cube([INNER_X+WALLSIZE*2, INNER_Y+WALLSIZE*2, INNER_Z_BOTTOM+WALLSIZE]);
|
||||||
|
|
||||||
|
translate([WALLSIZE, WALLSIZE, WALLSIZE]) {
|
||||||
|
cube([INNER_X, INNER_Y, INNER_Z_BOTTOM]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Overlap area
|
||||||
|
difference() {
|
||||||
|
translate([WALLSIZE/2, WALLSIZE/2, INNER_Z_BOTTOM+WALLSIZE])
|
||||||
|
cube([INNER_X+WALLSIZE, INNER_Y+WALLSIZE, INNER_Z_OVERLAP]);
|
||||||
|
|
||||||
|
translate([WALLSIZE, WALLSIZE, INNER_Z_BOTTOM+WALLSIZE])
|
||||||
|
cube([INNER_X, INNER_Y, INNER_Z_OVERLAP]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// The top
|
||||||
|
translate([INNER_X + WALLSIZE * 4, 0, 0]) {
|
||||||
|
difference() {
|
||||||
|
cube([INNER_X+WALLSIZE*2, INNER_Y+WALLSIZE*2, INNER_Z_TOP+WALLSIZE]);
|
||||||
|
|
||||||
|
translate([WALLSIZE/2, WALLSIZE/2, WALLSIZE])
|
||||||
|
cube([INNER_X+WALLSIZE, INNER_Y+WALLSIZE, INNER_Z_TOP]);
|
||||||
|
}
|
||||||
|
}
|
18
Gear_Generator.scad
Normal file
18
Gear_Generator.scad
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
INNER_RADIUS=5;
|
||||||
|
OUTER_RADIUS=15;
|
||||||
|
HEIGHT=5;
|
||||||
|
|
||||||
|
TEETH_AMOUNT=8;
|
||||||
|
TEETH_WIDTH=5;
|
||||||
|
TEETH_HEIGHT=5;
|
||||||
|
|
||||||
|
difference() {
|
||||||
|
cylinder(h=HEIGHT, r=OUTER_RADIUS);
|
||||||
|
cylinder(h=HEIGHT, r=INNER_RADIUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i = [0:360/TEETH_AMOUNT:360]) {
|
||||||
|
rotate([0, 0, i])
|
||||||
|
translate([INNER_RADIUS, -TEETH_WIDTH/2, 0])
|
||||||
|
cube([OUTER_RADIUS-INNER_RADIUS+TEETH_HEIGHT, TEETH_WIDTH, HEIGHT]);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user