【问题标题】:polyhedron in openSCAD yields "No top level geometry to render"openSCAD 中的多面体产生“没有要渲染的顶级几何图形”
【发布时间】:2014-05-06 15:42:00
【问题描述】:

我不明白为什么这个多面体会给我一个“没有要渲染的顶级几何图形”错误。所有三角形的方向都正确,“并列”视图仅显示黄色外表面。这是我的代码:

top_width=39;
bottom_width=51;
col_offset=6;
length=160;
height=40;
rows=10;
cols=40;
top_row_width=top_width/rows;
bottom_row_width=bottom_width/rows;
col_length=length/cols;
walls=0.4;

box();

module box(){
    polyhedron(
        points=[
            [ // point 0
                0,
                0,
                height
            ],[ // point 1
                length,
                0,
                height
            ],[ // point
                length,
                top_width,
                height
            ],[ // point 3
                0,
                top_width,
                height
            ],[ // point 4
                0,  
                0+col_offset,
                0
            ],[ // point 5
                length,
                0+col_offset,
                0
            ],[ // point 6
                length,
                bottom_width+col_offset,
                0
            ],[ // 7
                0,
                bottom_width+col_offset,
                0
            ]
        ],
        triangles=[
            [3,1,0],
            [3,2,1],
            [4,5,6],
            [4,6,7],
            [7,2,3],
            [6,2,7],
            [4,3,0],
            [4,7,3],
            [1,2,5],
            [1,2,5],
            [2,6,5],
            [0,1,5],
            [0,5,4]
        ]       
    );
}

任何提示都非常感谢,在此先感谢!

【问题讨论】:

    标签: openscad


    【解决方案1】:

    嗯,我也很困惑。最新版本的 OpenSCAD 支持用面代替三角形:

    面孔 = [ [0,3,2,1], [0,1,5,4], [1,2,6,5], [2,3,7,6], [0,4,7,3], [4,5,6,7] ]

    然后就可以了。

    您可以尝试在比这里更活跃的 OpenSCAD 论坛 http://forum.openscad.org/ 上提问。

    【讨论】:

      猜你喜欢
      • 2015-10-02
      • 1970-01-01
      • 1970-01-01
      • 2014-03-16
      • 2014-01-14
      • 1970-01-01
      • 1970-01-01
      • 2016-11-26
      • 1970-01-01
      相关资源
      最近更新 更多