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

reset_camera=Camera.CENTER doesn't center #139

Open
voneiden opened this issue Dec 29, 2024 · 1 comment
Open

reset_camera=Camera.CENTER doesn't center #139

voneiden opened this issue Dec 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@voneiden
Copy link

Python: 3.12
ocp_vscode: 2.6.1

Running on Wayland.

from build123d import Box, BuildPart
from ocp_vscode import Camera, show_all

with BuildPart() as part_builder:
    Box(10, 10, 10)

show_all(reset_camera=Camera.CENTER)

When running the code twice, I get the following output with the box half clipped outside of the view

clip

I poked around a bit and my first impression is that if I move this line

_target = (reset_camera === "keep") ? _target : center;
up above before p is defined the box will end up in a better position, but it's still not quite centered:
clip2

I've tested some previous versions and looks like in 2.3.3 it works as expected and the box is perfectly centered.

@bernhard-42 bernhard-42 added the bug Something isn't working label Feb 13, 2025
@bernhard-42
Copy link
Owner

It was a bit more complex to fix, but thanks for looking into it.
The fix will be part of the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants