Display setup sheet

More
6 years 6 months ago #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 to join the conversation.

More
6 years 6 months ago #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 to join the conversation.

More
6 years 6 months ago #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 to join the conversation.

More
6 years 6 months ago #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:
    Code:
    # use custom probe basic main window class windows: mainwindow: provider: custom_probebasic:CustomProbeBasic
  3. Specify the YAML file in the INI:
    Code:
    [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.

Attachment not found



Cheers,
Kurt

Please Log in to join the conversation.

More
6 years 6 months ago #163280 by Lcvette
Replied by Lcvette on topic Display setup sheet

KCJ wrote: 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:
    Code:
    # use custom probe basic main window class windows: mainwindow: provider: custom_probebasic:CustomProbeBasic
  3. Specify the YAML file in the INI:
    Code:
    [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.

Attachment not found



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

Please Log in to join the conversation.

More
6 years 6 months ago #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 to join the conversation.

More
6 years 6 months ago #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 to join the conversation.

More
2 years 2 months ago #308059 by anfänger
Replied by anfänger on topic Display setup sheet
Short question, I updated all my machines now to 2.9.3 and moved my modifications to the user tabs.
I thought also adding the setup sheet to my lathe using probe_basic_lathe.
With the mill it is still working on the lathe i get following error:
Code:
Traceback (most recent call last): File "/usr/bin/probe_basic_lathe", line 8, in <module> sys.exit(main()) ^^^^^^ File "/usr/lib/python3/dist-packages/probe_basic_lathe/__init__.py", line 19, in main qtpyvcp.run_vcp(opts, VCP_CONFIG_FILE) File "/usr/lib/python3/dist-packages/qtpyvcp/__init__.py", line 26, in run_vcp run(*args, **kwargs) File "/usr/lib/python3/dist-packages/qtpyvcp/app/__init__.py", line 129, in run launch_application(opts, config) File "/usr/lib/python3/dist-packages/qtpyvcp/app/launcher.py", line 78, in launch_application loadWindows(config['windows']) File "/usr/lib/python3/dist-packages/qtpyvcp/app/launcher.py", line 228, in loadWindows window = _initialize_object_from_dict(window_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/qtpyvcp/app/launcher.py", line 208, in _initialize_object_from_dict return obj(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ File "/home/ditte/linuxcnc/configs/ditte/custom_probebasic.py", line 15, in __init__ super(CustomProbeBasic, self).__init__(*args, **kwargs) File "/usr/lib/python3/dist-packages/probe_basic/probe_basic.py", line 47, in __init__ self.vtk.setViewMachine() # set view to machine at startup ^^^^^^^^ AttributeError: 'CustomProbeBasic' object has no attribute 'vtk'

Please Log in to join the conversation.

More
2 years 2 months ago #308592 by Lcvette
Replied by Lcvette on topic Display setup sheet
check the custom config yaml file for the changes made. always compare your sim config files first that is 99% of the time where your error originates from. if the sim launches and runs without issue.

Please Log in to join the conversation.

More
2 years 2 months ago #308678 by anfänger
Replied by anfänger on topic Display setup sheet
I solve the issue by making a custom tab and adapting the code snippets KCJ wrote four jears ago.

Please Log in to join the conversation.

Time to create page: 0.104 seconds
Powered by Kunena Forum