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

Thumbnail Zoom Option #2435

Closed
wants to merge 2 commits into from

Conversation

Ocraftyone
Copy link
Contributor

Allows the user to specify if they would like to zoom in/out the thumbnail. While working on #2405, I had requests for this as small thumbnails on small screens were hard to see. This will allow more flexability for those edge cases while leaving other UX alone.

@Ocraftyone
Copy link
Contributor Author

Also @SoftFever, this will likely have merge conflicts with #2405. When you merge that, I should be able to resolve the conflicts pretty quickly

@SoftFever
Copy link
Owner

Hi @Ocraftyone
Do you have screenshots for comparison?
The thumbnail is automatically zoom-to-fit model's bounding box.
Zoom option is not necessary IMO

# Conflicts:
#	src/libslic3r/GCode.cpp
#	src/libslic3r/Preset.cpp
#	src/libslic3r/PrintConfig.cpp
#	src/slic3r/GUI/Tab.cpp
@Ocraftyone
Copy link
Contributor Author

Honestly, I have to agree that it will be/is a very niche option. The main reason I took it on was due the the conversation with @discip in #1894

@Ocraftyone
Copy link
Contributor Author

Zoom is done relative to the auto zoom-to-fit. This feature just allows for fine adjustment. It would mainly be useful for viewing small images on small displays

100% (standard):
image
image

120%:
image
image

@discip
Copy link
Contributor

discip commented Oct 17, 2023

@SoftFever

Zoom option is not necessary IMO

For most users this is absolutely true, but as @Ocraftyone already mentioned this is very helpful if you have only a small screen. Hope you don't mind implementing this. 🥺

thanks in advance

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can reduce the margin from 20% to 10% by reduce the factor from 0.1 to 0.05 in Ln5567 - Ln5572

@SoftFever
Copy link
Owner

SoftFever commented Oct 18, 2023

Hi @Ocraftyone @discip
I understand that it might be useful in specific scenarios. However, I'm quite certain that only a handful of people would ever need this, so I'd prefer not to add an option for it.

I'd also like to highlight that setting a zoom factor could lead to parts of the model being cropped in the thumbnail, depending on its geometric shape. We calculate the camera view based on the model's Axis-Aligned Bounding Box (AABB) rather than the tight bounding box in ISO view. Computing the latter requires more processing power and, in my opinion, isn't essential. This approach is why some models appear slightly smaller while others seem just right.

Currently, the thumbnail zooms to 20% larger than the actual bounding box of the model. We could reduce this to 10%, ensuring there's still a reasonable margin, which might benefit those using smaller screens. (refer to my comment in the code review view)

I hope you can understand my considerations.

@discip
Copy link
Contributor

discip commented Oct 18, 2023

@SoftFever
I understand what you mean.

Just one more thought:

Would it be too difficult to set the general zoom to fit the object based not on its bounding box but on the widest dimension (whether horizontal or vertical)?
Because there is so much wasted/empty area around the object.
In general, everyone would benefit from this, as owners of larger TFTs would of course also get more details. 😊

This one for example should be fittet based on the vertical dimensions.

image

And this one should be fittet based on the horizontal dimensions.

image

Or would that already mean the consumption of additional computing power?

@Ocraftyone
Copy link
Contributor Author

Are you saying more of a post processing to the image?

@discip
Copy link
Contributor

discip commented Oct 18, 2023

No, I mean adjusting the 'position of the camera' in relation to the object.

Post processing the image will decrease the quality of the image.

@SoftFever
Copy link
Owner

@SoftFever I understand what you mean.

Just one more thought:

Would it be too difficult to set the general zoom to fit the object based not on its bounding box but on the widest dimension (whether horizontal or vertical)? Because there is so much wasted/empty area around the object. In general, everyone would benefit from this, as owners of larger TFTs would of course also get more details. 😊

This one for example should be fittet based on the vertical dimensions.

image

And this one should be fittet based on the horizontal dimensions.

image

Or would that already mean the consumption of additional computing power?
That's basically what mean: calculate tight bounding box in ISO view

@discip
Copy link
Contributor

discip commented Oct 21, 2023

That's basically what mean: calculate tight bounding box in ISO view

Alright, besides proposing to reworking the zoom 'mechanics' I unfortunately have no idea how this could be achieved efficiently.

@Ocraftyone
Copy link
Contributor Author

Closing in favor of a different approach

@Ocraftyone Ocraftyone closed this Nov 9, 2023
@discip
Copy link
Contributor

discip commented Nov 9, 2023

@Ocraftyone
Oh, so this is still being worked on!

What exactly is the other approach?

@Ocraftyone
Copy link
Contributor Author

I believe the other approach would be to increase the default zoom like SoftFever mentioned. I plan to get around to this and finish looking into the BTT stuff when I am done with my project. I am currently working on updating wxwidgets and implementing using bitmap bundles.

@discip
Copy link
Contributor

discip commented Nov 9, 2023

Thanks for the update. Although I'm super curious to see the final result, there is absolutely no intention to push.

Thank you very much in advance! 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants