mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:39:03 +08:00
Fix to grouped one at a time
This commit is contained in:
parent
03ca7142d5
commit
453047df1f
@ -35,7 +35,6 @@ class OneAtATimeIterator(Iterator.Iterator):
|
||||
for a in range(0,len(node_list)):
|
||||
for b in range(0,len(node_list)):
|
||||
if a != b and self._hit_map[a][b] and self._hit_map[b][a]:
|
||||
print("Derp")
|
||||
return
|
||||
|
||||
# Sort the original list so that items that block the most other objects are at the beginning.
|
||||
|
@ -120,7 +120,7 @@ class CuraEngineBackend(Backend):
|
||||
children = node.getAllChildren()
|
||||
children.append(node)
|
||||
for child_node in children:
|
||||
if type(child_node) is SceneNode and node.getMeshData() and node.getMeshData().getVertices() is not None:
|
||||
if type(child_node) is SceneNode and child_node.getMeshData() and child_node.getMeshData().getVertices() is not None:
|
||||
temp_list.append(child_node)
|
||||
object_groups.append(temp_list)
|
||||
else:
|
||||
@ -169,12 +169,12 @@ class CuraEngineBackend(Backend):
|
||||
#print("Iterator time! ", OneAtATimeIterator(self._scene.getRoot()))
|
||||
#for item in OneAtATimeIterator(self._scene.getRoot()):
|
||||
# print(item)
|
||||
center = Vector()
|
||||
print("Start sending objects to engine")
|
||||
for group in object_groups:
|
||||
print("Start sending group")
|
||||
group_message = slice_message.object_lists.add()
|
||||
for object in group:
|
||||
center += object.getPosition()
|
||||
|
||||
print("Added object to group")
|
||||
mesh_data = object.getMeshData().getTransformed(object.getWorldTransformation())
|
||||
|
||||
obj = group_message.objects.add()
|
||||
@ -192,7 +192,7 @@ class CuraEngineBackend(Backend):
|
||||
#obj.indices = meshData.getIndicesAsByteArray()
|
||||
|
||||
self._scene.releaseLock()
|
||||
print("sending slice message")
|
||||
print("Message completed. Sending...")
|
||||
self._socket.sendMessage(slice_message)
|
||||
|
||||
def _onSceneChanged(self, source):
|
||||
|
Loading…
x
Reference in New Issue
Block a user