[SOLVED] Working plane snap doesn't seem to work

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
Moult
Posts: 222
Joined: Sat Jan 05, 2019 11:46 am
Contact:

[SOLVED] Working plane snap doesn't seem to work

Postby Moult » Sun May 19, 2019 11:36 am

Steps to reproduce. This occurs in latest master, but also occurs in v0.18:

1. New FreeCAD file. Create an extruded wire such that you have a box, like so.
2019-05-19-212827_925x351_scrot.png
2019-05-19-212827_925x351_scrot.png (39.4 KiB) Viewed 204 times
2. Select a face of the box, and then press "Set working plane" to align the working plane to that face. Then with the working plane snap on, draw a rectangle next to the box. You will see that the rectangle is indeed flat on the working plane, and parallel to the face.
2019-05-19-212915_1090x413_scrot.png
2019-05-19-212915_1090x413_scrot.png (70.8 KiB) Viewed 204 times
3. Now, without changing the working plane, draw a new rectangle, but for the first corner, click somewhere such that your cursor is above a face of the first box. Once you click, you will discover that the working plane changes to whatever face you click on, and the rectangle tracker will show a triangle instead of a rectangle.
2019-05-19-213105_1016x391_scrot.png
2019-05-19-213105_1016x391_scrot.png (72.62 KiB) Viewed 204 times
4. This is the final result. Even though we never explicitly changed the working plane, the second rectangle we drew was suddenly parallel to whatever face we clicked on. Maybe this is the intended behaviour, but if so, doesn't it defeat the purpose of setting a working plane, and enabling a working plane snap?
2019-05-19-213113_1029x307_scrot.png
2019-05-19-213113_1029x307_scrot.png (57.91 KiB) Viewed 204 times
The intended result is that the working plane never changes and whatever I draw stays on it, like below:
2019-05-19-213641_1039x329_scrot.png
2019-05-19-213641_1039x329_scrot.png (41.72 KiB) Viewed 202 times
Is there a way to forcefully just draw on the working plane?

Code: Select all

OS: Gentoo/Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16790 (Git)
Build type: Unknown
Branch: master
Hash: 15f440525e59c3caf89f847a490981abf5a45f8f
Python version: 3.6.5
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Last edited by Moult on Sun May 26, 2019 7:54 am, edited 1 time in total.
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
vocx
Posts: 1727
Joined: Thu Oct 18, 2018 9:18 pm

Re: Working plane snap doesn't seem to work

Postby vocx » Sun May 19, 2019 3:49 pm

Moult wrote:
Sun May 19, 2019 11:36 am
...

3. Now, without changing the working plane, draw a new rectangle, but for the first corner, click somewhere such that your cursor is above a face of the first box. Once you click, you will discover that the working plane changes to whatever face you click on, and the rectangle tracker will show a triangle instead of a rectangle.

...
In other threads you mentioned using the "Auto" method of Draft SelectPlane, so just check you have a fixed working plane.

As for the problem itself.
  • I haven't seen that the working plane automatically reorients itself. I cannot test at the moment with my computer.
  • What I did notice is that when drawing a rectangle, the tracker shape looks triangular instead of rectangular. This seems to have started fairly recently, like in February 2019 or so, before 0.18 was officially released. I actually "blame" carlopav and you for these changes, as It seems to me you two have been adding code to Draft/Arch recently.
User avatar
Moult
Posts: 222
Joined: Sat Jan 05, 2019 11:46 am
Contact:

Re: Working plane snap doesn't seem to work

Postby Moult » Sun May 19, 2019 9:26 pm

I have just double checked:

1. Drawing a rectangle has a rectangle tracker, except for when it triggers a change of the working plane like described in this post. Perhaps the tracker gets confused with the WP change.
2. Yes, the working plane is fixed (i.e. not set to auto).

As the problem is reproducible in v0.18, I believe this is prior to any code changes of carlopav and I, but yes, we will be careful when writing patches :)
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
User avatar
yorik
Site Admin
Posts: 11567
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Working plane snap doesn't seem to work

Postby yorik » Mon May 20, 2019 2:41 pm

Note that I also added some changes to the working plane tool recently so that, even after launching the GUI mode, you can still pick a face or 3 verts to set the working plane. But I think your fix doesn't touch that.
User avatar
Moult
Posts: 222
Joined: Sat Jan 05, 2019 11:46 am
Contact:

Re: Working plane snap doesn't seem to work

Postby Moult » Sun May 26, 2019 7:54 am

Fix and PR:

https://github.com/FreeCAD/FreeCAD/pull/2210

Marking thread as solved.
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.