Skip to content
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

Avoid recentering viewport if the bounding box is max size 0 #3591

Merged
merged 1 commit into from
Dec 16, 2016

Conversation

lordofhyphens
Copy link
Member

@lordofhyphens lordofhyphens commented Nov 27, 2016

Defensive coding - fix provided by @jreinam

Fixes #3589

@alranel
Copy link
Member

alranel commented Nov 27, 2016

Oh thank you, I had already implemented another fix in the mean time. zoom_to_bounding_box should be never called on an empty bounding box.

@alranel alranel closed this Nov 27, 2016
@lordofhyphens lordofhyphens deleted the 3589-viewport-divide-by-zero branch November 27, 2016 17:50
@lordofhyphens
Copy link
Member Author

Works for me, I'll close the related issue then.

@lordofhyphens lordofhyphens restored the 3589-viewport-divide-by-zero branch November 28, 2016 02:42
@lordofhyphens
Copy link
Member Author

Perhaps we should merge this in to cover the situation? We could be chasing down marginal cases for weeks.

@lordofhyphens
Copy link
Member Author

Apparently it still is in a few cases.

@lordofhyphens
Copy link
Member Author

I think this is necessary for defensive coding (avoid crashes). Alternative I think is to invent a flag to not trigger the draw/update until slicing is complete, but if your BB is zero/invalid it amounts to the same thing, doesn't it?

@alranel alranel merged commit 7472077 into slic3r:master Dec 16, 2016
@lordofhyphens lordofhyphens deleted the 3589-viewport-divide-by-zero branch November 6, 2018 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Division by zero when chaning to spiralize mode
2 participants