move holes and helpers into seperate dir

holder for extruder and hexagonal screw mounts
This commit is contained in:
lukas 2021-09-09 21:19:54 +02:00
parent 7bb43947b1
commit e94e6b69f5
8 changed files with 142 additions and 39 deletions

View File

@ -1,4 +1,4 @@
use <Holes.scad>;
use <helpers/Holes.scad>;
$fn = 50;

View File

@ -1,5 +1,5 @@
use <Motorhalter.scad>;
use <Holes.scad>;
use <helpers/Holes.scad>;
MountSize = 40;
BodyWidth = 55;

View File

@ -1,28 +1,31 @@
use <Holes.scad>;
use <helpers/Holes.scad>;
include <Slider_dims.scad>;
Slider_back();
module Slider_back() {
difference() {
union() {
body();
zcube();
}
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();
}
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;

View File

@ -12,8 +12,9 @@ heightMain=90;
width=60;
depth=10;
bearingLength=24;
bearingDiam=15;
// bearing dimensions with little offsets to fit
bearingLength=24+.4;
bearingDiam=15+.2;
twoRodSize=2.2;
middleCylinderRad=2.5;

View File

@ -1,29 +1,116 @@
use <Slider_back.scad>
use <Holes.scad>
use <helpers/Holes.scad>
use <helpers/Helpers.scad>
include <Slider_dims.scad>
difference() {
translate([0,-10,0]) body();
roundedExtruderHolder=true;
dist=(heightMain-holeDist)/2;
translate([0,0,dist]) bearingHalfHole();
translate([0,0,dist+holeDist]) bearingHalfHole();
Slider_front();
module Slider_front() {
difference() {
union() {
// use same body as in back slider
translate([0,-10,0]) body();
Extruderholder();
}
zcube();
dist=(heightMain-holeDist)/2;
translate([0,0,dist]) bearingHalfHole();
translate([0,0,dist+holeDist]) bearingHalfHole();
cubecenter=heightMain/2-rollWithRodDist/2;
translate([0, -5, heightMain/2]) cube([width, 5, rollWithRodDist]);
zcube();
// add the 4 mountholes
translate([0, -5, 0]) MountHolesFront();
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,-5,holeTop]) rotate([0,0,90]) #M3Hole(10);
translate([width-holeLeftRightMargin,-5,holeTop]) rotate([0,0,90]) #M3Hole(10);
translate([holeLeftRightMargin,0,holeTop]) rotate([0,0,90]) {
#M3Hole(10);
M3Head(5);
}
translate([holeLeftRightMargin,-5,holeBottom]) rotate([0,0,90]) #M3Hole(10);
translate([width-holeLeftRightMargin,-5,holeBottom]) rotate([0,0,90]) #M3Hole(10);
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);
}
}

View File

@ -1,5 +1,5 @@
use <Motorhalter.scad>;
use <Holes.scad>;
use <helpers/Holes.scad>;
$fn = 50;

6
helpers/Helpers.scad Normal file
View File

@ -0,0 +1,6 @@
module roundedTriangle(length, sidewidth) {
render() difference() {
linear_extrude(length) polygon([[0,0],[sidewidth,0],[0,sidewidth]]);
translate([sidewidth, sidewidth, 0]) cylinder(r=sidewidth, h=length);
}
}

View File

@ -3,6 +3,8 @@ M4HoleDiam = 4.4;
M3NutDiam=6.01+.4;
M3HeadDiam = 5.8;
module M3Hole(thickness) {
rotate([0, 90, 0]) cylinder(h = thickness, d = M3HoleDiam);
}
@ -13,4 +15,8 @@ module M4Hole(thickness) {
module M3Nut(thickness) {
rotate([0, 90, 0]) cylinder(h = thickness, d = M3NutDiam, $fn=6);
}
module M3Head(thickness) {
rotate([0, 90, 0]) cylinder(h = thickness, d = M3HeadDiam);
}