模型墙使用差异在scad文件中消失

时间:2019-04-18 15:07:47

标签: rendering render cad openscad

在SCAD中,我有一个圆形的盒子,里面有一个空腔,我想在前面开一个孔。我所做的工作有效...当我渲染它( F6 )时,它可以工作。预览( F5 )时,它缺少墙壁。我不知道如何正确预览它,或者模型本身现在已经搞砸了。

module rounded_box() {
    union(){
        translate([0,0,5]) {
            linear_extrude(height = 25, twist = 0, slices = 100) {
                difference() {
                    offset(r = 10) {
                        square([20, 50], center = true);
                    }
                    offset(r = 6) {
                        square([20,50], center = true);
                    }
                }
             }
         }

         translate([0, 0, 0]) {
             linear_extrude(height=5, slices=10) {
                 offset(r = 10) {
                     square([20, 50], center = true);
                 }
             }
         }
    }
}

module plug_hole() {
    translate([0, -30, 10]){
        rotate([90, 90, 0]){
            linear_extrude(height=6, slices=100){
                square([5, 10], center=true);
            }
        }
    }
}

difference(){
    rounded_box();
    plug_hole();
}

预览:

enter image description here

渲染:

enter image description here

0 个答案:

没有答案