From 38d640934385f6bb1846be4128971c9b92eef5cc Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Thu, 28 Dec 2017 23:34:04 -0500 Subject: [PATCH] Openscad progress, made carriage, set up plates --- scad/bellows.scad | 2 +- scad/carriage.scad | 118 +++++++++++++++++++++++++++++++++++++++++++ scad/common.scad | 17 +++++++ scad/connectors.scad | 22 ++++---- scad/plates.scad | 41 +++++++++++++++ 5 files changed, 186 insertions(+), 14 deletions(-) create mode 100644 scad/carriage.scad create mode 100644 scad/plates.scad diff --git a/scad/bellows.scad b/scad/bellows.scad index fe305bf..0f3eddd 100644 --- a/scad/bellows.scad +++ b/scad/bellows.scad @@ -53,5 +53,5 @@ module camera_mount () { } } -bellows_camera_board(); +//bellows_camera_board(); //translate([0, 0, 9]) color("red") camera_mount(); \ No newline at end of file diff --git a/scad/carriage.scad b/scad/carriage.scad new file mode 100644 index 0000000..7794bff --- /dev/null +++ b/scad/carriage.scad @@ -0,0 +1,118 @@ +include <./common.scad>; + +ROD_D = 25.4 * 0.75; +THREAD_D = 12; + +ROD_SPACING = 150; +THREAD_SPACING = 60; + +module carriage_rod () { + cylinder(r = ROD_D / 2, h = 25.4 * 18, center = true, $fn = 120); +} + +module carriage_threaded () { + cylinder(r = THREAD_D / 2, h = 25.4 * 12, center = true, $fn = 120); +} + +module carriage_nut () { + rotate([0, 0, 360 / 6]) cylinder(r = 10.8, h = 12, center = true, $fn = 6); + //color("red") cube([18.5, 18.5, 11], center = true); +} + +module carriage_end () { + difference () { + union () { + rotate([0, 90, 0]) rounded_cube([30, 185, 50], d = 20, center = true); + translate([0, 0, -5]) cube([50, 185, 20], center = true); + } + //rods + translate([0, ROD_SPACING / 2, 0]) rotate([0, 90, 0]) carriage_rod(); + translate([0, -ROD_SPACING / 2, 0]) rotate([0, 90, 0]) carriage_rod(); + //threaded rods + translate([0, THREAD_SPACING / 2, 0]) rotate([0, 90, 0]) cylinder(r = (THREAD_D + 1) / 2, h = 25.4 * 12, center = true, $fn = 120); + translate([0, -THREAD_SPACING / 2, 0]) rotate([0, 90, 0]) cylinder(r = (THREAD_D + 1) / 2, h = 25.4 * 12, center = true, $fn = 120); + } + //feet + translate([10, (185 / 2) - (80 / 2), - 40]) { + difference () { + cube([70, 80, 60], center = true); + translate([-67, 0, 0]) rotate([0, -10, 0]) color("red") cube([70, 80 + 1, 160], center = true); + translate([55, 0, 0]) rotate([0, -8, 0]) color("red") cube([70, 80 + 1, 160], center = true); + translate([0, -55, 0]) rotate([25, 0, 0]) color("red") cube([70, 80 + 1, 160], center = true); + } + translate([0, (185 / 2) - 40, -28]) { + difference () { + //rounded_cube([40, 30, 4], d = 10, center = true, $fn = 60); + //cylinder(r = 5, h = 5, center = true, $fn = 60); + } + } + } + translate([10, -(185 / 2) + (80 / 2), - 40]) { + difference () { + cube([70, 80, 60], center = true); + translate([-67, 0, 0]) rotate([0, -10, 0]) color("red") cube([70, 80 + 1, 160], center = true); + translate([55, 0, 0]) rotate([0, -8, 0]) color("red") cube([70, 80 + 1, 160], center = true); + translate([0, 55, 0]) rotate([-25, 0, 0]) color("red") cube([70, 80 + 1, 160], center = true); + } + translate([0, -(185 / 2) + 40, -28]) { + difference () { + //rounded_cube([40, 30, 4], d = 10, center = true, $fn = 60); + //cylinder(r = 5, h = 5, center = true, $fn = 60); + } + } + } +} + +module carriage_sled () {} + +module carriage_sled_b () { + difference () { + rotate([0, 90, 0]) rounded_cube([30, 185, 40], d = 20, center = true); + //rod + translate([0, ROD_SPACING / 2, 0]) rotate([0, 90, 0]) cylinder(r = (ROD_D + 1) / 2, h = 25.4 * 18, center = true, $fn = 120); + translate([0, -ROD_SPACING / 2, 0]) rotate([0, 90, 0]) cylinder(r = (ROD_D + 1) / 2, h = 25.4 * 18, center = true, $fn = 120); + //threading + translate([0, THREAD_SPACING / 2, 0]) rotate([0, 90, 0]) cylinder(r = (THREAD_D + 1) / 2, h = 25.4 * 18, center = true, $fn = 120); + translate([0, -THREAD_SPACING / 2, 0]) rotate([0, 90, 0]) cylinder(r = (THREAD_D + 1) / 2, h = 25.4 * 18, center = true, $fn = 120); + //nuts + translate([15, THREAD_SPACING / 2, 0]) rotate([0, 90, 0]) carriage_nut(); + translate([-15, THREAD_SPACING / 2, 0]) rotate([0, 90, 0]) carriage_nut(); + } + +} + +module carriage_handle () { + translate([0, 0, ((25.4 / 2) / 2) + ((25.4 / 3) / 2)]) cylinder(r = 25, h = 25.4 / 3, center = true, $fn = 200); + difference () { + cylinder(r = 18 / 2, h = 25.4 / 2, center = true, $fn = 60); + cylinder(r = 12 / 2, h = (25.4 / 2) + 1, center = true, $fn = 60); + } + translate([20, 0, 20 - 4]) cylinder(r2 = 4, r1 = 3, h = 8, center = true, $fn = 100); + translate([20, 0, 20]) sphere(r = 4, center = true, $fn = 100); +} + + +module carriage_assembled () { + color("blue") translate([0, ROD_SPACING / 2, 0]) rotate([0, 90, 0]) carriage_rod(); + color("blue") translate([0, -ROD_SPACING / 2, 0]) rotate([0, 90, 0]) carriage_rod(); + + color("green") translate([3.5 * 25.4, THREAD_SPACING / 2, 0]) rotate([0, 90, 0]) carriage_threaded(); + color("green") translate([3.5 * 25.4, -THREAD_SPACING / 2, 0]) rotate([0, 90, 0]) carriage_threaded(); + + translate([9 * 25.4 - 26, 0, 0 ]) carriage_end(); + //carriage_sled_b(); + translate([9 * 25.4 + 7, THREAD_SPACING / 2, 0 ]) rotate([0, 90, 0]) carriage_handle(); + translate([9 * 25.4 + 7, -THREAD_SPACING / 2, 0 ]) rotate([0, 90, 0]) carriage_handle(); +} + + +carriage_assembled(); + + +difference () { + //carriage_sled_b(); + //translate([0, -85, 0]) cube([200, 200, 200], center = true); + //translate([100, 0, 0]) cube([200, 200, 200], center = true); + + //translate([0, 145, 0]) cube([200, 200, 200], center = true); +} \ No newline at end of file diff --git a/scad/common.scad b/scad/common.scad index 06a15a6..f0f53a3 100644 --- a/scad/common.scad +++ b/scad/common.scad @@ -12,4 +12,21 @@ module rounded_cube (cube_arr = [1, 1, 1], d = 0, center = false) { translate ([1 * (cube_arr[0] / 2) - r, -1 * (cube_arr[1] / 2) + r, 0]) cylinder(r = r, h = cube_arr[2], center = center); translate ([-1 * (cube_arr[0] / 2) + r, 1 * (cube_arr[1] / 2)- r, 0]) cylinder(r = r, h = cube_arr[2], center = center); } +} + +echo("common.scad - trap_cube()"); +module trap_cube(height = 19, top_x = 30, top_y = 34, bottom_x = 45, bottom_y = 65, wall_thickness = 2) { + difference(){ + hull(){ + translate([0,0,height]) + cube([top_x, top_y, 0.1], center=true); + cube([bottom_x, bottom_y, 0.1], center=true); + } + + hull(){ + translate([0,0,height]) + cube([top_x - wall_thickness, top_y - wall_thickness, 0.1], center=true); + cube([bottom_x - wall_thickness, bottom_y - wall_thickness, 0.1], center=true); + } + } } \ No newline at end of file diff --git a/scad/connectors.scad b/scad/connectors.scad index 34b239e..099b626 100644 --- a/scad/connectors.scad +++ b/scad/connectors.scad @@ -6,7 +6,7 @@ PIN_B = [(18 / 2) - (3.5 / 2) - 3 - 1.5, 2 + (3.5 / 2)]; PIN_C = [(18 / 2) - (3.5 / 2) - 3 - 1.5, - 2 - (3.5 / 2)]; PIN_D = [-(18 / 2) + (1 / 2) + 4.5, - 2 - (3.5 / 2)]; -module pin (ROTATE = false, PAD = 0, HEIGHT = 10) { +module jk_pin (ROTATE = false, PAD = 0, HEIGHT = 10) { if (ROTATE == false) { cube([1 + PAD, 3.5 + PAD, HEIGHT], center = true); } else { @@ -14,13 +14,13 @@ module pin (ROTATE = false, PAD = 0, HEIGHT = 10) { } } -module pins (PAD = 0, HEIGHT = 10) { +module jk_pins (PAD = 0, HEIGHT = 10) { Z = 24 / 2 + 10 / 2; - translate([PIN_A[0], PIN_A[1], Z]) pin(false, PAD, HEIGHT); - translate([PIN_D[0], PIN_D[1], Z]) pin(false, PAD, HEIGHT); + translate([PIN_A[0], PIN_A[1], Z]) jk_pin(false, PAD, HEIGHT); + translate([PIN_D[0], PIN_D[1], Z]) jk_pin(false, PAD, HEIGHT); - translate([PIN_B[0], PIN_B[1], Z]) pin(true, PAD, HEIGHT); - translate([PIN_C[0], PIN_C[1], Z]) pin(true, PAD, HEIGHT); + translate([PIN_B[0], PIN_B[1], Z]) jk_pin(true, PAD, HEIGHT); + translate([PIN_C[0], PIN_C[1], Z]) jk_pin(true, PAD, HEIGHT); } module body () { @@ -48,7 +48,7 @@ module male_jk103_neg () { module male_jk103 () { difference () { body(); - translate([0, 0, -10]) pins(0, 20); + translate([0, 0, -10]) jk_pins(0, 20); translate([0, 0, -3]) male_jk103_neg(); //bolt translate([15, 0, 5]) rotate([0,90,0]) cylinder(r = 1, h = 20, center = true, $fn = 40); @@ -72,17 +72,13 @@ module male_jk103_back (){ } module pin_inserts () { - color("red") pins(0, 24); + color("red") jk_pins(0, 24); } module female_jk103 () { difference () { body(); - translate([0, 0, 25]) rotate([0, 180, 0]) pins(0.5, 20); + translate([0, 0, 25]) rotate([0, 180, 0]) jk_pins(0.5, 25); } } -//translate([20, 0, 0]) male_jk103(); -translate([40, 0, 0]) male_jk103_back(); -//translate([20, 0, -7]) pin_inserts(); -//female_jk103(); \ No newline at end of file diff --git a/scad/plates.scad b/scad/plates.scad new file mode 100644 index 0000000..337540b --- /dev/null +++ b/scad/plates.scad @@ -0,0 +1,41 @@ +include <./bellows.scad>; +include <./connectors.scad>; +include <./light.scad>; +include <./motor.scad>; + +module bellows_plate () { + translate([0, 0, 3]) bellows_camera_board(); + translate([0, 55, 12.5]) color("red") camera_mount(); +} + +module connectors_plate () { + translate([20, 0, 12]) rotate([180, 0, 0]) male_jk103(); + translate([20, 20, 20]) male_jk103_back(); + translate([0, 0, 12]) female_jk103(); +} + +module light_plate () {} + +module motor_plate () {} + +//bellows.scad + +//bellows_camera_board(); +//camera_mount(); +//bellows_plate(); + + +//connectors.scad + +//rotate([180, 0, 0]) male_jk103(); +//male_jk103_back(); +//female_jk103(); +//connectors_plate(); + +//light.scad + +//light_plate(); + +//motor.scad + +//motor_plate(); \ No newline at end of file