[ Fixed ] Draft_SelectPlane ignores nesting

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 ] Draft_SelectPlane ignores nesting

Post by Roy_043 »

The Draft_SelectPlane command ignores the nesting of objects.

In the example file a Draft_Circle created on the XY plane with its center at the origin was put in a Std_Part.
That Std_Part was manipulated to achieve a 'random' position and orientation.

Selecting the face of the circle and calling Draft_SelectPlane results in the WP being aligned with the XY plane.

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)
Attachments
Draft_SelectPlane_ignores_nesting.FCStd
(11.8 KiB) Downloaded 52 times
Last edited by Roy_043 on Mon Oct 25, 2021 5:15 pm, edited 1 time in total.
marioalexis
Posts: 124
Joined: Wed Jun 19, 2019 7:44 pm

Re: [ Bug ] Draft_SelectPlane ignores nesting

Post by marioalexis »

Confirmed.
In the alingTo* methods of WorkingPlane, the InList method of the objects should be used to verify nesting.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_SelectPlane ignores nesting

Post by Roy_043 »

In another topic the getParentGeoFeatureGroup method was suggested in a somewhat similar situation.

But I also think that this can work here:

Code: Select all

sel = FreeCADGui.Selection.getSelectionEx("", 0) # 0=do not resolve
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_SelectPlane ignores nesting

Post by Roy_043 »

User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_SelectPlane ignores nesting

Post by Roy_043 »

Roy_043 wrote: Thu Jul 15, 2021 6:23 pm But I also think that this can work here:
No, that does not work.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_SelectPlane ignores nesting

Post by Roy_043 »

User avatar
thomas-neemann
Veteran
Posts: 11800
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [ Bug ] Draft_SelectPlane ignores nesting

Post by thomas-neemann »

Roy_043 wrote: Thu Jul 15, 2021 8:01 am
if you click on part it works

1.png
1.png (84.94 KiB) Viewed 1648 times

OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.26155 (Git) AppImage
Build type: Release
Branch: master
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
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)
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 ] Draft_SelectPlane ignores nesting

Post by Roy_043 »

thomas-neemann wrote: Sun Oct 24, 2021 9:02 am if you click on part it works
The issue is about nesting and you are not selecting a nested face. So I do not understand what you are trying to say. Note that the given example is a very simple case. The circle in the Std_Part might also have a 'random' orientation.
User avatar
thomas-neemann
Veteran
Posts: 11800
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [ Bug ] Draft_SelectPlane ignores nesting

Post by thomas-neemann »

Roy_043 wrote: Sun Oct 24, 2021 10:28 am
there is often a difference in freecad whether you click on the geometry or the entry in the parts tree.
and in the parts tree it often makes a difference where you click. I think it's okay.
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 ] Draft_SelectPlane ignores nesting

Post by Roy_043 »

I still don't understand the relevance of your comment within the context of this topic.
Post Reply