3D-bin-packing
3D-bin-packing copied to clipboard
Sorting error under multiple conditions?
The code below only works in the last line, right?
Should you write this when using multiple conditions for sort
self.items.sort(key=lambda item: (item.level item.loadbear)), reverse=False)
https://github.com/jerry800416/3D-bin-packing/blob/43793860f0a75f1553e6cbf95d43bb3862725e51/py3dbp/main.py#LL497C7-L501C68
`
self.items.sort(key=lambda item: item.loadbear, reverse=True)
self.items.sort(key=lambda item: item.level, reverse=False)
`
@woshisj Thank you very much, this problem will be fixed in the next version.