Linux inkscape save as HPGL file for pen cutting plotter extension






sunday 3 may 2009
vinyl cutter plotter snijplotter with linux inkscape
inkscpape 0.46
does not have the  print command  option
to launch the hpgl distiller

also i would like to see pstoedit  hpgl
drvhpgl.cpp should have a commandline option
for setting knive pressure and speed

hpgl distiller can be launched from the <effects> menu extensions
/usr/share/inkscape/extensions




 
Treid to modify the dxf save extension
it almost works
but i need te get the penup lines right
anyone out there that can help me


some text entered in inkscape
path -> object to path
effects->modify path -> flatten bezier 0.1
file save as plt using HPGL_cutter.inx with HPGL_cutter.py
both above files are placed in file:///usr/share/inkscape/extensions/


hp2xx jpg creation of the saved hpgl plt file
as you can see not perfect yet
need penup lines

von dutch hp2xx view of a inkscape saved hpgl file vondutch.eps


It should be possible to send the saved file direct via serial port to plotter
so taht the plotter draws or cuts the file
using parameters set in the save dialog



Convert an saved epsi file to hpgl plotter file using a program called ps2edit
then preview the hpgl / plt file or make jpeg with hp2xx


Set serial port for plotter under linux terminal
 stty 19200 cs8 -parenb -parodd  crtscts  -ixon -ixoff  -F /dev/ttyS0

copy a file to serial port cq plotter / cutter
cat /myvondutch.plt > /dev/ttyS0

maybe something like conversion and sending in one command also works
cat infile.eps | pstoedit -f "hpgl" >  /dev/ttyS0

pstoedit -f hpgl /kissmy.eps /kissmy.plt



problems using the pstoedit hpgl
init string is defined in sourcecode
looks like my plotter needs  a PA wich my plotter needs when first time turned on (penabsolute)
also speed
was looking for a header or init string config file but its defined in source code
also problems with the scale
real plot is not the size i would expect  its smaller 310mm wide is 219mm

Modified pstoedit /src/drvhpgl.cpp
strange VS holds scale  vs is velocity speed select and not scale
changed the drvhpgl.cpp a bit, scale to 14 instead of 10
and VS to a speed i want and a TP for toolpressure SP1 to SP0 so that plotter turns on knife blade offset compensation
and a PA
would be better to make above command line arguments
psto edit configure make and make install
ok its not perfect but i can use the plotter now on Linux

Manual kerning letterspacing in with inkscape
select text
use keys alt+> or alt+< to adjust letter spacing

First thermo transfer cut on plotter with Linux my illegal VonDutch Tshirt






First my vondutch tshirt made with a vinyl cutter plotter on linux using inkscape and psoedit
reflective thermo transfer
would like to change Von to Me Dutch
but cannot find a ttf font alike vondutch font
 







Another try

ps2hpgl
changed /usr/share/inkscape/extensions/dxf_output.inx
    into hpgl_plotter_output.inx and modifeid its contents

changed /usr/share/inkscape/extensions/ps2dxf.sh
    into ps2hpgl.sh and modifeid its contents

now i can use "save as" from inkscape to HPGL

it uses pstoedit   (in wich i have modifeid /pstoedit-3.44/src/drvhpgl.cpp) for correct speed and scale hpgl header  (configure -> make -> make install)
would be better to change drvhpgl and the inx file so that ,pennr, sp, and speed, pressure,  can be set as parameters in inkscape save dialog
and pass them as  commandline option to pstoedit -f hpgl
and maybe option for direct output to plotter

Source files for inkscape save as hpgl pen cutting plotter

Problems i spend an hour on  -> file permisions where not correct (is executable)




Inkscape open / import HPGL pen cutting plotter file using hp2xx
 hp2xx -m svg  /input.plt /output.svg

<inkscape-extension>
    <_name>HPGL Input</_name>
    <id>org.inkscape.input.HPGL</id>
    <dependency type="executable" _description="u need hp2xx ">hp2xx</dependency>
    <dependency type="extension">org.inkscape.input.svg</dependency>
     <input>
        <extension>.plt</extension>
        <mimetype>image/x-svg</mimetype>
        <_filetypename>hpgl pen cutting plotter (*.plt)</_filetypename>
        <_filetypetooltip>Import HPGL pen cutting plotter file</_filetypetooltip>
        <output_extension>org.inkscape.output.svg</output_extension>
    </input>
    <script>
        <command reldir="path">hp2xx -m svg $input $output</command>
    </script>
</inkscape-extension>

above does the conversion only the file is not loaded in inkscape
HELLUP?

Another try

What is HPGL-Distiller?
HPGL-Distiller is a small program that was written to filter out aspects of a HPGL file which are not relevant for various HPGL output devices, typically vinyl cutters. The original reason for filtering out the irrelevant codes was that my own personal vinyl cutter was responding poorly to the excess data.
http://pldaniels.com/hpgl-distiller

screenshot With the use of HPGL-Distiller, you can now finally use your favorite programs like Inkscape, QCAD, GIMP and many others to produce professional vinyl cutting output results without having to jump back to Windows(tm).

How does it work?
The HPGL-Distiller is actually a very simple program (even written in C) that breaks the incoming HPGL data stream into individual HPGL commands and simply copies or ignores each command based on the built in list of 'acceptable' HPGL commands. A lot of HPGL commands generated by pstoedit pertain to aspects of plotting like line type, width, pen colour, pen width and such, all of which aren't always relevant, especially in the cutting processes.

It should be pointed out that as you go up in the range of the plotters/cutters, the HPGL feature set they support will tend to increase (ie, supporting arcs, circles, rectangles natively).

How do I use it?
HPGL-Distiller is used as a post-processing tool after converting an existing vector format (SVG, DXF, EPS etc) into HPGL via 'pstoedit'. By default the output of the pstoedit (with -f plot-hpgl) contains a lot of HPGL commands which are of no relevance to the final vinyl cutter in question.

	pstoedit -f plot-hpgl imagefile.eps fulloutput.hpgl

hpgl-distiller -i fulloutput.hpgl -o distilled.hpgl

(subsequently you can possibly output the distilled HPGL to your
cutter using 'cat distilled.hpgl > /dev/ttyS1 )

What software licence is this released under?
HPGL-Distiller is released under the modified BSD licence. This means that it's compatible with other licences like GPL as well as being commercial/closed-source friendly.

Download
http://pldaniels.com/hpgl-distiller
CHANGELOG
hpgl-distiller-0.9.1.tar.gz
hpgl-distiller-0.9.0.tar.gz

Installing
Installation is quite simple, a two step process

changes i made
inkscape printbox should be (print destination window) | prog arg...
| /hpgl_distiller/print-to-cutter.sh


in the print-to-cutter.sh file changed
pstoedit -f plot-hpgl $INF $OUTF
to
pstoedit -f hpgl $INF $OUTF

and changed in print-to-cutter.sh
CUTTER=/dev/ttyS0
stty 19200 cs8 -parenb -parodd  crtscts  -ixon -ixoff  -F /dev/ttyS0

http://pldaniels.com/hpgl-distiller
This works perfect for me







 VonDutch_MeDutch.png
vondutch__medutch.png
Luberth Dijkman Bangert 23 1619GJ Andijk The Netherlands 5 Oktober 2006

links


http://www.openclipart.org/cgi-bin/navigate

Do you cut vinyl with a cutting plotter on a *nix Unix Linux Operating System
Tell me how you do it


Subject: Success with Roland Camm-1

From: Bruce Westfall To: linux_vinyl_cut/3x6.nl Date: Wed, 19 Mar 2008 13:33:24 -0400 I used the instructions you had on the page, but changed a bit in the print-to-cutter script: Here it is with the comments removed ---------------------------------------- CUTTER=/dev/ttyS0 stty 9600 cs8 -parenb -parodd crtscts -ixon -ixoff -F /dev/ttyS0 TMPDIR=/tmp INF=$TMPDIR/cutter.$$.eps OUTF=$TMPDIR/cutter.$$.tmp HPGL=$TMPDIR/cutter.$$.hpgl REMOVE_INF=0 reading from STDIN # if [ $# -eq 1 ]; then INF=$1 else cat > $INF REMOVE_INF=1 fi pstoedit -xscale 1.115 -yscale 1.115 -f plot-hpgl $INF $OUTF hpgl-distiller -i $OUTF -o $HPGL ---------------------------------------- I commented out the part that removes the old files so I can see what is going on. Print command is: | /home/bruce/hpgl/print-to-cutter.sh In my Inkscape preferences.xml, the following is now there: Works great is is EXACTLY to scale!! Thanks for making this available! Subject: Experiences with HP plotters... Date 6 april 2008 Hello, my name is Jim D, I live in East Tennessee, USA. I have visited your site a number of times over the last several years. I have owned two models* of HP plotters, and wanted to share intereseting things I have learned. I used to have the Draftsmaster 2 7596A, I now have the Draftsmaster MX plus, I like the MX much better, it has a 62 inch plot length, twice that if tiled. So, some things I have learned: My two year old child smashed an extra carousel against something, and the plastic piece that moves up and down (one below each pen) came off. The spring came out. I realized that the spring and piece were not broken, they can be carefully removed at will. So later, when I was cutting very expensive translucent vinyl for a backlit sign, I was having difficulty getting the Mimaki blade holder to be picked up by the plotter carriage. The spring loaded slide up and down piece below the knife holder, on the carrousel wasn't letting it go. The Mimaki is quite a bit taller than my Roland, so that was the problem. But the adjustable Mimaki cuts much better. Then I remembered that the piece can be removed. The knife holder still holds in the carrousel just fine, with the piece removed. I think it is just there to keep pens from drying out. I have 3 knife holders: A Roland, a Mimaki, and an aftermarket German one. The last 2 a freind gave me when he bought a Chinese plotter. The German one needs to swivel easier, but I think that is little problem, probably just lubrication. I have become very interested in Inkscape software. The trace program saves me HOURS of time. I am a proffessional sign maker. But my Corel Draw is old, version 8. It will not open the SVG file from Inkscape. Inkscape will not send drawing to old HP plotter, even with expensive aftermarket driver. Then, I discovered that Inkscape will save a file as an Oo file extension. ( Open Office .org ) For whatever reason, the Open Office draw program WILL send a drawing to the HP plotter. Very nice. But, it gets better. For months, I have been trying to get a way to save an Inkscape file so that my old Corel 8 will see it. I'm aware of the psEdit, but it requiresa $50 plug in, and blah, blah, blah, what a hassle. Just 2 or 3 nights ago, I realized that Inkscape will save as EMF (encapsulated meta file? ). this is not the EPS, that did not work for me. But the EMF did. Now I can do anything with the files I want. I could have just bought Corel 10 from ebay to open SVG in Corel, but money has been difficult lately. The EMF file was very good news for me. You might want to try the Open Office freeware. If you haven't seen it lately, it now has 5 parts, one of them is a vector draw program. Before I got the MX plus, I was thinking seriously about how to change the plot length of the 7596A. I learned that the limits are stored in e-prom chip. ( E programable ) In order to change the settings, you need to remove the chip, ( it is large ) and put it in a board made for this purpose. Then, with the right software, you look at all the settings on the chip, change the ones needed, and reinstall the chip. I would also get rid of that bothersome check paper size feature in these plotters. I took great interest in your efforts to use Linux/Inkscape together. I will study all that you have done. Myself, I think the Linux people need to worry less about making a new version every 6 months, and put effort towards hardware issues. Not many modems compatible, not many wireless connections either. Probably not many plotter drivers. That is what makes your work intertesting. I will study it. *I have two extra 7596a models, and a destop model in the attic. I "rescue" them like some people rescue stray cats or dogs. But hey, a lot easier to deal with, eh? No feed, no stink. I will talk to you later, THANKS for the site, Jim D. comment linux open office is verry slow on my fedora linux pc (especialy the menus) i do not understand that you cannot use inkscape to save or send as old hpgl style with the info on this page you can use inkscape to send old style hpgl to plotter (hpgl-distiller) http://pldaniels.com/hpgl-distiller ok not sure to me = maybe you run inkscape / openoffice on ms windows






some links

Signs Decals Stickers
www.Sticker.Tk