diff --git a/polyhedron_3d.py b/polyhedron_3d.py index 68298e6cd4ecf819bf01e6ab999fe4754937e379..f7281d653d1ea7fd329e31bb2923c8ba7b556774 100755 --- a/polyhedron_3d.py +++ b/polyhedron_3d.py @@ -224,7 +224,7 @@ class WavefrontObj(object): # we need at least 2 vertices to make an edge if len(vtxlist) > 1: # we can have more than one vertex per line - get adjacent pairs - self.edg.append(pairwise(vtxlist)) + self.edg.extend(pairwise(vtxlist, start=False)) def add_f(self, line): """Add face from parsed line""" diff --git a/tests/data/refs/polyhedron_3d__--show__edg__--obj__methane__--cw_wound__True.out b/tests/data/refs/polyhedron_3d__--show__edg__--obj__methane__--cw_wound__True.out new file mode 100644 index 0000000000000000000000000000000000000000..9bd5bdef00df2c2a3f41c8efd93de83209fc89a5 --- /dev/null +++ b/tests/data/refs/polyhedron_3d__--show__edg__--obj__methane__--cw_wound__True.out @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/tests/test_polyhedron_3d.py b/tests/test_polyhedron_3d.py index f4f810e18a1858a96728f2bb1352b18b631fa8dd..4c26ace05cdd1aaf1720c4b95a4906a89bb6c7cb 100644 --- a/tests/test_polyhedron_3d.py +++ b/tests/test_polyhedron_3d.py @@ -12,6 +12,7 @@ class Poly3DBasicTest(ComparisonMixin, TestCase): ('--show=fce', '--obj=cube', '--r1_ax=z', '--r1_ang=45', '--z_sort=max', '--cw_wound=True'), ('--show=edg', '--obj=oct', '--r1_ax=z', '--r1_ang=45', '--th=4', '--cw_wound=True'), ('--show=vtx', '--obj=methane', '--cw_wound=True'), + ('--show=edg', '--obj=methane', '--cw_wound=True'), ('--show=fce', '--obj=from_file', '--spec_file=great_stel_dodec.obj', '--cw_wound=True'), ] compare_file = 'svg/empty.svg'