-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Objects sometimes translate when flipping #1495
Comments
It is in fact grid aligning. Not sure if not doing that is better or worse. I did it to avoid floating point problems. I could however just snap the point to int to achieve the same. |
Hm.. I think the safest thing would be not rounding at all here. Any floating point errors will be tiny since it's all double precision. Also, rounding the center point to integer before flipping could introduce 1 unit offsets, in the same way as my example does, which would be difficult to see. |
Well it might turn integer plane plane points into float, which I'd prefer to avoid. |
How about rounding the bounding box min/max points to integers before taking the center point? This will give a center point that is either integer, or an integer +/- 0.5. Those should be safe floating-point values; 0.5 is not a repeating fraction in binary like 0.1 is. I've got a PR for this I'm just polishing up. |
Fixed now that #1500 is merged |
Not snapping the center point gives undesirable behaviour when part of the selection bbox is off-grid, and the selection contains on-grid vertices (which will be moved off grid). This reverts the fix for #1495
* 1889: Restore grid snapping of flip center. Not snapping the center point gives undesirable behaviour when part of the selection bbox is off-grid, and the selection contains on-grid vertices (which will be moved off grid). This reverts the fix for #1495 * 1889: snap flip center to 1/2 the grid size instead of the actual grid This will avoid reintroducing #1495
The brushes have been translated a bit on the X axis. Is TB grid-aligning the center point of the entire selection before flipping it?
It might be better if things didn't shift like this when flipping.
The text was updated successfully, but these errors were encountered: