DIY_3D_Printer/Slider_front.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

116 lines
3.3 KiB
OpenSCAD

use <Slider_back.scad>
use <helpers/Holes.scad>
use <helpers/Helpers.scad>
include <Slider_dims.scad>
roundedExtruderHolder=true;
Slider_front();
module Slider_front() {
difference() {
union() {
// use same body as in back slider
translate([0,-10,0]) body();
Extruderholder();
}
dist=(heightMain-holeDist)/2;
translate([0,0,dist]) bearingHalfHole();
translate([0,0,dist+holeDist]) bearingHalfHole();
zcube();
cubecenter=heightMain/2-rollWithRodDist/2;
translate([0, -5, heightMain/2]) cube([width, 5, rollWithRodDist]);
// add the 4 mountholes
translate([0, -10, 0]) MountHolesFront();
// cut extruder holes
Extruderholes();
}
}
// Similar function from Slider_back without the hexagonal holes
module MountHolesFront() {
translate([holeLeftRightMargin,0,holeTop]) rotate([0,0,90]) {
#M3Hole(10);
M3Head(5);
}
translate([width-holeLeftRightMargin,0,holeTop]) rotate([0,0,90]) {
#M3Hole(10);
M3Head(5);
}
translate([holeLeftRightMargin,0,holeBottom]) rotate([0,0,90]) {
#M3Hole(10);
M3Head(3);
}
translate([width-holeLeftRightMargin,0,holeBottom]) rotate([0,0,90]) {
#M3Hole(10);
M3Head(3);
}
}
extruder_diam=21.75;
extruder_flatdist=16;
// offset height needed to place the extruder straight on the surface
extruder_offset=(extruder_diam-extruder_flatdist)/2;
extruder_platform_width=15;
extruder_platform_height=10;
extruder_platform_x=18.25;
module Extruderholder() {
translate([0, -10-extruder_offset, extruder_platform_x+extruder_platform_height/2]) hull() {
translate([width/2 - extruder_platform_width/2, 0, 0])
rotate([-90, 0, 0]) cylinder(d=extruder_platform_height, h=extruder_offset);
translate([width/2 + extruder_platform_width/2, 0, 0])
rotate([-90, 0, 0]) cylinder(d=extruder_platform_height, h=extruder_offset);
if(roundedExtruderHolder) {
// no rounded edges on bottom
translate([width/2 - extruder_platform_width/2 - extruder_platform_height/2, 0, -extruder_platform_height/2])
cube([extruder_platform_width + extruder_platform_height, extruder_offset, extruder_platform_height/2]);
}
}
depth=10;
roundhelperwidth=extruder_diam+3;
difference() {
union() {
// bottom cube
translate([width/2 - roundhelperwidth/2, -10-depth, 0]) cube([roundhelperwidth, depth, 5]);
// the triangle over it
// linear_extrude(roundhelperwidth) #polygon([[0,0],[5,0],[0,5]]); no rounded triangle
translate([width/2 - roundhelperwidth/2, -10, 5]) rotate([0, -90, 180]) roundedTriangle(roundhelperwidth, 5);
}
translate([width/2, -10-extruder_diam/2, 0]) cylinder(d=extruder_diam, h=15, $fn=125);
}
}
module Extruderholes() {
// hole distance from each other
holeDist=14;
translate([width/2 + holeDist/2, 0, extruder_platform_x + extruder_platform_height/2]) {
rotate([0,0,-90]) #M3Hole(15);
rotate([30,0,-90]) #M3Nut(8);
}
translate([width/2 - holeDist/2, 0, extruder_platform_x + extruder_platform_height/2]) {
rotate([0,0,-90]) #M3Hole(15);
rotate([30,0,-90]) #M3Nut(8);
}
}