Koodi:
use <MCAD/shapes.scad>
//$fa=100;
//$fs=1;
//keskiön pää
//dodecagon(30, 100);
//color("black")
//cylinder (20, r = 18, center = true);
//polkimen pää
//translate([175,0,20]){
//cylinder (100, r = 7.14 , center = true);
//color("black")
//translate([0,0,0])
//cylinder (10, r = 9, center = true);
//}
union(){
//module right_piece(){
hull() {
// from heart of bottom_piece to end of right_piece = 35mm
//polkimen pää
translate([160,0,20]) {
rotate([0,0,0])
cube(size=[1,25,10], center=true);
}
// right_piece thickness at begin right_piece is 10mm
// right_piece thickness at end is 5mm
translate([35,0,0])
rotate([0,0,0])
cube(size=[1,36,15], center=true);
}
//}
//right_piece();
//akselin pääty ja pyöristys
difference(){
difference(){
translate([-10,0,0])
color("red")
cube(size=[20,36,15], center=true);
dodecagon(30, 100);}
//tube2(height, ID, OD, center = false);
tube2(30, 40, 60, center = true);
}
difference(){
translate([15,0,0])
cube(size=[40,36,15], center=true);
dodecagon(30, 100);}
//polkimen pääty ja pyöristys
//difference(){
difference(){
translate([170,0,20])
cube(size=[20,25,10], center=true);
translate([180,0,20])
cylinder (100, r = 7.14 , center = true);}
difference(){
difference(){
translate([185,0,20])
color("red")
cube(size=[10,25,10], center=true);
translate([177.86,0,20])
// cylinder (100, r = 7.14 , center = true);
// translate([180,0,20])
tube2(100, 25, 35, center = true);
}
translate([180,0,20])
cylinder (100, r = 7.14 , center = true);
}
}
Kirjanmerkit