InkCut Extension, send HPGL directly to cutter from Inkscape

Post about using Inkscape with cutters or plotters.

InkCut Extension, send HPGL directly to cutter from Inkscape

Postby frmdstryr » Thu Apr 08, 2010 10:42 am

I wrote an extension based off of the hgpl_cut used for exporting as hpgl. I named it InkCut Plot Paths. It's still under development, I make a few changes every now and then... It sends hpgl directly to your cutter via serial or usb. I have NOT tested on windows, or mac, I do not intend to. It works perfect on ubuntu and should work fine on any other linux box.


New Version!!!

The new version as been attached. Completely rewritten, there is no need to install pyserial (i've included it).

The instructions are pretty much similar to below... but anyways here's a few screenshots and new features explained...

  1. Select what you want to cut, it must be paths only or else it will complain, read the messages if you get one.
    Image
  2. Go to the extensions menu again, under Cutter/Plotter select InkCut 1.0
  3. As you can see completely new gui, I want to fill up the vinyl, so click add stack, then preview to update the changes

    Image

    Image
  4. If you want to preview in inkscape like the old versions check the box Preview in Inkscape, then click preview again. A new instance of inkscape should open up with the cut data, looking something like this...
    Image
  5. If it looks good, continue on ... (notice if blade offset is on, your preview may look like it's messed up, its not.)
    We have to set up our cutter, so click on the properties button at the top right corner.

    Image
  6. A dialog will open, under the Connection frame, choose the interface you're using, and expand the corresponding type. Then fill in the settings as needed. If you click test connection, it should send a test plot to the device of a square. If the test cut worked we're ready to go. (Note: inkcut will autodetect cups printers and serial ports)

    Image
  7. Finally, close out and click plot paths, another dialog showing some plot information will open up, click send to start the cut.
Image


Hopefully it works! If not, post your bugs so i can fix them.
Attachments
InkCut-1.0.tar.gz
InkCut-1.0
(151.54 KiB) Downloaded 1193 times
InkCut-0.2.tar.gz
InkCut 0.2
(8.3 KiB) Downloaded 574 times
InkCut-0.1.tar.gz
InkCut 0.1
(8.22 KiB) Downloaded 472 times
Last edited by frmdstryr on Wed May 26, 2010 12:48 pm, edited 4 times in total.
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby icecream » Sun Apr 11, 2010 5:53 pm

just gave your extension a quick shot.

a couple of minor issues i have noticed:
* when using the pen to draw bezier curves and lines (shift+F6), it seems to interpret all curves as closed paths.
* when the job is finished, my cutter just stays in a hung state... the display says "waittting [sic]". is there some sort of HPGL finished command that should be sent at the end?

other than that, it seems to work very well. this will be hugely useful to everyone doing cutting/plotting under linux. thanks!

system details:
creation pcut ct1200
ubuntu 9.10 64bit
inkscape 0.47
icecream
 
Posts: 1
Joined: Sun Apr 11, 2010 5:41 pm

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

Postby frmdstryr » Sat Apr 17, 2010 1:52 am

As for the first issue, I've changed it back in v2, I had it overcutting every path because I found that sometimes inkscape would not put a closepath command on some of the paths. Instead it would just put two points at the same spot. You can fix it by pressing ctrl + + which should close all the paths in v2.

As for the hanging state, i'll look to see if there's an end plot command. My cutter didn't need it (US Cutter Refine MH1351).

I'm glad to see someone can use it. v2 will be coming out soon (maybe this weekend). I've just added functionality to blade0ffset, but there's still some bugs to work out and issues when using with overcut to fix yet.
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby damianleuthold » Sun Apr 18, 2010 11:48 pm

This worked for me and was exactly what I needed. Thanks so much. My cutter also gets stuck in waiting after plotting.

I had tried a number of solutions that other people had created that did not work for me and my plotter (Thread - http://ubuntuforums.org/showthread.php?t=1433016; Other Solutions - Tux plot, hpgl-distiller; Plotter - US Cutter PCut 630)
damianleuthold
 
Posts: 2
Joined: Sun Apr 11, 2010 10:56 am

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

Postby frmdstryr » Mon Apr 19, 2010 5:23 am

There is no end plot command, if someone wants to work with me, I can try to figure out why your plotters are hanging after the plot ends. Thanks.

A potential bug fix was added in v0.2, read the edited first post.
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby frmdstryr » Sat May 01, 2010 1:10 pm

Little tease of the gui for InkCut v1, it's a completely separate program, so it'll be able to have many more features, and eventually windows support!


Image

Full pic here, sorry it got cut off... http://picasaweb.google.com/FrmDstryr/I ... 8564362754
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby Farrell » Fri May 07, 2010 1:56 pm

I have a UScutter LaserPoint 24" cutter and am not able to get InkCut to work with it. I have InkCut set to use the Serial interface, /dev/ttyUSB0. All settings were left at the defaults. To attempt a test cut I made a rectangle in Inkscape, converted it to a path, selected it, then opened InkCut.

Here is the pertinent part of dmesg:

Code: Select all
[528388.030745] usb 1-2.3: new full speed USB device using ehci_hcd and address 14
[528388.141908] usb 1-2.3: configuration #1 chosen from 1 choice
[528388.142380] ftdi_sio 1-2.3:1.0: FTDI USB Serial Device converter detected
[528388.142431] usb 1-2.3: Detected FT232BM
[528388.142436] usb 1-2.3: Number of endpoints 2
[528388.142440] usb 1-2.3: Endpoint 1 MaxPacketSize 64
[528388.142445] usb 1-2.3: Endpoint 2 MaxPacketSize 64
[528388.142449] usb 1-2.3: Setting MaxPacketSize 64
[528388.142774] usb 1-2.3: FTDI USB Serial Device converter now attached to ttyUSB0


Here is what InkCut displays when I try to cut/plot:

Code: Select all
['PU0,2351', 'PD2758,2351', 'PD2758,400', 'PD0,400', 'PD0,2351', 'PD20,2351']
Total vinyl used 6.89 (cm).
Sent 11 commands.
IN;SP1;VS4;FS80;PU0,2351;PD2767,2351;PD2757,2311;PD2757,389;PD2717,400;PD-10,400;PD0,440;PD0,2351;PD20,2351;PU3157,0;


I am running Ubuntu 10.04 amd64. Any ideas of what I might be doing wrong?

Thanks,
-Farrell
Farrell
 
Posts: 19
Joined: Fri May 07, 2010 1:50 pm

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

Postby kmrs75 » Fri May 07, 2010 4:48 pm

it looks like it sent to the cutter -
the cutter doesnt do anything at all

and i assume the cutter works fine in windows software?

that first string looks unusual i will check when i get home and see if i have the same thing on a triangle
kmrs75
 
Posts: 48
Joined: Sat Apr 10, 2010 2:03 am

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

Postby Farrell » Sat May 08, 2010 9:05 am

Yes, the cutter works fine in Windows. I am currently cutting with VMware > Windows XP > SignCut. Let me know if you need any other information ... I would love to abandon Windows for cutting :)

-Farrell
Farrell
 
Posts: 19
Joined: Fri May 07, 2010 1:50 pm

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

Postby frmdstryr » Sat May 08, 2010 9:33 am

What settings are you using in signcut? It looks like you may need to use the printer connection instead of the serial connection...

P.S. abandoning windows & signcut is my goal too :)
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby Farrell » Sat May 08, 2010 4:10 pm

Here are my SignCut settings:

Image

If I should try doing it as a printer I assume I need to add a print queue, do I just tell CUPS to use a generic/raw driver?

Thanks again,
-Farrell
Farrell
 
Posts: 19
Joined: Fri May 07, 2010 1:50 pm

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

Postby kmrs75 » Sat May 08, 2010 6:01 pm

i dont have a lasercutter but doesnt the serial port on the cutter default to 7 - i know the MH does in windows

have you played with that at all -
kmrs75
 
Posts: 48
Joined: Sat Apr 10, 2010 2:03 am

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

Postby frmdstryr » Sun May 09, 2010 12:34 am

Farrell wrote:Here are my SignCut settings:

If I should try doing it as a printer I assume I need to add a print queue, do I just tell CUPS to use a generic/raw driver?

Thanks again,
-Farrell

It's using a usb to serial, so go here http://pyserial.sourceforge.net/example ... rial-ports, download scanlinux.py and run it and post the output, the code is
Code: Select all
cd Downloads
python scanlinux.py


assuming you save it to the Downloads folder (default)
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby Farrell » Sun May 09, 2010 3:55 am

Here's the output:

Code: Select all
upgrdman@Farrell:~$ python scanlinux.py
Found ports:
/dev/ttyS0
/dev/ttyS3
/dev/ttyS2
/dev/ttyS1
/dev/ttyUSB0
upgrdman@Farrell:~$
Farrell
 
Posts: 19
Joined: Fri May 07, 2010 1:50 pm

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

Postby frmdstryr » Wed May 12, 2010 8:06 am

Strange... does the inidcator light flash when you send data? Does it flash on signcut? (if there is one on the lasercutters) Thanks.
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby cohort » Wed May 12, 2010 8:38 am

frmdstryr wrote:Strange... does the inidcator light flash when you send data? Does it flash on signcut? (if there is one on the lasercutters) Thanks.

There is no indicator light - instead, the display would change from 'Online' to 'Waiting'.
cohort
 
Posts: 4
Joined: Sun Apr 11, 2010 10:13 am

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

Postby frmdstryr » Thu May 13, 2010 2:33 am

Try this, create a empty file on your desktop named hpgl and paste this
Code: Select all
IN;PU0,0;PD2000,0;PD2000,2000;PD0,2000;PD0,0;PU;

save it, then open a terminal and paste this in
Code: Select all
cat Desktop/hpgl > /dev/ttyUSB0

it should cut a 5cm box
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby Farrell » Fri May 14, 2010 11:31 am

My cutter will start out with "On Line." shown on the LCD. While cutting it will display "Waiting" and when it finishes and I click on the "Stop After Cutting" button in SignCut, the cutter's LCD will go back to "On Line." Here is a short clip showing the cutter being used with VMware > Windows XP > SignCut:

http://rcheliguy.com/images/cutting_wit ... _winxp.avi

When I try what you mention the cutter acts like nothing happened :( Here is what I did:

Code: Select all
upgrdman@Farrell:~$ echo "IN;PU0,0;PD2000,0;PD2000,2000;PD0,2000;PD0,0;PU;" > hpgl
upgrdman@Farrell:~$ cat hpgl
IN;PU0,0;PD2000,0;PD2000,2000;PD0,2000;PD0,0;PU;
upgrdman@Farrell:~$ cat hpgl > /dev/ttyUSB0
upgrdman@Farrell:~$


Here is a short clip showing that nothing happens:

http://rcheliguy.com/images/not_cutting_with_linux.avi

I am guessing my cutter might be expecting some sort of handshake / wake up / start cutting command that it is not getting?

-Farrell
Farrell
 
Posts: 19
Joined: Fri May 07, 2010 1:50 pm

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

Postby Farrell » Fri May 14, 2010 5:43 pm

I figured out how to cut within Linux but I do not know how to modify your code to adapt InkCut. Here is what I found out:
viewtopic.php?f=31&t=5203&p=22523#p22526

Thanks for bearing with me.

-Farrell
Farrell
 
Posts: 19
Joined: Fri May 07, 2010 1:50 pm

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

Postby frmdstryr » Sun May 16, 2010 7:36 am

This was fixed in v0.2, I should have made a separate button for it, I posted the solution in your topic. Thanks.
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby Farrell » Sun May 16, 2010 8:45 am

Silly me, I installed some updates and restarted my computer, and it seems I have some different issues now.

Trying to cat any of those files to my cutter does nothing. If I try to cut with InkPlot my cutter will hang up. The LCD shows "On Line" but it does nothing and none of the control buttons work. If I then press one of the limit switches to reset the cutter I can cat my hpgl files and they will cut. Is InkCut sending some sort of non-readable ASCII code to enable the cutter or driver?

The file I am trying to cut is a simple stylized flame graphic. If I run InkCut it gives me the following message:

Code: Select all
['PU493,421', 'PD498,449', 'PD499,484', 'PD497,521', 'PD490,555', 'PD473,607', 'PD450,659', 'PD419,714', 'PD377,778', 'PD315,871', 'PD266,958', 'PD228,1042', 'PD199,1125', 'PD179,1206', 'PD167,1288', 'PD163,1388', 'PD164,1528', 'PD165,1646', 'PD163,1729', 'PD157,1790', 'PD146,1844', 'PD125,1909', 'PD97,1974', 'PD62,2036', 'PD23,2092', 'PD7,2114', 'PD2,2123', 'PD19,2108', 'PD51,2071', 'PD116,1987', 'PD154,1919', 'PD188,1841', 'PD215,1759', 'PD234,1677', 'PD241,1613', 'PD243,1485', 'PD244,1384', 'PD248,1319', 'PD257,1273', 'PD273,1231', 'PD294,1194', 'PD318,1168', 'PD343,1154', 'PD355,1153', 'PD366,1155', 'PD387,1170', 'PD401,1194', 'PD409,1230', 'PD412,1277', 'PD408,1334', 'PD397,1396', 'PD377,1466', 'PD347,1550', 'PD301,1680', 'PD270,1797', 'PD250,1908', 'PD242,2019', 'PD243,2105', 'PD250,2184', 'PD266,2257', 'PD288,2326', 'PD295,2341', 'PD297,2343', 'PD297,2341', 'PD287,2296', 'PD272,2226', 'PD264,2153', 'PD263,2081', 'PD269,2012', 'PD285,1932', 'PD312,1848', 'PD355,1752', 'PD417,1633', 'PD488,1492', 'PD511,1436', 'PD527,1386', 'PD536,1339', 'PD539,1294', 'PD537,1247', 'PD530,1196', 'PD518,1097', 'PD516,1010', 'PD526,934', 'PD534,901', 'PD546,870', 'PD565,836', 'PD589,811', 'PD615,794', 'PD641,787', 'PD668,789', 'PD693,800', 'PD714,820', 'PD731,850', 'PD738,874', 'PD742,899', 'PD740,957', 'PD723,1022', 'PD692,1097', 'PD622,1257', 'PD595,1329', 'PD572,1398', 'PD555,1464', 'PD541,1529', 'PD532,1593', 'PD526,1658', 'PD524,1722', 'PD526,1792', 'PD542,1972', 'PD551,2078', 'PD555,2181', 'PD552,2273', 'PD544,2346', 'PD527,2421', 'PD505,2499', 'PD478,2574', 'PD450,2639', 'PD440,2662', 'PD439,2667', 'PD440,2667', 'PD468,2624', 'PD505,2555', 'PD537,2477', 'PD565,2394', 'PD588,2304', 'PD606,2210', 'PD620,2113', 'PD628,2012', 'PD631,1910', 'PD625,1781', 'PD618,1692', 'PD624,1620', 'PD638,1567', 'PD658,1530', 'PD669,1517', 'PD682,1508', 'PD695,1503', 'PD708,1502', 'PD722,1504', 'PD736,1510', 'PD762,1534', 'PD785,1573', 'PD804,1626', 'PD812,1662', 'PD816,1700', 'PD816,1786', 'PD803,1888', 'PD778,2012', 'PD759,2119', 'PD754,2230', 'PD755,2288', 'PD760,2344', 'PD787,2508', 'PD805,2610', 'PD815,2687', 'PD819,2757', 'PD819,2838', 'PD815,2936', 'PD804,3015', 'PD779,3141', 'PD752,3251', 'PD750,3257', 'PD753,3256', 'PD786,3178', 'PD826,3066', 'PD846,2991', 'PD863,2916', 'PD875,2840', 'PD883,2765', 'PD888,2691', 'PD887,2618', 'PD883,2547', 'PD874,2478', 'PD859,2379', 'PD852,2324', 'PD849,2266', 'PD850,2215', 'PD854,2179', 'PD861,2161', 'PD870,2146', 'PD880,2137', 'PD891,2133', 'PD907,2138', 'PD926,2152', 'PD945,2172', 'PD962,2198', 'PD980,2235', 'PD995,2275', 'PD1006,2317', 'PD1013,2360', 'PD1016,2411', 'PD1009,2485', 'PD1001,2571', 'PD997,2666', 'PD996,2756', 'PD1000,2829', 'PD1008,2890', 'PD1019,2949', 'PD1034,3004', 'PD1052,3053', 'PD1086,3121', 'PD1100,3144', 'PD1108,3151', 'PD1094,3112', 'PD1072,3056', 'PD1058,3002', 'PD1050,2947', 'PD1048,2888', 'PD1049,2842', 'PD1054,2795', 'PD1079,2668', 'PD1098,2577', 'PD1108,2503', 'PD1112,2440', 'PD1110,2382', 'PD1100,2312', 'PD1083,2246', 'PD1057,2173', 'PD1017,2083', 'PD962,1952', 'PD927,1842', 'PD915,1784', 'PD906,1726', 'PD900,1668', 'PD898,1612', 'PD900,1557', 'PD905,1505', 'PD914,1457', 'PD927,1414', 'PD947,1368', 'PD970,1333', 'PD995,1310', 'PD1008,1304', 'PD1020,1302', 'PD1042,1308', 'PD1060,1326', 'PD1074,1355', 'PD1084,1395', 'PD1090,1447', 'PD1091,1510', 'PD1088,1583', 'PD1081,1667', 'PD1073,1757', 'PD1070,1840', 'PD1073,1918', 'PD1080,1993', 'PD1092,2066', 'PD1111,2139', 'PD1135,2214', 'PD1165,2293', 'PD1201,2374', 'PD1203,2379', 'PD1204,2378', 'PD1197,2356', 'PD1172,2277', 'PD1154,2206', 'PD1143,2139', 'PD1137,2072', 'PD1137,2013', 'PD1142,1951', 'PD1155,1873', 'PD1175,1768', 'PD1196,1664', 'PD1208,1586', 'PD1214,1518', 'PD1216,1444', 'PD1211,1333', 'PD1197,1219', 'PD1171,1096', 'PD1133,955', 'PD1107,860', 'PD1104,833', 'PD1103,800', 'PD1107,747', 'PD1111,728', 'PD1119,712', 'PD1128,701', 'PD1141,692', 'PD1157,687', 'PD1177,685', 'PD1206,686', 'PD1236,699', 'PD1267,722', 'PD1297,752', 'PD1323,790', 'PD1344,832', 'PD1364,883', 'PD1375,929', 'PD1381,979', 'PD1383,1044', 'PD1381,1123', 'PD1370,1197', 'PD1350,1277', 'PD1318,1375', 'PD1295,1444', 'PD1282,1498', 'PD1276,1551', 'PD1275,1619', 'PD1275,1681', 'PD1279,1733', 'PD1305,1885', 'PD1329,2030', 'PD1333,2085', 'PD1335,2138', 'PD1331,2212', 'PD1320,2279', 'PD1301,2343', 'PD1272,2407', 'PD1251,2451', 'PD1275,2421', 'PD1312,2364', 'PD1352,2290', 'PD1382,2209', 'PD1405,2124', 'PD1419,2033', 'PD1424,1940', 'PD1421,1843', 'PD1409,1744', 'PD1388,1645', 'PD1379,1593', 'PD1381,1551', 'PD1393,1518', 'PD1403,1506', 'PD1415,1497', 'PD1434,1490', 'PD1452,1490', 'PD1469,1497', 'PD1485,1510', 'PD1499,1529', 'PD1513,1554', 'PD1524,1585', 'PD1534,1621', 'PD1540,1672', 'PD1542,1761', 'PD1539,1854', 'PD1530,1947', 'PD1515,2048', 'PD1491,2164', 'PD1469,2276', 'PD1464,2361', 'PD1468,2438', 'PD1481,2518', 'PD1505,2610', 'PD1543,2724', 'PD1593,2874', 'PD1624,2984', 'PD1638,3073', 'PD1642,3162', 'PD1640,3219', 'PD1635,3272', 'PD1625,3320', 'PD1612,3367', 'PD1603,3403', 'PD1604,3405', 'PD1605,3403', 'PD1612,3387', 'PD1643,3286', 'PD1663,3178', 'PD1673,3066', 'PD1671,2953', 'PD1663,2868', 'PD1651,2788', 'PD1634,2705', 'PD1610,2615', 'PD1584,2511', 'PD1579,2470', 'PD1577,2425', 'PD1582,2357', 'PD1589,2333', 'PD1598,2315', 'PD1609,2304', 'PD1623,2300', 'PD1638,2303', 'PD1656,2313', 'PD1680,2338', 'PD1702,2377', 'PD1720,2427', 'PD1731,2485', 'PD1734,2558', 'PD1731,2655', 'PD1730,2716', 'PD1732,2777', 'PD1747,2911', 'PD1773,3049', 'PD1810,3189', 'PD1853,3319', 'PD1898,3424', 'PD1908,3442', 'PD1911,3444', 'PD1911,3441', 'PD1894,3386', 'PD1873,3322', 'PD1855,3257', 'PD1841,3192', 'PD1830,3124', 'PD1822,3056', 'PD1818,2985', 'PD1820,2835', 'PD1827,2677', 'PD1828,2561', 'PD1822,2472', 'PD1810,2397', 'PD1785,2309', 'PD1738,2197', 'PD1689,2077', 'PD1673,2026', 'PD1663,1976', 'PD1656,1928', 'PD1654,1882', 'PD1656,1840', 'PD1661,1802', 'PD1671,1770', 'PD1684,1743', 'PD1700,1724', 'PD1719,1713', 'PD1734,1710', 'PD1748,1713', 'PD1762,1721', 'PD1776,1733', 'PD1800,1772', 'PD1820,1829', 'PD1828,1867', 'PD1834,1912', 'PD1842,2052', 'PD1851,2199', 'PD1867,2314', 'PD1890,2421', 'PD1924,2523', 'PD1969,2626', 'PD2030,2739', 'PD2052,2774', 'PD2033,2731', 'PD2002,2662', 'PD1974,2587', 'PD1951,2512', 'PD1936,2444', 'PD1930,2384', 'PD1928,2311', 'PD1931,2231', 'PD1939,2153', 'PD1947,2075', 'PD1950,2000', 'PD1948,1933', 'PD1940,1878', 'PD1919,1802', 'PD1888,1725', 'PD1843,1638', 'PD1778,1532', 'PD1695,1389', 'PD1663,1324', 'PD1637,1263', 'PD1618,1207', 'PD1605,1154', 'PD1598,1106', 'PD1598,1062', 'PD1607,1009', 'PD1615,988', 'PD1626,971', 'PD1639,958', 'PD1654,948', 'PD1672,942', 'PD1692,940', 'PD1717,944', 'PD1742,954', 'PD1766,971', 'PD1788,993', 'PD1808,1020', 'PD1825,1052', 'PD1839,1088', 'PD1850,1127', 'PD1855,1171', 'PD1856,1236', 'PD1855,1381', 'PD1858,1424', 'PD1864,1458', 'PD1879,1516', 'PD1901,1578', 'PD1935,1653', 'PD1985,1752', 'PD2040,1866', 'PD2076,1956', 'PD2096,2033', 'PD2104,2110', 'PD2105,2159', 'PD2100,2204', 'PD2095,2249', 'PD2100,2237', 'PD2108,2205', 'PD2124,2127', 'PD2127,2077', 'PD2127,2014', 'PD2123,1951', 'PD2117,1898', 'PD2100,1812', 'PD2076,1727', 'PD2045,1637', 'PD2004,1537', 'PD1956,1416', 'PD1948,1383', 'PD1945,1349', 'PD1944,1311', 'PD1952,1284', 'PD1964,1263', 'PD1980,1251', 'PD1995,1244', 'PD2007,1242', 'PD2037,1249', 'PD2065,1266', 'PD2090,1292', 'PD2111,1327', 'PD2129,1371', 'PD2134,1391', 'PD2137,1420', 'PD2139,1561', 'PD2143,1723', 'PD2155,1854', 'PD2175,1966', 'PD2207,2075', 'PD2231,2136', 'PD2261,2200', 'PD2292,2260', 'PD2321,2305', 'PD2327,2313', 'PD2327,2310', 'PD2302,2250', 'PD2279,2190', 'PD2259,2131', 'PD2245,2072', 'PD2235,2011', 'PD2228,1945', 'PD2226,1874', 'PD2231,1707', 'PD2236,1587', 'PD2234,1494', 'PD2223,1414', 'PD2203,1337', 'PD2170,1257', 'PD2129,1178', 'PD2057,1074', 'PD1984,968', 'PD1927,876', 'PD1881,794', 'PD1845,717', 'PD1811,624', 'PD1800,582', 'PD1793,542', 'PD1790,506', 'PD1791,471', 'PD1797,438', 'PD1806,406', 'PD1778,403', 'PD1675,401', 'PD1147,400', 'PD487,400', 'PD493,421', 'PD497,441']
Total vinyl used 5.83 (cm).
Sent 566 commands.
IN;SP1;VS4;FS80;PU493,421;PD498,449;PD499,484;PD497,521;PD490,555;PD473,607;PD450,659;PD419,714;PD377,778;PD315,871;PD266,958;PD228,1042;PD199,1125;PD179,1206;PD167,1288;PD163,1388;PD164,1528;PD165,1646;PD163,1729;PD157,1790;PD146,1844;PD125,1909;PD97,1974;PD62,2036;PD23,2092;PD7,2114;PD2,2123;PD19,2108;PD51,2071;PD116,1987;PD154,1919;PD188,1841;PD215,1759;PD234,1677;PD241,1613;PD243,1485;PD244,1384;PD248,1319;PD257,1273;PD273,1231;PD294,1194;PD318,1168;PD343,1154;PD355,1153;PD366,1155;PD387,1170;PD401,1194;PD409,1230;PD412,1277;PD408,1334;PD397,1396;PD377,1466;PD347,1550;PD301,1680;PD270,1797;PD250,1908;PD242,2019;PD243,2105;PD250,2184;PD266,2257;PD288,2326;PD295,2341;PD297,2343;PD299,2331;PD288,2302;PD287,2296;PD272,2226;PD264,2153;PD263,2081;PD269,2012;PD285,1932;PD312,1848;PD355,1752;PD417,1633;PD488,1492;PD511,1436;PD527,1386;PD536,1339;PD539,1294;PD537,1247;PD530,1196;PD518,1097;PD516,1010;PD526,934;PD534,901;PD546,870;PD565,836;PD589,811;PD615,794;PD641,787;PD668,789;PD693,800;PD714,820;PD731,850;PD738,874;PD742,899;PD740,957;PD723,1022;PD692,1097;PD622,1257;PD595,1329;PD572,1398;PD555,1464;PD541,1529;PD532,1593;PD526,1658;PD524,1722;PD526,1792;PD542,1972;PD551,2078;PD555,2181;PD552,2273;PD544,2346;PD527,2421;PD505,2499;PD478,2574;PD450,2639;PD440,2662;PD439,2667;PD450,2667;PD462,2633;PD468,2624;PD505,2555;PD537,2477;PD565,2394;PD588,2304;PD606,2210;PD620,2113;PD628,2012;PD631,1910;PD625,1781;PD618,1692;PD624,1620;PD638,1567;PD658,1530;PD669,1517;PD682,1508;PD695,1503;PD708,1502;PD722,1504;PD736,1510;PD769,1540;PD782,1568;PD785,1573;PD804,1626;PD812,1662;PD816,1700;PD816,1786;PD803,1888;PD778,2012;PD759,2119;PD754,2230;PD755,2288;PD760,2344;PD787,2508;PD805,2610;PD815,2687;PD819,2757;PD819,2838;PD815,2936;PD804,3015;PD779,3141;PD752,3251;PD750,3257;PD761,3251;PD768,3218;PD786,3178;PD826,3066;PD846,2991;PD863,2916;PD875,2840;PD883,2765;PD888,2691;PD887,2618;PD883,2547;PD874,2478;PD859,2379;PD852,2324;PD849,2266;PD850,2215;PD854,2179;PD861,2161;PD870,2146;PD880,2137;PD891,2133;PD907,2138;PD926,2152;PD945,2172;PD962,2198;PD980,2235;PD995,2275;PD1006,2317;PD1013,2360;PD1016,2411;PD1009,2485;PD1001,2571;PD997,2666;PD996,2756;PD1000,2829;PD1008,2890;PD1019,2949;PD1034,3004;PD1052,3053;PD1086,3121;PD1100,3144;PD1115,3157;PD1094,3112;PD1094,3112;PD1072,3056;PD1058,3002;PD1050,2947;PD1048,2888;PD1049,2842;PD1054,2795;PD1079,2668;PD1098,2577;PD1108,2503;PD1112,2440;PD1110,2382;PD1100,2312;PD1083,2246;PD1057,2173;PD1017,2083;PD962,1952;PD927,1842;PD915,1784;PD906,1726;PD900,1668;PD898,1612;PD900,1557;PD905,1505;PD914,1457;PD927,1414;PD947,1368;PD970,1333;PD995,1310;PD1008,1304;PD1020,1302;PD1042,1308;PD1060,1326;PD1074,1355;PD1084,1395;PD1090,1447;PD1091,1510;PD1088,1583;PD1081,1667;PD1073,1757;PD1070,1840;PD1073,1918;PD1080,1993;PD1092,2066;PD1111,2139;PD1135,2214;PD1165,2293;PD1201,2374;PD1203,2379;PD1204,2378;PD1197,2356;PD1172,2277;PD1154,2206;PD1143,2139;PD1137,2072;PD1137,2013;PD1142,1951;PD1155,1873;PD1175,1768;PD1196,1664;PD1208,1586;PD1214,1518;PD1216,1444;PD1211,1333;PD1197,1219;PD1171,1096;PD1133,955;PD1107,860;PD1104,833;PD1103,800;PD1107,747;PD1111,728;PD1119,712;PD1128,701;PD1141,692;PD1157,687;PD1177,685;PD1206,686;PD1236,699;PD1267,722;PD1297,752;PD1323,790;PD1344,832;PD1364,883;PD1375,929;PD1381,979;PD1383,1044;PD1381,1123;PD1370,1197;PD1350,1277;PD1318,1375;PD1295,1444;PD1282,1498;PD1276,1551;PD1275,1619;PD1275,1681;PD1279,1733;PD1305,1885;PD1329,2030;PD1333,2085;PD1335,2138;PD1331,2212;PD1320,2279;PD1301,2343;PD1272,2407;PD1251,2451;PD1275,2421;PD1312,2364;PD1352,2290;PD1382,2209;PD1405,2124;PD1419,2033;PD1424,1940;PD1421,1843;PD1409,1744;PD1388,1645;PD1379,1593;PD1381,1551;PD1393,1518;PD1403,1506;PD1415,1497;PD1434,1490;PD1452,1490;PD1469,1497;PD1485,1510;PD1499,1529;PD1513,1554;PD1524,1585;PD1534,1621;PD1540,1672;PD1542,1761;PD1539,1854;PD1530,1947;PD1515,2048;PD1491,2164;PD1469,2276;PD1464,2361;PD1468,2438;PD1481,2518;PD1505,2610;PD1543,2724;PD1593,2874;PD1624,2984;PD1638,3073;PD1642,3162;PD1640,3219;PD1635,3272;PD1625,3320;PD1612,3367;PD1603,3403;PD1604,3405;PD1605,3403;PD1612,3387;PD1643,3286;PD1663,3178;PD1673,3066;PD1671,2953;PD1663,2868;PD1651,2788;PD1634,2705;PD1610,2615;PD1584,2511;PD1579,2470;PD1577,2425;PD1582,2357;PD1589,2333;PD1598,2315;PD1609,2304;PD1623,2300;PD1638,2303;PD1656,2313;PD1680,2338;PD1702,2377;PD1720,2427;PD1731,2485;PD1734,2558;PD1731,2655;PD1730,2716;PD1732,2777;PD1747,2911;PD1773,3049;PD1810,3189;PD1853,3319;PD1898,3424;PD1908,3442;PD1911,3444;PD1912,3430;PD1899,3402;PD1894,3386;PD1873,3322;PD1855,3257;PD1841,3192;PD1830,3124;PD1822,3056;PD1818,2985;PD1820,2835;PD1827,2677;PD1828,2561;PD1822,2472;PD1810,2397;PD1785,2309;PD1738,2197;PD1689,2077;PD1673,2026;PD1663,1976;PD1656,1928;PD1654,1882;PD1656,1840;PD1661,1802;PD1671,1770;PD1684,1743;PD1700,1724;PD1719,1713;PD1734,1710;PD1748,1713;PD1762,1721;PD1776,1733;PD1800,1772;PD1820,1829;PD1828,1867;PD1834,1912;PD1842,2052;PD1851,2199;PD1867,2314;PD1890,2421;PD1924,2523;PD1969,2626;PD2030,2739;PD2057,2782;PD2035,2737;PD2033,2731;PD2002,2662;PD1974,2587;PD1951,2512;PD1936,2444;PD1930,2384;PD1928,2311;PD1931,2231;PD1939,2153;PD1947,2075;PD1950,2000;PD1948,1933;PD1940,1878;PD1919,1802;PD1888,1725;PD1843,1638;PD1778,1532;PD1695,1389;PD1663,1324;PD1637,1263;PD1618,1207;PD1605,1154;PD1598,1106;PD1598,1062;PD1607,1009;PD1615,988;PD1626,971;PD1639,958;PD1654,948;PD1672,942;PD1692,940;PD1717,944;PD1742,954;PD1766,971;PD1788,993;PD1808,1020;PD1825,1052;PD1839,1088;PD1850,1127;PD1855,1171;PD1856,1236;PD1855,1381;PD1858,1424;PD1864,1458;PD1879,1516;PD1901,1578;PD1935,1653;PD1985,1752;PD2040,1866;PD2076,1956;PD2096,2033;PD2104,2110;PD2105,2159;PD2100,2204;PD2095,2249;PD2100,2237;PD2108,2205;PD2124,2127;PD2127,2077;PD2127,2014;PD2123,1951;PD2117,1898;PD2100,1812;PD2076,1727;PD2045,1637;PD2004,1537;PD1956,1416;PD1948,1383;PD1945,1349;PD1944,1311;PD1952,1284;PD1964,1263;PD1980,1251;PD1995,1244;PD2007,1242;PD2037,1249;PD2065,1266;PD2090,1292;PD2111,1327;PD2129,1371;PD2134,1391;PD2137,1420;PD2139,1561;PD2143,1723;PD2155,1854;PD2175,1966;PD2207,2075;PD2231,2136;PD2261,2200;PD2292,2260;PD2321,2305;PD2327,2313;PD2327,2299;PD2312,2272;PD2302,2250;PD2279,2190;PD2259,2131;PD2245,2072;PD2235,2011;PD2228,1945;PD2226,1874;PD2231,1707;PD2236,1587;PD2234,1494;PD2223,1414;PD2203,1337;PD2170,1257;PD2129,1178;PD2057,1074;PD1984,968;PD1927,876;PD1881,794;PD1845,717;PD1811,624;PD1800,582;PD1793,542;PD1790,506;PD1791,471;PD1797,438;PD1806,406;PD1778,403;PD1675,401;PD1147,400;PD487,400;PD493,421;PD497,441;PU0,0;H;


If I copy and paste the line with all of the command to a file, then remove "SP1;VS4;FS80;" from the beginning, and replace "H;" with "IN;" from the end, then cat that file to ttyUSB0, it will cut. Is there any setting in InkCut to do that?

-Farrell
Farrell
 
Posts: 19
Joined: Fri May 07, 2010 1:50 pm

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

Postby frmdstryr » Mon May 17, 2010 10:50 pm

As of now, no. If you want you can edit the hpgl.py file. Lines 112 and 116/118 have the before and after data commands.

replace this starting on line 108
Code: Select all
def export(self,spl,copies=1):
      assert type(spl) == list, "export data must be a list of hpgl commands"
      spl = self.adjust(spl,copies)
      if len(spl):
         hpgl = ["IN","SP1","VS%i"%(self.config['velocity']),"FS%i"%(self.config['force'])]
         hpgl.extend(self.convert(spl))
         # back to start   
         if self.config['feed'] >= 0:
            hpgl += ["PU%d,0"%((self.consumed[0]+self.size[0]+self.config['feed']*self.mm)*self.scale)]
         else:
            hpgl += ["PU0,0","H"]
         # print some information
         inkex.debug("Total vinyl used %0.2f (cm)."%(inkex.uutounit(self.consumed[0]+self.size[0],"cm")))
         inkex.debug("Sent %i commands."%(len(hpgl)-3))
         return ";".join(hpgl)+";"
      else:
         return False


with this
Code: Select all
def export(self,spl,copies=1):
      assert type(spl) == list, "export data must be a list of hpgl commands"
      spl = self.adjust(spl,copies)
      if len(spl):
         hpgl = ["IN"]
         hpgl.extend(self.convert(spl))
         # back to start   
         if self.config['feed'] >= 0:
            hpgl += ["PU%d,0"%((self.consumed[0]+self.size[0]+self.config['feed']*self.mm)*self.scale),"IN"]
         else:
            hpgl += ["PU0,0","IN"]
         # print some information
         inkex.debug("Total vinyl used %0.2f (cm)."%(inkex.uutounit(self.consumed[0]+self.size[0],"cm")))
         inkex.debug("Sent %i commands."%(len(hpgl)-3))
         return ";".join(hpgl)+";"
      else:
         return False


save the file and open inkscape,
i recommend not closing the file before trying it out,
if you get an error you can always ctrl+z

I'll add options for the new inkscape so you can edit these from the gui
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby Farrell » Tue May 18, 2010 11:45 am

Awesome, I can now cut with Inkscape / InkCut! Thanks so much!

I did however realize a small quirk when cutting in Linux (both with InkCut or by cat'ing a file to the cutter directly.) The cutter cuts fine but it sounds like it might be pausing for a small fraction of a second between each command. It is not visually noticeable but it can be heard as a slight groaning or quivering type of sound.

Here is my cutter being controlled by InkCut:
http://rcheliguy.com/images/plotting_with_inkcut.avi

If you compare that to my earlier video of the cutter being controlled by SignCut in Windows, you might be able to hear the difference. Especially in the last line being cut/plotted you can hear three distinct pauses in the InkCut video.
http://rcheliguy.com/images/cutting_wit ... _winxp.avi

I used the VMware usb sniffer tool to log what SignCut was sending to my cutter, and it seems intriguing. It looks a little like HPGL and a little like DMPL. Here is a screenshot of the sniffer when it starts to cut/plot, note the "EP2 OUT" lines:

http://rcheliguy.com/images/usb_sniffer.jpg

Weird huh?

-Farrell

EDIT: Here's my SVG for the flames graphic in case that helps:
http://rcheliguy.com/images/flames.svg
Farrell
 
Posts: 19
Joined: Fri May 07, 2010 1:50 pm

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

Postby frmdstryr » Tue May 18, 2010 12:34 pm

I need that sniffer!!!! It would help me with debugging/writing new code soooo much.

As for the difference, what was your force & speed settings? Seems like it was cutting harder on InkCut (it's set to 80g by default).

Thanks for posting this.
frmdstryr
 
Posts: 37
Joined: Thu Apr 08, 2010 9:22 am

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

Postby Farrell » Tue May 18, 2010 1:19 pm

We took the speed and pressure settings out of the code, my cutter does not like them. I have to set speed and pressure manually with the cutter's control pad. As far as I know I can't set it via software (I wish i could...) in either Windows or Linux. Both cuts/plots were done at the same speed (050) and pressure (135.) Those numbers do not seem to correlate to any specific mm/s or grams respectively. That pressure is just enough to cut 2.8mil vinyl (FDC 4200 series opaque white) when using the blade holder instead of the pen.

As for the VMware sniffer, it's a free download:
http://labs.vmware.com/flings/virtualusb
http://vusb-analyzer.sourceforge.net/tutorial.html

I extracted the SignCut parts of the usb dump, if I cat that to /dev/ttyUSB0 my cutter cuts exactly like SignCut did. :)
http://rcheliguy.com/images/signcut_usb_dump

-Farrell
Farrell
 
Posts: 19
Joined: Fri May 07, 2010 1:50 pm

Next

Return to Inkscape & Cutters/Plotters

Who is online

Users browsing this forum: No registered users and 0 guests