|
広告 OpenSCADで三面図 その2continue form: [OpenSCADで三面図]
OpenSCADで単純に三面図を出すにはprojection() dist=5;
//translate([dist,dist]) rotate([-45,0,0]) sample();
trihedral_figure(dist) sample();
module sample(){
difference() {
cylinder (h = 4, r=1, center = true, $fn=100);
rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}
}
module trihedral_figure(dist){
translate([0,0,0]) projection(cut = false) children();
translate([0,dist,0]) projection(cut = false) rotate([90,0,0]) children();
translate([dist,0,0]) projection(cut = false) rotate([0,90,0]) children();
}
で三面図が出てくる (ただし、複雑な図形はもう少し手間を掛けないとならない)。しかし、寸法線は入らない。 前の記事に書いたdimlines.scadを使うと寸法線を入れることができるが、寸法線が3次元図形で書かれているため、DXFなどにエクスポートすることができない。 上の例(projection() 広告 |