Save as HPGL problems

Post about using Inkscape with cutters or plotters.
pixpop
Posts: 4
Joined: Fri Mar 26, 2010 2:37 pm

Save as HPGL problems

Postby pixpop » Fri Mar 26, 2010 2:58 pm

I'm trying to create files for a HP Plotter that wants HPGL.

Generally, when I make a drawing and choose File --> Save As and then select HPGL as the file format. I get a file that contains only the following:

IN;SP1;

This just means initialize the plotter and select pen 1. Doesn't seem to matter what's actually in the drawing.

Is this functionality supposed to work? Is there some other way to get HPGL output from Inkscape?

Thanks,

Neil

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

Re: Save as HPGL problems

Postby brynn » Fri Mar 26, 2010 3:52 pm

Welcome to the forums, pixpop :D

When you choose Save As HPGL, are you also typing .hpgl at the end of the filename? I've noticed some programs will automaticallly append the format and others you have to do it yourself. In older versions of Inkscape, you had to do both -- type .hpgl on the end AND select hpgl from the dropdown. I haven't noticed about the newest stable release version 0.47.

If you are doing that already, and it's not behaving as you expect, then I have more questions.
Generally, when I make a drawing and choose File --> Save As and then select HPGL as the file format. I get a file that contains only the following:

IN;SP1;

What do you mean that the file contains only "IN;SP1;"? Do you mean that's what the file is named? Surely the file must contain the image! Is that "IN;SP1;" what shows on the cutter machine display? I'm not sure what you mean, so if you could explain a little more, for us cutting machine novices :P

What happens when you do the Save as? Is it supposed to start cutting at that moment, and it's not? What's not happening that you expect to happen? Any error messages?

Also, you might read the original message in this topic
viewtopic.php?f=5&t=820
Don't bother reading the whole thread; the info you need is in the original message. The bottom line is that you need the program that uses that file format installed, and I assume you do. But just FYI.

pixpop
Posts: 4
Joined: Fri Mar 26, 2010 2:37 pm

Re: Save as HPGL problems

Postby pixpop » Fri Mar 26, 2010 4:07 pm

When I do Save As, I expect Inkscape to create a .hpgl file that contains the image. Then If I send that file to my plotter, I expect it to plot the image.

If I create a .hpgl file by hand, (i.e., without using Inkscape) and send it to the plotter, it works correctly. So I know that I can plot an image if I have a correct .hpgl file.

Inkscape does create a .hpgl file, but the file does not contain the image. All it contains is the instruction to select Pen 1. If I send that file to the plotter, it does select Pen 1. But it doesn't draw anything, because there are no drawing commands in the .hpgl file that Inkscape created.

The file does not contain the image I'm trying to plot.

pixpop
Posts: 4
Joined: Fri Mar 26, 2010 2:37 pm

Re: Save as HPGL problems

Postby pixpop » Fri Mar 26, 2010 4:10 pm

Just for clarification, my machine is a plotter, not a cutting machine. It uses the same hpgl language that cutting machines use. It has pens, and it draws lines on paper, instead of cutting vinyl. But it works exactly the same way.

pixpop
Posts: 4
Joined: Fri Mar 26, 2010 2:37 pm

Re: Save as HPGL problems

Postby pixpop » Fri Mar 26, 2010 4:31 pm

OK, I found the problem. It's necessary to first save the drawing as .svg, and then save it as .hpgl. Don't know why this should make any difference though.

Anyway, now I see the output I expect.

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

Re: Save as HPGL problems

Postby brynn » Fri Mar 26, 2010 4:43 pm

Oh wow, I'm glad you got it figured out!
I also don't understand why that should matter, but have seen other instances where that fixes the problem :roll:

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

Re: Save as HPGL problems

Postby frmdstryr » Fri Apr 09, 2010 10:07 am


ingobaab

Re: Save as HPGL problems

Postby ingobaab » Fri Jun 25, 2010 7:35 am

I tried your extension in Windows with inkscape 0.47-devel:
It dies with:

File "C:\Programme\inkscape\share\extensions\inkcut\app\main.py", line 25, in <module>
import pygtk,sys,os,logging
ImportError: No module named pygtk

Is it possible to install pygtk? how? thank you!
Seems to be almost working also under Win(XP) =)

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

Re: Save as HPGL problems

Postby kmrs75 » Fri Jun 25, 2010 6:45 pm

no that is just for linux -

but saving an image as *.hpgl is just that the code to make it work- you will get pu; pd; and a bunch of number and so on

think of is a grid - pu is pen up pd is pen down - the numbers are quardinets in the job

there should be no image for hpgl it is code just telling where the pens plotter or cutter to go.

hope i explained it right

dl.lists

Re: Save as HPGL problems

Postby dl.lists » Thu Oct 14, 2010 6:25 am

Although this thread is some months old it refers to my problem .. svg >> hpgl or svg >> plt.

I have installed inkscape 0.48 on Windows Vista.

I next installed uniconvertor-1.1.5-win32.msi and patched inkscape.

I now need to convert *.svg files to *.plt .. or *.hpgl format

I created a simple "hello world!" text object and saved as test.svg.

I then saved test.svg as as test.plt and and test.hpgl

Opening with a text editor test.hpgl just a few bytes containing the short line ..

IN;SP1;PU;


The file test.plt is larger in size but when viewed in two different PLT viewers ..

pltviewer.com and irvanviewer.com

the "hello world!" text font is in outline but not filled in black and is not the same view as in test.svg.

There is also a rogue rectangle object rendered which is not drawn in the test.svg file.

Can anyone give me some tips on converting *.svg files to *.plt for printing SVG drawn tree structures on HP plotter?

dl.lists

Re: Save as HPGL problems

Postby dl.lists » Thu Oct 14, 2010 8:11 pm

After posting the above I found this utility TotalCADConverter which converts Inkscape created *.svg files into *.plt and *.hpgl formats (and other file formats) .. and vice versa back to svg.

However I would still like to understand why inkscape does not convert to these formats.

Yepi
Posts: 8
Joined: Wed Jun 15, 2011 5:30 am

Re: Save as HPGL problems

Postby Yepi » Thu Jun 16, 2011 3:27 am

I have the same problem and the saving as svg did not work, I do not even get the IN;SP1 bit anymore, its just blank.

I had a file of a houseplan and it would not export to hpgl, so I redrew every path manually and got rid of the old paths.

The old file was an svg export from sketchup and it would not even export to plt properly. Redrawing manually has

solved the issue but means alot of extra work but now it plots to completely the wrong scale with hpgl export but the correrct scale in plt.

polymerheart
Posts: 1
Joined: Sun Sep 25, 2011 11:37 am

Re: Save as HPGL problems

Postby polymerheart » Sun Sep 25, 2011 11:47 am

I was having a similar problem, but have just noticed a possible reason and solution. Inkscape doesn't seem to output rectangles. So when I tested the HPGL output (and by tested, I mean I looked at the file (and by looked, I mean loaded it into a text file editor)) with a simple file with a single rectangle, I found just

Code: Select all

IN;SP1;PU;
.

Selecting the rectangle, and turning it into a path rather than an object worked.

Oddly, this does not need to be done for ellipses. However, disappointingly, Inkscape renders circles as a series straight lines. Granted, this is how a plotter works anyway, so why does it bother me?

My output is to be sent to a plotter via a microcontroller, with limited memory. A command such as CI300; is clearly using up less memory to store. Secondly, I will be scaling my pictures up and down, based on what buttons an end-user will press on the device, and it is harder to scale appropriately.

It is also true of bezier splines.

Suggestions, anyone?

Thanks!

ychan
Posts: 3
Joined: Fri Jul 26, 2013 9:19 pm

Re: Save as HPGL problems

Postby ychan » Fri Jul 26, 2013 9:45 pm

i accidently found the problem is because of the "Height of selection" Setting, if the unit in "px" you will get the problem. if you switch it to "mm" then it will be ok.
i like this program so much and THANKS so much to all the authors making this program.THANKS
and last hop some one can adding some more feature to the hpgl output..... like "fill" and "sketch" plot mode.

THANKS
Best Regard
Last edited by ychan on Fri Aug 02, 2013 1:12 pm, edited 2 times in total.


Return to “Inkscape & Cutters/Plotters”