[ Fixed ] Snap cycling only works if X coord input has the focus?

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

[ Fixed ] Snap cycling only works if X coord input has the focus?

Post by Roy_043 »

For some reason snap cycling (see Draft_Snap) does not work if Length input (f.e. if you use the Draft_Line command) has the focus.
There is a preference to change the default focus to that input box:
Edit → Preferences... → Draft → General settings → Draft tools options → Set focus on Length instead of X coordinate
You need to select this if you want to test. If Length input has the focus the shortcut is 'sent' to that input box instead.

The same issue occurs if you Draft_Constrain using the "Y" option f.e.

It seems that only if the focus is on the X coord input box that snap cycling works.

Code: Select all

OS: Windows 8.1 (6.3)
Word size of FreeCAD: 64-bit
Version: 0.20.25220 (Git)
Build type: Release
Branch: master
Hash: 46282db7c8c65d1205a4cd03499d4beadb1573c6
Python version: 3.8.10
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: Dutch/Netherlands (nl_NL)
Last edited by Roy_043 on Mon Oct 25, 2021 5:13 pm, edited 1 time in total.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [ Bug ] Snap cycling only works if X coord input has the focus?

Post by thomas-neemann »

Roy_043 wrote: Thu Jul 29, 2021 7:56 am .... Set focus on Length instead of X coordinate....
i have never used / needed this setting. what is it for ?

During my search I came across this:


https://forum.freecadweb.org/viewtopic. ... 23&t=36136
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [ Bug ] Snap cycling only works if X coord input has the focus?

Post by thomas-neemann »

Roy_043 wrote: Thu Jul 29, 2021 7:56 am
apparently this option saves a click of the mouse. I can not find any problem with me. I probably didn't understand something correctly. can you make a video of it?
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Snap cycling only works if X coord input has the focus?

Post by Roy_043 »

Some users like to create geometry by entering X and Y coordinates, others prefer Length and Angle input. The "Set focus on Length instead of X coordinate" preference is intended for the latter users. It indeed saves a mouse click. But that preference is not what this topic is about.

To test the problem:
Note: "Set focus on Length instead of X coordinate" is off.
  1. Open the attached document.
  2. Make sure only Draft_Snap_Midpoint and Draft_Snap_Center are activated.
  3. Start the Draft_Line command.
  4. For the first point snap to the center of the magenta circle.
  5. Press Y to constrain the direction
  6. Move the pointer over the yellow line (this is the first line in the document).
  7. Notice that the midpoint of the yellow line is detected.
  8. Press ` (reverse quote) to cycle snapping
  9. Result: the ` input ends up in the Y input box.
  10. Cancel the command.
  11. Again start the Draft_Line command.
  12. For the first point snap to the center of the white circle.
  13. Move the pointer over the yellow line.
  14. Again the midpoint of the yellow line is detected.
  15. Press ` (reverse quote) to cycle snapping.
  16. Move the pointer by a tiny amount but stay on the yellow line.
  17. Result: the midpoint of of the green line is detected.
  18. Repeat the cycling to find the midpoint of the red line.
  19. Cycle again to return to the yellow line.
Attachments
snap-cycling.FCStd
(12.63 KiB) Downloaded 37 times
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [ Bug ] Snap cycling only works if X coord input has the focus?

Post by thomas-neemann »

Roy_043 wrote: Sat Jul 31, 2021 4:34 pm
I can confirm. In my opinion, however, it only makes sense if, for example, you want to keep the y value of the captured point and want to change the x value manually, then also press x to jump to the input field. this could save auxiliary constructions. nice function.
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [ Bug ] Snap cycling only works if X coord input has the focus?

Post by thomas-neemann »

Roy_043 wrote: Sat Jul 31, 2021 4:34 pm
Snap cycling seems to be meant for something else. for catching hidden elements. I haven't done that yet. not even if I switch my tastaur to english and press the corresponding button. but it doesn't seem important to me, because you can hide something like that.

1.png
1.png (8.95 KiB) Viewed 1872 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Snap cycling only works if X coord input has the focus?

Post by Roy_043 »

Thomas, I have worked on that page. "Obscured" does not mean "hidden" (as in: Visibility is false) in this case. But I'll revise the text to make things clearer.

You can change the shortcut for cycling:
Edit → Preferences... → Draft → User interface settings → In-Command Shortcuts
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [ Bug ] Snap cycling only works if X coord input has the focus?

Post by thomas-neemann »

Roy_043 wrote: Sat Jul 31, 2021 7:36 pm Thomas, I have worked on that page. "Obscured" does not mean "hidden" (as in: Visibility is false) in this case....
OK thanks. is there an example that shows what it is used for?
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Snap cycling only works if X coord input has the focus?

Post by Roy_043 »

Imagine an outline of a room with a column (see the image). If the outline of the room was created first there is no way to snap to the midpoint of the line of the column obscured by the room outline, unless you use snap cycling (or make the room outline invisible).

Image:
Top: without snap cycling.
Bottom: after pressing the cycle key once and moving the pointer a little.
Attachments
snap-cycling.png
snap-cycling.png (7.8 KiB) Viewed 1771 times
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [ Bug ] Snap cycling only works if X coord input has the focus?

Post by thomas-neemann »

Roy_043 wrote: Sun Aug 01, 2021 8:55 am
thanks for the hint. that's how I had imagined it, but it doesn't work for me. will try it with windows and report here.

Greetings Thomas


edit

under windows it doesn't work for me either.
this is not a problem because it does not result in any unnoticed faulty geometries.
you know how to hide parts in the foreground in order to catch those lying behind.



when trying to change the settings, freecad is frozen.
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Post Reply