[To be reworked] Sketcher Tool settings : testers welcome!

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Sketcher Tool settings : testers welcome!

Post by adrianinsaval »

Here another weird situation with keyboard, it brings me back to the length field when pressing enter, and as before the values can't be set just using keyboard, I must make enough clicks in the viewport even if they are completely unrelated to the final shape/position of the edges.
Attachments
simplescreenrecorder-2022-07-06_21.21.17.mp4.txt
(986.89 KiB) Downloaded 13 times
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: Sketcher Tool settings : testers welcome!

Post by paddle »

Kunda1 wrote: Wed Jul 06, 2022 11:47 am
phpBB [video]
@paddle these are the features that we're testing in the PR ?
This video is from my initial development. Things changed quite a bit since Abdullah reworked the DSH.
But overall yes this video is an overview of the tool settings widget.

Besides the testing is on the tools mentioned by Abdullah, as they are those that are finished :
DSH Line
DSH Rectangle
DSH Circle
DSH Ellipse
DSH Polygon
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: Sketcher Tool settings : testers welcome!

Post by paddle »

adrianinsaval wrote: Thu Jul 07, 2022 1:20 am Overall seems pretty great, it's a little awkward to use if you try to define everything through keyboard because you still need to make all the clicks needed if you were doing it just through the mouse, it would be nice if the values could be accepted with just enter. Attached a video trying to do it on keyboard, just remove the .txt from the name
I'm not sure to understand what you mean. And I can't understand the video very clearly. Pressing enter should validate the value and go to next step.

Though testing now the slot DSH (on 'paddle_widget', but it seems that 'paddle_widget_testing' hasn't further commits on slot) it does have problems going from one parameter to the next. I will fix it and push asap.

Did you meet this issue with rectangle DSH?
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: Sketcher Tool settings : testers welcome!

Post by paddle »

adrianinsaval wrote: Thu Jul 07, 2022 1:27 am Here another weird situation with keyboard, it brings me back to the length field when pressing enter, and as before the values can't be set just using keyboard, I must make enough clicks in the viewport even if they are completely unrelated to the final shape/position of the edges.
Yes indeed it's a problem with slot DSH. I'll fix that asap

@abdullah
Slot feature was missing it's getState function. I'm building on 'paddle_widget_testing' branch and will push on that branch if it solves the problem.

Code: Select all

template <> auto DrawSketchHandlerSlotBase::ToolWidgetManager::getState(int parameterindex) const {
    switch (parameterindex) {
    case WParameter::First:
    case WParameter::Second:
        return SelectMode::SeekFirst;
        break;
    case WParameter::Third:
    case WParameter::Fourth:
        return SelectMode::SeekSecond;
        break;
    case WParameter::Fifth:
        return SelectMode::SeekThird;
        break;
    default:
        THROWM(Base::ValueError, "Parameter index without an associated machine state")
    }
}
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Sketcher Tool settings : testers welcome!

Post by abdullah »

openBrain wrote: Wed Jul 06, 2022 6:40 am Sorry but this is a bit of a mess. I just looked and the PR and the testing branch on your repo are not in sync. So I don't know what is to be tested ATM. Please advise.
If I can have an opinion on this, the PR should be the reference for testing, but I should be able to compile any. ;)
That is indeed surprising...

I have pushed a branch (paddle_widget_testing) to my github. My PC says my local and my remote branches are in sync:

Code: Select all

commit b485cc42663e76f7caca5a0d3aa845ed0c82114e (HEAD -> paddle_widget_testing, AFreeCAD/paddle_widget_testing)
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Sat Jul 2 06:55:03 2022 +0200

    codespell
The PR is just a PR from that branch (abdullahtahiriyo:paddle_widget_testing).

Do you see something I do not see?
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Sketcher Tool settings : testers welcome!

Post by abdullah »

adrianinsaval wrote: Thu Jul 07, 2022 1:20 am Overall seems pretty great, it's a little awkward to use if you try to define everything through keyboard because you still need to make all the clicks needed if you were doing it just through the mouse, it would be nice if the values could be accepted with just enter.
Thanks for testing.

DSH Slot is not finished yet. This is why I wanted to focus this testing round in:

DSH Line
DSH Rectangle
DSH Circle
DSH Ellipse
DSH Polygon

In these tools, you should be able to create the shape by any mixture of combinations of mouse clicks and keyboard inputs. This means:
1) You should be able to create any of those shapes only with the mouse, as you were doing before this PR.
2) You should be able to create a shape only by entering the parameter values in the widget (in which case, it will be dimensionaly constrained to those values)
3) Any combination of setting some parameters via mouse clicks (in which case there will no dimensional constraint, but will respect any autoconstraint), and widget parameters (in which case those parameters will be constrained via dimensional constraints).

In those tools it is not expected that you have to do both, enter a value and click for it to work. That would be unintended and a bug.
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: Sketcher Tool settings : testers welcome!

Post by paddle »

abdullah wrote: Thu Jul 07, 2022 8:56 am DSH Slot is not finished yet.
Oh that's why. Anyhow, I added the getstate and it solved said problem. Somehow I can't find how to PR to the paddle_widget_testing so here's the commit :
https://github.com/PaddleStroke/FreeCAD ... c985c3634d
Or the code is on my earlier post. Probably easier to just copy paste it.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Sketcher Tool settings : testers welcome!

Post by abdullah »

paddle wrote: Thu Jul 07, 2022 9:04 am Oh that's why. Anyhow, I added the getstate and it solved said problem. Somehow I can't find how to PR to the paddle_widget_testing so here's the commit :
https://github.com/PaddleStroke/FreeCAD ... c985c3634d
I prefer not to change the testing branch during a testing round. This helps with ensuring that all different users are testing the same thing. For development we have the paddle_widget branch (this I have just rebased, added your latest honeycomb commits, and the code you posted above). Of course, in all the branches there is still missing that you do not have proper attribution for several commits due to intensive fixing and squashing of commits, this will change before any prospective merge.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Sketcher Tool settings : testers welcome!

Post by abdullah »

Ok, next try to see if I get the forum mention system right...

@openBrain

@chrisb

@adrianinsaval

Now I think I get it. I was writing the mention tags myself. Using @ and starting to type the first letters of the name is very convenient (specially for difficult to remember names).

Ah! One important bit. What do you think of the new organisation of the toolbar?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Sketcher Tool settings : testers welcome!

Post by adrianinsaval »

abdullah wrote: Thu Jul 07, 2022 8:56 am DSH Slot is not finished yet. This is why I wanted to focus this testing round in:

DSH Line
DSH Rectangle
DSH Circle
DSH Ellipse
DSH Polygon
Ah! Sorry I missed this if it was said before, I'll give it another test over the weekend.
Post Reply