Lock angle line in Draft

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
matthyuz
Posts: 33
Joined: Sat Sep 16, 2017 8:01 pm

Lock angle line in Draft

Post by matthyuz »

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.27809 (Git)
Build type: Release
Python 3.8.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Spanish/Argentina (es_AR)
Installed mods:
* fasteners
* fcgear
* sheetmetal

Hello, everyone.
I am confused with how the line tool works in Draft.
What I am trying to replicate is the angle lock, just like what is performed at minute 3:14 of the attached video. In that video the key to lock the angle is L (lock), but in later versions of FreeCAD, it is the H key.
The problem I see is that after pressing the H key (having enabled the line end snap), when moving the mouse pointer, the line is locked at an angle, but does not pass through the expected point. It appears displaced a few degrees.
I also tested with the Polyline tool; it seems to work correctly, although in some tests the same error appeared (this last one testing in 3 dimensions).
Can someone test and tell me if the operation of this H key is as expected?
Thank you very much.

https://www.youtube.com/watch?v=KpEl2Jt ... zalezGomez
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Lock angle line in Draft

Post by thomas-neemann »

that doesn't work for me either. the function is currently being worked on. here is a workaround

https://www.youtube.com/watch?v=pp0lb_89n-s

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

https://www.youtube.com/@thomasneemann5 ... ry=freecad
matthyuz
Posts: 33
Joined: Sat Sep 16, 2017 8:01 pm

Re: Lock angle line in Draft

Post by matthyuz »

Hi Thomas and thanks for confirming that it is not working properly.
I am glad that work is being done to fix this feature, I find it very useful.
I am interested in getting some notice when it is resolved so I can help by testing.
Regards.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Lock angle line in Draft

Post by thomas-neemann »

matthyuz wrote: Sat Mar 12, 2022 3:00 pm ...
I am interested in getting some notice when it is resolved so I can help by testing.
Regards.
here is a fix that might work. gladly feedback

https://forum.freecadweb.org/viewtopic. ... 63#p578291
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
matthyuz
Posts: 33
Joined: Sat Sep 16, 2017 8:01 pm

Re: Lock angle line in Draft

Post by matthyuz »

Hi Thomas, thanks for the heads up, but I don't know how I should test this solution.
Should I wait until it is merged?
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Lock angle line in Draft

Post by thomas-neemann »

matthyuz wrote: Sun Mar 13, 2022 10:31 pm Hi Thomas, thanks for the heads up, but I don't know how I should test this solution.
Should I wait until it is merged?
Experience has shown that something like this will be available here in 1 to 2 weeks

https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
matthyuz
Posts: 33
Joined: Sat Sep 16, 2017 8:01 pm

Re: Lock angle line in Draft

Post by matthyuz »

Hi Thomas, do you know when this will be fixed or if it is planned to be fixed?.
I downloaded the latest development version (28717) and the problem persists.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Lock angle line in Draft

Post by Roy_043 »

While testing this I have found an issue with the PR mentioned in the topic Thomas linked to. But this does not affect the workflow shown in the video tutorial. I suspect that your problem is related to having Draft_Snap_Near active. Please switch that off and check again.

matthyuz wrote: Sat Mar 12, 2022 12:54 am I also tested with the Polyline tool
I do not understand this. The lock angle option is not available for polylines (see Draft_Wire).
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Lock angle line in Draft

Post by thomas-neemann »

matthyuz wrote: Wed Apr 20, 2022 11:30 am Hi Thomas, do you know when this will be fixed or if it is planned to be fixed?.
...
I do not know
Roy_043 wrote: Wed Apr 20, 2022 6:18 pm ....I do not understand this....

apparently it works now, but the value jumps and it is inaccurate. in 0.18 it was still fine

t1.FCStd
(6.12 KiB) Downloaded 21 times

https://www.youtube.com/watch?v=64-hsEpIKkM


phpBB [video]
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: Lock angle line in Draft

Post by Roy_043 »

Confirmed. Here is a modified DraftGui.py file that I think fixes this problem, as well as the problem I discovered yesterday.

Note that there is a fundamental issue with this, and other, Draft task panels. The input boxes are also used to display the coordinates of the point in the 3D view. This display is controlled by the "Number of decimals" preference. There is an ambiguity. When the user presses the "Enter point" button what is being confirmed? The actual coordinates of the 3D point, or the rounded representation in the task panel? In many cases the Draft code reads the rounded coordinates from the task panel and uses those. This can lead to unexpected inaccuracies and may in fact explain the problem @matthyuz is experiencing.

So the general advice is that for the Draft WB the "Number of decimals" preference should not be set too low.
Attachments
DraftGui.py
(103.19 KiB) Downloaded 27 times
Post Reply