elk icon indicating copy to clipboard operation
elk copied to clipboard

Box layout does not take padding into account.

Open soerendomroes opened this issue 3 years ago • 3 comments

Box layout does try to optimize a rectangle packing depending on the desired aspect ratio. However, it does not take the padding into account, which may result in ONO packings. Screenshot from 2022-08-31 09-28-07 (Rectangles should be drawn next to each other instead of under each other)

soerendomroes avatar Aug 31 '22 07:08 soerendomroes

can u give more information on this

Harsha19-08 avatar Sep 24 '23 05:09 Harsha19-08

The algorithm tries to create a packing with a certain aspect ratio. If however, the bottom padding is very high and all other paddings are zero, this does bot change the outcome and the rectangles are still packed on top of each other instead of next to each other to safe space.

I try to link a model for this but basically, the packing is only a very high strip.

soerendomroes avatar Sep 26 '23 05:09 soerendomroes

Here is an example using left padding.

soerendomroes avatar Sep 28 '23 07:09 soerendomroes