Request for comments - constraint highlighting
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Request for comments - constraint highlighting
https://github.com/itain/FreeCAD/tree/h ... onstraints
Branch: hilight_constraints
Asking for both technical and usability comments.
Changed files:
src/Mod/Sketcher/Gui/TaskSketcherConstrains.h
src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp
Items in the sketcher constraint list are marked, based on selected geometric object in the sketch.
If a single item is selected mark all the constraints that are directly referencing this item.
If two or more items are selected, mark those constraints that directly reference at least two selected items (select two items to see how they are related!).
This version ignores main axes, external edges and the root point when they are selected. Should be easy to add them.
I'm managing own selection lists. This is done also in ViewProviderSketch.cpp (and possibly other places). I do not know if there is a way (and is it at all advisable) to share objects between TaskSketcherConstrains and ViewProviderSketch.
Thanks!
-- Itai
Branch: hilight_constraints
Asking for both technical and usability comments.
Changed files:
src/Mod/Sketcher/Gui/TaskSketcherConstrains.h
src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp
Items in the sketcher constraint list are marked, based on selected geometric object in the sketch.
If a single item is selected mark all the constraints that are directly referencing this item.
If two or more items are selected, mark those constraints that directly reference at least two selected items (select two items to see how they are related!).
This version ignores main axes, external edges and the root point when they are selected. Should be easy to add them.
I'm managing own selection lists. This is done also in ViewProviderSketch.cpp (and possibly other places). I do not know if there is a way (and is it at all advisable) to share objects between TaskSketcherConstrains and ViewProviderSketch.
Thanks!
-- Itai
Re: Request for comments - constraint highlighting
Almost two weeks and 0 responses! What am I doing wrong?
Since my previous post I have added support for main axes, external edges root point, and also merged in the master branch several times.
I find this new feature useful.
Usage (set the filter to All to see the full list of constraints):
Select a single sketch object (line, arc, circle) to see the constraints that are related to that object.
Select a single vertex (line-end, point, etc) to see the constraints that are related to that vertex.
Select multiple items to see the constraints that are related to two or more items in the selected group.
To find the constraint that affects two connected line ends, it is easiest to use the box-selection tool on the area that contains the connected vertices.
Since my previous post I have added support for main axes, external edges root point, and also merged in the master branch several times.
I find this new feature useful.
Usage (set the filter to All to see the full list of constraints):
Select a single sketch object (line, arc, circle) to see the constraints that are related to that object.
Select a single vertex (line-end, point, etc) to see the constraints that are related to that vertex.
Select multiple items to see the constraints that are related to two or more items in the selected group.
To find the constraint that affects two connected line ends, it is easiest to use the box-selection tool on the area that contains the connected vertices.
Re: Request for comments - constraint highlighting
Hi, I am not a freecad maintainer so you might want to catch one on IRC to get a review if none responds here.
I did not try your code yet but from reading the diff, if I understand well, this works by modifying the behavior of the "All" filter by automatically highlight the constrains related to the selection. I find this a bit strange; my advise, for what it's worth, would be to add a filter "Follow Selection". I also have the sensation that it would simplify the code.
I did not try your code yet but from reading the diff, if I understand well, this works by modifying the behavior of the "All" filter by automatically highlight the constrains related to the selection. I find this a bit strange; my advise, for what it's worth, would be to add a filter "Follow Selection". I also have the sensation that it would simplify the code.
Re: Request for comments - constraint highlighting
Sorry for the double post but i forgot to mention: If you want your code to be reviewed for trunk integration, you might want to post in the "Pull Request" section of the forum.
Re: Request for comments - constraint highlighting
Hi,
Sorry nobody replied, but it's very easy to miss posts with phpbb forums (in fact I hadn't seen it)... You might try to send a private message to one of the sketcher developers like logari81. As xat80 said, there is a special section for that in this forum too, and there is also a "pull request" feature on the bug tracker, which I suggest you to use, so you don't risk to see your request lost in the void. I won't guarantee you that it will be accepted, though. As a general rule, you're always advised to discuss your ideas first, to see what others think of it, before implementing them...
Sorry nobody replied, but it's very easy to miss posts with phpbb forums (in fact I hadn't seen it)... You might try to send a private message to one of the sketcher developers like logari81. As xat80 said, there is a special section for that in this forum too, and there is also a "pull request" feature on the bug tracker, which I suggest you to use, so you don't risk to see your request lost in the void. I won't guarantee you that it will be accepted, though. As a general rule, you're always advised to discuss your ideas first, to see what others think of it, before implementing them...
Re: Request for comments - constraint highlighting
show screenshots or screencasts!nahshon wrote:Almost two weeks and 0 responses! What am I doing wrong?
Btw. why should constraints be selected when you select edges? This complicates things with selection. I would just add a point "Info" to the right-click pop-up menu or something like this, but I wouldn't mess with users selection.
Re: Request for comments - constraint highlighting
Actually I'll move this post to the "pull requests" section...
Re: Request for comments - constraint highlighting
Update:
Pass lists of conflicting / redundant constraints into TaskSketcherConstrains. These are colored red in the constraint list.
Always translate Resolved / Unresolved messages.
Paint the Unresolved messages red.
Todo: TaskSketcherMessage must compose the messages rather than accept strings via the slot functions.
Pass lists of conflicting / redundant constraints into TaskSketcherConstrains. These are colored red in the constraint list.
Always translate Resolved / Unresolved messages.
Paint the Unresolved messages red.
Todo: TaskSketcherMessage must compose the messages rather than accept strings via the slot functions.
Re: Request for comments - constraint highlighting
For those who replied earlier, After Yorik moved the thread I could not reply for some time. Then My computer was broken for more than a day (a new display adapter fixed it).
@yorikvanhavre: Thanks!
@xat80: I do not change the filter. Only add colors to already filtered items in the constraint list.
@logari81: I do not select constraints (I know its a bad idea. Been there in my very early trials).
Here's a screenshot after my latest changes. It shows only colors in the constraints list. There are also small changes to the sketcher messages area.
-- Itai
PS, How do I cause the image to be seen with the correct size?
@yorikvanhavre: Thanks!
@xat80: I do not change the filter. Only add colors to already filtered items in the constraint list.
@logari81: I do not select constraints (I know its a bad idea. Been there in my very early trials).
Here's a screenshot after my latest changes. It shows only colors in the constraints list. There are also small changes to the sketcher messages area.
-- Itai
PS, How do I cause the image to be seen with the correct size?
Re: Request for comments - constraint highlighting
Update: new merge from master and apply fix suggested here.