mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 13:49:02 +08:00
Added check to see if a SceneNode has vertices before adding it
CURA-2460
This commit is contained in:
parent
3f9024aeff
commit
efd3fc3487
@ -74,7 +74,12 @@ class ThreeMFReader(MeshReader):
|
|||||||
# TODO: We currently do not check for normals and simply recalculate them.
|
# TODO: We currently do not check for normals and simply recalculate them.
|
||||||
mesh_builder.calculateNormals()
|
mesh_builder.calculateNormals()
|
||||||
mesh_builder.setFileName(file_name)
|
mesh_builder.setFileName(file_name)
|
||||||
node.setMeshData(mesh_builder.build().getTransformed(rotation))
|
mesh_data = mesh_builder.build().getTransformed(rotation)
|
||||||
|
|
||||||
|
if not len(mesh_data.getVertices()):
|
||||||
|
continue # This object doesn't have data, so skip it.
|
||||||
|
|
||||||
|
node.setMeshData(mesh_data)
|
||||||
node.setSelectable(True)
|
node.setSelectable(True)
|
||||||
|
|
||||||
transformations = root.findall("./3mf:build/3mf:item[@objectid='{0}']".format(entry.get("id")), self._namespaces)
|
transformations = root.findall("./3mf:build/3mf:item[@objectid='{0}']".format(entry.get("id")), self._namespaces)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user