diff --git a/Slider.scad b/Slider.scad index c784a76..874999b 100644 --- a/Slider.scad +++ b/Slider.scad @@ -1,3 +1,74 @@ -$fn=50; +$fn=75; -cube(); +// distance between two rods +holeDist=65; + +// diameter of rod sticks +rodDiameter=8; + +// overall height +heightMain=90; + +width=60; +depth=10; + +bearingLength=24; +bearingDiam=15; + +twoRodSize=2.2; +middleCylinderRad=2.5; +middleCylinderOuterRad=4; + +rollWithRodDist=13.6; // rolle mit rod drauf + +difference() { + body(); + + 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(); +} + +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); + } + + 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+1); // 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); + } + } +}