Inkscape 0.46-0.48 won't vector cut on ULS Laser
Inkscape 0.46-0.48 won't vector cut on ULS Laser
Hello,
I've been trying for two years without success to get my ULS Laser cutter to work directly from inkscape.
I've set my path stroke lines to RGB (255,0,0) and line width of 0.003mm all the way to 0.001mm. Yet they always come up rastered in the ULS software after hitting print.
However, if I save a copy as PDF, then print from Adobe Acrobat, the vector lines are correctly shown as cuts and in red.
It's really a big pain to have to export every file to PDF, then open/print it in AA. I've checked all the inkscape settings (printing in Vector mode not raster) and tried every possible combation of stroke widths. For the PDFs, 0.003mm seems to be the best size. According to ULS, anything under 0.005mm (and RED) will be vector cut. Everything else is looked at as a raster. Yet regardless of the line width, I either get a black rastered line or no lines at all (<0.003mm)
ULS says any shape or path set to stroke style of 0.003mm with RGB 255,0,0 should show up as cuts. ULS wasn't much help for inkscape as it works from PDF/corel draw/etc.
Does anyone have some advice?
I've been trying for two years without success to get my ULS Laser cutter to work directly from inkscape.
I've set my path stroke lines to RGB (255,0,0) and line width of 0.003mm all the way to 0.001mm. Yet they always come up rastered in the ULS software after hitting print.
However, if I save a copy as PDF, then print from Adobe Acrobat, the vector lines are correctly shown as cuts and in red.
It's really a big pain to have to export every file to PDF, then open/print it in AA. I've checked all the inkscape settings (printing in Vector mode not raster) and tried every possible combation of stroke widths. For the PDFs, 0.003mm seems to be the best size. According to ULS, anything under 0.005mm (and RED) will be vector cut. Everything else is looked at as a raster. Yet regardless of the line width, I either get a black rastered line or no lines at all (<0.003mm)
ULS says any shape or path set to stroke style of 0.003mm with RGB 255,0,0 should show up as cuts. ULS wasn't much help for inkscape as it works from PDF/corel draw/etc.
Does anyone have some advice?
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
Welcome to the forum
I'm sorry no one has answered. Maybe my will reply, which will bump your topic back to the top, will get things moving.
I don't think these will help, but just in case, did you see these: viewtopic.php?f=31&t=4987 and viewtopic.php?f=31&t=11496?
I'm sorry no one has answered. Maybe my will reply, which will bump your topic back to the top, will get things moving.
I don't think these will help, but just in case, did you see these: viewtopic.php?f=31&t=4987 and viewtopic.php?f=31&t=11496?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
Thanks for the links. Unfortunately, they don't look like they will be helpful for my setup. ULS now says that Inkscape isn't sending vector data to the windows GDI printer interface. Even though the default setting under inkscape is to use vector (not raster) mode. Any ideas from here?
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
No, I really have no clue. But I can recommend a nice little forum called Inkscape Cutting Design http://www.inkscapecuttingdesign.com/index.php?. They have experience with all kinds of different machines, and might know, for example, if a recent upgrade no longer supports Inkscape. I really have no idea what the problem might be, but that is one thing that comes to mind as a possibility.
Or maybe someone else will have an idea
Or maybe someone else will have an idea
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 8
- Joined: Tue Dec 18, 2007 10:43 pm
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
attached is a proposal to produce a vector graphics printout for Windows. This particular method will work only on Windows, but if I understand the various reports correctly, this rasterization problem occurs only on Windows.
The method is based on the file dxf_outlines.py which has been rewritten to use gdi32.dll for printing. It runs as an Inkscape Python extension from the menu item Extensions->Export->Win32 Vector Print. It will produce a vector output if the linewidth is 1 printer pixel or less. The necessary files are attached here:
Further info is available at https://bugs.launchpad.net/inkscape/+bug/630639 comment 12, 13
Since I do not have access to a true laser cutter, any feedback would be more than welcome.
hth,
Alvin
The method is based on the file dxf_outlines.py which has been rewritten to use gdi32.dll for printing. It runs as an Inkscape Python extension from the menu item Extensions->Export->Win32 Vector Print. It will produce a vector output if the linewidth is 1 printer pixel or less. The necessary files are attached here:
Further info is available at https://bugs.launchpad.net/inkscape/+bug/630639 comment 12, 13
Since I do not have access to a true laser cutter, any feedback would be more than welcome.
hth,
Alvin
- Attachments
-
- print_win32_vector.zip
- (3.53 KiB) Downloaded 475 times
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
Oh, nice work!
I don't know much about this problem, but I do hope it helps, and look forward to reports of actual use
I don't know much about this problem, but I do hope it helps, and look forward to reports of actual use
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 8
- Joined: Tue Dec 18, 2007 10:43 pm
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
fix committed to bzr rev 11575, any testing would be welcome.
Alvin Penner
Alvin Penner
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
I don't know about your brand of laser cutter but with our (Trotec) cutters line width doesn't matter when printing from inkscape. It only looks at the rgb value and the path. I know that isn't much help, but it does work with some lasers. It also works fine with our vinyl cutter, even though driver support is so bad we have to use it on a 32bit xp machine. It looks like you went through and looked, but on our laser drivers there are all sorts of hidden checkboxes that can mess stuff up.
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
I have exactly the same issue when I try to cut with the Laser Cutter Epilog Helix 60 W using Inkscape 0.46. No matter what settings I use that only rasters data, never
cuts and the computer attached only runs in Windows. I can't switch computers or OS because both laser and computer belong to TechShop (company that runs for profit) so I have to use the software they provide (CorelDraw).
cuts and the computer attached only runs in Windows. I can't switch computers or OS because both laser and computer belong to TechShop (company that runs for profit) so I have to use the software they provide (CorelDraw).
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
Hi Alvin,
I tried to use the extension with our ULS VersaLaser and while the rasterisation problem is fixed I get one, maybe two different issues.
The dimensions of the objects send to the cutter are squashed in y-direction by about half. So if I send a square with 1 cm long sides I'll end up with a rectangle with 1 cm x 0.5 cm (w x h). The 2:1 ratio is the ratio of the page width to height. I'm not sure if that's the cause, though. I've tried both your extension and the altered version from Eric Gradman in Bug #966244 but the behavior is the same.
The other issue is that there is some scaling going on but I haven't made any investigations into what the factor is and if the alternative version resolves this issue.
I'll see if it is persistant when printing to PDF.
In the meantime I'd appreciate any help in resolving this issue.
Thanks,
J
I tried to use the extension with our ULS VersaLaser and while the rasterisation problem is fixed I get one, maybe two different issues.
The dimensions of the objects send to the cutter are squashed in y-direction by about half. So if I send a square with 1 cm long sides I'll end up with a rectangle with 1 cm x 0.5 cm (w x h). The 2:1 ratio is the ratio of the page width to height. I'm not sure if that's the cause, though. I've tried both your extension and the altered version from Eric Gradman in Bug #966244 but the behavior is the same.
The other issue is that there is some scaling going on but I haven't made any investigations into what the factor is and if the alternative version resolves this issue.
I'll see if it is persistant when printing to PDF.
In the meantime I'd appreciate any help in resolving this issue.
Thanks,
J
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
mmunto wrote:I have exactly the same issue when I try to cut with the Laser Cutter Epilog Helix 60 W using Inkscape 0.46. No matter what settings I use that only rasters data, never
cuts and the computer attached only runs in Windows. I can't switch computers or OS because both laser and computer belong to TechShop (company that runs for profit) so I have to use the software they provide (CorelDraw).
I use Epilog Helix and Mini... both will not cut directly from Inkscape... files need to be saved as PDF and printed/cut from Adobe Reader.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
Hi.
For this type of problem I would use the "binary search" method, eliminating one piece of the "system" at a time.
A little more info about your laser system would be nice. What model LC? What OS? Which Inkscape version? Which extension version?
Does it print correctly from other applications?
If yes the problem lies "within" Inkscape - either in your Inkscape cutter extension or the SVG file itself.
This is easy to test by sending a file to the LC (laser cutter) with "hand-made" commands.
Is the communication between the LC and PC serial?
If yes - it would be easy to install a "serial sniffer" program which enables you to look at the commands being sent to the cutter.
You will then be able to see if the correct line thickness for cuts are sent to your LC.
Another way to analyze the output is to print to a file. Add a printer, - File - Generic - Text Only.
You will the be asked for a file name when printing.
After printing open this file with your favorite text editor and look at the commands.
All cutting is done after the "PD" commands (Pen Down).
Still another way to test the output is to install a plotter simulator- there are several free versions on the net.
-http://www.ke5fx.com/gpib/7470.htm
-http://en.kioskea.net/download/download-16709-hp-gl-emulator
From one of the ULS LC manuals:
(From personal experience - in nine out of ten cases these problems can be attributed to "PEBKAC" - Problem Exists Between Keyboard And Chair!
Don't ask how I know )
Please provide some more info - if possible post a "probematic" SVG file plus printer output.
RGDS
Ragnar
For this type of problem I would use the "binary search" method, eliminating one piece of the "system" at a time.
A little more info about your laser system would be nice. What model LC? What OS? Which Inkscape version? Which extension version?
Does it print correctly from other applications?
If yes the problem lies "within" Inkscape - either in your Inkscape cutter extension or the SVG file itself.
This is easy to test by sending a file to the LC (laser cutter) with "hand-made" commands.
Is the communication between the LC and PC serial?
If yes - it would be easy to install a "serial sniffer" program which enables you to look at the commands being sent to the cutter.
You will then be able to see if the correct line thickness for cuts are sent to your LC.
Another way to analyze the output is to print to a file. Add a printer, - File - Generic - Text Only.
You will the be asked for a file name when printing.
After printing open this file with your favorite text editor and look at the commands.
All cutting is done after the "PD" commands (Pen Down).
Still another way to test the output is to install a plotter simulator- there are several free versions on the net.
-http://www.ke5fx.com/gpib/7470.htm
-http://en.kioskea.net/download/download-16709-hp-gl-emulator
From one of the ULS LC manuals:
- If laser cutting is desired, set the line thickness of the lines that are drawn
in the graphics software to 0.001 inches (0.025 mm) or the smallest possible line thickness available.
(From personal experience - in nine out of ten cases these problems can be attributed to "PEBKAC" - Problem Exists Between Keyboard And Chair!
Don't ask how I know )
Please provide some more info - if possible post a "probematic" SVG file plus printer output.
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
I'm having the exact same issue. I just got a ULS Versalaser VL200, and my WinXP 32-bit laptop running Inkscape does not print "vector cuts" (just raster) with any stroke width including 0.001mm. All other functions appear normal. But, those vector cuts would sure save a lot of time for those vertical cuts... I have to use another application to get those done, but I'd really love to just use Inkscape.
Anyway, I remember reading in the manual that it doesn't accept postscript. So, I think that's out. The communication between the laser cutter and the PC is USB, but the problem can be identified before then. In the "Versalaser Control Panel", you can preview your image before starting the job, and vector cuts appear as red (default - you can specify what different colors are enabled and what each means, but I promise this is configured correctly along with all other settings). Red line - vector cut. Black line - raster etched line. So the problem is happening somewhere between Inkscape, and the Versalaser drivers. It's not the commands being sent to the hardware.
The laser cutter is at my shop, and I'm at home ATM, so I'll see what results I get with the Extensions>Export command. Thank you for the files in the zip! But, I wouldn't be surprised if I get the exact same new problems as crakkhead earlier.
Anyway, I remember reading in the manual that it doesn't accept postscript. So, I think that's out. The communication between the laser cutter and the PC is USB, but the problem can be identified before then. In the "Versalaser Control Panel", you can preview your image before starting the job, and vector cuts appear as red (default - you can specify what different colors are enabled and what each means, but I promise this is configured correctly along with all other settings). Red line - vector cut. Black line - raster etched line. So the problem is happening somewhere between Inkscape, and the Versalaser drivers. It's not the commands being sent to the hardware.
The laser cutter is at my shop, and I'm at home ATM, so I'll see what results I get with the Extensions>Export command. Thank you for the files in the zip! But, I wouldn't be surprised if I get the exact same new problems as crakkhead earlier.
-
- Posts: 2
- Joined: Fri Sep 29, 2017 4:50 am
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
OK - So for everybody that's having scaling problems with their laser, here's a soluton... Edit the Python file that is the win32 vector print.
Full disclaimer - I don't know python, I'm a bad programmer, but I tried this and it works. I know this thread is old, but this IS THE SOLUTION. Or at least one of them, but lacking anything better, THIS IS IT. Multiply the Y axis by 2. Wham. See below.
For me it's located here:
C:\Program Files\Inkscape\share\extensions
print_win32_vector.py
It's possible, and even LIKELY that this change will stretch the output of any other device you print to, but for OUR crappy old laser cutter, it works gangbusters. Make sure you convert all your objects to paths.
Add the *2 to the line shown:
self.groupmat = [[[self.scale, 0.0, 0.0], [0.0, self.scale*2, 0.0]]] # Andy changed this to make it print right.
Here's the ENTIRE python script print_win32_vector.py because I can't attach a .py file..nooooOOooo.
So there's that. Just replace the print_win32_vector.py with the contents shown there, or add the *2 to the self.groupmat line.
Full disclaimer - I don't know python, I'm a bad programmer, but I tried this and it works. I know this thread is old, but this IS THE SOLUTION. Or at least one of them, but lacking anything better, THIS IS IT. Multiply the Y axis by 2. Wham. See below.
For me it's located here:
C:\Program Files\Inkscape\share\extensions
print_win32_vector.py
It's possible, and even LIKELY that this change will stretch the output of any other device you print to, but for OUR crappy old laser cutter, it works gangbusters. Make sure you convert all your objects to paths.
Add the *2 to the line shown:
self.groupmat = [[[self.scale, 0.0, 0.0], [0.0, self.scale*2, 0.0]]] # Andy changed this to make it print right.
Here's the ENTIRE python script print_win32_vector.py because I can't attach a .py file..nooooOOooo.
Code: Select all
#!/usr/bin/env python
'''
print_win32_vector.py
This extension will generate vector graphics printout, specifically for Windows GDI32.
Copyright (C) 2012 Alvin Penner, [email protected]
Broken and stretched along the Y axis by Andy Baker
so it only works with ULS laser cutters September 2017
[email protected]
This is a modified version of the file dxf_outlines.py by Aaron Spike, [email protected]
It will write only to the default printer.
The printing preferences dialog will be called.
In order to ensure a pure vector output, use a linewidth < 1 printer pixel
- see http://www.lessanvaezi.com/changing-printer-settings-using-the-windows-api/
- get GdiPrintSample.zip at http://archive.msdn.microsoft.com/WindowsPrintSample
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
from ctypes import *
# local library
import inkex
import simplestyle
import simpletransform
import cubicsuperpath
inkex.localize() # Initialize gettext
if not inkex.sys.platform.startswith('win'):
exit(_("sorry, this will run only on Windows, exiting..."))
myspool = WinDLL("winspool.drv")
mygdi = WinDLL("gdi32.dll")
LOGBRUSH = c_long*3
DM_IN_PROMPT = 4 # call printer property sheet
DM_OUT_BUFFER = 2 # write to DEVMODE structure
class MyEffect(inkex.Effect):
def __init__(self):
inkex.Effect.__init__(self)
self.visibleLayers = True # print only visible layers
def process_shape(self, node, mat):
rgb = (0,0,0) # stroke color
fillcolor = None # fill color
stroke = 1 # pen width in printer pixels
# Very NB : If the pen width is greater than 1 then the output will Not be a vector output !
style = node.get('style')
if style:
style = simplestyle.parseStyle(style)
if style.has_key('stroke'):
if style['stroke'] and style['stroke'] != 'none' and style['stroke'][0:3] != 'url':
rgb = simplestyle.parseColor(style['stroke'])
if style.has_key('stroke-width'):
stroke = self.unittouu(style['stroke-width'])/self.unittouu('1px')
stroke = int(stroke*self.scale)
if style.has_key('fill'):
if style['fill'] and style['fill'] != 'none' and style['fill'][0:3] != 'url':
fill = simplestyle.parseColor(style['fill'])
fillcolor = fill[0] + 256*fill[1] + 256*256*fill[2]
color = rgb[0] + 256*rgb[1] + 256*256*rgb[2]
if node.tag == inkex.addNS('path','svg'):
d = node.get('d')
if not d:
return
p = cubicsuperpath.parsePath(d)
elif node.tag == inkex.addNS('rect','svg'):
x = float(node.get('x'))
y = float(node.get('y'))
width = float(node.get('width'))
height = float(node.get('height'))
p = [[[x, y],[x, y],[x, y]]]
p.append([[x + width, y],[x + width, y],[x + width, y]])
p.append([[x + width, y + height],[x + width, y + height],[x + width, y + height]])
p.append([[x, y + height],[x, y + height],[x, y + height]])
p.append([[x, y],[x, y],[x, y]])
p = [p]
else:
return
trans = node.get('transform')
if trans:
mat = simpletransform.composeTransform(mat, simpletransform.parseTransform(trans))
simpletransform.applyTransformToPath(mat, p)
hPen = mygdi.CreatePen(0, stroke, color)
mygdi.SelectObject(self.hDC, hPen)
self.emit_path(p)
if fillcolor is not None:
brush = LOGBRUSH(0, fillcolor, 0)
hBrush = mygdi.CreateBrushIndirect(addressof(brush))
mygdi.SelectObject(self.hDC, hBrush)
mygdi.BeginPath(self.hDC)
self.emit_path(p)
mygdi.EndPath(self.hDC)
mygdi.FillPath(self.hDC)
return
def emit_path(self, p):
for sub in p:
mygdi.MoveToEx(self.hDC, int(sub[0][1][0]), int(sub[0][1][1]), None)
POINTS = c_long*(6*(len(sub)-1))
points = POINTS()
for i in range(len(sub)-1):
points[6*i] = int(sub[i][2][0])
points[6*i + 1] = int(sub[i][2][1])
points[6*i + 2] = int(sub[i + 1][0][0])
points[6*i + 3] = int(sub[i + 1][0][1])
points[6*i + 4] = int(sub[i + 1][1][0])
points[6*i + 5] = int(sub[i + 1][1][1])
mygdi.PolyBezierTo(self.hDC, addressof(points), 3*(len(sub)-1))
return
def process_clone(self, node):
trans = node.get('transform')
x = node.get('x')
y = node.get('y')
mat = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]
if trans:
mat = simpletransform.composeTransform(mat, simpletransform.parseTransform(trans))
if x:
mat = simpletransform.composeTransform(mat, [[1.0, 0.0, float(x)], [0.0, 1.0, 0.0]])
if y:
mat = simpletransform.composeTransform(mat, [[1.0, 0.0, 0.0], [0.0, 1.0, float(y)]])
# push transform
if trans or x or y:
self.groupmat.append(simpletransform.composeTransform(self.groupmat[-1], mat))
# get referenced node
refid = node.get(inkex.addNS('href','xlink'))
refnode = self.getElementById(refid[1:])
if refnode is not None:
if refnode.tag == inkex.addNS('g','svg'):
self.process_group(refnode)
elif refnode.tag == inkex.addNS('use', 'svg'):
self.process_clone(refnode)
else:
self.process_shape(refnode, self.groupmat[-1])
# pop transform
if trans or x or y:
self.groupmat.pop()
def process_group(self, group):
if group.get(inkex.addNS('groupmode', 'inkscape')) == 'layer':
style = group.get('style')
if style:
style = simplestyle.parseStyle(style)
if style.has_key('display'):
if style['display'] == 'none' and self.visibleLayers:
return
trans = group.get('transform')
if trans:
self.groupmat.append(simpletransform.composeTransform(self.groupmat[-1], simpletransform.parseTransform(trans)))
for node in group:
if node.tag == inkex.addNS('g','svg'):
self.process_group(node)
elif node.tag == inkex.addNS('use', 'svg'):
self.process_clone(node)
else:
self.process_shape(node, self.groupmat[-1])
if trans:
self.groupmat.pop()
def effect(self):
pcchBuffer = c_long()
myspool.GetDefaultPrinterA(None, byref(pcchBuffer)) # get length of printer name
pname = create_string_buffer(pcchBuffer.value)
myspool.GetDefaultPrinterA(pname, byref(pcchBuffer)) # get printer name
hPrinter = c_long()
if myspool.OpenPrinterA(pname.value, byref(hPrinter), None) == 0:
exit(_("Failed to open default printer"))
# get printer properties dialog
pcchBuffer = myspool.DocumentPropertiesA(0, hPrinter, pname, None, None, 0)
pDevMode = create_string_buffer(pcchBuffer + 100) # allocate extra just in case
pcchBuffer = myspool.DocumentPropertiesA(0, hPrinter, pname, byref(pDevMode), None, DM_IN_PROMPT + DM_OUT_BUFFER)
myspool.ClosePrinter(hPrinter)
if pcchBuffer != 1: # user clicked Cancel
exit()
# initiallize print document
docname = self.document.getroot().xpath('@sodipodi:docname', namespaces=inkex.NSS)
if not docname:
docname = ['New document 1']
lpszDocName = create_string_buffer('Inkscape ' + docname[0].split('\\')[-1])
DOCINFO = c_long*5
docInfo = DOCINFO(20, addressof(lpszDocName), 0, 0, 0)
self.hDC = mygdi.CreateDCA(None, pname, None, byref(pDevMode))
if mygdi.StartDocA(self.hDC, byref(docInfo)) < 0:
exit() # user clicked Cancel
self.scale = (ord(pDevMode[58]) + 256.0*ord(pDevMode[59]))/96 # use PrintQuality from DEVMODE
self.scale /= self.unittouu('1px')
self.groupmat = [[[self.scale, 0.0, 0.0], [0.0, self.scale*2, 0.0]]] # Andy changed this and added the *2 to make it print right on a crappy laser.
doc = self.document.getroot()
self.process_group(doc)
mygdi.EndDoc(self.hDC)
if __name__ == '__main__':
e = MyEffect()
e.affect()
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99
So there's that. Just replace the print_win32_vector.py with the contents shown there, or add the *2 to the self.groupmat line.
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
Since this topic that you posted in is about versions 0.46 to 0.48, should we assume this code is meant to fix extensions in that version?
Did the fix provided earlier in this topic not work for you? Were you able to test it as requested by the developer who offered the fix? As far as I understand "developer-speak" fix committed means that there's a branch with the fix in it, but not necessarily that that fix was ever released. There may be more info in the referenced bug report, with I didn't look up (because this topic is so old).
Or is this code meant to "fix" the current Inkscape version 0.92.2? If so, do you know if there's a bug report for it? If so, you should post this there, so that other developers can review it.
If you're using 0.92.x, you might need to learn about the change in unit handling. Either because it might fix the problem you're having, or just because it might be helpful to understand.
https://inkscape.org/en/learn/faq/#inks ... rogram-xyz
Did the fix provided earlier in this topic not work for you? Were you able to test it as requested by the developer who offered the fix? As far as I understand "developer-speak" fix committed means that there's a branch with the fix in it, but not necessarily that that fix was ever released. There may be more info in the referenced bug report, with I didn't look up (because this topic is so old).
Or is this code meant to "fix" the current Inkscape version 0.92.2? If so, do you know if there's a bug report for it? If so, you should post this there, so that other developers can review it.
If you're using 0.92.x, you might need to learn about the change in unit handling. Either because it might fix the problem you're having, or just because it might be helpful to understand.
https://inkscape.org/en/learn/faq/#inks ... rogram-xyz
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 2
- Joined: Fri Sep 29, 2017 4:50 am
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
Hit here,
So in reading that FAQ, I can see that the units problem it references isn't what was going on here, because it's happening only in one axis, and it's happening at exactly 50% and not in a units mismatch, which I'm well trained to see.
I AM in fact using 0.92, and this "problem" still happens, and obviously existed in 0.46 and 0.48, but I'm not actually sure if this IS a problem for anything aside from these ULS laser cutters. I don't have a plotter to test it on for example. All I can say is that for THIS particular problem, the solution I provided fixes it on this one class of hardware. I don't know if this problem exists in the firmware of the ULS cutters ONLY, or if it's across the board. I can say with great certainty that our laser cutter is the most temperamental and annoying thing in the whole shop aside from the fax machine, so I wouldn't rule out a problem on its end. That said, I expect that the modification I made WILL break other vector prints on other hardware. BUT I can't test it.
BIG DISCLAIMER - I'm not a programmer! I know enough about Python to be dangerous (except in this case) and when I do make code changes, I usually email them to somebody in the office that knows how to use GIT and they handle the rest. Everybody hates me for it, but it's what makes sense. I'm kind of hoping a real programmer will take the changes I made and fix my jerk-off implementation and do it right.
Andy
So in reading that FAQ, I can see that the units problem it references isn't what was going on here, because it's happening only in one axis, and it's happening at exactly 50% and not in a units mismatch, which I'm well trained to see.
I AM in fact using 0.92, and this "problem" still happens, and obviously existed in 0.46 and 0.48, but I'm not actually sure if this IS a problem for anything aside from these ULS laser cutters. I don't have a plotter to test it on for example. All I can say is that for THIS particular problem, the solution I provided fixes it on this one class of hardware. I don't know if this problem exists in the firmware of the ULS cutters ONLY, or if it's across the board. I can say with great certainty that our laser cutter is the most temperamental and annoying thing in the whole shop aside from the fax machine, so I wouldn't rule out a problem on its end. That said, I expect that the modification I made WILL break other vector prints on other hardware. BUT I can't test it.
BIG DISCLAIMER - I'm not a programmer! I know enough about Python to be dangerous (except in this case) and when I do make code changes, I usually email them to somebody in the office that knows how to use GIT and they handle the rest. Everybody hates me for it, but it's what makes sense. I'm kind of hoping a real programmer will take the changes I made and fix my jerk-off implementation and do it right.
Andy
Re: Inkscape 0.46-0.48 won't vector cut on ULS Laser
Hi Andy,
No, the units issue is particular to 0.92.x So if this is the same problem which existed in 0.46 to 0.48, it would not be relevant. I wasn't sure from your previous post (in large part probably because I scarcely understand development and coding language).
Since your problem is the same as the op, I wonder if you saw this reply:
I sounds as if a fix was written, and committed to some branch. Perhaps it never made to into a stable version. I don't know, I didn't read the report (and even if I did, I probably can't understand it). Perhaps it was because it was never tested? I don't know.
I didn't even read this entire thread. Just from skimming through it, it sounds like a few different people have contributed bits and pieces. It would probably be helpful if.... Well I mean, it sounds like this whole issue could use someone to sort through it all, organize it if necessary, and try to bring everything up to date. If you have the time and motivation.
In any case, an Inkscape developer isn't likely to see your code here, if that's what you meant by "real programmer". For some reason, Inkscape developers rarely visit forums. That's why I suggested posting it to the relevant bug report, so that developers can review it.
I suppose it's possible someone with the right skills will see it here. But the best chance of someone in the Inkscape community using it, is probably if they can find it in the bug tracker. This is the bug report that was referenced early in this post
I assume it would be the one where you should post this. But you would be a better judge of that than me. If you can't find a relevant report, please feel free to start a new one.
No, the units issue is particular to 0.92.x So if this is the same problem which existed in 0.46 to 0.48, it would not be relevant. I wasn't sure from your previous post (in large part probably because I scarcely understand development and coding language).
Since your problem is the same as the op, I wonder if you saw this reply:
alvinpenner wrote:fix committed to bzr rev 11575, any testing would be welcome.
Alvin Penner
I sounds as if a fix was written, and committed to some branch. Perhaps it never made to into a stable version. I don't know, I didn't read the report (and even if I did, I probably can't understand it). Perhaps it was because it was never tested? I don't know.
I didn't even read this entire thread. Just from skimming through it, it sounds like a few different people have contributed bits and pieces. It would probably be helpful if.... Well I mean, it sounds like this whole issue could use someone to sort through it all, organize it if necessary, and try to bring everything up to date. If you have the time and motivation.
In any case, an Inkscape developer isn't likely to see your code here, if that's what you meant by "real programmer". For some reason, Inkscape developers rarely visit forums. That's why I suggested posting it to the relevant bug report, so that developers can review it.
I suppose it's possible someone with the right skills will see it here. But the best chance of someone in the Inkscape community using it, is probably if they can find it in the bug tracker. This is the bug report that was referenced early in this post
Further info is available at https://bugs.launchpad.net/inkscape/+bug/630639 comment 12, 13
I assume it would be the one where you should post this. But you would be a better judge of that than me. If you can't find a relevant report, please feel free to start a new one.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design