关闭 scad 对象顶部和底部的孔

Closing hole in top and bottom of scad object

如何在 scad 对象中创建关闭或打开顶面的选项?

我知道我可以更改 ID=0 但这会导致长度发生变化。我想要相同长度和构造的对象我只想创建一个选项来打开或关闭顶面和底面。

scad 库文件可以在这里找到。 Scad File

use <SnapConnectorLibrary.scad>
   
annularMale(length=10, ID=4.0, OD=4.5, baseRatio=1.35, toothDistanceFromEnd=0, toothMinWallThickness=0.5, tooth="ridge", toothLength=1.5,toothHeight=0.3, baseRelief=true, reliefRadius = 1, ridgeToothRatio = 0.75, toothOut = false);

我想要打开或关闭的顶面和底面的图像。

我想你可以用圆柱体填充零件的内部。 本意是不修改库。

use <SnapConnectorLibrary.scad>
   
union(){
   cylinder(h = 10, r = 4.0, $fn = 180);


   annularMale(length               = 10.00, 
               ID                   =  4.00, 
               OD                   =  4.50, 
               baseRatio            =  1.35, 
               toothDistanceFromEnd =     0, 
               toothMinWallThickness=  0.50, 
               tooth                = "ridge", 
               toothLength          =  1.50,
               toothHeight          =  0.30, 
               baseRelief           =  true, 
               reliefRadius         =  1.00, 
               ridgeToothRatio      =  0.75, 
               toothOut             = false);
}