如何让多面体在 OpenSCAD 中正确填充面?

How can I get a polyhedron to fill in faces properly in OpenSCAD?

我是 OpenSCAD 新手。我正在尝试创建一个基本的三角形楔形,它将成为更大组件的一部分。但我已经 运行 惹上麻烦了。使用下面的代码,我得到了正确位置的点;然而,这些面似乎有点 "bent inward." 换句话说,多面体的面并没有完全填满。

polyhedron(
    points = [
        [-0.3, 0.15, 0],
        [-0.4, 0.15, 0],
        [-0.3, 0.6, 0],
        [-0.4, 0.6, 0],
        [-0.3, 0.15, -0.7],
        [-0.4, 0.15, -0.7]
    ],
    faces = [
        [0,1,2,3],
        [2,3,4,5],
        [1,3,5],
        [0,2,4],
        [0,1,4,5]
    ]
);

下面是一些不同角度的截图来说明我的意思 "bent inward":

我做错了什么?

看这里:openscad documentation polyhedron

Point ordering for faces When looking at the face from the outside inwards, the points must be clockwise.

you can highlight wrong oreintated faces

正确的面孔例如:

faces = [
        [1,3,2,0],
        [2,3,5,4],
        [1,5,3],
        [0,2,4],
        [0,4,5,1]
    ]

如果将矩形区域分成 2 个三角形,则可以忽略顺时针方向要求。

polyhedron(
    points = [
        [-0.3, 0.15, 0],
        [-0.4, 0.15, 0],
        [-0.3, 0.6, 0],
        [-0.4, 0.6, 0],
        [-0.3, 0.15, -0.7],
        [-0.4, 0.15, -0.7]
    ],
    faces = [
        [0,1,2], [1,2,3], //break into 2 triangles
        [2,3,4], [3,4,5], //break into 2 triangles
        [1,3,5],
        [0,2,4],
        [0,1,4 ], [1,4,5] //break into 2 triangles
    ]
);