Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
piffpoof
Posts: 346
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by piffpoof »

In the Tree view of the Combo browser, is it worth adding an option to the contextual menu (right-click) to select all the children of the selected object?

This would relieve the user from multiple selects and/or drags to select all the children of an object.

I have attached 4 screen snapshots.

In the first screen snapshot there is an object structure with 3 top-level objects (Cut 1, Cut 2, Cut 3), each of which has children:
select tree 1.jpg
select tree 1.jpg (33.63 KiB) Viewed 4677 times
In the second screen snapshot it shows the object "Cut 2" selected, along with the present contextual (right-click) menu for FreeCAD v0.15:
select tree 2.jpg
select tree 2.jpg (54.96 KiB) Viewed 4677 times
Say the object "Cut 2" and all its children are to be dragged to another group, copied or deleted. The user must click on:
  • Cut 2
  • Pad 3
  • Sketch 3
  • Pad 4
  • Sketch 4
This is a lot of busy work, especially as objects models get much deeper than my simple example.

In the third screen I have attached the screen as it appears with the child-objects selected.
select tree 3.jpg
select tree 3.jpg (33.26 KiB) Viewed 4677 times
What I am wondering about is adding an option to the menu list which might be titled something like "Select all children of selected object". I have made up a 4th screen which shows how it would appear:
select tree 4.jpg
select tree 4.jpg (122.22 KiB) Viewed 4677 times
I see this as a time-saving and error reducing enhancement.

Dean
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Potential Function Request - Select All Children of Object in Tree View

Post by bernd »

try:
change to ArchWB --> select your object in tree view --> right mouse click --> utilities --> select group
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Potential Function Request - Select All Children of Object in Tree View

Post by jmaustpc »

bernd wrote:try:
change to ArchWB --> select your object in tree view --> right mouse click --> utilities --> select group
that only goes one level down, i.e. in the example above if applied to Cut it would also select the two Pads but not their sketches.

OS: Ubuntu 14.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6062 (Git)
Build type: Release
Branch: master
Hash: 61e1a5ca2fee4ea7a95965afdbb510a450d46660
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Of course if you select the top item and Copy, you get a pop up asking if you want to select the dependencies.
piffpoof wrote:This would relieve the user from multiple selects and/or drags to select all the children of an object.
It may well be useful but it could also become more complex. Your example has a simple tree structure, the selection would have to decide what to do if for example one of those Pads was used in multiple Boolean operations.
User avatar
piffpoof
Posts: 346
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: Potential Function Request - Select All Children of Object in Tree View

Post by piffpoof »

bernd wrote:try:
change to ArchWB --> select your object in tree view --> right mouse click --> utilities --> select group
Yes, that's the idea. I never venture into the Architecture workbench and so was unaware of that menu option. And attaching the Select Children as part of a Utilities entry on the contextual menu is also a great idea - no need to clutter up the main level of the menu. Of course, as pointed out, the selection is only going one level deep.
jmaustpc wrote:Of course if you select the top item and Copy, you get a pop up asking if you want to select the dependencies.
Yes you do, but certainly for me that question is 'busy work' most of the time. It is invaluable when you miss something out so it definitely is of use and I am not suggesting it's removal or replacement. But a lot of time when I am working with the tree below an object, I don't depend on that question.

And with a truly complex object tree, I have to review all the child-objects as they are not enumerated in the pop-up (and they should not be listed there)
jmaustpc wrote:
piffpoof wrote:This would relieve the user from multiple selects and/or drags to select all the children of an object.
It may well be useful but it could also become more complex. Your example has a simple tree structure, the selection would have to decide what to do if for example one of those Pads was used in multiple Boolean operations.
Yes, it seems that nothing is ever truly simple or straight forward in FreeCAD. I intentionally made a simple example of the object tree in this post, most of my object trees are much deeper and much more complex in terms of variety of object types - including pads used in multiple Boolean operations.

I wasn't really proposing a change to any existing system behaviour such as removing functionality or even changing it. Rather I was suggesting adding an alternative to the menu. Something that it looks like the Architecture workbench already has started. That way the multiple secondary options could be "hung" off the Utilities sub-menu.

Also my proposal would remain passive as it would only affect the selection process. The pop-up regarding selecting dependancies would still come into play.

Does anyone know if the menu that the Architecture workbench produces ("right mouse click --> utilities --> select group") is written in Python or C++ (or something else)?

thanks for the great feedback
User avatar
yorik
Founder
Posts: 13630
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Potential Function Request - Select All Children of Object in Tree View

Post by yorik »

If you repeat the same Arch command several times, it goes down to further levels...
It could indeed be good to remove that feature from arch and add it for all workbenches...
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Potential Function Request - Select All Children of Object in Tree View

Post by triplus »

For delete purposes check out:

Remove Subtree: Removes the selected objects and all children that are not referenced from other objects
User avatar
piffpoof
Posts: 346
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: Potential Function Request - Select All Children of Object in Tree View

Post by piffpoof »

yorik wrote:If you repeat the same Arch command several times, it goes down to further levels...
It could indeed be good to remove that feature from arch and add it for all workbenches...
It's now been a couple of weeks since these posts. While I continued working I kept Yorik's suggestion in the back of my mind and my conclusion is:

I think this is good idea, both to "... remove that feature from arch and add it for all workbenches...", as well as have options on the Utilities contextual menu to either select the next level down or to the bottom of the tree.

One thing I like about this suggestion is that by adding a "Utilities..." menu to the contextual menu (right-click menu) of all workbenches, this provides a another point of customisation available to the user. I don't know the internals well enough, but would this be another possible point to connect Macros to (in the same fashion they are connected to the toolbars)?

Are there any feelings about this? I am quite happy to write up a feature request if people feel it is is worth while. I certainly do.

Dean
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Potential Function Request - Select All Children of Object in Tree View

Post by bejant »

Hi Dean, it look like you're making models having much more complexity than what I've done. If you think the feature is worthwhile, I'd say go ahead and put in a ticket on Mantis so that it doesn't become forgotten here in the forum. If you do put in a ticket you may want to post back with a link to it in this topic.
User avatar
piffpoof
Posts: 346
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: Potential Function Request - Select All Children of Object in Tree View

Post by piffpoof »

to update this thread, I have entered 2 Feature Requests into the Mantis Bug Tracker:
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Potential Function Request - Select All Children of Object in Tree View

Post by microelly2 »

I have done some work on browsing the object net
https://www.youtube.com/watch?v=5evyAtZLnEg
https://github.com/microelly2/freecad-objecttree
does it make sense to add the requested action to this?

I work on a subnet/tree with configurable depth
Post Reply