mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-19 04:09:40 +08:00
Merge pull request #19961 from pskowronskiTDx/tdx-integration
Final touches for the CoR visualization
This commit is contained in:
commit
5de3fe6368
@ -17,7 +17,7 @@ class NavlibClient(pynav.NavlibNavigationModel):
|
||||
self._was_pick = False
|
||||
self._hit_selection_only = False
|
||||
self._picking_pass = None
|
||||
self._pivot_node = OverlayNode(node=SceneNode(), image_path=Resources.getPath(Resources.Images, "3dx_pivot.png"), size=3.)
|
||||
self._pivot_node = OverlayNode(node=SceneNode(), image_path=Resources.getPath(Resources.Images, "cor.png"), size=2.5)
|
||||
|
||||
def pick(self, x, y, check_selection = False, radius = 0.):
|
||||
|
||||
@ -70,8 +70,8 @@ class NavlibClient(pynav.NavlibNavigationModel):
|
||||
from UM.Qt.QtApplication import QtApplication
|
||||
main_window = QtApplication.getInstance().getMainWindow()
|
||||
|
||||
x_n = 2. * main_window._mouse_x / self._scene.getActiveCamera().getViewportWidth() - 1.
|
||||
y_n = 2. * main_window._mouse_y / self._scene.getActiveCamera().getViewportHeight() - 1.
|
||||
x_n = 2. * main_window._mouse_x / main_window.width() - 1.
|
||||
y_n = 2. * main_window._mouse_y / main_window.height() - 1.
|
||||
|
||||
if self.get_is_view_perspective():
|
||||
self._was_pick = True
|
||||
@ -226,8 +226,6 @@ class NavlibClient(pynav.NavlibNavigationModel):
|
||||
camera_position = active_camera.getWorldPosition()
|
||||
dist = (camera_position - self._pivot_node.getWorldPosition()).length()
|
||||
scale = dist / 400.
|
||||
if scale < 1.:
|
||||
scale = scale * scale
|
||||
else:
|
||||
view_width = active_camera.getViewportWidth()
|
||||
current_size = view_width + (2. * active_camera.getZoomFactor() * view_width)
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
BIN
resources/images/cor.png
Normal file
BIN
resources/images/cor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
Loading…
x
Reference in New Issue
Block a user