155 lines
4.7 KiB
OpenSCAD
155 lines
4.7 KiB
OpenSCAD
include <BOSL2/std.scad>
|
|
|
|
$fn=20;
|
|
|
|
showScan=0;
|
|
showAnchors=0;
|
|
showDoor=1;
|
|
showSeparateObjects=0;
|
|
|
|
// model sizes
|
|
panelThickness=3;
|
|
|
|
// door measurements
|
|
doorGutter=6;
|
|
doorToBolt=34;
|
|
|
|
if(showScan) {
|
|
// scan
|
|
// lay flat and set the bottom-right as origin
|
|
translate([-5,110,55]) rotate([-90,0,0])
|
|
#rotate([26.9,15,-1]) scale(450) import("scan.stl");
|
|
}
|
|
if(showAnchors) {
|
|
// scale measurement
|
|
/*
|
|
translate([-270,162,0])
|
|
cuboid([20,210,1], anchor=BOTTOM+LEFT);
|
|
translate([-250,47,0])
|
|
cuboid([305-20,20,1], anchor=BOTTOM+LEFT);
|
|
translate([-250,47+210+20,0])
|
|
cuboid([305-20,20,1], anchor=BOTTOM+LEFT);
|
|
*/
|
|
|
|
translate([35,47+10,0])
|
|
#cylinder(h=10, d=5, anchor=BOTTOM);
|
|
translate([-250,47+10,0])
|
|
#cylinder(h=10, d=5, anchor=BOTTOM);
|
|
translate([-250,47+210+10,0])
|
|
#cylinder(h=10, d=5, anchor=BOTTOM);
|
|
translate([35,47+210+10,0])
|
|
#cylinder(h=10, d=5, anchor=BOTTOM);
|
|
}
|
|
if(showDoor) {
|
|
if (showSeparateObjects) {
|
|
rotate([0,0,-90]) translate([-20,8,10])
|
|
color("orange") import("limit-switch-flag-and-chain-catch-assembled.stl");
|
|
}
|
|
}
|
|
|
|
|
|
module topPanel(){
|
|
translate([doorGutter,230,0]){
|
|
difference(){
|
|
cuboid([40,145,panelThickness], rounding=1, edges=["Y",BACK], anchor=FRONT+LEFT+BOTTOM) {
|
|
if (showSeparateObjects) {
|
|
// limit switch
|
|
translate([0,-12-65,0]) position(TOP+BACK) color("purple") rotate(90) import("limit-switch-mount-sideways.stl");
|
|
// servo mount
|
|
translate([17.8,-42,20]) position(TOP+BACK+LEFT) rotate([0,0,90]) color("teal") import("Futaba_3001_Servo_Mount.stl");
|
|
// servo
|
|
translate([44,-31.5,31]) position(TOP+BACK+LEFT) rotate([0,0,90]) color("gray") import("servo futaba s3003 v6.stl");
|
|
// top pulley
|
|
translate([-10,-21,31]) position(TOP+BACK+LEFT) rotate([0,90,0]) color("red") import("parametric_ball_pulley-improved-with-flares.stl");
|
|
}
|
|
// servo mount holes
|
|
difference(){
|
|
translate([0,-1,0]) position(TOP+BACK+LEFT) cuboid([40,61,19], rounding=1, anchor=BACK+LEFT+BOTTOM);
|
|
translate([26.6,-20.1,10]) position(TOP+BACK+LEFT)
|
|
cyl(h=10,d=2, anchor=BACK+LEFT+BOTTOM);
|
|
translate([26.6,-41.5,10]) position(TOP+BACK+LEFT)
|
|
cyl(h=10,d=2, anchor=BACK+LEFT+BOTTOM);
|
|
}
|
|
}
|
|
// mounting hole
|
|
translate([29,37,0]) {
|
|
cyl(h=panelThickness+1,d=5, anchor=BOTTOM);
|
|
translate([0,0,panelThickness-2])
|
|
cyl(h=3,d=15, chamfer1=0.5, anchor=BOTTOM);
|
|
}
|
|
// limit switch hole
|
|
translate([32,74.1,0]) {
|
|
cyl(h=panelThickness+1,d=2, anchor=BOTTOM);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
module middlePanel(){
|
|
translate([doorGutter,85,0]) {
|
|
cuboid([40,145,panelThickness], rounding=1, edges=["Y"], anchor=FRONT+LEFT+BOTTOM) {
|
|
if (showSeparateObjects) {
|
|
//arduino
|
|
translate([20,0,0]) color("green") position(TOP) cuboid([2*INCH,2.5*INCH,1*INCH], anchor=BOTTOM);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
module bottomPanel(){
|
|
translate([doorGutter,-60,0]) {
|
|
difference() {
|
|
cuboid([40,145,panelThickness], rounding=1, edges=["Y",FRONT], anchor=FRONT+LEFT+BOTTOM) {
|
|
if (showSeparateObjects) {
|
|
// limit switch
|
|
translate([0,60,0]) position(TOP+FRONT) rotate(90) color("purple") import("limit-switch-mount-sideways-right.stl");
|
|
// bottom pulley
|
|
translate([-3,-5,27.5]) position(TOP+FRONT+LEFT) color("teal") import("LBracket_Parametric_rev9.stl");
|
|
translate([-10,14,31]) position(TOP+FRONT+LEFT) rotate([0,90,0]) color("red") import("parametric_ball_pulley-improved-with-flares.stl");
|
|
}
|
|
// pulley mount
|
|
difference(){
|
|
translate([2,0,0]) position(TOP+FRONT+LEFT) cuboid([35,27.5,27.5], rounding=1, anchor=FRONT+LEFT+BOTTOM);
|
|
translate([20.7,12.9,20]) position(TOP+FRONT+LEFT)
|
|
cyl(h=10,d=2, anchor=FRONT+LEFT+BOTTOM);
|
|
translate([30.7,12.9,20]) position(TOP+FRONT+LEFT)
|
|
cyl(h=10,d=2, anchor=FRONT+LEFT+BOTTOM);
|
|
}
|
|
}
|
|
// mounting hole
|
|
translate([29,117,0]) {
|
|
cyl(h=panelThickness+1,d=5, anchor=BOTTOM);
|
|
translate([0,0,panelThickness-2])
|
|
cyl(h=3,d=15, chamfer1=0.5, anchor=BOTTOM);
|
|
}
|
|
// limit switch hole
|
|
translate([32,66,0]) {
|
|
cyl(h=panelThickness+1,d=2, anchor=BOTTOM);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
difference(){
|
|
union(){
|
|
topPanel();
|
|
middlePanel();
|
|
bottomPanel();
|
|
}
|
|
translate([doorGutter+20,85,0]) scale(0.4) partition_cut_mask(gap=0, cutpath="dovetail", $slop=0.5);
|
|
translate([doorGutter+20,230,0]) scale(0.4) partition_cut_mask(gap=0, cutpath="dovetail", $slop=0.5);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|