広告
雑多なこと
- 2014年バージョンではpointsなどの配列に新しい要素を追加できない
- 新しいバージョンではconcatという関数でできるようになるらしい
- 同じ変数を複数回定義すると「undef」(数値的には0)になる。
- 角にアールがついたブロックを作るのに便利な関数
- minkowski
- 厚さも変わってしまうので注意
rBox(20,10,10,2);
module rBox(x,y,z,r,res=100,center=false){
minkowski(){
cube(size = [x-2*r,y-2*r,z-2*r],$fn=res,center=center);
cylinder(r=r,h=r,$fn=res,center=center);
}
}
- hull
- 楕円柱
- 円柱をresizeで潰す
ellipseCylinder(10,20,5,res=200,center=true);
module ellipseCylinder(h,a,b,res=100,center=false){
resize([0,2*b,0])
cylinder(h = h, r = a,$fn=res,center=center);
}
- 元図形が残るミラー
- 2014年バージョンでは専用関数は無い。mirrorは元図形が残らない
- 有志が作ったモジュールがある
module copy_mirror(vec=[0,1,0])
{
children();
mirror(vec) children();
}
- 同様の手法でコピーもできる
copy([20,0,0])
cube([10,20,5], center = true);
module copy(vec=[0,0,0]){
children();
translate(vec) children();
}
広告
|