powsybl-diagram icon indicating copy to clipboard operation
powsybl-diagram copied to clipboard

Stacking snake lines

Open flo-dup opened this issue 3 years ago • 1 comments

  • Do you want to request a feature or report a bug? Feature

  • What is the current behavior? There's always layoutParam.getVerticalSnakeLinePadding() between two consecutive snake lines between voltage levels, even if no crossing would occur.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem See the example of the tutorial, the two first snake lines above could be at the same ordinate, leading to a more compact diagram.

screenshot

  • What is the expected behavior? Two snake lines which do not overlap could be at the same ordinate,

  • What is the motivation / use case for changing the behavior? More compact diagram

  • Other information A way to do it could be to know which are the "slots" available, in fact it reminds me of the skyline problem, maybe the similarity could help finding a nice algorithm?

flo-dup avatar Feb 15 '22 22:02 flo-dup

There is an algo that does something similar for internCells in BlockPositionner:InternCellsLanes::arrangeLanes inspiration or reuse?

BenoitJeanson avatar Feb 16 '22 07:02 BenoitJeanson