Proposal: select one or more pieces, hide the others.

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
felix
Posts: 26
Joined: Sat Nov 09, 2013 1:42 pm
Location: Madrid. Spain
Contact:

Proposal: select one or more pieces, hide the others.

Postby felix » Tue Nov 10, 2015 11:35 am

I think that would be helpful in any drawing that upon selection of one or more pieces, they can temporarily hide all other by pressing a key.

Something like that makes Blender with the / key.

Texto original:

Propuesta: seleccionar una o más piezas, ocultar las demás.

Pienso que sería de gran ayuda en cualquier dibujo que, previa selección de una o más piezas, se puedan ocultar temporalmente todas las demás con solo pulsar una tecla.

Algo parecido a lo que hace Blender con la tecla /.

Félix Fernández.
mario52
Posts: 3217
Joined: Wed May 16, 2012 2:13 pm

Re: Proposal: select one or more pieces, hide the others.

Postby mario52 » Wed Nov 11, 2015 12:22 pm

hi
see here Macro Toggle Visibility
set of tree macro

1: hidden the objects not selected
if objects are hidden and selected (in comboview) then Visibility = True and hidden alls objects visible (reverse point 1)

2: macro displayed alls objects

3: macro hidden alls objects

4: macro SelectedStay alls objects not selected are deleted

EDIT 24/06/2016 22h55 Paris modify link to the new page
mario
Last edited by mario52 on Fri Jun 24, 2016 8:57 pm, edited 2 times in total.
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting, Dialog creation. My macros on Gist.github.
renatorivo
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Proposal: select one or more pieces, hide the others.

Postby renatorivo » Wed Nov 11, 2015 8:29 pm

felix wrote:I think that would be helpful in any drawing that upon selection of one or more pieces, they can temporarily hide all other by pressing a key.

Something like that makes Blender with the / key.
+1
Hello Mario, thanks.
Can you add this as a menu that is opened by clicking the right button on the name of the document? Or am I asking too much?
Renato
mario52
Posts: 3217
Joined: Wed May 16, 2012 2:13 pm

Re: Proposal: select one or more pieces, hide the others.

Postby mario52 » Wed Nov 11, 2015 8:52 pm

hi
new version with correction if not document
no renato not know, maybe if someone goes !

no renato non so, forse se passa qualcuno !
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting, Dialog creation. My macros on Gist.github.
renatorivo
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Proposal: select one or more pieces, hide the others.

Postby renatorivo » Wed Nov 11, 2015 9:31 pm

I'm thinking to simple scripts, that placed in a specific folder, can provide new commands in a context menu, such as scripts for Nautilus that copied to the folder ~ / .gnome2 / nautilus-scripts allow you to implement its functions. This can also be done in windows, but I do not know where. And in FreeCAD?
mario52
Posts: 3217
Joined: Wed May 16, 2012 2:13 pm

Re: Proposal: select one or more pieces, hide the others.

Postby mario52 » Wed Nov 11, 2015 9:44 pm

hi
I do not know maybe yorik or wmayer or microelly2 ??
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting, Dialog creation. My macros on Gist.github.
User avatar
felix
Posts: 26
Joined: Sat Nov 09, 2013 1:42 pm
Location: Madrid. Spain
Contact:

Re: Proposal: select one or more pieces, hide the others.

Postby felix » Thu Nov 12, 2015 8:41 am

Hello Mario. Thanks.

Félix
mario52
Posts: 3217
Joined: Wed May 16, 2012 2:13 pm

Re: Proposal: select one or more pieces, hide the others.

Postby mario52 » Thu Nov 12, 2015 5:38 pm

hi
i modify the macro Macro SelectVisible include the tree macros in one
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting, Dialog creation. My macros on Gist.github.
User avatar
felix
Posts: 26
Joined: Sat Nov 09, 2013 1:42 pm
Location: Madrid. Spain
Contact:

Re: Proposal: select one or more pieces, hide the others.

Postby felix » Fri Nov 13, 2015 10:20 am

Excellent, a great help to facilitate the work in FreeCAD.

Thanks for you work Mario.

Félix
User avatar
yorik
Site Admin
Posts: 12058
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: Proposal: select one or more pieces, hide the others.

Postby yorik » Fri Nov 13, 2015 2:55 pm

renatorivo wrote:I'm thinking to simple scripts, that placed in a specific folder, can provide new commands in a context menu, such as scripts for Nautilus that copied to the folder ~ / .gnome2 / nautilus-scripts allow you to implement its functions. This can also be done in windows, but I do not know where. And in FreeCAD?
This is basically how macros work... You place them into the macros folder, and they become accessible to freecad.

What could be done, is another macro that gets a list of macros, and builds a qt menu from them (and why not, add it to the context menu). But at the moment, macros are simple python scripts, they don't contain any name or icon, or shortcut, or tooltip/description, which would not make a very interesting menu.

There is a discussion started by microelly2 about adding some more "meta-info" to the macros, but so far it is still in discussion...