代码之家  ›  专栏  ›  技术社区  ›  Mohammed

如何在OpenSCAD中放置对象(使其与Z轴齐平以进行3d打印)

  •  0
  • Mohammed  · 技术社区  · 4 年前

    如果你想3D打印一些东西,那么你必须确保你的物体在所有轴的正侧。你不能让一个物体穿过负Z轴,否则它在打印机床上就不合适了(我认为)。那么,我如何切割超出Z轴的额外部分呢?

    1 回复  |  直到 4 年前
        1
  •  2
  •   George Menoutis    4 年前

    我觉得这个问题很奇怪。无论openSCAD功能如何,切片器都应该允许您将对象与打印地板对齐,甚至可以将其放置在您选择的表面上,甚至可以手动“淹没”它,使其只打印打印地板的一部分。

        2
  •  1
  •   rmlockerd    3 年前

    如果你的意思是切断底部, 一种通用的方法是:

    cutOutBottom(MAX_HEIGHT=20) sphere(10);
     
    module cutOutBottom(MAX_HEIGHT) {
      intersection()
      {
         children();
         
         linear_extrude(MAX_HEIGHT)  
         projection()
         children();
      }    
    }
    
        3
  •  1
  •   Joe Eifert    3 年前

    我为此给自己写了一个模块。

    module cut_off_bottom(max_size = 100)
    {
        difference(){
            children();
            translate([-0.5 * max_size, -0.5 * max_size, -max_size])
                cube([max_size, max_size, max_size]);
        }
    }
    
    

    这是不言自明的。如果需要,您还可以增加默认的最大对象大小。

    请按如下方式称呼它:

    cut_off_bottom() yourobject;
    
        4
  •  0
  •   Mohammed    4 年前

    我发现一个好的方法是创建一个长方体,使其从零Z轴高度开始,然后到达负Z轴高度。然后,如果将其与对象区分开来,则超出Z轴的额外部分将与Z平面齐平。

    difference(){
    rock_with_hole();
    // This is to floor the object at the floor (z axis plane is the floor)
    translate([0,0,-flooring]){
        cube([200, 200,flooring]);
    
        }
    }
    

    enter image description here

    enter image description here

    enter image description here 最终产品