Manipulator WorkBench

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
User avatar
Zolko
Posts: 1042
Joined: Mon Dec 17, 2018 10:02 am

Re: Manipulator WorkBench

Postby Zolko » Sun Feb 02, 2020 11:17 am

Hello,

I have 2 questions:

1) is the Caliper tool App::Link aware ? By that, I wish to know whether it's possible to measure distances and angles between 2 linked objects (parts). I tested it and it doesn't seem like it.

2) why did you choose to use panels instead of windows ? (QDialog type for example). Would it be possible/difficult to have an option for choosing between the 2 layouts ? (panel/window).
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
User avatar
easyw-fc
Posts: 2905
Joined: Thu Jul 09, 2015 9:34 am

Re: Manipulator WorkBench

Postby easyw-fc » Sun Feb 02, 2020 11:30 am

Zolko wrote:
Sun Feb 02, 2020 11:17 am
Hello,

I have 2 questions:

1) is the Caliper tool App::Link aware ? By that, I wish to know whether it's possible to measure distances and angles between 2 linked objects (parts). I tested it and it doesn't seem like it.
R 1) would you post a FC file example to check?
Zolko wrote:
Sun Feb 02, 2020 11:17 am
2) why did you choose to use panels instead of windows ? (QDialog type for example). Would it be possible/difficult to have an option for choosing between the 2 layouts ? (panel/window).
R 2) I used a DockWidget because I wanted to allow to dock the widget to LeftDockWidgetArea or RightDockWidgetArea.
As far as I know, this is not available with a QDialog.
User avatar
Zolko
Posts: 1042
Joined: Mon Dec 17, 2018 10:02 am

Re: Manipulator WorkBench

Postby Zolko » Sun Feb 02, 2020 11:36 am

easyw-fc wrote:
Sun Feb 02, 2020 11:30 am
Zolko wrote:
Sun Feb 02, 2020 11:17 am
1) is the Caliper tool App::Link aware ? By that, I wish to know whether it's possible to measure distances and angles between 2 linked objects (parts). I tested it and it doesn't seem like it.
R 1) would you post a FC file example to check?
attached. When you measure between 2 links, it actually returns the value of the measurement between the 2 original parts.

Zolko wrote:
Sun Feb 02, 2020 11:17 am
2) why did you choose to use panels instead of windows ? (QDialog type for example). Would it be possible/difficult to have an option for choosing between the 2 layouts ? (panel/window).
R 2) I used a DockWidget because I wanted to allow to dock the widget to LeftDockWidgetArea or RightDockWidgetArea.
As far as I know, this is not available with a QDialog.
I understand. On the other hand, you might not want the caliper tool to always be there, it is something that I really need, but only sometimes: for me, I'd like to be able to activate it, make my measurements, and when I'm done close the window and it's not cluttering my screen. So the question was to be able to choose between the 2 layouts: panel or window. May-be it's not possible.
Attachments
asm_tuto2.FCStd
(61.12 KiB) Downloaded 15 times
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
User avatar
f3nix
Posts: 337
Joined: Sat May 30, 2015 11:58 am

Re: Manipulator WorkBench

Postby f3nix » Sun Feb 02, 2020 12:34 pm

easyw-fc wrote:
Fri Jan 31, 2020 8:59 pm
Hi Mateusz
I've just added a hdpi branch to my repo
https://github.com/easyw/Manipulator/tree/hdpi
you can test the new Aligner with your HDPI screen
.. and, if you want, adapt the other tools...
then just poke me here or make a PR to the hdpi branch and I will merge it and finalizing the merging.
Hello Maurice.
To be honest I do not like the docked behaviour. It expands too much for my taste. Too much mouse movement necessary. Screenshot attached.

easyw-fc wrote:
Fri Jan 31, 2020 8:59 pm
ATM I cannot find a way to keep the old behavior to minimize the dialog but the dialog can be placed behind the Combo Tab... so there is not a big defeat though...
One solution that comes to mind is hiding/showing widgets when necessary. Qt should handle the rest automagically.
E.g.

Code: Select all

...
...
...
ALGDockWidget.ui.Label_Align_Gui.setVisible(False)
ALGDockWidget.ui.AlignGroup.setVisible(False)
ALGDockWidget.ui.ReferenceGroup.setVisible(False)
ALGDockWidget.ui.ControlsGroup.setVisible(False)
...
...
...
Cheers,
Mateusz
Attachments
align.png
align.png (71.79 KiB) Viewed 634 times
User avatar
easyw-fc
Posts: 2905
Joined: Thu Jul 09, 2015 9:34 am

Re: Manipulator WorkBench

Postby easyw-fc » Sun Feb 02, 2020 3:05 pm

Zolko wrote:
Sun Feb 02, 2020 11:36 am
for me, I'd like to be able to activate it, make my measurements, and when I'm done close the window and it's not cluttering my screen.
it should be simply closable clicking on the red cross button... Caliper button can be assigned to the Toolbar and be activated or closed at your needs...
User avatar
easyw-fc
Posts: 2905
Joined: Thu Jul 09, 2015 9:34 am

Re: Manipulator WorkBench

Postby easyw-fc » Sun Feb 02, 2020 3:28 pm

f3nix wrote:
Sun Feb 02, 2020 12:34 pm
Hello Maurice.
To be honest I do not like the docked behaviour. It expands too much for my taste. Too much mouse movement necessary. Screenshot attached.
...
One solution that comes to mind is hiding/showing widgets when necessary. Qt should handle the rest automagically.

Cheers,
Mateusz
Hi Mateusz
I reverted to your Aligner hdpi ui solution...
Then I have added the hiding to allow the minimize resizing...
I have uploaded a first release of Aligner fully adapted for hdpi ... could you please test it?
https://github.com/easyw/Manipulator/tree/hdpi
https://github.com/easyw/Manipulator/ra ... Aligner.py
User avatar
easyw-fc
Posts: 2905
Joined: Thu Jul 09, 2015 9:34 am

Re: Manipulator WorkBench

Postby easyw-fc » Mon Feb 03, 2020 10:11 pm

f3nix wrote:
Sun Feb 02, 2020 12:34 pm
Hello Maurice.
Hi Mateusz
I've updated also Caliper in the hdpi branch...
you can test the latest code it here:
https://github.com/easyw/Manipulator/ra ... Caliper.py
User avatar
easyw-fc
Posts: 2905
Joined: Thu Jul 09, 2015 9:34 am

Re: Manipulator WorkBench

Postby easyw-fc » Mon Feb 03, 2020 10:13 pm

Zolko wrote:
Sun Feb 02, 2020 11:36 am
attached. When you measure between 2 links, it actually returns the value of the measurement between the 2 original parts.
@Zolko
I've downloaded the example and I will have a look at asap I've finished the HDPI improvement.
User avatar
f3nix
Posts: 337
Joined: Sat May 30, 2015 11:58 am

Re: Manipulator WorkBench

Postby f3nix » Tue Feb 04, 2020 5:38 am

easyw-fc wrote:
Mon Feb 03, 2020 10:11 pm
f3nix wrote:
Sun Feb 02, 2020 12:34 pm
Hello Maurice.
Hi Mateusz
I've updated also Caliper in the hdpi branch...
you can test the latest code it here:
https://github.com/easyw/Manipulator/ra ... Caliper.py
Hello Maurice.
Caliper looks good. Works great with scaling. :)

One thing is missing I think:

Code: Select all

diff --git a/Caliper.py b/Caliper.py
index 510a717..c6403a0 100644
--- a/Caliper.py
+++ b/Caliper.py
@@ -1026,6 +1026,7 @@ def Cp_undock():
 
 def Cp_internal(show):
     CPDockWidget.ui.Controls_Group.setVisible(show)
+    CPDockWidget.ui.Label.setVisible(show)
 
 def Cp_resize():
     CPDockWidget.resize(sizeXmin,sizeYmin)
easyw-fc wrote:
Sun Feb 02, 2020 3:28 pm
I reverted to your Aligner hdpi ui solution...
Then I have added the hiding to allow the minimize resizing...
Sorry but I do not see any change in the behaviour. It almost looks the same as before. After checking the ui files it looks the vertical and horizontal spacers are not in the right spots (could you please check my original branch).

The undock button is not top aligned.

Cheers,
Mateusz

P.S.1 Does PyQt add QtCore.Qt.AlignTop automatically or do you have to add them by hand. PySide2's uic does not do it.
P.S.2 I have spotted some odd behavior. I am able to test only with QT_SCREEN_SCALE_FACTORS=1;2;1;2. Sometimes when moving across screens with different factors the window gets resized randomly. The window gets spread across two monitors. Or the window is doubling its size after every move (not always). Will have to investigate it further if it is a Qt bug, PySide bug or something else.
Attachments
align-proposed.png
align-proposed.png (23.52 KiB) Viewed 517 times
align-current.png
align-current.png (24.56 KiB) Viewed 517 times
User avatar
easyw-fc
Posts: 2905
Joined: Thu Jul 09, 2015 9:34 am

Re: Manipulator WorkBench

Postby easyw-fc » Tue Feb 04, 2020 2:13 pm

f3nix wrote:
Tue Feb 04, 2020 5:38 am
Hello Maurice.
Caliper looks good. Works great with scaling. :)

One thing is missing I think:
Caliper should be fine now :D

f3nix wrote:
Tue Feb 04, 2020 5:38 am
Sorry but I do not see any change in the behaviour. It almost looks the same as before. After checking the ui files it looks the vertical and horizontal spacers are not in the right spots (could you please check my original branch).

The undock button is not top aligned.
I should have fixed both Aligner and Mover
Could you please test the three widgets?
https://github.com/easyw/Manipulator/tree/hdpi