fixed the nut & finished the camera mount

This commit is contained in:
Kaan Barmore-Genç 2023-12-24 13:16:23 -06:00
parent e826c8bd86
commit 1a4ae271a7
Signed by: kaan
GPG key ID: B2E280771CD62FCF

View file

@ -1,3 +1,17 @@
/** Parameters */
$camera_mount = true;
$base = true;
$screen_mount = true;
$arm_pieces = 1;
$screws = 1;
$nuts = 1;
/** Scale nuts up slightly for easier fit and less friction. */
$nut_scale = 1.05;
$nut_bumps = false;
/** Code */
module __no_more_parameters() {};
$triangle_width = 65;
$triangle_height = 40;
$triangle_thickness = 5.87;
@ -8,11 +22,21 @@ $triangle_y_hole_gap = 20;
$triangle_x_offset = 19;
$triangle_y_offset = 5;
$fn=10;
$fn = $preview ? 8 : 360;
$steps_per_turn = $preview ? 8 : 128;
use <Thread_Library.scad>
camera_mount();
if ($camera_mount) {
translate([0, -60, 0])
camera_mount();
}
if ($base) {
translate([10, 0, 0]) attachment_point();
}
if ($screen_mount) {
translate([0, 40, 0]) screen_mount();
}
$camera_mount_thickness = 1;
$camera_screw_gap_y = 25.2;
@ -31,6 +55,29 @@ module camera_mount() {
translate([-1 * $camera_screw_gap_y - $camera_screw_diameter / 1.33, -1 * $camera_screw_gap_y / 2, -0.1])
cube([$camera_screw_gap_y, $camera_screw_gap_y, 3 * $camera_mount_thickness]);
};
$width = 20;
$thickness = 3;
$attachment_offset = 8.475;
difference() {
union() {
color("orange")
translate([$width + $attachment_offset, $thickness / 2, $width / 2])
rotate([90, 0, 0])
cylinder(d=$width, h=$thickness);
intersection() {
translate([$width + $attachment_offset, $thickness / 2, 0])
rotate([90, 0, 0])
cylinder(h=$thickness, d=$width * 2);
translate([$attachment_offset, -$thickness / 2, 0])
cube([$width, $thickness, $width]);
};
};
translate([$width + $attachment_offset, $thickness / 2, $width / 2])
rotate([90, 0, 0])
thread_hole_punch();
};
}
module attachment_point() {
@ -78,25 +125,6 @@ module screen_mount() {
cylinder(h=$screen_mount_thickness * 2, d=$screen_side_cutout_size);
translate([0, $screen_mount_height / 2, -0.1])
cylinder(h=$screen_mount_thickness * 2, d=$screen_side_cutout_size);
/*
translate([25, 0, -0.1])
rotate([0, 0, -30])
cube([$screen_mount_width, $screen_mount_height, $screen_mount_thickness * 2]);
translate([-10, -20, -0.1])
rotate([0, 0, 30])
cube([$screen_mount_width, $screen_mount_height, $screen_mount_thickness * 2]);
translate([0, $screen_mount_height, 0])
mirror([0, 1, 0])
union() {
translate([25, 0, -0.1])
rotate([0, 0, -30])
cube([$screen_mount_width, $screen_mount_height, $screen_mount_thickness * 2]);
translate([-10, -20, -0.1])
rotate([0, 0, 30])
cube([$screen_mount_width, $screen_mount_height, $screen_mount_thickness * 2]);
};
*/
};
};
@ -120,4 +148,87 @@ module nose_rounding() {
color("blue")
cylinder(h=$triangle_thickness * 3, d=$rounded_nose);
};
};
};
module thread(backlash=0.1) {
scale([0.5, 0.5, 0.5])
trapezoidThread(length=35, backlash=backlash, stepsPerTurn=$steps_per_turn);
}
$screw_head_diameter = 25;
$screw_head_thickness = 8;
$nut_head_bump_thickness = 0.5;
module nut_head(thickness=$screw_head_thickness) {
union() {
cylinder(d=$screw_head_diameter, h=thickness, $fn=6);
if ($nut_bumps)
translate([0, 0, thickness])
nut_bumps();
};
}
module nut_bumps() {
bump_length = $screw_head_diameter * 0.05;
bump_count = 24;
for (i = [0:1:bump_count - 1]) {
rotate([0, 0, i * (360 / bump_count)])
translate([$screw_head_diameter / 2 - bump_length * 3, 0, 0])
color("red")
cube([bump_length, $nut_head_bump_thickness, $nut_head_bump_thickness]);
}
}
for (i = [0:1:$screws - 1]) {
translate([-$screw_head_diameter, i * ($screw_head_diameter + 5), 0])
union() {
translate([0, 0, $screw_head_thickness - 4])
thread();
nut_head();
};
}
for (i = [0:1:$nuts - 1]) {
translate([-$screw_head_diameter * 2 - 8, i * ($screw_head_diameter + 5), 0])
difference() {
nut_head();
scale([$nut_scale, $nut_scale, 1])
translate([0, 0, -4]) thread(backlash=-0.2);
};
}
module arm_piece() {
union() {
$thickness = 3;
$length = 60;
$width = 20;
difference() {
union() {
cube([$length, $width, $thickness]);
translate([0, $width / 2, 0])
cylinder(h=$thickness, d=$width);
translate([$length, $width / 2, 0])
cylinder(h=$thickness, d=$width);
};
translate([0, $width / 2, 0])
thread_hole_punch();
translate([$length, $width / 2, 0])
thread_hole_punch();
}
if ($nut_bumps) {
translate([0, $width / 2, $thickness])
nut_bumps();
translate([$length, $width / 2, $thickness])
nut_bumps();
}
}
}
for (i = [0:1:$arm_pieces - 1]) {
translate([0, (i + 1) * -40, 0])
arm_piece();
}
module thread_hole_punch(height=50) {
translate([0, 0, -0.1])
cylinder(d=13, h=height);
}