[ Fixed ] Draft_SelectGroup is confusing

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
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

[ Fixed ] Draft_SelectGroup is confusing

Post by Roy_043 »

Looking at the Draft_SelectGroup command I find the results somewhat confusing.

Issue 1: nested_groups.png and nested_groups.FCStd

On the left the Group was selected. On the right the Circle was selected.
The selections are different, but if you invoke the Draft_Move command you will end up moving the same objects (all circles). So why is there this difference and when is it useful? On the left I would expect Group001 and Group002 to also be selected.

Issue 2: groups_and_layers.png and groups_and_layers.FCStd

Objects can occur multiple times in the Tree view. This will certainly be the case when layers are used. The command does not handle this situation well. In the image Line003 in Group was selected.

Issue 3: see Issue2

The command is called Draft_SelectGroup but also selects layers. If this is intended behavior the command name is confusing. Compare the Draft_AddToGroup command which does not work with layers (although it does, wrongly IMO, show the 'Layers' group).

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
nested_groups.png
nested_groups.png (11.21 KiB) Viewed 2442 times
nested_groups.FCStd
(12.88 KiB) Downloaded 59 times
groups_and_layers.png
groups_and_layers.png (12.02 KiB) Viewed 2442 times
groups_and_layers.FCStd
(18.62 KiB) Downloaded 46 times
Last edited by Roy_043 on Mon Jan 10, 2022 9:07 am, edited 1 time in total.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft_SelectGroup is confusing

Post by Roy_043 »

Roy_043 wrote: Fri Jul 16, 2021 8:48 pm Draft_AddToGroup command which does not work with layers (although it does, wrongly IMO, show the 'Layers' group)
As a side-effect of PR4879 the Draft LayerContainer no longer appears in the Draft_AddToGroup menu.
https://github.com/FreeCAD/FreeCAD/pull/4879

Re. Draft_SelectGroup issue 2:
The situation is more complex:
What if the user selects an object in the 3D view and the object occurs in a layer and a group? Should the content of the layer or the group be selected? Or both?
An object can even occur in multiple layers (this can be achieved by editing their Group property).

Maybe Draft_AddToGroup and Draft_SelectGroup should be restricted to groups and group-like Arch objects, and to handle layers two new commands should be added?

For Draft_SelectGroup it may work to only consider the items selected in the Tree view. But then the purpose of the command becomes somewhat lost. In the tree you may as well select the group the object is in.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft_SelectGroup is confusing

Post by Roy_043 »

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

Re: [ Fixed ] Draft_SelectGroup is confusing

Post by Roy_043 »

Merged.
Post Reply