Better selection system for constraints in Sketcher

A subforum for research and development of the user interface of FreeCAD

Moderator: agryson

User avatar
bejant
Posts: 4125
Joined: Thu Jul 11, 2013 3:06 pm

Re: Better selection system for constraints in Sketcher

Postby bejant » Thu Dec 29, 2016 3:51 am

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...
My Part Design tutorials on YouTube (aimed at beginners).
jnxd
Posts: 127
Joined: Mon Mar 30, 2015 2:30 pm

Re: Better selection system for constraints in Sketcher

Postby jnxd » Thu Dec 29, 2016 6:10 am

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.
efyx
Posts: 156
Joined: Fri Sep 26, 2014 7:36 pm

Re: Better selection system for constraints in Sketcher

Postby efyx » Mon Jan 09, 2017 6:57 am

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 :))
jnxd
Posts: 127
Joined: Mon Mar 30, 2015 2:30 pm

Re: Better selection system for constraints in Sketcher

Postby jnxd » Tue Jan 10, 2017 6:47 am

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.
jnxd
Posts: 127
Joined: Mon Mar 30, 2015 2:30 pm

Re: Better selection system for constraints in Sketcher

Postby jnxd » Sat Jan 21, 2017 12:46 pm

I was just wondering if we should move this thread to the newly surfaced UI/UX forum.
jnxd
Posts: 127
Joined: Mon Mar 30, 2015 2:30 pm

Re: Better selection system for constraints in Sketcher

Postby jnxd » Tue Jan 24, 2017 9:43 am

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/FreeCAD/tree/constraintselect.
User avatar
agryson
Posts: 452
Joined: Wed Nov 23, 2016 8:30 am
Location: Paris, France
Contact:

Re: Better selection system for constraints in Sketcher

Postby agryson » Tue Jan 24, 2017 10:38 am

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
Posts: 4125
Joined: Thu Jul 11, 2013 3:06 pm

Re: Better selection system for constraints in Sketcher

Postby bejant » Wed Jan 25, 2017 2:13 am

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...
My Part Design tutorials on YouTube (aimed at beginners).
User avatar
NormandC
Posts: 12258
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Better selection system for constraints in Sketcher

Postby NormandC » Wed Jan 25, 2017 3:25 am

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!
jnxd
Posts: 127
Joined: Mon Mar 30, 2015 2:30 pm

Re: Better selection system for constraints in Sketcher

Postby jnxd » Wed Jan 25, 2017 3:44 am

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.