Display setup sheet

More
08 Apr 2020 20:05 #163232 by anfänger
Hello,

I use fusion for cad and cam and thought it would be useful to be able to show the setup sheets in probe basic. So I added a setup tab with a Webview widget.
I always rename the setup sheets like the nc-files (and hope fusion will do this automatically one day). now I only need to find a way to load the sheet together with the nc file.
For this I would need to read path and name, change the ending and parse this to the webview widget.
Or simply add a filechooser to the setup tab



Can anyone help me to make the changes?
I have never worked with python or qt.

Thanks Patrick

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 22:51 #163250 by persei8
Replied by persei8 on topic Display setup sheet
What a good idea. I also use Fusion as well as Aspire and they both can make setup sheets. I generally just print it off. If you name the ngc and setup html files with the same basename, a python routine could just look for the html file whenever you load a gcode file. (I know, you said that - just pondering) I will think about implementing this in qtdragon.

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 00:00 #163255 by KCJ
Replied by KCJ on topic Display setup sheet
Patrick, that is a fantastic idea!

I'll make an example showing how this type of addition can be done without having to modify any of the ProbeBasic code.

Cheers,
Kurt

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 01:57 #163279 by KCJ
Replied by KCJ on topic Display setup sheet
Here is a quick and dirty example of how to add the setup sheet tab to ProbeBasic, without having to modify any if the PB source files.

  1. Place the attached custom_probebasic.py file in your config directory.
  2. Add a custom_config.yml file to the config directory with the following content:
    # use custom probe basic main window class
    windows:
      mainwindow:
        provider: custom_probebasic:CustomProbeBasic
  3. Specify the YAML file in the INI:
    [DISPLAY]
    DISPLAY = probe_basic
    CONFIG_FILE = custom_config.yml
    ...


Run LinuxCNC as usual. A new tab will be inserted in the main tab widget containing a QWebView for displaying the setup sheet. Each time a GCODE file is loaded it will look for an HTML file with the same name as the gcode file and display it in the webview.



Cheers,
Kurt
Attachments:
The following user(s) said Thank You: BigJohnT, tommylight, anfänger

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 02:02 #163280 by Lcvette
Replied by Lcvette on topic Display setup sheet

Here is a quick and dirty example of how to add the setup sheet tab to ProbeBasic, without having to modify any if the PB source files.

  1. Place the attached custom_probebasic.py file in your config directory.
  2. Add a custom_config.yml file to the config directory with the following content:
    # use custom probe basic main window class
    windows:
      mainwindow:
        provider: custom_probebasic:CustomProbeBasic
  3. Specify the YAML file in the INI:
    [DISPLAY]
    DISPLAY = probe_basic
    CONFIG_FILE = custom_config.yml
    ...


Run LinuxCNC as usual. A new tab will be inserted in the main tab widget containing a QWebView for displaying the setup sheet. Each time a GCODE file is loaded it will look for an HTML file with the same name as the gcode file and display it in the webview.



Cheers,
Kurt


I actually made a set up sheet window in the file chooser tab already just for this but couldn't figure out the webview widget, hazzy can you set it up there? It's already formatted in probe basic for this purpose!

Chris
The following user(s) said Thank You: KCJ, anfänger

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 02:04 #163281 by KCJ
Replied by KCJ on topic Display setup sheet
Hey Chris, absolutely! I did not know it was already there.

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 04:28 #163297 by anfänger
Replied by anfänger on topic Display setup sheet
Thanks for all the help. I didn’t realise the setup tab yet. But I will have a look at it on the next release. Till then I will check out the custom yaml file.

Cheers Patrick

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.519 seconds
Powered by Kunena Forum