Page 1 of 2

Navigation Styles for TD - Phase 1

Posted: Fri Jun 17, 2022 12:10 am
by wandererfan
If you are able to build your own FreeCAD, I would appreciate your help in testing the first phase of implementing navigation styles in TechDraw.

This phase implements pan and zoom functions for the 10 existing navigation styles. Selection is unchanged - LMB for single selection, CNTL + LMB for multiple selection. Choice of navigation style is the same mechanism as the rest of FreeCAD.

A branch based on today's master is available here: https://github.com/WandererFan/FreeCAD/tree/navStyles

Known short comings:
- drag operations for Gesture style is not implemented as I have not yet figured out how to do drags on my laptop.
- operations using the ALT key in the Maya-Gesture style are untested as something is trapping these events in Linux Mint.
- mouse wheel zoom is always available, even if the style does not call for it.

Thanks for your help.

Re: Navigation Styles for TD - Phase 1

Posted: Fri Jun 17, 2022 10:46 am
by ToniTen
wandererfan wrote: Fri Jun 17, 2022 12:10 am - operations using the ALT key in the Maya-Gesture style are untested as something is trapping these events in Linux Mint.
I don't use Mint, I use Xubuntu, but maybe Cinnamon, the Mint default DE (if you're using a different DE, read that here), has the same thing as Xubuntu, where you can set a key to drag windows. I had it set to Alt myself and changes it to Super ("Windows" key)

Re: Navigation Styles for TD - Phase 1

Posted: Fri Jun 17, 2022 10:56 am
by user1234
I will test it, when i can compile FreeCAD again.


Greetings
user1234

Re: Navigation Styles for TD - Phase 1

Posted: Fri Jun 17, 2022 12:48 pm
by Kunda1
@wandererfan , if you make a PR to master I can generate experimental Snap builds for testers of said branch.

Re: Navigation Styles for TD - Phase 1

Posted: Fri Jun 17, 2022 2:01 pm
by wandererfan
Kunda1 wrote: Fri Jun 17, 2022 12:48 pm @wandererfan , if you make a PR to master I can generate experimental Snap builds for testers of said branch.
This sounds tasty. Does the PR need to be merged to master? I was hoping to have some other eyes on this before merging.

Re: Navigation Styles for TD - Phase 1

Posted: Fri Jun 17, 2022 2:23 pm
by wandererfan
Another known issue...

- RMB context menu is not working in Blender, CAD, Gesture, MayaGesture, OpenSCAD and Revit styles.

Re: Navigation Styles for TD - Phase 1

Posted: Sat Jun 18, 2022 12:32 am
by Kunda1
wandererfan wrote: Fri Jun 17, 2022 2:01 pm Does the PR need to be merged to master? I was hoping to have some other eyes on this before merging.
Nope. Just needs to be a PR (it can even be a draft pr)

Re: Navigation Styles for TD - Phase 1

Posted: Sat Jun 18, 2022 2:03 pm
by wandererfan
Kunda1 wrote: Sat Jun 18, 2022 12:32 am Nope. Just needs to be a PR (it can even be a draft pr)
issue #7047.

Thanks for this!

Re: Navigation Styles for TD - Phase 1

Posted: Sun Jun 19, 2022 12:11 am
by wandererfan
Thanks to Kunda1, we have a Snap version of this branch for testing. See Ubuntu_Snap for general instructions for using a Snap version. To get this branch, follow these instructions:
⭐ Snap package ready for this PR.
snap refresh freecad --channel=latest/edge/TD-NavStyles

To return to your regular Snap (depending on

snap refresh freecad --channel=stable
snap refresh freecad --channel=edge

Re: Navigation Styles for TD - Phase 1

Posted: Sun Jun 19, 2022 10:05 am
by balrobs
First of all thank you @wandererfan for your wonderful work on Techdraw :D
In order to support your effort I tested the PAN an ZOOM functions in the snap version ... here my report:
  • Blender style -> Pan ok, Zoom ok;
  • CAD style -> Pan ok, Zoom ok;
  • Gesture style on PC -> Pan ok, Zoom ok;
  • Maya style -> Pan ok, Zoom ok;
  • OpenCascade style -> Pan ok, Zoom somehow wierd (see note below);
  • Openinventor style -> Pan ok, Zoom ok;
  • OpenSCAD style -> Pan ok, Zoom ok;
  • Revit style -> Pan ok, Zoom ok;
  • Touchpad syle on PC -> Pan ok, Zoom ok;
  • TinkerCAD syle -> Pan ok, Zoom ok;
General note:
  • Using the Pan function I noticed that sometimes you can't move the page even if there is enough space on the canvas ... this seems to happen especially when the zoomed out page is very small in relation to the canvas.
  • In TD another mouse pointer is used for the Pan operation then outside TD [small flaw].
Note on OpenCascade style:
  • Trying to zoom with Crtl+LMB and moving the pointer around for a while sometime ends up with a wierd view position. While moving the pointer a view got disconected form the page and at the end of the operation his position was outside the page. I could see this behaviour mutiple times but unfortunatelly now I can't reproduce it any more.
Cheers :D

Code: Select all

OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.29182 +1 (Git) Snap 72
Build type: Release
Branch: (HEAD detached at e4395a4bb7)
Hash: e4395a4bb7c492d1520f269ed576001bdb9389ca
Python 3.8.10, Qt 5.15.3, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.2
Locale: English/United States (en_US)