From e94e6b69f5ec4a220b45524387bf55e27e5a0d8d Mon Sep 17 00:00:00 2001 From: lukas Date: Thu, 9 Sep 2021 21:19:54 +0200 Subject: [PATCH] move holes and helpers into seperate dir holder for extruder and hexagonal screw mounts --- Motorhalter.scad | 2 +- SliderLeft.scad | 2 +- Slider_back.scad | 41 ++++++----- Slider_dims.scad | 5 +- Slider_front.scad | 117 +++++++++++++++++++++++++++---- ZMotorHalter.scad | 2 +- helpers/Helpers.scad | 6 ++ Holes.scad => helpers/Holes.scad | 6 ++ 8 files changed, 142 insertions(+), 39 deletions(-) create mode 100644 helpers/Helpers.scad rename Holes.scad => helpers/Holes.scad (75%) diff --git a/Motorhalter.scad b/Motorhalter.scad index 8aea98d..bd5c1d3 100644 --- a/Motorhalter.scad +++ b/Motorhalter.scad @@ -1,4 +1,4 @@ -use ; +use ; $fn = 50; diff --git a/SliderLeft.scad b/SliderLeft.scad index 5b8e047..eb2d911 100644 --- a/SliderLeft.scad +++ b/SliderLeft.scad @@ -1,5 +1,5 @@ use ; -use ; +use ; MountSize = 40; BodyWidth = 55; diff --git a/Slider_back.scad b/Slider_back.scad index d169aac..c77dce2 100644 --- a/Slider_back.scad +++ b/Slider_back.scad @@ -1,28 +1,31 @@ -use ; +use ; include ; +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; diff --git a/Slider_dims.scad b/Slider_dims.scad index 2614130..d8a133b 100644 --- a/Slider_dims.scad +++ b/Slider_dims.scad @@ -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; diff --git a/Slider_front.scad b/Slider_front.scad index 5522485..53f7b6a 100644 --- a/Slider_front.scad +++ b/Slider_front.scad @@ -1,29 +1,116 @@ use -use +use +use include -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); + } } \ No newline at end of file diff --git a/ZMotorHalter.scad b/ZMotorHalter.scad index 39c469e..89b638f 100644 --- a/ZMotorHalter.scad +++ b/ZMotorHalter.scad @@ -1,5 +1,5 @@ use ; -use ; +use ; $fn = 50; diff --git a/helpers/Helpers.scad b/helpers/Helpers.scad new file mode 100644 index 0000000..ad6b150 --- /dev/null +++ b/helpers/Helpers.scad @@ -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); + } +} \ No newline at end of file diff --git a/Holes.scad b/helpers/Holes.scad similarity index 75% rename from Holes.scad rename to helpers/Holes.scad index b622cd1..29996a3 100644 --- a/Holes.scad +++ b/helpers/Holes.scad @@ -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); } \ No newline at end of file