Better selection system for constraints in Sketcher

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Better selection system for constraints in Sketcher

Post by bejant »

jnxd wrote:@bejant: A more precise statement of my problem is the following:
@jnxd, I should have written that I know FreeCAD only as a user, I can't code...
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Better selection system for constraints in Sketcher

Post by jnxd »

bejant wrote: @jnxd, I should have written that I know FreeCAD only as a user, I can't code...
That's OK bejant. I myself am just a beginner here. In any case the problem is out there for people with better knowledge to give their inputs.
My latest (or last) project: B-spline Construction Project.
efyx
Posts: 280
Joined: Fri Sep 26, 2014 7:36 pm

Re: Better selection system for constraints in Sketcher

Post by efyx »

jnxd wrote:
I have an idea for enchancement. See page 3 of this post, 2nd picture example 1, part of circle between "quadrant" constrains - what if, there would be 2nd option (dropdown menu from trim) that works similar to trim tool (selecting between two points), but not deleting line/arc between but changing it to construction line. The geometries would be saved, and should work better than trim tool nowadays. Also whole drawing would looks better (all circles, lines which were used to sketch will be saved and all dimensions also :))
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Better selection system for constraints in Sketcher

Post by jnxd »

efyx wrote: I have an idea for enchancement. See page 3 of this post, 2nd picture example 1, part of circle between "quadrant" constrains - what if, there would be 2nd option (dropdown menu from trim) that works similar to trim tool (selecting between two points), but not deleting line/arc between but changing it to construction line. The geometries would be saved, and should work better than trim tool nowadays. Also whole drawing would looks better (all circles, lines which were used to sketch will be saved and all dimensions also :))
I am not really sure how good an idea that is. So I'll let other people decide that. However, one tool we probably must have is the extend tool: click an element, and it will be extrapolated to the next clicked element.
My latest (or last) project: B-spline Construction Project.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Better selection system for constraints in Sketcher

Post by jnxd »

I was just wondering if we should move this thread to the newly surfaced UI/UX forum.
My latest (or last) project: B-spline Construction Project.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Better selection system for constraints in Sketcher

Post by jnxd »

I started development of a generalized framework for the "constraint creation modes", and it seems to be working for whatever constraints I have modified to use it. In the mode a selection filter is active that will only let you select items that follow a sequence. For example in case of point-on-object constraint, if the first selection is a vertex, the filter will only allow the next selection to be a curve.

However, there seems to be a problem in that a selection does not stick when more than one objects are to be selected. It is listed in an internal vector which is eventually passed to the Command object, so the mode works, but there is no indication of what is selected. A look through gdb shows that a selection is made, but is eventually erased somewhere down the line, apparently in a code which I did not write and cannot control, as well as gdb cannot track. Can someone help figuring out why it is happening? Any help would be appreciated.

The code can be found at https://github.com/AjinkyaDahale/FreeCA ... aintselect.
My latest (or last) project: B-spline Construction Project.
User avatar
agryson
Posts: 463
Joined: Wed Nov 23, 2016 8:30 am
Location: Bordeaux, France
Contact:

Re: Better selection system for constraints in Sketcher

Post by agryson »

jnxd wrote:I was just wondering if we should move this thread to the newly surfaced UI/UX forum.
Sounds like a good fit - just moved it.

BTW, loving all the work being put into this. The "select first, constrain second" thing was really unintuitive for me at first, this approach of select constraint type and then the geometry would reduce errors enormously for me.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Better selection system for constraints in Sketcher

Post by bejant »

jnxd wrote:However, there seems to be a problem
I noticed that the persistent Coincident Constraint mode has disabled Box Selection, will you re-enable it? It's much faster to Box Select points because the user doesn't need a direct hit on each point...
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Better selection system for constraints in Sketcher

Post by NormandC »

bejant wrote:I noticed that the persistent Coincident Constraint mode has disabled Box Selection
I just noticed it as well. Sorry but for me it severely reduces this mode's usefulness. I hope it was unintended and that you'll be able to fix it.

Otherwise I just now found the time to test the new constraint selection system, I'll admit I didn't see the interest at first, but after testing it I think it will grow on me. :) I like that you can exit the mode with a right-click, just like for geometry tools which keeps the UI consistent.

Belated thanks for your work!
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Better selection system for constraints in Sketcher

Post by jnxd »

bejant wrote:
jnxd wrote:However, there seems to be a problem
I noticed that the persistent Coincident Constraint mode has disabled Box Selection, will you re-enable it? It's much faster to Box Select points because the user doesn't need a direct hit on each point...
Are you talking of my branch or master? There was a sacrifice of select then constrain method, but those changes are not sent in a PR afaik. It turns out it was completely unnecessary, so I'll change that part back.

But the press button then select functionality will not have box select for some time until I figure out how to do it and integrate it with my own little framework. Your observation did put forth a serious flaw in my method and I'm glad I did not go around changing all constraints to this method like a monkey with a hammer using it on everything.
My latest (or last) project: B-spline Construction Project.
Post Reply