3D-bin-packing icon indicating copy to clipboard operation
3D-bin-packing copied to clipboard

Sorting error under multiple conditions?

Open woshisj opened this issue 1 year ago • 1 comments

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 avatar May 09 '23 08:05 woshisj

@woshisj Thank you very much, this problem will be fixed in the next version.

jerry800416 avatar Aug 01 '23 03:08 jerry800416