Back to community
Completed

Rotating and Flipping BSP Trees

M
marvelphOP

Auto Flow creates BSP trees, but the current operations only swap elements while preserving the tree structure.
Would it be possible to add the following transformations to the entire tree?

Rotate — cycle the layout in 90-degree increments (0° → 90° → 180° → 270°)
Flip — mirror the layout horizontally or vertically

Replies5

WrapperDeveloper

Thanks for the suggestion. Could you share when this function would typically be used?

M
marvelphOP

There are two scenarios.

First, there are cases where you want to temporarily switch between height-first and width-first layouts.
Suppose the window is split horizontally into two sections, with the right side further split vertically. If you want to switch to a layout where the window is split vertically and the bottom section is split horizontally, this would effectively be a 90-degree rotation.
It is not easy to achieve this by toggling between moving the window up, down, left, or right and changing the split direction.

The second scenario involves correcting a situation where a new window has resulted in an unintended split.
For example, if a new window has split the vertical side opposite to the intended side in a left-right split, and you want to swap the left and right sides, this would be equivalent to a horizontal flip.

WrapperDeveloper

updated in v0.14.8

M
marvelphOP

@1050424691510222908
Thank you.
I gave it a try, and I think it works well.
Am I correct in understanding that the flip applies to the current BSP, while the rotation applies to the root BSP?

WrapperDeveloper

yes, that's how it was designed

Open in Discord