Skip to content
Snippets Groups Projects
Commit bc75baa0 authored by Manuel Schmidt's avatar Manuel Schmidt
Browse files

Code aufgeräumt

parent 21dffd7c
No related branches found
No related tags found
No related merge requests found
......@@ -552,10 +552,10 @@ module case_front_side(x, y, z, visibility) {
}
//union
rotate([0, 0, 0])
case_raspberryPi_screwcylinder(x+5, y-1, z+23.5, visibility);
case_raspberryPi_screwcylinder(x+5, y-1, z+23.5, visibility);
rotate([0, 0, 0])
case_raspberryPi_screwcylinder(x+90, y-1, z+23.5 , visibility);
case_raspberryPi_screwcylinder(x+90, y-1, z+23.5, visibility);
}
}
......@@ -574,20 +574,43 @@ module case_top_side(x, y, z, visibility) {
difference() {
union() {
difference() {
translate([x, y, z]) color([0.4, 0.4, 0.4], visibility) cube([95, 62, 2]);
translate([x+9, y+4, z-0.5]) color([0.4, 0.4, 0.4], visibility) cube([80, 53, 3]);
translate([x, y, z])
color([0.4, 0.4, 0.4], visibility)
cube([95, 62, 2]);
translate([x+9, y+4, z-0.5])
color([0.4, 0.4, 0.4], visibility)
cube([80, 53, 3]);
}
// union
translate([x+5, y, z+1]) color([0.4, 0.4, 0.4], visibility) cylinder(2, 5, 5, true);
translate([x+90, y, z+1]) color([0.4, 0.4, 0.4], visibility) cylinder(2, 5, 5, true);
translate([x+5, y+62, z+1]) color([0.4, 0.4, 0.4], visibility) cylinder(2, 5, 5, true);
translate([x+90, y+62, z+1]) color([0.4, 0.4, 0.4], visibility) cylinder(2, 5, 5, true);
translate([x+5, y, z+1])
color([0.4, 0.4, 0.4], visibility)
cylinder(2, 5, 5, true);
translate([x+90, y, z+1])
color([0.4, 0.4, 0.4], visibility)
cylinder(2, 5, 5, true);
translate([x+5, y+62, z+1])
color([0.4, 0.4, 0.4], visibility)
cylinder(2, 5, 5, true);
translate([x+90, y+62, z+1])
color([0.4, 0.4, 0.4], visibility)
cylinder(2, 5, 5, true);
}
// difference
translate([x+5, y-1, z+1]) cylinder(3, 1.3, 1.3, true);
translate([x+90, y-1, z+1]) cylinder(3, 1.3, 1.3, true);
translate([x+5, y+63, z+1]) cylinder(3, 1.3, 1.3, true);
translate([x+90, y+63, z+1]) cylinder(3, 1.3, 1.3, true);
translate([x+5, y-1, z+1])
cylinder(3, 1.3, 1.3, true);
translate([x+90, y-1, z+1])
cylinder(3, 1.3, 1.3, true);
translate([x+5, y+63, z+1])
cylinder(3, 1.3, 1.3, true);
translate([x+90, y+63, z+1])
cylinder(3, 1.3, 1.3, true);
}
}
......@@ -603,8 +626,7 @@ module case_raspberryPi(x, y, z, visibility){
case_left_side(x+0, y+0, z+2, visibility);
case_back_side(x+0, y+60, z+2, visibility);
case_front_side(x+0, y+0, z+2, visibility);
case_ground_plate(x+0, y+0, z+0, visibility);
//case_top_side(0, 0, 30.5, visibility);
case_ground_plate(x+0, y+0, z+0, visibility);
}
}
}
......@@ -618,41 +640,66 @@ module case_raspberryPi_top(x, y, z, visibility) {
module case_camera_ground_plate(x, y, z, visibility) {
difference() {
union() {
translate([x, y, z-2]) color([0.4, 0.4, 0.4], visibility) cube([95, 62, 2]);
translate([x, y, z-2])
color([0.4, 0.4, 0.4], visibility)
cube([95, 62, 2]);
//screwcylinder(x+65, y+15, z-2);
}
translate([x+4, y+4, z-2.1]) cube([6.1, 20, 2.2]);
translate([x+4, y+4, z-2.1])
cube([6.1, 20, 2.2]);
}
}
module case_camera_left_side(x, y, z, visibility) {
translate([x, y, z]) color([0.4, 0.4, 0.4], visibility) cube([2, 62, 20]);
translate([x, y, z])
color([0.4, 0.4, 0.4], visibility)
cube([2, 62, 20]);
}
module case_camera_front_side(x, y, z, visibility) {
difference() {
translate([x, y, z]) color([0.4, 0.4, 0.4], visibility) cube([95, 2, 20]);
translate([x+41.5, y-0.5, z-0.1]) cube([15, 3, 13.1]);
translate([x, y, z])
color([0.4, 0.4, 0.4], visibility)
cube([95, 2, 20]);
translate([x+41.5, y-0.5, z-0.1])
cube([15, 3, 13.1]);
}
}
module case_camera_right_side(x, y, z, visibility) {
translate([x, y, z]) color([0.4, 0.4, 0.4], visibility) cube([2, 62, 20]);
translate([x, y, z])
color([0.4, 0.4, 0.4], visibility)
cube([2, 62, 20]);
}
module case_camera_back_side(x, y, z, visibility) {
translate([x, y, z]) color([0.4, 0.4, 0.4], visibility) cube([95, 2, 20]);
translate([x, y, z])
color([0.4, 0.4, 0.4], visibility)
cube([95, 2, 20]);
}
module case_camera_top_side(x, y, z, visibility) {
union() {
difference() {
translate([x, y, z-2]) color([0.4, 0.4, 0.4 ], visibility) cube([95, 62, 2]);
translate([x+49, y+29, z-1]) cylinder(3, 16, 16, true);
translate([x+5, y+28, z+1]) cylinder(10, 1.3 , 1.3, true);
translate([x+5, y+57, z+1]) cylinder(10, 1.3 , 1.3, true);
translate([x+90, y+57, z+1]) cylinder(10, 1.3, 1.3, true);
translate([x+90, y+5, z+1]) cylinder(10, 1.3, 1.3, true);
translate([x, y, z-2])
color([0.4, 0.4, 0.4], visibility)
cube([95, 62, 2]);
translate([x+49, y+29, z-1])
cylinder(3, 16, 16, true);
translate([x+5, y+28, z+1])
cylinder(10, 1.3, 1.3, true);
translate([x+5, y+57, z+1])
cylinder(10, 1.3, 1.3, true);
translate([x+90, y+57, z+1])
cylinder(10, 1.3, 1.3, true);
translate([x+90, y+5, z+1])
cylinder(10, 1.3, 1.3, true);
}
case_camera_top_side_edge(x, y, z, visibility);
......@@ -664,75 +711,161 @@ module case_camera_top_side_edge(x, y, z, visibility) {
// Left side
difference() {
union() {
translate([x+2.5, y+2.5, z]) color([0.4, 0.4, 0.4], visibility) cube([2, 50, 5 ]);
case_camera_edge_screwcylinder(x+5, y+28 , z+2.5, visibility);
translate([x-2.5, y+22.5, z]) color([0.4 ,0.4, 0.4]) cube([8, 11, 5], visibility);
translate([x+2.5, y+2.5, z])
color([0.4, 0.4, 0.4], visibility)
cube([2, 50, 5]);
case_camera_edge_screwcylinder(x+5, y+28, z+2.5, visibility);
translate([x-2.5, y+22.5, z])
color([0.4,0.4, 0.4])
cube([8, 11, 5], visibility);
}
translate([x-0.5, y+24.5, z-0.1]) cube([6.05 , 7, 6]);
translate([x-3.5, y+22, z-1]) cube([6, 12, 7 ]);
translate([x-0.5, y+24.5, z-0.1])
cube([6.05, 7, 6]);
translate([x-3.5, y+22, z-1])
cube([6, 12, 7]);
}
// Front side
difference() {
union() {
translate([x+9, y+57.5, z]) color([0.4, 0.4, 0.4], visibility) cube([77, 2, 5 ]);
case_camera_edge_screwcylinder(x+5, y+ 57, z+2.5, visibility);
translate([x+8.5, y+57, z]) color([0.4, 0.4, 0.4], visibility) cube([2, 2.5, 5]);
translate([x+3, y+51.5, z]) color([0.4, 0.4, 0.4], visibility) cube([2.5, 2, 5]);
translate([x+9, y+57.5, z])
color([0.4, 0.4, 0.4], visibility)
cube([77, 2, 5]);
case_camera_edge_screwcylinder(x+5, y+57, z+2.5, visibility);
translate([x+8.5, y+57, z])
color([0.4, 0.4, 0.4], visibility)
cube([2, 2.5, 5]);
translate([x+3, y+51.5, z])
color([0.4, 0.4, 0.4], visibility)
cube([2.5, 2, 5]);
}
translate([x, y+59.5, z-0.1]) color([0.4, 0.4, 0.4], visibility) cube([10, 4, 6]);
translate([x-1.5, y+51.5, z-0.1]) color([0.4 , 0.4, 0.4], visibility) cube([4, 10 , 6]);
translate([x+1.5, y+53.5, z-0.1]) color([0.4 , 0.4, 0.4], visibility) cube([4, 8 , 6]);
translate([x+0.5, y+56.5, z-0.1]) color([0.4 , 0.4, 0.4], visibility) cube([8, 4 , 6]);
translate([x, y+59.5, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([10, 4, 6]);
translate([x-1.5, y+51.5, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([4, 10, 6]);
translate([x+1.5, y+53.5, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([4, 8, 6]);
translate([x+0.5, y+56.5, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([8, 4, 6]);
}
// Right side
difference() {
union() {
translate([x+90.5, y+8.5, z]) color([0.4, 0.4, 0.4], visibility) cube([2, 45, 5]);
case_camera_edge_screwcylinder(x+90, y+57, z+2.5, visibility);
translate([x+84.5, y+57, z]) color([0.4, 0.4, 0.4], visibility) cube([2, 2.5, 5]);
translate([x+89.5, y+51.5, z]) color([0.4, 0.4, 0.4], visibility) cube([2.5, 2, 5]);
translate([x+90.5, y+8.5, z])
color([0.4, 0.4, 0.4], visibility)
cube([2, 45, 5]);
case_camera_edge_screwcylinder(x+90, y+57, z+2.5, visibility);
translate([x+84.5, y+57, z])
color([0.4, 0.4, 0.4], visibility)
cube([2, 2.5, 5]);
translate([x+89.5, y+51.5, z])
color([0.4, 0.4, 0.4], visibility)
cube([2.5, 2, 5]);
}
translate([x+85, y+59.5, z-0.1]) color([0.4, 0.4, 0.4], visibility) cube([10, 4, 6]);
translate([x+92.5, y+51.5, z-0.1]) color([ 0.4, 0.4, 0.4], visibility) cube([4, 10, 6]);
translate([x+90.5, y+53.5, z-0.1]) color([ 0.4, 0.4, 0.4], visibility) cube([5, 3, 6]);
translate([x+86.5, y+57, z-0.1]) color([ 0.4, 0.4, 0.4], visibility) cube([5, 3, 6]);
translate([x+85, y+59.5, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([10, 4, 6]);
translate([x+92.5, y+51.5, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([4, 10, 6]);
translate([x+90.5, y+53.5, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([5, 3, 6]);
translate([x+86.5, y+57, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([5, 3, 6]);
}
}
// Back side
difference() {
union() {
translate([x+3, y+2.5, z]) color([0.4, 0.4, 0.4], visibility) cube([83, 2, 5 ]);
case_camera_edge_screwcylinder(x+90, y+5, z+2.5, visibility);
translate([x+84.5, y+3, z]) color([0.4, 0.4, 0.4], visibility) cube([2, 2.5, 5]);
translate([x+89.5, y+8.5, z]) color([0.4, 0.4, 0.4], visibility) cube([2.5, 2, 5]);
translate([x+3, y+2.5, z])
color([0.4, 0.4, 0.4], visibility)
cube([83, 2, 5]);
case_camera_edge_screwcylinder(x+90, y+5, z+2.5, visibility);
translate([x+84.5, y+3, z])
color([0.4, 0.4, 0.4], visibility)
cube([2, 2.5, 5]);
translate([x+89.5, y+8.5, z])
color([0.4, 0.4, 0.4], visibility)
cube([2.5, 2, 5]);
}
translate([x+85, y-1.5, z-0.1]) color([0.4, 0.4, 0.4], visibility) cube([10, 4, 6]);
translate([x+92.5, y, z-0.1]) color([ 0.4, 0.4, 0.4], visibility) cube([4, 10, 6]);
translate([x+90.0, y+5.5, z-0.1]) color([ 0.4, 0.4, 0.4], visibility) cube([5, 3, 6]);
translate([x+86.5, y+2, z-0.1]) color([ 0.4, 0.4, 0.4], visibility) cube([15, 3, 6]);
translate([x+41, y+2, z+1]) color([ 0.4, 0.4, 0.4], visibility) cube([16, 3, 6]);
translate([x+85, y-1.5, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([10, 4, 6]);
translate([x+92.5, y, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([4, 10, 6]);
translate([x+90.0, y+5.5, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([5, 3, 6]);
translate([x+86.5, y+2, z-0.1])
color([0.4, 0.4, 0.4], visibility)
cube([15, 3, 6]);
translate([x+41, y+2, z+1])
color([0.4, 0.4, 0.4], visibility)
cube([16, 3, 6]);
}
}
module case_camera_edge_screwcylinder(x, y, z, visibility) {
difference() {
translate([x, y, z]) color([0.4, 0.4, 0.4]) cylinder(5, 5.5, 5.5, $fn=50, true);
translate([x, y, z]) cylinder(6, 3.5, 3.5, $fn=50, true);
}
difference() {
translate([x, y, z])
color([0.4, 0.4, 0.4])
cylinder(5, 5.5, 5.5, $fn=50, true);
translate([x, y, z])
cylinder(6, 3.5, 3.5, $fn=50, true);
}
}
module case_camera_screwcylinder1(x, y, z, visibility) {
echo("Schraubzylinder erstellen");
difference(){
translate([x, y, z]) color([0.4, 0.4, 0.4], visibility) rotate([0, 0, 0]) cylinder(5, 3, 3, $fn=50, true);
translate([x, y, z]) rotate([0, 0, 0]) cylinder(6, 0.9, 0.9, $fn=50, true);
translate([x, y, z])
color([0.4, 0.4, 0.4], visibility)
rotate([0, 0, 0]) cylinder(5, 3, 3, $fn=50, true);
translate([x, y, z])
rotate([0, 0, 0])
cylinder(6, 0.9, 0.9, $fn=50, true);
}
}
module case_camera_screwcylinder2(x, y, z, visibility) {
difference(){
translate([x, y, z]) color([0.4, 0.4, 0.4], visibility) rotate([0, 0, 0]) cylinder(18, 3, 3, $fn=50, true);
translate([x, y, z-5]) rotate([0, 0, 0]) cylinder(20, 1.2, 1.2, $fn=50, true);
translate([x, y, z])
color([0.4, 0.4, 0.4], visibility)
rotate([0, 0, 0]) cylinder(18, 3, 3, $fn=50, true);
translate([x, y, z-5])
rotate([0, 0, 0])
cylinder(20, 1.2, 1.2, $fn=50, true);
}
}
......@@ -752,13 +885,33 @@ module case_camera(x, y, z, visibility) {
case_camera_screwcylinder2(x+5, y+57, z-11, visibility);
case_camera_screwcylinder2(x+5, y+28, z-11, visibility);
/* Additional material */
translate([x, y+25.5, z-20]) color([0.4, 0.4, 0.4], visibility) cube([3.5, 5, 20]);
translate([x+1, y+55, z-20]) color([0.4, 0.4, 0.4], visibility) cube([2, 5, 20]);
translate([x+2, y+59, z-20]) color([0.4, 0.4, 0.4], visibility) cube([5, 2, 20]);
translate([x+92, y+55, z-20]) color([0.4, 0.4, 0.4], visibility) cube([2, 5, 20]);
translate([x+89, y+59, z-20]) color([0.4, 0.4, 0.4], visibility) cube([5, 2, 20]);
translate([x+92, y+2, z-20]) color([0.4, 0.4, 0.4], visibility) cube([2, 5, 20]);
translate([x+89, y+1, z-20]) color([0.4, 0.4, 0.4], visibility) cube([5, 2, 20]);
translate([x, y+25.5, z-20])
color([0.4, 0.4, 0.4], visibility)
cube([3.5, 5, 20]);
translate([x+1, y+55, z-20])
color([0.4, 0.4, 0.4], visibility)
cube([2, 5, 20]);
translate([x+2, y+59, z-20])
color([0.4, 0.4, 0.4], visibility)
cube([5, 2, 20]);
translate([x+92, y+55, z-20])
color([0.4, 0.4, 0.4], visibility)
cube([2, 5, 20]);
translate([x+89, y+59, z-20])
color([0.4, 0.4, 0.4], visibility)
cube([5, 2, 20]);
translate([x+92, y+2, z-20])
color([0.4, 0.4, 0.4], visibility)
cube([2, 5, 20]);
translate([x+89, y+1, z-20])
color([0.4, 0.4, 0.4], visibility)
cube([5, 2, 20]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment