LinuxCNC Features - a kind of NGCGUI

More
07 Sep 2015 17:32 #62190 by FernV
Thanks Andy,

I will check how I can use it

Regards
Fern

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

More
07 Sep 2015 17:36 #62191 by andypugh
There is a usage example in hobbing.py in the zip file here: wiki.linuxcnc.org/cgi-bin/wiki.pl?Hobbing
The following user(s) said Thank You: FernV

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

More
07 Sep 2015 17:38 #62192 by FernV
Hi fixer,

Well done, I will include this D-Sub in new version

Fern

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

More
12 Sep 2015 05:44 - 12 Sep 2015 05:45 #62484 by fixer
a screenshot preview of a work in progress - should be done in a week. Some small changes in features.py, and modified engrave-lines from here :http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_LinuxCNC_G-Code_Generators#Text_Engraving_Software


Attachments:
Last edit: 12 Sep 2015 05:45 by fixer.

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

More
13 Sep 2015 12:45 #62512 by FernV
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
13 Sep 2015 15:41 - 13 Sep 2015 15:53 #62513 by fixer
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: 13 Sep 2015 15:53 by fixer.

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

More
14 Sep 2015 06:43 #62541 by FernV
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
14 Sep 2015 07:27 #62547 by FernV
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
14 Sep 2015 10:55 #62549 by fixer

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.

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!

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:
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
14 Sep 2015 19:05 #62558 by FernV

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.

When do you think you will publish it?


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

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:
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.159 seconds
Powered by Kunena Forum