format all files

add 3dprinter.scad where to simulate the whole 3dprinter should look like
This commit is contained in:
lukas 2021-01-04 19:08:21 +01:00
parent 77607f2ecc
commit b26be99f4e
5 changed files with 212 additions and 130 deletions

62
3dprinter.scad Normal file
View File

@ -0,0 +1,62 @@
use <angle_bracket.scad>;
use <horizontal_angle_bracket.scad>;
use <Motorhalter.scad>;
use <YRollHolder.scad>;
bottmoutline();
bottomAngleBrackets();
horizontalProfile();
YAxis();
module bottmoutline() {
// draw alu profiles
translate([0, - 40, 0]) aluProfile(400);
translate([0, 400, 0]) aluProfile(400);
translate([0, - 40, 0]) rotate([0, 0, 90]) aluProfile(480);
translate([440, - 40, 0]) rotate([0, 0, 90]) aluProfile(480);
}
module bottomAngleBrackets() {
// draw angle bracktes
angle_bracket();
translate([400, 0, 0]) rotate([0, 0, 90]) angle_bracket();
translate([400, 400, 0]) rotate([0, 0, 180]) angle_bracket();
translate([0, 400, 0]) rotate([0, 0, 270]) angle_bracket();
}
module horizontalProfile() {
height = 600;
translate([- 40, 180, 0]) rotate([0, - 90, 0]) halfAluProfile(height);
translate([460, 180, 0]) rotate([0, - 90, 0]) halfAluProfile(height);
// upper part
translate([- 60, 180, height]) halfAluProfile(520);
// add the horitzontal angle bracktes
translate([- 40, 135, 0]) rotate([0, 0, 90]) horizontal_angle_bracket();
translate([440, 265, 0]) rotate([0, 0, 270]) horizontal_angle_bracket();
// angle brackets up
translate([- 40, 220, height]) rotate([90, 90, 0]) angle_bracket();
translate([440, 180, height]) rotate([-90, 90, 0]) angle_bracket();
}
module YAxis() {
translate([160, 0, 0]) Motorhalter();
translate([214, 400, 0]) rotate([0, 0, 180]) YRollHolder();
}
// -- MODULES -- //
module aluProfile(length) {
color("#dddddd") cube([length, 40, 40]);
}
module halfAluProfile(length) {
color("#dddddd") cube([length, 40, 20]);
}

View File

@ -13,11 +13,16 @@ leftholedist=7;
M3HoleDiam = 3.4;
M3HeadDiam = 5.8;
Motorhalter();
module Motorhalter() {
render() difference() {
mainbody();
translate([motorwidth, wanddickelinks, 0]) motorholes();
leftholes();
}
}
//modules
@ -26,11 +31,13 @@ module mainbody(){
translate([motorwidth, wanddickelinks, 0])cube([wanddickemotor, motorheight, motorheight]);
translate([motorwidth + wanddickemotor,motorheight * 2 /3,motorheight]) rotate([0,0,180]) linear_extrude(3) polygon([[0,0], [0, motorheight * 2 /3], [motorwidth * 2 /3, motorheight* 2 /3]]);
translate([motorwidth + wanddickemotor, motorheight * 2 / 3, motorheight]) rotate([0, 0, 180]) linear_extrude(3)
polygon([[0, 0], [0, motorheight * 2 / 3], [motorwidth * 2 / 3, motorheight * 2 / 3]]);
}
module motorholes() {
translate([0,motorheight/2,motorheight/2])rotate([0,90,0])cylinder(h=wanddickemotor, d=cylinderdiameter, $fn=130);
translate([0, motorheight / 2, motorheight / 2])rotate([0, 90, 0])cylinder(h = wanddickemotor, d = cylinderdiameter,
$fn = 130);
translate([0, motorheight - motorholedistance, motorheight - motorholedistance]) MotorM3Hole();

View File

@ -9,17 +9,21 @@ length=30;
// cambelt has 6mm width
innerspace = 8;
// call main
YRollHolder();
module YRollHolder() {
render() difference() {
frame();
holes();
}
}
module frame() {
cube([innerspace + 2 * thickness, thickness, height]);
translate([0, thickness, 0]) cube([thickness, length, height]);
translate([innerspace + thickness, thickness, 0]) cube([thickness, length, height]);
}
module holes() {

View File

@ -9,11 +9,15 @@ M4HoleDiam=4.4;
holedistance = 10;
// main call
angle_bracket();
difference() {
module angle_bracket() {
render() difference() {
frame();
holes();
}
}
module frame() {
// x plate

View File

@ -15,10 +15,15 @@ holedistance=10;
horizontalcenterholes = true;
difference() {
// calling main
horizontal_angle_bracket();
module horizontal_angle_bracket() {
render() difference() {
frame();
holes();
}
}
module frame() {
// left tile