dbrgn / tangible

Tangible is a Python library to convert data into tangible 3D models.
Other
34 stars 4 forks source link

OpenSCAD Polyhedra: Use faces instead of triangles #13

Open dbrgn opened 9 years ago

dbrgn commented 9 years ago

Triangles for constructing polyhedra have been deprecated as of OpenSCAD 2014.04. Backend code should be upgraded.

dbrgn commented 6 years ago

Some examples stopped working.

$ python examples/rectangle_tower_2d.py
union()
{
    translate([0, 0, 0])
    {
        polyhedron(
points=[[3.0, 3.0, 0], [-3.0, 3.0, 0], [-3.0, -3.0, 0], [3.0, -3.0, 0], [5.0, 3.0, 10], [-5.0, 3.0, 10], [-5.0, -3.0, 10], [5.0, -3.0, 10]],
    triangles=[(0, 1, 2), (0, 2, 3), (4, 7, 6), (4, 6, 5), (0, 4, 5), (0, 5, 1), (1, 5, 6), (1, 6, 2), (2, 6, 7), (2, 7, 3), (3, 7, 4), (3, 4, 0)]
);
    };
    translate([0, 0, 10])
    {
        polyhedron(
points=[[5.0, 3.0, 0], [-5.0, 3.0, 0], [-5.0, -3.0, 0], [5.0, -3.0, 0], [3.0, 11.0, 10], [-3.0, 11.0, 10], [-3.0, -11.0, 10], [3.0, -11.0, 10]],
    triangles=[(0, 1, 2), (0, 2, 3), (4, 7, 6), (4, 6, 5), (0, 4, 5), (0, 5, 1), (1, 5, 6), (1, 6, 2), (2, 6, 7), (2, 7, 3), (3, 7, 4), (3, 4, 0)]
);
    };
};

First, make sure that the tests report this (probably need to install OpenSCAD on Travis), and then fix this in the backend.