2017-10-18 73 views
0

我在想如何避免openscad中两个对象之间的尖角。使用openscad对象之间的尖角平滑

MWE: 我有下面的代码给出了圆柱体和球体之间的尖角。

sphere (r=0.3, $fn=50); 

rotate([90,0,0]) 
{ 
cylinder (h=2, r=0.1, center=true, $fn=20); 
} 

rotate([0,90,0]) 
{ 
cylinder (h=2, r=0.1, center=true, $fn=20); 
} 

我在找什么?

它是一个连接圆柱体和球体的'360度三维弧形'。像一个扩大的列。

我尝试了其他几种使用minkowski()函数的组合(下面的代码),但与球体有关的柱面末端永远不会平滑。

module draw(){ 
sphere (r=0.3, $fn=50); 

rotate([90,0,0]) 
{ 
cylinder (h=2, r=0.1, center=true, $fn=20); 
} 

rotate([0,90,0]) 
{ 
cylinder (h=2, r=0.1, center=true, $fn=20); 
} 

} 

minkowski(){ 
draw(); 
sphere(0.01); 
} 

请问谁能给我一个提示。

回答

0

一些负面甜甜圈怎么样?

sphere (r=0.3, $fn=50); 

rotate([90,0,0]) 
    cylinder (h=2, r=0.1, center=true, $fn=20); 
rotate([0,90,0]) 
    cylinder (h=2, r=0.1, center=true, $fn=20); 

for(r = [0 : 90 : 270]) 
    rotate([90,0,r]) negative_donut(); 

module negative_donut() { 
    difference(){ 
     translate([0, 0, 0.3]) donut(0.1,0.05); 
     translate([0, 0, 0.345]) donut(0.2,0.1); 
    }  
} 

module donut(r1, r2){ 
    rotate_extrude($fn=50) 
    translate([r1, 0, 0]) 
    circle(r = r2);  
} 

enter image description here 我直勾勾的大小和距离,所以你可能在数学改善这里。