Minor codestyle changes

This commit is contained in:
Jaime van Kessel 2016-09-26 12:55:17 +02:00
parent f3f1bf664a
commit d7cf65258f

View file

@ -47,7 +47,8 @@ class ThreeMFReader(MeshReader):
mesh_builder = MeshBuilder() mesh_builder = MeshBuilder()
node = SceneNode() node = SceneNode()
vertex_list = [] vertex_list = []
#for vertex in entry.mesh.vertices.vertex:
# for vertex in entry.mesh.vertices.vertex:
for vertex in entry.findall(".//3mf:vertex", self._namespaces): for vertex in entry.findall(".//3mf:vertex", self._namespaces):
vertex_list.append([vertex.get("x"), vertex.get("y"), vertex.get("z")]) vertex_list.append([vertex.get("x"), vertex.get("y"), vertex.get("z")])
Job.yieldThread() Job.yieldThread()
@ -114,13 +115,13 @@ class ThreeMFReader(MeshReader):
group_decorator = GroupDecorator() group_decorator = GroupDecorator()
result.addDecorator(group_decorator) result.addDecorator(group_decorator)
elif len(objects) == 1: elif len(objects) == 1:
result = result.getChildren()[0] # Only one object found, return that. result = result.getChildren()[0] # Only one object found, return that.
except Exception as e: except Exception as e:
Logger.log("e", "exception occured in 3mf reader: %s", e) Logger.log("e", "exception occured in 3mf reader: %s", e)
try: # Selftest - There might be more functions that should fail try: # Selftest - There might be more functions that should fail
boundingBox = result.getBoundingBox() bounding_box = result.getBoundingBox()
boundingBox.isValid() bounding_box.isValid()
except: except:
return None return None