Repository navigation
Replies: 1 comment 1 reply
|
@Elkniwt good idea, and you found the right place. Equal gaps now also spreads parts between the outer two when they're longer than the room there: the gap just becomes negative, so nested shapes can be spaced evenly. The status bar shows the negative gap. It's built and comes with the next update. I kept the check for parts on a board or on the plate (lines 169 and 185), since they'd stick out over the edge there. One thing to know: if one shape is longer than all the others in that direction and encloses them, it counts as the board. Parts stacked exactly on one spot still get the message, because nothing would move. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, the Align operation can perform "Equal Gaps" with that small icon near the middle dot, but it won't do so if there's not enough room to fit all the parts with some space in between. However, on one occasion, I had objects that sort of curved around and nested within one another and I wanted to nest them evenly. Their shape didn't allow for them to have gaps between them in a strict sense, but like nested cups or matryoshka dolls, they wouldn't even intersect one another if they were simply evenly spaced. If you were to add up all the selected objects' extents in the given direction, subtract the sum from the current min/max in that direction, and divide the result by number of shapes minus one, even if the result is negative, it can be used as the offset from the end of one shape to the beginning of the next. There's no need to refuse the operation. The user can just undo if it is not to their liking.
I think, if lines 169 and 177 of alignDistribute.ts were removed / commented out, this ability could be achieved. I'm uncertain about line 185, because I'm not too familiar with the source (or the programming language).
All reactions