DIY_3D_Printer/Slider_back.scad
lukas e94e6b69f5 move holes and helpers into seperate dir
holder for extruder and hexagonal screw mounts
2021-09-09 21:19:54 +02:00

90 lines
2.6 KiB
OpenSCAD

use <helpers/Holes.scad>;
include <Slider_dims.scad>;
Slider_back();
module Slider_back() {
difference() {
union() {
body();
zcube();
}
dist=(heightMain-holeDist)/2;
translate([0,0,dist]) bearingHalfHole();
translate([0,0,dist+holeDist]) bearingHalfHole();
cubecenter=heightMain/2-rollWithRodDist/2;
translate([0, 0, heightMain/2]) cube([width, 5, rollWithRodDist]);
translate([0, -5, cubecenter]) beltHolder();
translate([width, -5, cubecenter]) rotate([0, 180, 0]) beltHolder();
// add the 4 mountholes
MountHoles();
}
}
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);
}
}
// add the offset cube with the triangle to have space for the belts in it
module zcube() {
cubez=heightMain/2-rollWithRodDist;
translate([0, -5, cubez]) cube([width, 5, rollWithRodDist]);
// the bottom triangle
translate([0, 0, cubez]) rotate([-90,0,-90]) linear_extrude(width) #polygon([[0,0],[5,0],[0,5]]);
}
module bearingHalfHole() {
sideDist=3;
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]) rotate([0, 90, 0]) cylinder(h = bearingLength, d = bearingDiam);
translate([width-bearingLength-sideDist,0,0]) rotate([0, 90, 0]) cylinder(h = bearingLength, d = bearingDiam);
}
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);
}
}
}
module MountHoles() {
translate([holeLeftRightMargin,0,holeTop]) {
rotate([0,0,90]) #M3Hole(10);
translate([0,5,0]) rotate([0,0,90]) M3Nut(5);
}
translate([width-holeLeftRightMargin,0,holeTop]) {
rotate([0,0,90]) #M3Hole(10);
translate([0,5,0]) rotate([0,0,90]) M3Nut(5);
}
translate([holeLeftRightMargin,0,holeBottom]) {
translate([0,-5,0]) rotate([0,0,90]) #M3Hole(15);
translate([0,5,0]) rotate([0,0,90]) M3Nut(10);
}
translate([width-holeLeftRightMargin,0,holeBottom]) {
translate([0,-5,0]) rotate([0,0,90]) #M3Hole(15);
translate([0,5,0]) rotate([0,0,90]) M3Nut(10);
}
}