59 lines
1.3 KiB
OpenSCAD
59 lines
1.3 KiB
OpenSCAD
|
|
fil = 0.25;
|
|
w = 31+fil*6;
|
|
l = 12;
|
|
cls = 6.4;
|
|
base_width = 30;
|
|
base_height = 15;
|
|
|
|
// Size of magnets used (plus clearance).
|
|
magnet = [20.1+1, 6.1+0.4, 1.6+0.8];
|
|
|
|
// Glue mount or magnet mount?
|
|
magnet_mount = true;
|
|
|
|
// Clamp.
|
|
module clamp (){
|
|
translate([0, fil*6, 0])
|
|
cube([fil*6, fil*6, l]);
|
|
translate([fil*6+2.5, fil*6, 0])
|
|
cube([cls-2.5, fil*8, l]);
|
|
cube([fil*3+cls, fil*6, l]);
|
|
}
|
|
|
|
// Lower clamp.
|
|
translate ([0, -fil*4, 0])
|
|
clamp();
|
|
|
|
// Upper clamp.
|
|
translate ([0, w+fil*4, l]) rotate([180, 0, 0])
|
|
clamp();
|
|
|
|
difference () {
|
|
minkowski () {
|
|
union () {
|
|
// Clamp connection.
|
|
translate([fil*3+cls, -4, 0])
|
|
cube([0.001, w+4+fil, l]);
|
|
// Clamp to base.
|
|
translate([fil*3+cls, -4, 0]) rotate([0, 0, 270])
|
|
cube([0.001, 4, l]);
|
|
|
|
// Base.
|
|
translate([fil*3+cls+4, -4, 0]) rotate([0, 0, 345])
|
|
if (magnet_mount) {
|
|
cube([magnet[2], magnet[1]*2, magnet[0]]);
|
|
} else {
|
|
cube([0.001, base_height, base_width]);
|
|
}
|
|
}
|
|
cylinder(0.001, fil*3, fil*3, $fn=64);
|
|
}
|
|
|
|
translate([fil*3+cls+4, -4, 0]) rotate([0, 0, 345])
|
|
if (magnet_mount) {
|
|
translate([magnet[2]/2, magnet[1]/2, -0.001])
|
|
cube([magnet[2], magnet[1], magnet[0]+0.002]);
|
|
}
|
|
}
|
|
|