[Solved]Options to only being able to select edges/vertices/faces?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

[Solved]Options to only being able to select edges/vertices/faces?

Post by pathfinder »

Hello,

maybe I confused this with another program, but wasn't there an option to toggle whether you only want vertices, edges or faces to be selectable? I can't find it anymore.

If there isn't one, I'd like to make a feature request :)

With more complex objects, sometime selecting edges or vertices can be a hassle. I know that the draw styles can be used for edges, but for vertices, it's just a mess of points without any context.
Last edited by pathfinder on Fri Jan 28, 2022 8:44 pm, edited 2 times in total.
User avatar
Shalmeneser
Veteran
Posts: 9545
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Options to only being able toselect edges/vertices/faces?

Post by Shalmeneser »

I don't think.

Which context ? 3D view or sketcher ?
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: Options to only being able toselect edges/vertices/faces?

Post by TheMarkster »

There is a selection gate.

Code: Select all

filter = Gui.Selection.Filter("SELECT Part::Feature SUBELEMENT Edge, SELECT Part::Feature SUBELEMENT Face")
Gui.Selection.addSelectionGate(filter)
Now you can only select Edges and Faces, no vertices.

Code: Select all

Gui.Selection.removeSelectionGate()
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

Re: Options to only being able toselect edges/vertices/faces?

Post by pathfinder »

Shalmeneser wrote: Mon Jan 24, 2022 10:41 pm I don't think.

Which context ? 3D view or sketcher ?
In 3D view.

I'm currently working on a project where I have to put chamfers on literally hundreds of edges and it would really speed up the process. What's also super annoying is that I had to start over selecting the relevant edges like three times now because once I misclick on the background, I lose the edges I selected – not to toot Blenders horn too much here, but in Blender, vertex/face/edge selection can be backstepped with Crtl+Z, which makes it a non-issue over there.
TheMarkster wrote: Mon Jan 24, 2022 10:46 pm There is a selection gate.

Code: Select all

filter = Gui.Selection.Filter("SELECT Part::Feature SUBELEMENT Edge, SELECT Part::Feature SUBELEMENT Face")
Gui.Selection.addSelectionGate(filter)
Now you can only select Edges and Faces, no vertices.

Code: Select all

Gui.Selection.removeSelectionGate()
Interesting, how do I use this?

Edit: As a workaround, I decided to create the chamfer first, then add edges after. Works quite well.
Last edited by pathfinder on Fri Jan 28, 2022 8:39 pm, edited 1 time in total.
User avatar
Shalmeneser
Veteran
Posts: 9545
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Options to only being able toselect edges/vertices/faces?

Post by Shalmeneser »

You can modify the list of edges after asking for chamfer.
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: Options to only being able toselect edges/vertices/faces?

Post by TheMarkster »

Open the python console and paste into it. Ctrl+Shift+P if you are on a recent 0.20 build, else look in the view menu -> panels.
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

Re: Options to only being able toselect edges/vertices/faces?

Post by pathfinder »

Shalmeneser wrote: Fri Jan 28, 2022 8:21 pm You can modify the list of edges after asking for chamfer.
Yes, that's what I ended up doing.
TheMarkster wrote: Fri Jan 28, 2022 8:22 pm Open the python console and paste into it. Ctrl+Shift+P if you are on a recent 0.20 build, else look in the view menu -> panels.
Aaaaah, the black magic stuff, gotcha. I'll take a look.
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: [Solved]Options to only being able to select edges/vertices/faces?

Post by TheMarkster »

You can also use selection observers and add to the selection only certain subobject types on preselection if the Ctrl key is held down. I do this in MeshRemodel with the Auto mode for selecting vertices, for example, many vertices to make a BSpline. But it's not setup to work with edges.

Usage would be:

1) enable auto mode
2) hold Ctrl while mousing over the desired points
3) make the bspline
4) end auto mode
Post Reply