How to disable preview in Gmocappy

More
13 Jul 2022 09:51 - 13 Jul 2022 11:59 #247220 by tarasko
Hello. I'm loading huge files (230Mbytes size) and on my cnc desktop rendering of these files are useless and it's painful for working.
Is there a way to completely disable rendering of tool path, and don't burn CPU resources?
 
Last edit: 13 Jul 2022 11:59 by tarasko.

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

More
13 Jul 2022 19:36 #247247 by HansU
You can try to hide it, but I am not sure if this reduces the cpu load (and if its even hidden). Insert this in the display section of the ini file:
EMBED_TAB_NAME = preview
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = hide
For reference:
linuxcnc.org/docs/devel/html/gui/gmoccap...tabs-and-side-panels
The following user(s) said Thank You: tarasko

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

More
14 Jul 2022 12:52 #247286 by cmorley
add this near to top of program:

(AXIS,stop)
The following user(s) said Thank You: tarasko

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

More
14 Jul 2022 17:54 - 14 Jul 2022 17:58 #247308 by snakeoil
If I use "EMBED_TAB_COMMAND = hide" on 2.9 it hides the preview but also the file browser. I guess they display in the same "tab"... or something.

Meanwhile AXIS,stop seems to speed things up, allows big (15MB) gcode files, but I get this error:

Found an error!
The following information may be useful in troubleshooting:
Traceback (most recent call last):
File"/usr/lib/python3/dist-packages/gladevcp/hal_gremlin.py", line 144,
in fileloaded
self._load(f)
File"/usr/lib/python3/dist-packages/rs274/glcanon.py", line 347, in inner
return f(self, *args, **kw)
File"/usr/lib/python3/dist-packages/gladevcp/hal_gremlin.py",.line282,
in _load
return self.load(filename)
File "/usr/lib/python3/dist-packages/gremlin.py", line 354, in load
result, seq = self.load_preview(filename, canon, unitcode, initcode)
File"/usr/lib/python3/dist-packages/rs274/g|canon.py", line 1865, in
load_preview
result, seq = qcode parse(f, canon, *args)
RuntimeError: parse_file interp_error

Last edit: 14 Jul 2022 17:58 by snakeoil.

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

More
15 Jul 2022 04:06 #247352 by cmorley
I see see error too, weird qtdragon doesn't get it (very similar code).
But (AXIS,hide) worked in Gmoccapy.

(AXIS,show) is available too, in this way you can hide/show different parts.

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

More
27 Jul 2022 08:29 #248393 by HansU
I think these special commands like (AXIS, xxx) should appear somewhere else in the docs than in the Axis page as they are relevant for some more GUIs.
Maybe in www.linuxcnc.org/docs/html/gcode/overview.html#gcode:messages ?
 

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

More
27 Jul 2022 13:19 #248417 by HansU
Maybe we could also add an option in the ini file to disable the preview like the guys of machinekit did:

groups.google.com/g/machinekit/c/xN_nHGH-Czo?pli=1
github.com/machinekit/machinekit/commit/...88e07eb6651bf10266dc

The docs there say:
  • 'DISABLE_PREVIEW = YES'Loading big files can seriously slow down or even crash Axis if the preview is enabled,
    because it consumes huge amounts of memory.
    This option turns the preview off. The live plot will still be drawn.
It sounds nice that the live plot is still available.

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

More
29 Jul 2022 16:01 #248622 by cmorley
That is a good idea. I recently added (PREVIEW,) as an alternative to AXIS to be more generic.

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

More
29 Jul 2022 17:05 #248628 by HansU

That is a good idea.

To which of my two posts is this related?

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

More
29 Jul 2022 17:11 #248630 by cmorley
sorry, I was speaking of the documentation.
QtDragon already has this:
linuxcnc.org/docs/devel/html/gui/qtdragon.html#_preview_control

I have no strong opinion of your other suggestion, but if done it should be done for all GUIs so affects code in three files - but the code changes would be very similar.

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

Moderators: newbynobiHansU
Time to create page: 0.083 seconds
Powered by Kunena Forum