From 6aa8a81bddb3256bf65a232a826aa772bab9f523 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 19 Jul 2024 22:05:23 -0700 Subject: [PATCH] Single mount format checkpoint --- v1/scad/lib/generic/extension_clip.scad | 9 +- v1/scad/lib/generic/spool_cage.scad | 6 +- v1/scad/lib/generic/spool_holder_clip.scad | 6 +- v1/scad/lib/generic/spoolmount.scad | 99 +++++++++++++--------- v1/scad/lib/generic/spoolmount_a.scad | 42 --------- v1/scad/lib/generic/spoolmount_b.scad | 29 ------- v1/scad/lib/generic/spoolmount_hook.scad | 24 ++++++ v1/scad/lib/prusa_enclosure/mount.scad | 4 +- 8 files changed, 93 insertions(+), 126 deletions(-) delete mode 100644 v1/scad/lib/generic/spoolmount_a.scad delete mode 100644 v1/scad/lib/generic/spoolmount_b.scad create mode 100644 v1/scad/lib/generic/spoolmount_hook.scad diff --git a/v1/scad/lib/generic/extension_clip.scad b/v1/scad/lib/generic/extension_clip.scad index 650c021..384beb8 100644 --- a/v1/scad/lib/generic/extension_clip.scad +++ b/v1/scad/lib/generic/extension_clip.scad @@ -1,15 +1,14 @@ -use -use +use module extension_clip(h) { assert(h >= 14, "minimum extension_clip height is 14"); // Bottom spoolmount - spoolmount_b(); + spoolmount(); // Top spoolmount translate([0, 0, h - 5]) - spoolmount_a(); + spoolmount(); translate([0, 0, 4]) { // Inner center cylinder @@ -41,4 +40,4 @@ module extension_clip(h) { ]); } -extension_clip(h=25); \ No newline at end of file +extension_clip(h=25); diff --git a/v1/scad/lib/generic/spool_cage.scad b/v1/scad/lib/generic/spool_cage.scad index 48fec03..4f8b022 100644 --- a/v1/scad/lib/generic/spool_cage.scad +++ b/v1/scad/lib/generic/spool_cage.scad @@ -1,10 +1,10 @@ -use +use use <../util/torus.scad> module spool_cage(h=90, ptfe_offset=-10) { // TODO: Parameterize diameter - spoolmount_b(); + spoolmount(); // Radial arms out from spoolmount for (a = [0 : 45 : 315]) { @@ -79,4 +79,4 @@ module spool_cage(h=90, ptfe_offset=-10) { torus(r_major=103, r_minor=2, $fn=500); } -spool_cage(); \ No newline at end of file +spool_cage(); diff --git a/v1/scad/lib/generic/spool_holder_clip.scad b/v1/scad/lib/generic/spool_holder_clip.scad index 05bb684..5bf937c 100644 --- a/v1/scad/lib/generic/spool_holder_clip.scad +++ b/v1/scad/lib/generic/spool_holder_clip.scad @@ -1,10 +1,10 @@ -use +use use <../util/torus.scad> module spool_holder_clip(h) { assert(h >= 25, "minimum spool_holder_clip height is 25"); - spoolmount_b(); + spoolmount(); // Fill in spoolmount cylinder(h=5, r=26); @@ -42,4 +42,4 @@ module spool_holder_clip(h) { torus(r_major=17, r_minor=2.5, xs=0.7, $fn=200); } -spool_holder_clip(h=100); \ No newline at end of file +spool_holder_clip(h=100); diff --git a/v1/scad/lib/generic/spoolmount.scad b/v1/scad/lib/generic/spoolmount.scad index afdd359..ff68c9c 100644 --- a/v1/scad/lib/generic/spoolmount.scad +++ b/v1/scad/lib/generic/spoolmount.scad @@ -1,62 +1,77 @@ use <../util/torus.scad> module spoolmount() { - // Ring difference() { // Cylinder body - cylinder(h=5, r=42, $fn=200); + cylinder(h=5, r=44, $fn=200); // Central through hole cylinder(h=5, r=25.1, $fn=200); - // Bottom slightly wider cutout - translate([0, 0, -1]) - cylinder(h=1.5, r=25.45, $fn=200); - - // Top slightly wider cutout - translate([0, 0, 4.5]) - cylinder(h=1.5, r=25.45, $fn=200); - } - - for (a = [45 : 90 : 335]) { - // Locking bumps - rotate([0, 0, a - 10]) - rotate_extrude(angle=20, $fn=200) - translate([23.1, 0, 0]) - polygon(points=[ - [2.0, 0], - [2.0, 0.5], - [0, 2.5], - [2.0, 4.5], - [2.0, 5], - ]); - - // Rounded bump ends - for (o = [-10, 10]) { - rotate([0, 0, a + o]) - translate([0, 30.1, 0]) - scale([0.2, 1.0, 1.0]) - rotate_extrude($fn=200) - translate([5, 0, 0]) + // Cutouts for rounded edges + for (z = [-1, 4.5]) { + translate([0, 0, z]) + cylinder(h=1.5, r=25.45, $fn=200); + } + + // Holes + for (a = [0 : 30 : 330]) { + rotate([0, 0, a]) + translate([34.75, 0, 0]) + rotate([90, 0, 90]) + linear_extrude(9.25, center=true) polygon(points=[ - [0, 0.5], - [2.0, 2.5], - [0, 4.5], + [4, -1], + [4, 2], + [6, 4], + [6, 6], + [-6, 6], + [-6, 4], + [-4, 2], + [-4, -1], ]); } } - // Rounded outer edge - translate([0, 0, 2.5]) { - torus(r_major=42, r_minor=2.5, xs=0.7, $fn=200); + intersection() { + cylinder(h=5, r=25.1, $fn=200); + + for (a = [45 : 90 : 335]) { + // Locking bumps + rotate([0, 0, a - 10]) + rotate_extrude(angle=20, $fn=200) + translate([23.1, 0, 0]) + polygon(points=[ + [2.0, 0], + [2.0, 0.5], + [0, 2.5], + [2.0, 4.5], + [2.0, 5], + ]); + + // Rounded bump ends + for (o = [-10, 10]) { + rotate([0, 0, a + o]) + translate([0, 30.1, 0]) + scale([0.2, 1.0, 1.0]) + rotate_extrude($fn=200) + translate([5, 0, 0]) + polygon(points=[ + [0, 0.5], + [2.0, 2.5], + [0, 4.5], + ]); + } + } } - // Rounded inner edges - { - translate([0, 0, 0.5]) - torus(r_major=25.45, r_minor=0.5, xs=0.7, $fn=200); + // Rounded outer edge + translate([0, 0, 2.5]) + torus(r_major=44, r_minor=2.5, xs=0.7, $fn=200); - translate([0, 0, 4.5]) + // Rounded inner edges + for (z = [0.5, 4.5]) { + translate([0, 0, z]) torus(r_major=25.45, r_minor=0.5, xs=0.7, $fn=200); } } diff --git a/v1/scad/lib/generic/spoolmount_a.scad b/v1/scad/lib/generic/spoolmount_a.scad deleted file mode 100644 index feea8e1..0000000 --- a/v1/scad/lib/generic/spoolmount_a.scad +++ /dev/null @@ -1,42 +0,0 @@ -use - -// SpoolMount fixed side (i.e. attached to printer or enclosure) -module spoolmount_a() { - spoolmount(); - - // Hooks - for (x = [-33, 33]) { - translate([x, 0, 5]) - rotate([0, -90, 0]) - linear_extrude(6, center=true) { - polygon(points=[ - [0, 0], - [0, 4], - [2, 4], - [4, 6], - [5, 6], - [5, 2], - [3, 0], - [0, 0], - ]); - - translate([3, 2]) - circle(r=2, $fn=50); - } - } - - // Locking bump - translate([0, -30.8, 5]) - rotate([0, -90, 0]) - linear_extrude(6, center=true) { - polygon(points=[ - [0, 0], - [1.6, -4], - [1.6, -5], - [0, -5], - [0, 0], - ]); - } -} - -spoolmount_a(); \ No newline at end of file diff --git a/v1/scad/lib/generic/spoolmount_b.scad b/v1/scad/lib/generic/spoolmount_b.scad deleted file mode 100644 index 9f50d1a..0000000 --- a/v1/scad/lib/generic/spoolmount_b.scad +++ /dev/null @@ -1,29 +0,0 @@ -use - -// SpoolMount removable side (i.e. attached to spool holder or cage) -module spoolmount_b() { - difference() { - spoolmount(); - - // Holes - for (a = [0 : 30 : 330]) { - rotate([0, 0, a]) - translate([29.75, 0, 0]) { - // Center through hole - translate([3.25, 0, 3]) - cube([6.5, 8, 7], center=true); - - // Diagonal sides - translate([3.25, 0, 4]) - rotate([45, 0, 0]) - cube([6.5, sqrt(72), sqrt(72)], center=true); - - // Flat top cutout - translate([3.25, 0, 5]) - cube([6.5, 12, 2], center=true); - } - } - } -} - -spoolmount_b(); \ No newline at end of file diff --git a/v1/scad/lib/generic/spoolmount_hook.scad b/v1/scad/lib/generic/spoolmount_hook.scad new file mode 100644 index 0000000..f06822a --- /dev/null +++ b/v1/scad/lib/generic/spoolmount_hook.scad @@ -0,0 +1,24 @@ +module spoolmount_hook() { + linear_extrude(9) { + polygon(points=[ + [0, 0], + [0, 12], + [1, 12], + [3, 10], + [7, 10], + [9, 12], + [10, 12], + [10, 8], + [8, 6], + [5, 6], + [5, 2], + [3, 2], + [1, 0], + ]); + + translate([8, 8]) + circle(r=2, $fn=50); + } +} + +spoolmount_hook(); \ No newline at end of file diff --git a/v1/scad/lib/prusa_enclosure/mount.scad b/v1/scad/lib/prusa_enclosure/mount.scad index a6b017f..3b17935 100644 --- a/v1/scad/lib/prusa_enclosure/mount.scad +++ b/v1/scad/lib/prusa_enclosure/mount.scad @@ -1,10 +1,10 @@ -use <../generic/spoolmount_a.scad> +use <../generic/spoolmount.scad> use <../util/screw_hole_m3.scad> use <../util/torus.scad> module prusa_enclosure_mount(angle, h=10) { translate([0, 0, h - 5]) - spoolmount_a(); + spoolmount(); rotate([0, 0, angle]) difference() {