remove sorting of geometry objects

这个提交包含在:
jasminium
2019-09-04 17:06:32 +01:00
父节点 cb63366361
当前提交 b46265fcf9

查看文件

@@ -61,10 +61,14 @@ class Scene:
# to build in the correct subgrid. # to build in the correct subgrid.
sg = sg_cmd.subgrid sg = sg_cmd.subgrid
self.process_cmds(sg_cmd.children_multiple, sg) self.process_cmds(sg_cmd.children_multiple, sg)
self.process_cmds(sg_cmd.children_geometry, sg) self.process_cmds(sg_cmd.children_geometry, sg, sort=False)
def process_cmds(self, commands, grid, sort=True):
if sort:
cmds_sorted = sorted(commands, key=lambda cmd: cmd.order)
else:
cmds_sorted = commands
def process_cmds(self, commands, grid):
cmds_sorted = sorted(commands, key=lambda cmd: cmd.order)
for obj in cmds_sorted: for obj in cmds_sorted:
# in the first level all objects belong to the main grid # in the first level all objects belong to the main grid
uip = create_user_input_points(grid) uip = create_user_input_points(grid)
@@ -117,7 +121,7 @@ class Scene:
G.initialise_grids() G.initialise_grids()
# Process the main grid geometry commands # Process the main grid geometry commands
self.process_cmds(self.geometry_cmds, G) self.process_cmds(self.geometry_cmds, G, sort=False)
# Process all the commands for the subgrid # Process all the commands for the subgrid
self.process_subgrid_commands(G.subgrids) self.process_subgrid_commands(G.subgrids)