chiark / gitweb /
Properly check the v1/2/3 tag, else we have issues with faces with normals.
authordaid303 <daid303@gmail.com>
Mon, 28 Jan 2013 12:37:03 +0000 (13:37 +0100)
committerdaid303 <daid303@gmail.com>
Mon, 28 Jan 2013 12:37:03 +0000 (13:37 +0100)
Cura/util/meshLoaders/amf.py

index 30a950c376c3438afb759ee667185734aba874f0..61a28b585eb995bb971faf7cfb6cd1a22b6bf6cb 100644 (file)
@@ -67,8 +67,9 @@ class amfModel(mesh.mesh):
                                for volume in mesh.iter('volume'):
                                        for triangle in volume.iter('triangle'):
                                                for t in triangle:
-                                                       v = vertexList[int(t.text)]
-                                                       self.addVertex(v[0], v[1], v[2])
+                                                       if t.tag == 'v1' or t.tag == 'v2' or t.tag == 'v3':
+                                                               v = vertexList[int(t.text)]
+                                                               self.addVertex(v[0], v[1], v[2])
 
                self.vertexes *= scale
                self._postProcessAfterLoad()