Better selection system for constraints in Sketcher
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Better selection system for constraints in Sketcher
The current system of adding constraints feels a bit annoying in that FreeCAD complains if we select a constraint before selecting the items on which to apply it. It should be possible to add some or all of the elements necessary for creating the constraint into the selection. A good example is the fillet option in sketch, which allows us to do so (rather makes us, it'd be good if it worked on the current selection too). I suggest we add the constraint icon next to the cursor like one that is there when making geometries, and put a short message on the status bar asking the user to select additional elements to the selection. The fillet tool can provide the skeleton for implementation of such a feature. Any coments?
My latest (or last) project: B-spline Construction Project.
Re: Better selection system for constraints in Sketcher
Current system doesn't allow you to select constraint before selecting the sketcher geometry.jnxd wrote:The current system of adding constraints feels a bit annoying in that FreeCAD complains if we select a constraint before selecting the items on which to apply it.
That is possible as you can do a multi-select of appropriate sketcher geometry and after apply constraints in one step.jnxd wrote:It should be possible to add some or all of the elements necessary for creating the constraint into the selection.
Re: Better selection system for constraints in Sketcher
The advantage of this new selection style does for me not outweigh the speed of the current system. Every now and then I get a message to select the right number of of points, e.g. when applying symmetry to two points, but the message states clear what the problem is. This happens on heavy usage of FreeCAD approximately twice a day, or let's say 10 times. The new style would not really solve that problem, in that case messages would have to be created as well in case of badly selected vertexes or edges. To restrict the selection to only admissible values would prevent the common use case of selecting elements and deselecting some of them before applying the constraint if the intermediate selection is not permitted.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Better selection system for constraints in Sketcher
chrisb wrote:The advantage of this new selection style does for me not outweigh the speed of the current system. ... This happens on heavy usage of FreeCAD approximately twice a day, or let's say 10 times.
I am pretty much at the other end of the usage spectrum. In addition, I very often use Abaqus instead due to my work requirements. So I can imagine how our experiences with the current method vary. In that case, what do you think of disabling certain constraints incompatible with the current selection? It would be a bit more code but IMHO a huge improvement in UX.
Indeed, I can see how that would be a problem. But in exchange we get an option to successively apply the same constraint without having to click on the icon every time.chrisb wrote:To restrict the selection to only admissible values would prevent the common use case of selecting elements and deselecting some of them before applying the constraint if the intermediate selection is not permitted.
My latest (or last) project: B-spline Construction Project.
Re: Better selection system for constraints in Sketcher
That is an advantage, indeed. My workflow is usually starting with a polyline then adding as many concidence constraints, then tangential and so on (the sequence my vary). For the "two-element-constraints" like tangential I could well imagine similar behaviour as during the creation process, that the system stays in the state of adding the same kind of constraint again.jnxd wrote:But in exchange we get an option to successively apply the same constraint without having to click on the icon every time.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Better selection system for constraints in Sketcher
There is however a small problem when it comes to constraints that can take varying number of elements, like the angle constraint has an optional third point element that can be provided. Any suggestions on how to go about them?chrisb wrote:For the "two-element-constraints" like tangential I could well imagine similar behaviour as during the creation process, that the system stays in the state of adding the same kind of constraint again.
My latest (or last) project: B-spline Construction Project.
Re: Better selection system for constraints in Sketcher
Okay so I have some time at hand and I'm going to try my hand at making this selection system. I think lock would be the easiest so that's which I'll use as a proof of concept. Comparing the files CommandCreateGeo.cpp and CommandConstraints.cpp, I see the main difference is that in the former, DrawSketchHandler is subclassed and used. I think following the same route should be okay for constraints, except that there'll be much more modification to the methods of DrawSketchHandler.
My latest (or last) project: B-spline Construction Project.
Re: Better selection system for constraints in Sketcher
This sounds like a nice usability improvement, I guess it could be extended to increase the selection hot sones of the possible entities when choosing the constraint tool first.
The major issue this would solve is when sketching on a obscured face, that makes you rotate the view to have visibility. When doing this it is many times very difficult to select points especially in inside corners.
The point that could be difficult to select in the image below, is the far end point of the external reference in the corner.
The major issue this would solve is when sketching on a obscured face, that makes you rotate the view to have visibility. When doing this it is many times very difficult to select points especially in inside corners.
The point that could be difficult to select in the image below, is the far end point of the external reference in the corner.
Need help? Feel free to ask, but please read the guidelines first
Re: Better selection system for constraints in Sketcher
I don't think I can follow you. Maybe an example of what we would have to click before, and what you want it to be after?cox wrote:...I guess it could be extended to increase the selection hot sones of the possible entities when choosing the constraint tool first.
I started a branch for it here:https://github.com/AjinkyaDahale/FreeCA ... aintselect. I probably will be able to figure out my way through the code, but I'll need someone to teach me how and what kinds of tests should be done. Thanks in advance!
PS: I should also mention I got this idea from the way abaqus handles sketches. Somebady probably should just check if we'll get in trouble for using it.
My latest (or last) project: B-spline Construction Project.
- Pauvres_honteux
- Posts: 728
- Joined: Sun Feb 16, 2014 12:05 am
- Location: Far side of the moon
Re: Better selection system for constraints in Sketcher
Hi, and sorry for chiming in late, but I didn't notice this thread until a moment ago.
Now when our friendly soul of jnxd is picking up on this matter I'd like to put forward my old suggestion: 1416.
Extra argument: When it comes to working speed, it definitivly outperformes the current system.
I wonder if Abaqus have some similar selection system? Haven't worked with it for over 10 years now, so I guess things changed after the big french company bought it?
Oh, and another huge benefit: it'll be just one icon in/on the workbench, i.e. big space saving!
I guess some automagic stuff would be beneficial for checking what constrains are possible for the particular selections.
By the way: would this by any chance cover a whish for automagic horizontal, vertical and parallel when constraining distances? As it is now one can only set a distance between a point and, at the best, a line. With a bit of automagic the work for the user would be reduced to simply select two lines and type the desired value (or if non-parallel lines and you really want a distance, right click and choose Distance).
Edit: misspelled parallel...
Now when our friendly soul of jnxd is picking up on this matter I'd like to put forward my old suggestion: 1416.
Extra argument: When it comes to working speed, it definitivly outperformes the current system.
I wonder if Abaqus have some similar selection system? Haven't worked with it for over 10 years now, so I guess things changed after the big french company bought it?
Oh, and another huge benefit: it'll be just one icon in/on the workbench, i.e. big space saving!
I guess some automagic stuff would be beneficial for checking what constrains are possible for the particular selections.
By the way: would this by any chance cover a whish for automagic horizontal, vertical and parallel when constraining distances? As it is now one can only set a distance between a point and, at the best, a line. With a bit of automagic the work for the user would be reduced to simply select two lines and type the desired value (or if non-parallel lines and you really want a distance, right click and choose Distance).
Edit: misspelled parallel...
Last edited by Pauvres_honteux on Sun Dec 18, 2016 9:36 am, edited 2 times in total.