[Solved] Sometimes snap doesn't work straight away

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
thomas-neemann
Veteran
Posts: 11895
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

[Solved] Sometimes snap doesn't work straight away

Post by thomas-neemann »

sometimes snap doesn't work straight away, I was able to reproduce it today. here is an example.
1021.FCStd
(6.47 KiB) Downloaded 37 times

OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.26375 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 8a6e3d1)
Hash: 8a6e3d1b766a34546806b22d750929c2d00e30a6
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)


https://www.youtube.com/watch?v=SqLxPrHibCI


phpBB [video]
Last edited by thomas-neemann on Thu Nov 25, 2021 4:28 pm, edited 3 times in total.
Gruß Dipl.-Ing. (FH) Thomas Neemann

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

Re: Sometimes snap doesn't work straight away

Post by Roy_043 »

Draft_Snap_Parallel has this issue:
https://forum.freecadweb.org/viewtopic.php?f=23&t=60683
It occurs when you are moving the pointer around inside the smaller circle while drawing the 2nd line.
But there also may be an issue because the pointer is moved across the 2 circular edges.

Draft_Snap_WorkingPlane projects the snap point from another snap option onto the working plane. This snap option does not seem relevant here.
User avatar
thomas-neemann
Veteran
Posts: 11895
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Sometimes snap doesn't work straight away

Post by thomas-neemann »

Roy_043 wrote: Thu Nov 18, 2021 10:28 am
I found a workaround


https://www.youtube.com/watch?v=sMgRSMXagw4

phpBB [video]
Gruß Dipl.-Ing. (FH) Thomas Neemann

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

Re: [Workaround] Sometimes snap doesn't work straight away

Post by Roy_043 »

What also seems to work is move the pointer from one endpoint of the 1st line to the other.
User avatar
thomas-neemann
Veteran
Posts: 11895
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [Workaround] Sometimes snap doesn't work straight away

Post by thomas-neemann »

Roy_043 wrote: Thu Nov 18, 2021 10:58 am What also seems to work is move the pointer from one endpoint of the 1st line to the other.
yes, wonderful, that is faster
Gruß Dipl.-Ing. (FH) Thomas Neemann

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

Re: [Workaround] Sometimes snap doesn't work straight away

Post by Roy_043 »

Here is an updated version of gui_snapper.py. It should be placed in <install_folder>/Mod/Draft/draftguitools/.

The 3 problems demonstrated here should be solved:
  1. Draft_Snap_Parallel only worked beyond the endpoints of the edge: https://forum.freecadweb.org/viewtopic.php?f=23&t=60683.
  2. It was very hard to select an edge for Draft_Snap_Parallel if no other snaps were active. This problem probably (?) was never detected because it does not occur if f.e. Draft_Snap_End is active.
  3. Only two snap objects were stored. Moving the cursor across two circular edges after selecting the reference for Draft_Snap_Parallel resulted in the loss of that reference. The number of stored objects was increased to 8. That number may prove to be too big. To avoid confusion the list is now emptied when a command finishes.
The file also contains this fix:
https://forum.freecadweb.org/viewtopic.php?f=23&t=60749
Attachments
gui_snapper.zip
(14.77 KiB) Downloaded 26 times
User avatar
thomas-neemann
Veteran
Posts: 11895
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [Workaround] Sometimes snap doesn't work straight away

Post by thomas-neemann »

Roy_043 wrote: Thu Nov 18, 2021 10:04 pm
yes it is better that way, for me it is so that I first have to move the mouse over the line to which something should be parallel
1.png
1.png (20.88 KiB) Viewed 2446 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

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

Re: [Workaround] Sometimes snap doesn't work straight away

Post by Roy_043 »

thomas-neemann wrote: Fri Nov 19, 2021 7:38 am I first have to move the mouse over the line to which something should be parallel
Maybe I misunderstand, but yes you do have to do that. Imagine a document with many randomly oriented straight edges, how do you propose Draft_Snap_Parallel should work then?
User avatar
thomas-neemann
Veteran
Posts: 11895
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [Workaround] Sometimes snap doesn't work straight away

Post by thomas-neemann »

Roy_043 wrote: Fri Nov 19, 2021 1:38 pm
yes, i had asked myself that if there are several similar oblique lines which are then used. Marvelous. freecad is now finished :-)
Gruß Dipl.-Ing. (FH) Thomas Neemann

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