Factor out common spoolmount components

This commit is contained in:
Ian Gulliver
2024-07-06 22:48:17 -07:00
parent bf68b834a5
commit b9b4e481c5
3 changed files with 24 additions and 30 deletions

19
lib/spoolmount.scad Normal file
View File

@@ -0,0 +1,19 @@
use <torus.scad>
module spoolmount() {
// Ring
difference() {
cylinder(h=5, r=42, $fn=200);
translate([0, 0, -1])
cylinder(h=7, r=25, $fn=200);
}
// Rounded edges
translate([0, 0, 2.5]) {
torus(r_major=25, r_minor=2.5, xs=0.7, $fn=200);
torus(r_major=42, r_minor=2.5, xs=0.7, $fn=200);
}
}
spoolmount();

View File

@@ -1,14 +1,8 @@
use <torus.scad>
use <spoolmount.scad>
// SpoolMount fixed side (i.e. attached to printer or enclosure)
module spoolmount_a() {
// Ring
difference() {
cylinder(h=5, r=42, $fn=200);
translate([0, 0, -1])
cylinder(h=7, r=25, $fn=200);
}
spoolmount();
// Hooks
for (x = [-33, 33]) {
@@ -43,15 +37,6 @@ module spoolmount_a() {
[0, 0],
]);
}
// Rounded edges
translate([0, 0, 2.5]) {
// Inside
torus(r_major=25, r_minor=2.5, xs=0.7, $fn=200);
// Outside
torus(r_major=42, r_minor=2.5, xs=0.7, $fn=200); // 43.75
}
}
spoolmount_a();

View File

@@ -1,13 +1,9 @@
use <torus.scad>
use <spoolmount.scad>
// SpoolMount removable side (i.e. attached to spool holder or cage)
module spoolmount_b() {
difference() {
// Ring
cylinder(h=5, r=42, $fn=200);
translate([0, 0, -1])
cylinder(h=7, r=25, $fn=200);
spoolmount();
// Holes
for (a = [0 : 30 : 330]) {
@@ -28,12 +24,6 @@ module spoolmount_b() {
}
}
}
// Rounded edges
translate([0, 0, 2.5]) {
torus(r_major=25, r_minor=2.5, xs=0.7, $fn=200);
torus(r_major=42, r_minor=2.5, xs=0.7, $fn=200);
}
}
spoolmount_b();