Issue with Draft SelectPlane

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
tijtij
Posts: 5
Joined: Sun Nov 06, 2022 1:26 am

Issue with Draft SelectPlane

Post by tijtij »

I am getting the following error when invoking Draft SelectPlane to set the working pane to a selected face.

Running the Python command 'Draft_SelectPlane' failed:
Traceback (most recent call last):
File "/Applications/FreeCAD Weeekly.app/Contents/Resources/Mod/Draft/draftguitools/gui_selectplane.py", line 138, in Activated
if self.handle():
^^^^^^^^^^^^^
File "/Applications/FreeCAD Weeekly.app/Contents/Resources/Mod/Draft/draftguitools/gui_selectplane.py", line 215, in handle
FreeCAD.DraftWorkingPlane.alignToFace(sel.SubObjects[0],
File "/Applications/FreeCAD Weeekly.app/Contents/Resources/Mod/Draft/WorkingPlane.py", line 579, in alignToFace
if shape.ShapeType == 'Face':
^^^^^^^^^^^^^^^

cannot determine type of null shape


Draft SelectPlane will work again by saving the file, closing the file, and reopening the file. But after modifying the file by adding or moving an object the error will reappear until I reopen the file again.

I'm running macOS arm but I was able to recreate the bug on Windows x86_64. Here is a video of the error. In the video you can see that Draft SelectPlane is working but after adding an object it breaks. Is it possible that my file got corrupted, even though the issue goes away after reopening the file?

error-Draft-SelectPlane.FCStd
(207.3 KiB) Downloaded 34 times

Code: Select all

OS: macOS 13.1
Word size of FreeCAD: 64-bit
Version: 0.21.0.31483 (Git)
Build type: Release
Branch: master
Hash: 588620fd9fd138892b1cd2466f5c87d441493174
Python 3.11.0, Qt 5.15.6, Coin 4.0.0, Vtk 9.2.2, OCC 7.6.3
Locale: C/Default (C)
Installed mods: 
  * BIM 2021.12.0
  * Help 1.0.3

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.0.31709 (Git)
Build type: Release
Branch: master
Hash: e188802ca6997d2564e7570ab648462e6a059f87
Python 3.8.15, Qt 5.15.6, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Issue with Draft SelectPlane

Post by Roy_043 »

Confirmed. This is caused by the Site object. Workaround: make the Site invisible and then make the House visible again. Or you can remove the Site.
tijtij
Posts: 5
Joined: Sun Nov 06, 2022 1:26 am

Re: Issue with Draft SelectPlane

Post by tijtij »

Roy_043 wrote: Mon Jan 30, 2023 8:13 am Confirmed. This is caused by the Site object. Workaround: make the Site invisible and then make the House visible again. Or you can remove the Site.
Thanks @Roy_043. I see now how that the Site object ends up getting selected in the tree view even though I clicked on a child object. You have a keen eye to have noticed that.

Should a file a bug report?
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Issue with Draft SelectPlane

Post by Roy_043 »

Post Reply