I'm new to OpenSCAD. I'm trying to create a basic triangular wedge which is going to be part of a larger component. But I'm already running into trouble. Using the following code I get the points in the correct spots; however, it seems the faces are kind of "bent inward." In other words the faces of the polyhedron don't fill in all the way.
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]
]
);
Here are some screenshots from different angles to illustrate what I mean by "bent inward":
What have I done wrong?
look here: 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
correct faces e.g.:
faces = [
[1,3,2,0],
[2,3,5,4],
[1,5,3],
[0,2,4],
[0,4,5,1]
]