2021-09-09 19:19:54 +00:00
|
|
|
use <helpers/Holes.scad>;
|
2021-09-09 14:23:19 +00:00
|
|
|
include <Slider_dims.scad>;
|
2021-09-07 20:48:07 +00:00
|
|
|
|
2021-09-09 19:19:54 +00:00
|
|
|
Slider_back();
|
|
|
|
module Slider_back() {
|
|
|
|
difference() {
|
|
|
|
union() {
|
|
|
|
body();
|
|
|
|
zcube();
|
|
|
|
}
|
|
|
|
|
2021-09-07 11:22:31 +00:00
|
|
|
|
2021-09-09 19:19:54 +00:00
|
|
|
dist=(heightMain-holeDist)/2;
|
2021-12-19 18:20:46 +00:00
|
|
|
translate([0,0,dist]) bearingHalfHoles();
|
|
|
|
translate([0,0,dist+holeDist]) bearingHalfHoles();
|
2021-09-07 11:22:31 +00:00
|
|
|
|
2021-09-09 19:19:54 +00:00
|
|
|
cubecenter=heightMain/2-rollWithRodDist/2;
|
|
|
|
translate([0, 0, heightMain/2]) cube([width, 5, rollWithRodDist]);
|
2021-09-07 11:22:31 +00:00
|
|
|
|
2021-09-09 19:19:54 +00:00
|
|
|
translate([0, -5, cubecenter]) beltHolder();
|
|
|
|
translate([width, -5, cubecenter]) rotate([0, 180, 0]) beltHolder();
|
2021-09-07 20:48:07 +00:00
|
|
|
|
2021-09-09 19:19:54 +00:00
|
|
|
// add the 4 mountholes
|
|
|
|
MountHoles();
|
|
|
|
}
|
2021-09-07 11:22:31 +00:00
|
|
|
}
|
|
|
|
|
2021-09-09 19:19:54 +00:00
|
|
|
|
2021-09-07 11:22:31 +00:00
|
|
|
module body() {
|
|
|
|
edgeRound=1.5;
|
|
|
|
|
|
|
|
translate([edgeRound, 0, edgeRound]) minkowski() {
|
|
|
|
cube([width-edgeRound*2, depth/2, heightMain-edgeRound*2]);
|
|
|
|
rotate([-90, 0, 0]) cylinder(r=edgeRound,h=depth/2);
|
|
|
|
}
|
2021-09-09 14:23:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// add the offset cube with the triangle to have space for the belts in it
|
|
|
|
module zcube() {
|
2021-09-07 11:22:31 +00:00
|
|
|
cubez=heightMain/2-rollWithRodDist;
|
|
|
|
translate([0, -5, cubez]) cube([width, 5, rollWithRodDist]);
|
|
|
|
|
|
|
|
// the bottom triangle
|
2021-09-09 14:23:19 +00:00
|
|
|
translate([0, 0, cubez]) rotate([-90,0,-90]) linear_extrude(width) #polygon([[0,0],[5,0],[0,5]]);
|
2021-09-07 11:22:31 +00:00
|
|
|
}
|
|
|
|
|
2021-12-19 18:20:46 +00:00
|
|
|
function getBearingLength() = bearingLength;
|
|
|
|
|
|
|
|
module bearingHalfHoles() {
|
2021-09-07 11:22:31 +00:00
|
|
|
sideDist=3;
|
|
|
|
|
2021-12-19 18:20:46 +00:00
|
|
|
//rotate([0, 90, 0]) cylinder(h = width, d = 8+2); // we are defining +1mm to fit the rod in the hole...
|
|
|
|
translate([sideDist,0,0]) bearingHalfHole();
|
|
|
|
translate([width-bearingLength-sideDist,0,0]) bearingHalfHole();
|
|
|
|
}
|
|
|
|
|
|
|
|
module bearingHalfHole(rodln=bearingLength+10) {
|
|
|
|
#translate([(bearingLength - rodln)/2,0,0]) rotate([0, 90, 0]) cylinder(h = rodln, d = 8+2);
|
|
|
|
rotate([0, 90, 0]) cylinder(h = bearingLength, d = bearingDiam);
|
2021-09-07 11:22:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module beltHolder() {
|
|
|
|
translate([0, 0, -twoRodSize/2]) {
|
|
|
|
cube([17, 10, twoRodSize]);
|
|
|
|
translate([20, 0, twoRodSize/2]) rotate([-90, 0, 0]) difference() {
|
|
|
|
hull() {
|
|
|
|
cylinder(r=middleCylinderOuterRad, h=10);
|
|
|
|
#translate([-5, 0, 0]) #cylinder(r=1, h=10);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cylinder(r=middleCylinderRad, h=10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-09-07 20:48:07 +00:00
|
|
|
|
|
|
|
module MountHoles() {
|
2021-09-09 14:23:19 +00:00
|
|
|
translate([holeLeftRightMargin,0,holeTop]) {
|
2021-09-07 20:48:07 +00:00
|
|
|
rotate([0,0,90]) #M3Hole(10);
|
|
|
|
translate([0,5,0]) rotate([0,0,90]) M3Nut(5);
|
|
|
|
}
|
2021-09-09 14:23:19 +00:00
|
|
|
translate([width-holeLeftRightMargin,0,holeTop]) {
|
2021-09-07 20:48:07 +00:00
|
|
|
rotate([0,0,90]) #M3Hole(10);
|
|
|
|
translate([0,5,0]) rotate([0,0,90]) M3Nut(5);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-09-09 14:23:19 +00:00
|
|
|
translate([holeLeftRightMargin,0,holeBottom]) {
|
2021-09-07 20:48:07 +00:00
|
|
|
translate([0,-5,0]) rotate([0,0,90]) #M3Hole(15);
|
|
|
|
translate([0,5,0]) rotate([0,0,90]) M3Nut(10);
|
|
|
|
}
|
|
|
|
|
2021-09-09 14:23:19 +00:00
|
|
|
translate([width-holeLeftRightMargin,0,holeBottom]) {
|
2021-09-07 20:48:07 +00:00
|
|
|
translate([0,-5,0]) rotate([0,0,90]) #M3Hole(15);
|
|
|
|
translate([0,5,0]) rotate([0,0,90]) M3Nut(10);
|
|
|
|
}
|
|
|
|
}
|