InkCut Extension, send HPGL directly to cutter from Inkscape

Post about using Inkscape with cutters or plotters.
cncjohn
Posts: 5
Joined: Fri Jan 13, 2017 10:33 am

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

Postby cncjohn » Mon Jan 16, 2017 5:18 am

Thanks Moini for the speedy reply. I used sudo nautilus and looked at permissions. Set all the files and folders to read & write and file to execute and this seemed to work. I haven't tested yet so I may be on here again soon. Great if this works or I need to pay for Signcut in a months time when my Liyu 610 is one year old.

cncjohn
Posts: 5
Joined: Fri Jan 13, 2017 10:33 am

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

Postby cncjohn » Wed Jan 18, 2017 4:32 am

Ok I have good news. I tried controlling my Liyu cutter with Inkcut today. I found that squares and stars created in Inkscape and converted to paths cut just fine. So happy this is getting somewhere - result. I get the common problem other folk seem to get i.e. cutter is now cutting... message stays on the lcd after the job is complete. Not worried it seems to have no adverse effect.

The important issue I need to resolve urgently is the inability to cut text. I ungrouped it as there was some complaint about groups - so with the text converted to paths and ungrouped I received this error...

Traceback (most recent call last):
File "inkcutext.py", line 71, in <module>
effect.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 268, in affect
self.effect()
File "inkcutext.py", line 50, in effect
InkscapePlugin(self.document,nodes.keys(),inkex)
File "/home/john/.config/inkscape/extensions/inkcut/app/main.py", line 473, in InkscapePlugin
app = Application(svg,nodes,inkex)
File "/home/john/.config/inkscape/extensions/inkcut/app/main.py", line 114, in __init__
self.on_preview_clicked('first')
File "/home/john/.config/inkscape/extensions/inkcut/app/main.py", line 227, in on_preview_clicked
psvg = preview.hpgl(self.plot)
File "/home/john/.config/inkscape/extensions/inkcut/app/bin/preview.py", line 70, in hpgl
for c in plot.toHPGL().split(';'):
File "/home/john/.config/inkscape/extensions/inkcut/app/bin/path.py", line 391, in toHPGL
data = self.changeOrder(self.createTiledClones())
File "/home/john/.config/inkscape/extensions/inkcut/app/bin/path.py", line 380, in changeOrder
hpgl.extend(clone.toHPGL())
File "/home/john/.config/inkscape/extensions/inkcut/app/bin/path.py", line 553, in toHPGL
hpgl.extend(path.toHPGL())
File "/home/john/.config/inkscape/extensions/inkcut/app/bin/path.py", line 857, in toHPGL
poly = self.toPolyline()
File "/home/john/.config/inkscape/extensions/inkcut/app/bin/path.py", line 839, in toPolyline
raise AssertionError("Polyline only handles, (L, C, A,& Z) path cmds, given %s"%(cmd))
AssertionError: Polyline only handles, (L, C, A,& Z) path cmds, given Q

Tried a few different fonts, sizes etc - no joy so far. Please help. Thanks

Moini
Posts: 2045
Joined: Mon Oct 05, 2015 10:44 am

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

Postby Moini » Wed Jan 18, 2017 8:16 am

It appears that the function that converts the letter's path to a series of straight lines can't handle everything that the path is comprised of. I had to look it up, and found that Q is for Quadratic Bezier curves. So your letters contain those, and they don't work with the extension.

Here's something that explains how to convert to something that it will understand:
https://bugs.launchpad.net/inkscape/+bug/1009765 (but, unfortunately, just the maths).

I have no idea how to tell Inkscape to convert a quadratic bezier curve to a cubic one, but I think this is what would be needed.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

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

Postby ~suv » Wed Jan 18, 2017 9:09 am

Moini wrote:I have no idea how to tell Inkscape to convert a quadratic bezier curve to a cubic one, but I think this is what would be needed.

Node-edit the path (e.g. select a single node with Inkscape's node tool and nugde it with the arrow keys) - the node tool does not support editing quadratic Bézier and elliptical arc curves, and thus all quadratic ( as well as elliptical arc) path commands are “converted” to cubic Bézier curve commands.

Inkscape has no built-in (single-click) option to force writing only cubic Bézier curves to accommodate extensions which only support a limited set of SVG path commands. The curves in paths from text converted to path originate from the font definitions (and the type/flavour of font determines which types of curves are used for the glyph outlines - quadratic or cubic).

Moini
Posts: 2045
Joined: Mon Oct 05, 2015 10:44 am

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

Postby Moini » Wed Jan 18, 2017 9:16 am

If the user used a Boolean operation, like Path -> Combine or Path -> Union, would that do a rewrite, too? (or path -> difference with an object that doesn't intersect, maybe....)

Or selecting all nodes then moving them all with keyboard? Could be fast: Ctrl+Shift+A, n, Ctrl+A, arrow up, arrow down.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

cncjohn
Posts: 5
Joined: Fri Jan 13, 2017 10:33 am

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

Postby cncjohn » Wed Jan 18, 2017 9:27 am

Thanks for the prompt responses. People want the name of their boat cutting in vinyl. Maybe there are font choices that may cause fewer problems than others. I will try the node editing nudge trick and report back. I really don't want to buy signcut and be forced to carry on using windoze when my free first year expires. Some experimentation will now follow. Any further pointers welcome. I had never heard of quadratic beziers - that can be my something new today! Nice

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

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

Postby ~suv » Wed Jan 18, 2017 9:32 am

Moini wrote:If the user used a Boolean operation, like Path -> Combine or Path -> Union, would that do a rewrite, too? (or path -> difference with an object that doesn't intersect, maybe....)
You can test yourself e.g. with the 'o' (or 'O') of DejaVu Sans (usually available on Linux desktops, and on many distros the default fallback font for 'sans-serif').
  • Path > Combine does not fully rewrite the path commands. AFAICT it concatenates the path data of the individual paths into one, preserving the original path data (quadratic Bézier as well as elliptical arc curves).
  • Path > Union on the other hand seems to rewrite quadratic Béziers as cubic Béziers (it does however preserve elliptical arc commands as much as possible, e.g. when unioning circle or ellipses).
Moini wrote:Or selecting all nodes then moving them all with keyboard? Could be fast: Ctrl+Shift+A, n, Ctrl+A, arrow up, arrow down.
Yes. All nodes or a single selected one (as described in my other comment) does not make difference - both kinds of node-editing actions trigger a full path rewrite, with just cubic Bézier commands.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

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

Postby ~suv » Wed Jan 18, 2017 9:37 am

Historical note: AFAICS Inkscape <= 0.48 did convert the path data from fonts to cubic Bézier commands already when converting text to path (or maybe even earlier, internally), which might explain why some (older, or external) extensions did not see a real need to support other path commands than what was (usually) generated by Inkscape itself (M,m, L,l, C,c, Z,z).

Moini
Posts: 2045
Joined: Mon Oct 05, 2015 10:44 am

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

Postby Moini » Wed Jan 18, 2017 10:19 am

Thank you for the explanations, ~suv!
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

kmiddlebusher
Posts: 1
Joined: Wed Jan 18, 2017 11:28 am

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

Postby kmiddlebusher » Wed Jan 18, 2017 11:32 am

I have downloaded InkCut and can't get it installed. Newby to Linux and do not no what to do. I have Ubuntu Mate 16.04 running on Virtual Bow on a windows 10 machine. Do I have to make it a dual boot machine instead?

cncjohn
Posts: 5
Joined: Fri Jan 13, 2017 10:33 am

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

Postby cncjohn » Fri Feb 03, 2017 8:20 am

Thank you Moini and anyone else who have helped. Success! Inkcut cut my text perfectly. Here is what worked for me...
1. typed some truetype text into Inkscape
2. converted to paths
3. ungrouped
4. carried out the path-> union
5. cut it with inkcut.

Thank you all. No signcut paid software for me then - yippee.

Moini
Posts: 2045
Joined: Mon Oct 05, 2015 10:44 am

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

Postby Moini » Fri Feb 03, 2017 8:45 am

Can you post a picture of the result? I love to see what people create :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Pixelsaint
Posts: 11
Joined: Sat Apr 22, 2017 10:18 pm

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

Postby Pixelsaint » Fri Apr 28, 2017 2:56 am

Hi im new to linux and inkscape. I come from windows where i used corel and artcut with usb to serial driver CH341SER. It all worked fine but since moving to linux things have not been the same. My Flycut CSFY720 cuts way smaller than the artwork that gets sent to it. Couldnt figure out the scale/calibration settings so got hold of linux CH341SER driver, thing is i have no idea how to install it... CH341SER_LINUX/ch34x.c, CH341SER_LINUX/Makefile, CH341SER_LINUX/readme.txt These 3 files i recieved in the download.

Txt file says the following ...

// ChangeLog
// 1.0 - 1.1 modified to solve transmition between ch341 and ch341
// 1.1 - 1.2 Support high Linux kernel
Instructions

Note: 1.Please run followed executable programs as root privilege
2.Current Driver support versions of linux kernel range from 2.6.25 to 3.13.x
3.Current Driver support 32bits and 64bits linux systems

Usage:
(load or unload linux driver of CH34x)
//compile
#make
//load ch34x chips driver
#make load
//unload ch34x chips driver
#make unload
// 1.2 - 1.3 Fix some bugs

MAKE FILE SAYS THIS...

ifeq ($(KERNELRELEASE), )
KERNELDIR := /lib/modules/$(shell uname -r)/build
PWD :=$(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD)
clean:
rm -rf .tmp_versions Module.symvers *.mod.c *.o *.ko .*.cmd Module.markers modules.order
load:
modprobe usbserial
insmod ch34x.ko
unload:
rmmod ch34x
else
obj-m := ch34x.o
endif

ANY HELP WILL BE APPRECIATED.

Apparently linux have usb to serial drivers as default.

Moini
Posts: 2045
Joined: Mon Oct 05, 2015 10:44 am

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

Postby Moini » Fri Apr 28, 2017 7:50 am

Please, can we discuss this in the correct topic?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 9534
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

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

Postby brynn » Fri Apr 28, 2017 2:26 pm

Yes, Pixelsaint, if you could please post that in your original topic? You won't find any new or different people who can answer, by posting the same problem in different boards or different topics. Those of us who answer messages here, day after day, typically read all the new messages, everyday. Those who haven't answered yet probably just don't know the answer.

(Although I don't mind answering Private Messages now and then, a lot of people will not.)

Moini's trying to help you, if you could answer her last question in the other topic :D

Pixelsaint
Posts: 11
Joined: Sat Apr 22, 2017 10:18 pm

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

Postby Pixelsaint » Tue May 02, 2017 9:23 pm

Sorry guys im just all over the place "slow old newby"

Moini
Posts: 2045
Joined: Mon Oct 05, 2015 10:44 am

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

Postby Moini » Wed May 03, 2017 4:17 am

No worries :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Inkscape & Cutters/Plotters”

Who is online

Users browsing this forum: No registered users and 1 guest