Inspect G-code dialog make moveable

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
WarrenkCash
Posts: 27
Joined: Wed Aug 04, 2021 9:10 am

Inspect G-code dialog make moveable

Post by WarrenkCash »

Hello
I hope this is useful to others. When using Inspect G-code the dialog opens and is locked in the center of the screen blocking most of the screen. This make's it difficult to see every thing at once.
A fix for this is to find the file named PathInspect.py. It is in Mod/Path/PathScripts on linux. Change line 245 from result = dia.exec_() to result = dia.show() . keep the indent the same I still get caught with this. If FreeCAD is running you will need to close it and restart to see the change.
It seems to function the same as before , only now you can move the window any where you want now. I have not seen any problems doing this but it's easy to change back if it does play up.
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: Inspect G-code dialog make moveable

Post by chrisb »

On macOS I never had that problem, but I will try your proposal nevertheless, hoping that the dialog is no longer modal, so that I can turn the model while having the dialog open.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: Inspect G-code dialog make moveable

Post by chrisb »

chrisb wrote: Fri Jun 03, 2022 12:55 pm hoping that the dialog is no longer modal, so that I can turn the model while having the dialog open.
It is indeed no longer modal, and I can indeed access 3D view. Alas the dialog can drop behind the main window, where it may well get lost.

Is there something in between: a non-modal dialog staying on top of the main window?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: Inspect G-code dialog make moveable

Post by chrisb »

I just found a problem with the change: When I select a (profile) path and inspect it, then there is a new object named "selection" created, which lies outside of the whole Job.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jescombe
Posts: 90
Joined: Tue Mar 09, 2021 4:19 pm

Re: Inspect G-code dialog make moveable

Post by jescombe »

WarrenkCash wrote: Fri Jun 03, 2022 10:24 am When using Inspect G-code the dialog opens and is locked in the center of the screen blocking most of the screen. This make's it difficult to see every thing at once.
Are you using Linux / GNOME maybe? If so, this can be fixed in the GNOME Tweaks tool... Windows -> Attach Modal Dialogues -> Off

Edit: maybe it would still be better if it wasn't modal, but at least this allows you to move it to see your model ;)
WarrenkCash
Posts: 27
Joined: Wed Aug 04, 2021 9:10 am

Re: Inspect G-code dialog make moveable

Post by WarrenkCash »

Hello everyone.
I am on Ubuntu. I wil try the Gnome fix. Thanks for the tip jescombe .I also forgot the about info.


OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 2022.531.14555 (Git shallow)
Build type: Release
Branch: (HEAD detached at 2022.05.31-edge)
Hash: 36367cecc18492fec00ee01ecb2214c79a326f76
Python version: 3.8.10
Qt version: 5.15.3
Coin version: 4.0.1
OCC version: 7.6.2
Locale: English/Australia (en_AU)
bmsaus4ax
Posts: 258
Joined: Sat Nov 14, 2020 9:16 pm
Location: Bargara, Queensland, Australia UTC+10

Re: Inspect G-code dialog make moveable

Post by bmsaus4ax »

WarrenkCash wrote: Fri Jun 03, 2022 9:35 pm Hello everyone.
I am on Ubuntu. I wil try the Gnome fix. Thanks for the tip jescombe .I also forgot the about info.
jescombe also wrote:
Are you using Linux / GNOME maybe? If so, this can be fixed in the GNOME Tweaks tool... Windows -> Attach Modal Dialogues -> Off
Thank you to both WarrenkCash and jescombe
I have had this as a wish list item for some time. Had previously seen chrisb reference moving the window but could not get it to happen.
bmsaus4ax
Posts: 258
Joined: Sat Nov 14, 2020 9:16 pm
Location: Bargara, Queensland, Australia UTC+10

Re: Inspect G-code dialog make moveable

Post by bmsaus4ax »

chrisb wrote: Fri Jun 03, 2022 1:18 pm I just found a problem with the change: When I select a (profile) path and inspect it, then there is a new object named "selection" created, which lies outside of the whole Job.
This is happening in Ubuntu 20.04 also but only while the Inspect Window is open, clears when Inspect is closed.
Tested with a build , file modification;
and an AppImage, GNOME TWEAKS.
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: Inspect G-code dialog make moveable

Post by chrisb »

jescombe wrote: Fri Jun 03, 2022 2:46 pm Are you using Linux / GNOME maybe?
No, I'm on macOS (see above). I found another issue, or perhaps a feature: there can now multiple instances of the inspection window be opened.
Perhaps it is a solution to show the inspect code in the Task panel?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
WarrenkCash
Posts: 27
Joined: Wed Aug 04, 2021 9:10 am

Re: Inspect G-code dialog make moveable

Post by WarrenkCash »

I have tried the GNOME Tweaks tool... Windows -> Attach Modal Dialogues -> Off As suggested by jescombe on my Ubuntu machine and it allows me to move the dialog out of the way but does not let me interact with the model. With the modified PathInspect.py the dialog stays on top of the main window but allows me to interact with the model turning and resizing it with the navigation cube or mouse. I can also open more than on Path Inspect dialog and stack them on top of each other and they seem to function as they should.
I also modified PathInspect.py on a windows 10 and it also seems to function similarly . The dialog stays on top and I can also open multiple dialogs and they seem to function as they should. I can also interact with the model with the navigation cube but not the mouse. I did notice the Windows did allow me to move the dialog before modifying PathInspect.py but I could not interact with the model or open more than one Path Inspect dialog.
The safe option on linux is the GNOME Tweaks tool... Windows -> Attach Modal Dialogues -> Off.
Modify the PathInspect.py file and test it if you like you may find more uses. I had 4 debur Path Inspect dialogs open with the tool visible on my Ubuntu FreeCAD and ran through all with no problems moving the model and viewing the tool positions as well as holding shift and highlighting the whole path for all as well.
Being able to interact with the model is useful for a better view. More than one Path Inspect dialog open at once is interesting and possibly handy. You are also able to interact with the main FreeCAD window this could be a problem.
Post Reply