LinuxCNC Features - a kind of NGCGUI

More
11 years 1 month ago #62512 by FernV
Replied by FernV on topic LinuxCNC Features - a kind of NGCGUI
Hi Fixer

This is absolutely great...

I am speechless

Fern
The following user(s) said Thank You: fixer

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

More
11 years 1 month ago - 11 years 1 month ago #62513 by fixer
Replied by fixer on topic LinuxCNC Features - a kind of NGCGUI
Had a productive night :D
attached engrave feature, and D-sub inch and metric version.

I did some changes in features.py - in line 617 and in function to_gcode(). there is a if- statement that needs some work to be done. Can someone take a look at it (FernV, Nick,..)? It works because of an ugly hack with try:pass:, but it can be done better...
Features can now use external G-code generators with this change - call to program is defined in .ini file, the g-code must be returned in stdout.

also some work done in engrave-lines, now it can rotate text and you can choose font with additional index parameter.

File Attachment:

File Name: features.tar.gz
File Size:32 KB
Attachments:
Last edit: 11 years 1 month ago by fixer.

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

More
11 years 1 month ago #62541 by FernV
Replied by FernV on topic LinuxCNC Features - a kind of NGCGUI
Hi,

I will sure look at your work.

Here some shots of where I am at



As you can see, there are more headers and sub-headers and I hope it makes it more usable. However, I do not know how difficult it is with a touch screen to expand/collapse rows. Please tell me about your experience and what you think about it.



Add dialog does not exist anymore and IconView is integrated in the window and shows when Add button is clicked. A single click is required. Also please note the size of icons and height of rows to make it easier with a touch screen. Please comment.



A Virtual Keyboard appears when editing data type int and float. Not available in widget box. Simply set 'use_numeric_vkb = True' in the beginning of features.py. Again I would like your comment and if I should do more

Regards
Fern
Attachments:
The following user(s) said Thank You: fixer

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

More
11 years 1 month ago #62547 by FernV
Replied by FernV on topic LinuxCNC Features - a kind of NGCGUI
Hi Fixer

This file will do metric AND imperial


File Attachment:

File Name: mz_dsub.ngc
File Size:8 KB


Regards
Fern
Attachments:
The following user(s) said Thank You: fixer

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

More
11 years 1 month ago #62549 by fixer
Replied by fixer on topic LinuxCNC Features - a kind of NGCGUI

FernV wrote: Hi,

As you can see, there are more headers and sub-headers and I hope it makes it more usable. However, I do not know how difficult it is with a touch screen to expand/collapse rows. Please tell me about your experience and what you think about it.
Fern


I think, with split side by side view, there is plenty of space to have all parameters shown. Also requires less clicking. You have those sub headers declared in ini files, right? Leave it there, I am sure it will come handy, but with those basic subroutines with small set of params I would not use them.

FernV wrote: Hi,
Add dialog does not exist anymore and IconView is integrated in the window and shows when Add button is clicked. A single click is required. Also please note the size of icons and height of rows to make it easier with a touch screen. Please comment.
Fern


GREAT!, just what i wanted!

FernV wrote: Hi,
A Virtual Keyboard appears when editing data type int and float. Not available in widget box. Simply set 'use_numeric_vkb = True' in the beginning of features.py. Again I would like your comment and if I should do more
Fern


Again, great! Thank you!


When do you think you will publish it? I still have some ideas to do in engraving feature (text on arc), but wont be able to finish it before next weekend. if ypu want to include it in your version, of course.
I did something with that if statement, it works better, but can still be done even better. Do take a look at it:
Code:
def to_gcode(self, *arg) : def recursive(itr) : gcode_def = "" gcode = "" f = self.treestore.get(itr, 0)[0] if f.__class__ == Feature : gcode_def += f.get_definitions() gcode += f.process(f.attr["before"]) gcode += f.process(f.attr["call"]) try: comm = f.process(f.attr["command"]) if comm != "": rc = subprocess.check_output(os.path.abspath('.').strip() + comm.strip(), shell=True) if "(bash_return_string)" in gcode : gcode = string.replace(gcode, "(bash_return_string)", rc) except Exception: pass

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

More
11 years 1 month ago #62558 by FernV
Replied by FernV on topic LinuxCNC Features - a kind of NGCGUI

fixer wrote:

FernV wrote: As you can see, there are more headers and sub-headers and I hope it makes it more usable. However, I do not know how difficult it is with a touch screen to expand/collapse rows. Please tell me about your experience and what you think about it.
Fern


I think, with split side by side view, there is plenty of space to have all parameters shown. Also requires less clicking. You have those sub headers declared in ini files, right? Leave it there, I am sure it will come handy, but with those basic subroutines with small set of params I would not use them.


Depending on layout it could load differently. The idea is being easier to find the param a user wants to change. I think of any user, beginner or senior alike, not just you.

fixer wrote: When do you think you will publish it?


I still have a few bugs to sort out and some other things to improve

fixer wrote: I still have some ideas to do in engraving feature (text on arc), but wont be able to finish it before next weekend. if ypu want to include it in your version, of course.
I did something with that if statement, it works better, but can still be done even better. Do take a look at it:

Code:
def to_gcode(self, *arg) : def recursive(itr) : gcode_def = "" gcode = "" f = self.treestore.get(itr, 0)[0] if f.__class__ == Feature : gcode_def += f.get_definitions() gcode += f.process(f.attr["before"]) gcode += f.process(f.attr["call"]) try: comm = f.process(f.attr["command"]) if comm != "": rc = subprocess.check_output(os.path.abspath('.').strip() + comm.strip(), shell=True) if "(bash_return_string)" in gcode : gcode = string.replace(gcode, "(bash_return_string)", rc) except Exception: pass


I understand what you are doing but have you tried using <exec>subprocess("/lib/engrave-feature ...")</exec> in [CALL] content ? In f.process it would call 'exec_callback'.
I would try this way.

I would also modify engrave-feature.py to add some functionnality like : horizontal align (left, center or right), vertical align (top, center or bottom) that would require a first step of calculating width and height BEFORE creating the gcode. And instead of using yscale I would use 'Height'. I think xscale is OK.

Try to integrate it as much as possible so we can engrave some text in the center of a workpiece, engrave an ellipse around it then cut the workpiece as a rectangle with styled corners

Fern

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

Time to create page: 0.293 seconds
Powered by Kunena Forum