InkCut Extension, send HPGL directly to cutter from Inkscape

Post about using Inkscape with cutters or plotters.
frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Wed May 19, 2010 7:41 am

looks like signcut is using dmpl or some other language that i'm not yet aware of, Interesting.... much smaller file size....

my signcut le ran out of liscense's so i'm going to be sniffing signblazer & possibly flexi starter...

looks like back to research, need to compile a list of all the graphics plotting languages

so far...
HPGL -Hewlett Packard Graphic Language
HPGL/2 - Hewlett Packard Graphic Language Raster Printing
GPGL - Graphtec Plotter Graphic Language
DMPL - Digital Microprocessor Plotter Language
CAMM-GL - Roland's Graphic Language

kmrs75
Posts: 48
Joined: Sat Apr 10, 2010 2:03 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby kmrs75 » Wed May 19, 2010 3:23 pm

dont worry about the GPGL - graphtecs do both hpgl and GPGL - so i am still using your software under HPGL - i havent tried to print - cut -- have you tired it or has anyone else

from what i can tell from videos - print an image on vinyl with registration markes then load it in your cutter --then in software tell it to cut - from there the cutter looks for the reg marks and then cuts -

i am thinking there is a code at the begining that tells the cutter to look for reg marks any idea what that is -

i have sent a few emails to graphtec and asked for there list of codes but they have never replied with anything

frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Wed May 26, 2010 12:49 pm

Below is the old versions 0.1 and 0.2 for reference
Here's how to use it....
1. Open your svg
2. Select the path you want to cut, it must be at least one path, no groups, no objects.

Image

3. Open the InkCut Extension

Image

Setup your device
4. Click on the settings tab, most of the things you can leave default. The Serial Port name is required. I use a usb cable so my name was /dev/ttyUSB0, you can also just use a port number like 0,1, 2 etc. If you don't know which to choose, check pyserial documentation.

Image

5. With that done, click on the device tab, and adjust all the widths accordingly. InkCut doesn't support anything larger than your device size, so if you're trying to cut something bigger it will not work. I set my device width to 160 cm and tile width to 30 cm. The tile width is basically how wide your vinyl is.

6. At the bottom of the device tab you'll see a few more tabs, margin is default at 5 mm. This is just like a page margin on a printer, spacing on the ends of the tile. The cutting tab has two spinboxes, overcut is set to .5 mm and blade offset .25. Right now blade offset doesn't work, so you can put it at anything and it wont change your path. Overcut works as it sounds, it cuts an extra x mm of the path. The axis tab I highly recommend using the defaults, as I have not tested them with any other values yet.

Image

7. Now we're almost ready to cut. Click on the paths tab and choose the number of copies of your path you would like to cut out. If you setup your device correctly, it should automatically create tiles that fit.

Image

8. Padding and position are pretty straightforward, position is where the cutter should start on the vinyl, padding is the spacing between the tiles. I'm just going to leave them alone (they work if you need them).

9. Down further is path selection, this is useless (coming in newer versions possibly), ignore it.
10. Lastly a very useful tool is the preview instead of cut checkbox, this will convert the hpgl string back to svg paths and display it on your drawing. Notice, do not check the live preview checkbox. I only have this enabled so you can still change your selections without having to re open the InkCut extension. Red paths are when the pen is down and blue is when up. Use this to make sure it will cut what you're looking for. Mine looked like this at first.

Image

Image

I don't want to waste all that vinyl so i'll rotate the path and try again...
Using preview will make a new layer, to get rid of it hit either ctrl-z to undo or delete the layer. Now it looks like this, much better :).

Image

Now i'm ready to cut, uncheck the preview box and click apply again. Your cutter should start if all went well.. as of now there is no way to abort once you sent it, if you want to stop it, do it manually on the cutter. Clicking cancel will most likely cause your inkscape to lock up until it is done sending all the data.

Image

Once it's finished sending the data, it'll give you a nice message about the data it sent.

Image

Hope it works for you, please let me know if you're having bugs or issues with it, I can try to help fix them. If you like my work please send me a donation to my paypal address, frmdstryr@gmail.com. The files are attached with a readme to install. Thanks.

The results...

Image


I'm releasing version 0.2, new features:

    - blade offset actually works, but it's not 100% correct (it does help) --> if using with overcut, make sure the overcut is more than 4 x bladeOffset, use preview to check and make sure there's no errors
    - can now send via printer
    - velocity select features added
    - force select added

- bugs fixed:
overcutting not closed paths
hopefully fixed - end of plot hang/no response - - > set the Distance to feed at end of plot to less than 0, -1.0. It will return it to the origin (I think that was the cause for the hang)

File attached

kmrs75
Posts: 48
Joined: Sat Apr 10, 2010 2:03 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby kmrs75 » Wed May 26, 2010 1:18 pm

has anyone tried to do cut print with this -- i cant seam to get anything like that to work - i think the software sends some kind of code at the begining to turn on the laser eye

badandyjones
Posts: 1
Joined: Tue Jun 01, 2010 5:06 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby badandyjones » Tue Jun 01, 2010 5:32 am

i love your program but i have one problem, no matter what i do it cuts the inverse of what i need. I have a refine mh-635 and have tried putting a check next to the axes but it doesn't seem to do anything. Any help would be appreciated.

cmwyke
Posts: 2
Joined: Tue Jun 01, 2010 8:29 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby cmwyke » Tue Jun 01, 2010 12:37 pm

I can't seem to get InkCut to even show up under the extension list. I put it in the extensions directory, and even tried putting it in a folder in that directory and still nothing. Any help would be appreciated.

kmrs75
Posts: 48
Joined: Sat Apr 10, 2010 2:03 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby kmrs75 » Wed Jun 02, 2010 6:26 am

i havent tried ver 1.0 untill today

what am i doing wrong i have everything moved to the extensions folder and i do have python installed

here is a pic of inkscape

all that shows up is a small rectangle next to inkcut in the drop down
Attachments
Screenshot-New document 1 - Inkscape.png
Screenshot-New document 1 - Inkscape.png (107.96 KiB) Viewed 31391 times

cmwyke
Posts: 2
Joined: Tue Jun 01, 2010 8:29 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby cmwyke » Thu Jun 03, 2010 1:53 am

i managed to get 0.2 working, 1.0 wouldn't work though. Anyone got an MH cutter working via USB under Linux?

frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Mon Jun 07, 2010 4:32 am

badandyjones wrote:i love your program but i have one problem, no matter what i do it cuts the inverse of what i need. I have a refine mh-635 and have tried putting a check next to the axes but it doesn't seem to do anything. Any help would be appreciated.


By inverse do you mean mirrored over the x axis? If so, check the mirror over x axis box under device->axis. (or uncheck) .
If your using 1.0 it's under device properties.

frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Mon Jun 07, 2010 4:35 am

kmrs75 wrote:i havent tried ver 1.0 untill today

what am i doing wrong i have everything moved to the extensions folder and i do have python installed

here is a pic of inkscape

all that shows up is a small rectangle next to inkcut in the drop down


Post this, seems as if i may have not had something setup right...

Code: Select all

ls .config/inkscape/extensions/


It doesn't show up in the menu at all then?

stefann
Posts: 7
Joined: Mon Jun 07, 2010 4:11 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby stefann » Mon Jun 07, 2010 4:41 am

Hi, I'm testing your extension with a Graphtec CE5000-60 cutting plotter. Your inkscape extension is exactly what I'm looking for - I hope you find the time to continue developing...

I'm using Ubuntu 10.04; when I plugged the plotter it was detected automatically, so I installed it as Raw Printer. In InkCut, I just have to choose it in the printer tab.

First thing I observed: Hight and width are interchanged if I use InkCut with my plotter. The result looks exactely like in the preview; so the 'Add Stack' option won't work. The whole hpgl would have to be rotated by 90°.

Second, something for the wishlist: an option 'mirror' would be great. I'm cutting garment venyl films for textile printing so I always have to plot a mirrored version of the images.

Third thing: You wrote that your extension is based on the hpgl_cut used for exporting as hpgl. Maybe my english is the real problem but I don't understand on which export filter InkCut is based... however, I often get problems with InkCut which remind me of the native Inkscape HPGL export filter... As I'm trying to send HPGL directly to my cutter for months now (as a user, not a developer), I found out that the HPGL export filter by the sK1-project, UniConvertor (which is included in the inkscape-version in Ubuntu at least), works much better. It's the one with the PLT-extension and AFAIK developed for cutting plotters.

When I send the exported PLT-files to my cutting plotter I always get the expected results. With the native HPGL export filter I always had problems... and with InkCut it's just the same :-/

Please tell me if you need help, if you need someone testing or anything. As I said before, your extension is really exactely what I'm looking for. Thanks!!

frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Mon Jun 07, 2010 4:45 am

cmwyke wrote:i managed to get 0.2 working, 1.0 wouldn't work though. Anyone got an MH cutter working via USB under Linux?

Were there any errors for 1.0 or would it just not show up under the menu?

stefann
Posts: 7
Joined: Mon Jun 07, 2010 4:11 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby stefann » Mon Jun 07, 2010 7:20 am

stefann wrote:Second, something for the wishlist: an option 'mirror' would be great. I'm cutting garment venyl films for textile printing so I always have to plot a mirrored version of the images.

OK, sorry - I just found the axis-frame with the Invert y-axis option. But there's a problem: The Add Stacks-option doesn't work if one chooses not to invert the axis (uncheck the box)...

How to reproduce: Choose a path and open InkCut -> uncheck the option Invert x-axis in the Options-tab -> go back to General-tab and click Add Stack and then Preview -> nothing happens. If you check preview in inkscape you see the additional copy is there, but not on the paper.

As workaround it is possible to change the Y-Axis value in the position-frame. This works for me if I have 2 copies (to fill one material width); but when I want to have more copies it's not possible to build columns; instead I get a longer and longer row...

frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Mon Jun 07, 2010 1:24 pm

stefann wrote:
stefann wrote:Second, something for the wishlist: an option 'mirror' would be great. I'm cutting garment venyl films for textile printing so I always have to plot a mirrored version of the images.

OK, sorry - I just found the axis-frame with the Invert y-axis option. But there's a problem: The Add Stacks-option doesn't work if one chooses not to invert the axis (uncheck the box)...

How to reproduce: Choose a path and open InkCut -> uncheck the option Invert x-axis in the Options-tab -> go back to General-tab and click Add Stack and then Preview -> nothing happens. If you check preview in inkscape you see the additional copy is there, but not on the paper.

As workaround it is possible to change the Y-Axis value in the position-frame. This works for me if I have 2 copies (to fill one material width); but when I want to have more copies it's not possible to build columns; instead I get a longer and longer row...


I think I know the fix for your problem, it needs to be rotated 90 degrees. I had an option for this, but took it out as I didn't want to bother implementing it at the time (my cutter didnt need it). If you want to do some testing, I'd be glad to try and get it to work.

As for .plt I'll have to look into it some more.

I'll try to add an invert path option for the mirror that you're talking about.

stefann
Posts: 7
Joined: Mon Jun 07, 2010 4:11 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby stefann » Mon Jun 07, 2010 7:50 pm

frmdstryr wrote:I think I know the fix for your problem, it needs to be rotated 90 degrees. I had an option for this, but took it out as I didn't want to bother implementing it at the time (my cutter didnt need it). If you want to do some testing, I'd be glad to try and get it to work.

Great - I think it would be best to add this option in the device Properties window. I'd be glad to test InkCut with my Graphtec plotter, I'll try to send you a PM with my E-mail address.

frmdstryr wrote:As for .plt I'll have to look into it some more.

I always had problems with the native HPGL export filter - sometimes the result was mirrored, sometimes the size was changed, sometimes I just got error messages and it didn't work at all. Then I used HPGL destiller after exporting the HPGL from Inkscape and it worked much better.

Some weeks ago I found the PLT export filter - since then I use this filter, I send the files directly to my plotter and never had any problems. In the current version 1.1.4 of UniConvertor there's just a scaling bug.

frmdstryr wrote:I'll try to add an invert path option for the mirror that you're talking about.

Thanks!!

stefann
Posts: 7
Joined: Mon Jun 07, 2010 4:11 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby stefann » Tue Jun 08, 2010 6:05 am

I've got some more comments about the recent version (1.0) of InkCut:

1. In General-tab, the tooltip for Margin (Margin from edges of the material, only applies with width) isn't correct: the value also applies to length.

2. In General-tab, in the Preview-frame, according to the tooltip the hight of the preview should represent the width of the material but that's not correct (at the bottom there's always a margin). It would be helpful if the material would be represented by another color than grey (or a brighter grey), so one could see the difference better if one chooses another value for width.

3. In General-tab, in the Copies-frame, Add Stock should give an error message if it's not possible to add a copie or stack because of the materials width or lenght.

4. Spacing values apply to weeding lines but the position of the graphic isn't changed - so the weeding lines are off the material. Either the position should be changed automatically or spacing values souldn't apply to weeding lines. I vote for the second option ;)

5. In General-tab it would be great to have a option like Rotate graphic to rotate the graphic by 90 degrees. When I plott a graphic I nevery really care about the orientation - but it can make a big difference if you can place 3 instead of 2 copies in a row and thus save material. So that's just a suggetion how to easily optimize utilization of the material width.

frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Wed Jun 09, 2010 10:22 am

#1, correct, I changed that and forgot to update the tooltip

For #2, it does represent the width of the material (it's sized by the material width given), however this is not the "cutable" width. It assumes that the blade is lined up with the edge of the material, then adds the margin and starts the cut. Maybe i'm not fully understanding what your saying...

#3 yep, as well as an error if the stack/copy with calibration scale is too large for the cutable area. (as you can see its not done :P)

#4 I realized this, but didn't find a better way to implement it yet... I could possibly add a weedline padding spinbox. It currently subtracts into the margin on the bottom left corner to add spacing.

#5 I was thinking about adding an auto rotate (calulates which one will save the most vinyl), and center on page checkboxes.

Adding to my own bug list...
#6 shortest path optimization doesnt work

#7 device combobox doesnt do anything

#8 Don't know how to get rid of this error... .config/inkscape/extensions/inkcut/app/main.py:475: GtkWarning: gtk_widget_is_ancestor: assertion `ancestor != NULL' failed
gtk.main()



Thanks, I'll try to work on these tomorrow if I have off work, if not this weekend...

frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Wed Jun 09, 2010 10:28 am

btw thanks for the dontation stefann!

kmrs75
Posts: 48
Joined: Sat Apr 10, 2010 2:03 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby kmrs75 » Thu Jun 10, 2010 7:07 pm

stefann wrote:I've got some more comments about the recent version (1.0) of InkCut:

1. In General-tab, the tooltip for Margin (Margin from edges of the material, only applies with width) isn't correct: the value also applies to length.

2. In General-tab, in the Preview-frame, according to the tooltip the hight of the preview should represent the width of the material but that's not correct (at the bottom there's always a margin). It would be helpful if the material would be represented by another color than grey (or a brighter grey), so one could see the difference better if one chooses another value for width.

3. In General-tab, in the Copies-frame, Add Stock should give an error message if it's not possible to add a copie or stack because of the materials width or lenght.

4. Spacing values apply to weeding lines but the position of the graphic isn't changed - so the weeding lines are off the material. Either the position should be changed automatically or spacing values souldn't apply to weeding lines. I vote for the second option ;)

5. In General-tab it would be great to have a option like Rotate graphic to rotate the graphic by 90 degrees. When I plott a graphic I nevery really care about the orientation - but it can make a big difference if you can place 3 instead of 2 copies in a row and thus save material. So that's just a suggetion how to easily optimize utilization of the material width.



do you do any type of contour cutting (print/cut) i have tried it in linux i havne been able to get that to work on our grapohtec

i believe there is a code that is sent to the cutter to turn on laser and look for registration marks

have you had any luck with that - if you can see if you can find out what the code is mabey we can get that implemented in either ink cut - or i can talk to the guy that built tux plot and see if he can add it in his code

frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Fri Jun 11, 2010 1:38 am

moving this to http://inkcut.sourceforge.net
I want to add countour cutting features soon, i've yet to find out how. I'll put it on the todo list.

kmrs75
Posts: 48
Joined: Sat Apr 10, 2010 2:03 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby kmrs75 » Sat Jun 12, 2010 12:18 pm

ok in a few weeks im going to look into it myself if i found and code that may be helpfull i will let ya know -

Roger

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby Roger » Thu Jun 17, 2010 6:48 pm

I am French and I not mastery not the Englishman.
This is an IT translation.
With Inkcut I have these error messages:
Traceback (most recent call last):
File "/home/gabriel6522/.inkscape/extensions/inkcut2.py", line 281, in <module>
effect.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 154, in affect
self.effect()
File "/home/gabriel6522/.inkscape/extensions/inkcut2.py", line 273, in effect
plotdata = HPGL.export(spl,self.options.copies)
File "/home/gabriel6522/.inkscape/extensions/hpgl2.py", line 120, in export
inkex.debug("Total vinyl used %0.2f (cm)."%(inkex.uutounit(self.consumed[0]+self.size[0],"cm")))
AttributeError: 'module' object has no attribute 'uutounit'
That have to I make?
In + Roger

kmrs75
Posts: 48
Joined: Sat Apr 10, 2010 2:03 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby kmrs75 » Sat Jun 19, 2010 8:34 pm

sorry i have been gone a while been working alot everyday since may - but im back on and off still working alot

here is what you requested
ken@gateway-desktop:~$ ls .config/inkscape/extensions/
app copying doc inkcutext1.inx inkcutext.py readme
ken@gateway-desktop:~$

i removed all the files and tried it again but still getting just a small drop down no options here is another pic of it so you can see it
Attachments
Screenshot-6.png
Screenshot-6.png (175.26 KiB) Viewed 31076 times

Guest

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby Guest » Thu Jun 24, 2010 8:16 pm

Image
Image
A+ Roger

frmdstryr
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

Re: InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Fri Jun 25, 2010 1:14 pm

Roger wrote:I am French and I not mastery not the Englishman.
This is an IT translation.
With Inkcut I have these error messages:
Traceback (most recent call last):
File "/home/gabriel6522/.inkscape/extensions/inkcut2.py", line 281, in <module>
effect.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 154, in affect
self.effect()
File "/home/gabriel6522/.inkscape/extensions/inkcut2.py", line 273, in effect
plotdata = HPGL.export(spl,self.options.copies)
File "/home/gabriel6522/.inkscape/extensions/hpgl2.py", line 120, in export
inkex.debug("Total vinyl used %0.2f (cm)."%(inkex.uutounit(self.consumed[0]+self.size[0],"cm")))
AttributeError: 'module' object has no attribute 'uutounit'
That have to I make?
In + Roger


open hpgl2.py and either remove line 120 or comment it out by putting a # before it, that line isn't necessary for it to run:

Code: Select all

#inkex.debug("Total vinyl used %0.2f (cm)."%(inkex.uutounit(self.consumed[0]+self.size[0],"cm")))


Thanks.


Return to “Inkscape & Cutters/Plotters”