広告
*雑多なこと [#of0dd9c7]
-2014年バージョンではpointsなどの配列に新しい要素を追加できない
--新しいバージョンではconcatという関数でできるようになるらしい
-角にアールがついたブロックを作るのに便利な関数
--[[minkowski:https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#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:https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#hull]]
-楕円柱
--円柱を[[resize:https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#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:https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#mirror]]は元図形が残らない
--[[有志が作ったモジュールがある:http://forum.openscad.org/Wish-mirror-copy-true-td10681.html]]
 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();
 }

広告

リロード   差分   ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS