Split lib files
This commit is contained in:
27
lib/extension.scad
Normal file
27
lib/extension.scad
Normal file
@@ -0,0 +1,27 @@
|
||||
use <spoolmount_a.scad>
|
||||
use <spoolmount_b.scad>
|
||||
|
||||
module extension(h) {
|
||||
assert(h >= 23, "minimum extension height is 23");
|
||||
|
||||
// Bottom spoolmount
|
||||
spoolmount_b();
|
||||
|
||||
// Top spoolmount
|
||||
translate([0, 0, h - 5])
|
||||
spoolmount_a();
|
||||
|
||||
// Center cylinder
|
||||
cylinder(h=h, r=29, $fn=200);
|
||||
|
||||
// Expansion to support top spoolmount
|
||||
translate([0, 0, h - 18])
|
||||
rotate_extrude($fn=200)
|
||||
polygon(points=[
|
||||
[29, 0],
|
||||
[42, 13],
|
||||
[29, 13],
|
||||
]);
|
||||
}
|
||||
|
||||
extension(h=25);
|
||||
120
lib/prusa_enclosure_mount.scad
Normal file
120
lib/prusa_enclosure_mount.scad
Normal file
@@ -0,0 +1,120 @@
|
||||
use <spoolmount_a.scad>
|
||||
use <torus.scad>
|
||||
|
||||
module prusa_enclosure_mount(angle) {
|
||||
translate([0, 0, 13])
|
||||
spoolmount_a();
|
||||
|
||||
rotate([0, 0, angle])
|
||||
difference() {
|
||||
union() {
|
||||
for (yo = [-20, 20]) {
|
||||
translate([0, yo, 0])
|
||||
difference() {
|
||||
// Side body
|
||||
hull() {
|
||||
for (x = [30, 127]) {
|
||||
for (y = [-7, 7]) {
|
||||
for (z = [2.5, 15.5]) {
|
||||
translate([x, y, z])
|
||||
scale([0.7, 0.7, 1.0])
|
||||
sphere(d=5, $fn=50);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Through screw hole
|
||||
translate([120, 0, -1])
|
||||
cylinder(h=20, d=3.2, $fn=50);
|
||||
|
||||
// Hex nut / screw head cutout
|
||||
translate([120, 0, 18 - (2.6 / 2)])
|
||||
linear_extrude(2.61, center=true)
|
||||
polygon(points=[
|
||||
[-2.8, 1.6175],
|
||||
[0, 3.235],
|
||||
[2.8, 1.6175],
|
||||
[2.8, -1.6175],
|
||||
[0, -3.235],
|
||||
[-2.8, -1.6175],
|
||||
]);
|
||||
|
||||
// Underside washer alignment cutouts
|
||||
for (y = [-4, 4]) {
|
||||
translate([124, y, 0])
|
||||
cube([2, 2, 2], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Center body
|
||||
hull() {
|
||||
for (x = [30, 115]) {
|
||||
for (y = [-25, 25]) {
|
||||
for (z = [2.5, 15.5]) {
|
||||
translate([x, y, z])
|
||||
scale([0.7, 0.7, 1.0])
|
||||
sphere(d=5, $fn=50);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Spoolmount support ring
|
||||
{
|
||||
// Outer core
|
||||
difference() {
|
||||
union() {
|
||||
// Top core
|
||||
translate([0, 0, 2.5])
|
||||
cylinder(h=15.5, r=42, $fn=200);
|
||||
|
||||
// Bottom core
|
||||
cylinder(h=18, r=40.25, $fn=200);
|
||||
}
|
||||
|
||||
// Center through cutout
|
||||
translate([0, 0, -1])
|
||||
cylinder(h=20, r=25, $fn=200);
|
||||
|
||||
// Bottom cutout
|
||||
translate([0, 0, -1])
|
||||
cylinder(h=3.5, r=26.75, $fn=200);
|
||||
}
|
||||
|
||||
// Outer bottom rounded edge
|
||||
translate([0, 0, 2.5])
|
||||
torus(r_major=40.25, r_minor=2.5, xs=0.7, $fn=200);
|
||||
|
||||
// Inner bottom rounded edge
|
||||
translate([0, 0, 2.5])
|
||||
torus(r_major=26.75, r_minor=2.5, xs=0.7, $fn=200);
|
||||
}
|
||||
}
|
||||
|
||||
// Weight reduction holes rows 1/5
|
||||
for (x = [44.5 : 12 : 105]) {
|
||||
for (y = [-20 : 40 : 20]) {
|
||||
translate([x, y, -1])
|
||||
cylinder(h=20, d=9, $fn=50);
|
||||
}
|
||||
}
|
||||
|
||||
// Weight reduction holes rows 2/4
|
||||
for (x = [51 : 12 : 105]) {
|
||||
for (y = [-10 : 20 : 10]) {
|
||||
translate([x, y, -1])
|
||||
cylinder(h=20, d=9, $fn=50);
|
||||
}
|
||||
}
|
||||
|
||||
// Weight reduction holes row 3
|
||||
for (x = [56.5 : 12 : 105]) {
|
||||
translate([x, 0, -1])
|
||||
cylinder(h=20, d=9, $fn=50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
prusa_enclosure_mount(angle=0);
|
||||
57
lib/spoolmount_a.scad
Normal file
57
lib/spoolmount_a.scad
Normal file
@@ -0,0 +1,57 @@
|
||||
use <torus.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);
|
||||
}
|
||||
|
||||
// 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],
|
||||
]);
|
||||
}
|
||||
|
||||
// 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();
|
||||
39
lib/spoolmount_b.scad
Normal file
39
lib/spoolmount_b.scad
Normal file
@@ -0,0 +1,39 @@
|
||||
use <torus.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);
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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();
|
||||
6
lib/torus.scad
Normal file
6
lib/torus.scad
Normal file
@@ -0,0 +1,6 @@
|
||||
module torus(r_major, r_minor, xs=1.0, ys=1.0) {
|
||||
rotate_extrude()
|
||||
translate([r_major, 0, 0])
|
||||
scale([xs, ys, 1.0])
|
||||
circle(r=r_minor);
|
||||
}
|
||||
Reference in New Issue
Block a user