powsybl-diagram
powsybl-diagram copied to clipboard
Stacking snake lines
-
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.
-
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?
There is an algo that does something similar for internCells in BlockPositionner:InternCellsLanes::arrangeLanes inspiration or reuse?