QCAD line weight question ("printing" to Co2 laser)

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
pflumph
Newbie Member
Posts: 6
Joined: Fri Feb 10, 2023 1:31 am

QCAD line weight question ("printing" to Co2 laser)

Post by pflumph » Fri Feb 10, 2023 1:51 am

Good day!
I have an older Co2 laser that you "print" to, to cut. It's old enough that the original driver used the "pen" setting from the pen plotter days to control power and speed. The modern driver uses line weight and color to determine power, speed, and whether to raster engrave or cut a feature.
The line weight threshold for cut vs raster engrave is 0.001" or .1mm. Anything less gets cut as a vector, and anything thicker gets engraved as a raster.
There are 8 CMYK colors it parses to control speed and power. Black, red, yellow, etc.
This works, on the same computer, with AutoCAD and with Corel Draw. I can control the laser by what color and thickness lines are drawn in the DXF file.
In QCAD, however, everything gets interpreted as a raster, and the machine tries to engrave. This leads me to believe that the line weight isn't being sent properly when I "print" to the laser, from QCAD. I have tried line weights 0.00mm, 0.5mm and 0.9mm.
When using AutoCAD or Corel Draw (Lines set to "hairline"), the driver performs as expected
I have attached a very simple drawing. When printed, the laser driver engraves the lines instead of cutting them.

I appreciate any insight the forum may have! I'd love to be able to use QCAD rather than much more expensive alternatives!

PC: Lenovo Thinkpad X1 Carbon G5
OS: Windows 10
QCAD version 3.27.9 Pro

Reference manual states:

Code: Select all

"The  Printer Driver distinguishes between raster mode (engraving) and vector mode
(cutting) by the type of graphic artwork being used. Basically all graphics other than
outlines of very thin line widths will be interpreted as engraved images and the raster
mode will be used for output. If laser cutting is desired, set the line thickness of the
lines that are drawn in the graphics software to .001 inches (.1 mm) or the smallest
possible line thickness that is available. The printer driver will interpret these objects as
vectors and will cut them out. The use of color fills or bitmaps will cause the laser
system to engrave."
Attachments
Test Box.dxf
Simple drawing
(187.78 KiB) Downloaded 666 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 5054
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: QCAD line weight question ("printing" to Co2 laser)

Post by Husky » Fri Feb 10, 2023 2:40 am

Hi,
pflumph wrote:
Fri Feb 10, 2023 1:51 am
The line weight threshold for cut vs raster engrave is 0.001" or .1mm. Anything less gets cut as a vector, and anything thicker gets engraved as a raster.
That doesn't add up 0.001" = 0.0254 mm and is not equal to 0.1 mm . e_surprised

Your example drawing: I see one color with a default line weight. What are your QCAD settings for Default Line weight?

Husky_2023_02_09-01.png
Husky_2023_02_09-01.png (29.79 KiB) Viewed 13223 times
pflumph wrote:
Fri Feb 10, 2023 1:51 am
There are 8 CMYK colors it parses to control speed and power. Black, red, yellow, etc.
Just curios: If you use the color code - is the line weight ignored?
Work smart, not hard: QCad Pro
QcadPro, QcadCam, Win11/64, 64GB RAM, 10-Core, SSD
If a thread is considered as "solved" pls. change the title of the 1. post to "[solved] Title..."

pflumph
Newbie Member
Posts: 6
Joined: Fri Feb 10, 2023 1:31 am

Re: QCAD line weight question ("printing" to Co2 laser)

Post by pflumph » Fri Feb 10, 2023 4:23 am

I don't know - To this point, the colors don't seem to matter, but I don't know if that's because the line weight is off or not.
The 0.001"/0.1mm made no sense to me, either. But that's what the documentation says. It doesn't help that this thing was born around the same time as the internet... The workflow is a lot more mature on modern machines!
I'll play with the default line weight and see where I get.

Thanks for the tip!

pflumph
Newbie Member
Posts: 6
Joined: Fri Feb 10, 2023 1:31 am

Re: QCAD line weight question ("printing" to Co2 laser)

Post by pflumph » Fri Feb 10, 2023 4:56 am

So the default line weight didn't seem to help. I set it to 0.05mm and to 0.00mm.
Unfortunately I don't know how to tell what QCAD is actually sending to the print queue.
In all of my new tests, the file arrives at the printer with speed and power at 0.00, which seems to mean it doesn't know how to interpret the lines. If I make a line wider - say 0.13mm, It will engrave. And it engraves at the speed and power configured for that color as well, which is good news, I suppose.
I'm curious if the laser printer driver documentation is wrong, and the threshold really is 0.001", or 0.0254mm, and that 0.00mm lines are literally gone when printed. With the minimum line weight in QCAD of 0.05mm, I just can't get it to cut with this software. It's either non-existent at 0.0mm, or over the threshold at 0.0019"
Is there a way to adjust the minimum line weight, or to set the line weight manually?

I'd welcome any other suggestions!

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 5054
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: QCAD line weight question ("printing" to Co2 laser)

Post by Husky » Fri Feb 10, 2023 6:15 am

pflumph wrote:
Fri Feb 10, 2023 4:56 am
I'd welcome any other suggestions!
That will only be a wild guessing .... :lol:
pflumph wrote:
Fri Feb 10, 2023 4:56 am
So the default line weight didn't seem to help. I set it to 0.05mm and to 0.00mm.
For an easier testing step away from the default line weight setting. Control the color and line weight only over the layer settings.
pflumph wrote:
Fri Feb 10, 2023 4:56 am
So the default line weight didn't seem to help. I set it to 0.05mm and to 0.00mm.
Unfortunately I don't know how to tell what QCAD is actually sending to the print queue.
In all of my new tests, the file arrives at the printer with speed and power at 0.00, which seems to mean it doesn't know how to interpret the lines.
Is the QCAD print color mode set to Full Color in the Print Preview option bar and Print all lines as hairlines is turned off?
pflumph wrote:
Fri Feb 10, 2023 4:56 am
Is there a way to adjust the minimum line weight, or to set the line weight manually?
No. You are only able to use the given line weights like 0.00 mm, 0.05 mm, 0.09 mm etc.

I assume it will turn out that 0.00 will cut - everything else will engrave. Hopefully it will use colors for speed and power - only one way to figure it out - test it with layer colors and line weights wider than 0.00.
Work smart, not hard: QCad Pro
QcadPro, QcadCam, Win11/64, 64GB RAM, 10-Core, SSD
If a thread is considered as "solved" pls. change the title of the 1. post to "[solved] Title..."

CVH
Premier Member
Posts: 4874
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD line weight question ("printing" to Co2 laser)

Post by CVH » Fri Feb 10, 2023 8:10 am

Husky wrote:
Fri Feb 10, 2023 2:40 am
Your example drawing: I see one color with a default line weight. What are your QCAD settings for Default Line weight?
Or the file has changed, or there was a misinterpretation.
I see a drawing in inch, paper in inch, Layer 0 with attributes: White, Default and 12 lines with custom attributes: Black, 0.05mm

If we now zoom in on paper space we can estimate the line thickness being for example:
Just less than 5.101" - just over 5.099" = about 0.002" or just less than 0.0508mm what is a match with the custom Lineweight.
If we set custom Lineweight 0.00mm then there is no line thickness to distinguish in any zoom state.

0.05mm or 0.0019685" is about double the threshold and will thus be interpreted as engraving.
Lineweight 0.00mm is a non-standard weight included especially for Lasers.
pflumph wrote:
Fri Feb 10, 2023 4:56 am
So the default line weight didn't seem to help. I set it to 0.05mm and to 0.00mm.
Setting the Default Lineweight in App.Prefs. doesn't do anything here because the lines have a custom color and weight.
Or change the custom weight of the lines, or set them ByLayer and adapt the layer attributes.
pflumph wrote:
Fri Feb 10, 2023 1:51 am
I have tried line weights 0.00mm, 0.5mm and 0.9mm.
I assume you missed some zeros there. :wink:

The whole problem is that you print to a device and not export/import a dxf file ...
How the drawing/paper unit is involved with printing is not readily documented.
Have you tried to convert the drawing to mm?
Or you could export to PDF and print that.

Colors can be another issue ... Black isn't always treated as RGB(0,0,0) and White not as RGB(255,255,255).
They can be saved in ACAD color table and may return blackish or near white.
Normally QCAD will handle that ...

Question aside: If the setup is as old as than the internet, what is the current status of your CO2 laser tube?
They do age you know. :wink:

Regards,
CVH
Last edited by CVH on Sat Feb 11, 2023 8:20 pm, edited 1 time in total.

pflumph
Newbie Member
Posts: 6
Joined: Fri Feb 10, 2023 1:31 am

Re: QCAD line weight question ("printing" to Co2 laser)

Post by pflumph » Sat Feb 11, 2023 6:47 pm

I've tried it all. Default line weight at 0.00mm and 0.05mm, with the drawing at default. Setting the layer to 0.00mm and 0.05mm with the drawing by layer, and setting the lines directly to 0.00mm and 0.05mm.
The result is all the same.
Color does seem to effect the speed and power, but raster engrave vs vector cut appears to be solely dependent on line width. AutoCAD seems to do OK with it, as does CorelDraw on "hairline".
Incidentally, I also tried Lightburn yesterday, and had the same issues. LB also seems to output lines over the threshold when printing.

Guess I'm drawing dead here. I'll have to export the drawing to SVG or PDF and import into another application for cutting.
Unless I'm missing another setting? Would it be possible to add a 0.02mm line weight to QCAD? Not just for me, but this would enable printing directly to ULS and Epilogue lasers (probably others), natively.
I have also reached out to ULS to see if the vector threshold can be adjusted in the print driver. If they can make it 0.002", this wouldn't be an issue.
Not sure I'll get any love from either ULS or QCAD devs with something this niche. But I have found threads in LightBurn and other forums from ULS and Epilogue users with the same issue - And no resolution.

Yes, the tubes dim and fail over time. It's a bit of a wonder that this one still works - Though it may have been recharged at some point. I haven't taken it apart to see. I have another ULS machine of the same vintage that doesn't lase any more. A tube refresh costs about $1k, but it's worth it. These lasers have much higher beam quality than the commodity Chinese machines these days. They are native imperial machines, so you don't have to convert inches to MM to machine an accurate part. And they don't require flowing Co2 or buckets of water with a pond pump for cooling.
FWIW, they start to fade around 5 years, and that's if they are used weekly! They fade faster if they just sit. So it's about $200/year to keep one running, if you keep it exercised :D

Thanks everyone!

CVH
Premier Member
Posts: 4874
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD line weight question ("printing" to Co2 laser)

Post by CVH » Sat Feb 11, 2023 9:19 pm

pflumph wrote:
Sat Feb 11, 2023 6:47 pm
I've tried it all ... Guess I'm drawing dead here.
So engraving works ...

What if you do Print Preview (Ctrl+Shift+P) and then set 'Print all lines as hairlines'.
Of course at scale 1:1 :wink:
Your paper is defined as 12 by 24 inch. :?

You then need to use the printer button of the Print Preview ... :roll:


And the final trial:
Merge your example drawing to one polyline with for example Polyline from Selection (OC).
Select the polyline and set the Global Width in the Property Editor to 0.0009 or so.
The value is in drawing units ... Maybe that works.
I know, it hardly shows in the QCAD GUI, there is no Screen Based equivalent ... Anti-Aliasing may look better but very faint.

Regards,
CVH

User avatar
andrew
Site Admin
Posts: 8766
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD line weight question ("printing" to Co2 laser)

Post by andrew » Mon Feb 13, 2023 9:53 am

pflumph: Can you try this (without restarting QCAD or reloading your drawing anywhere in between):

1. Load your drawing
2. Make sure your lines have their lineweight set to 0.00mm
3. Show the script shell using menu Misc > Development > Script Shell
4. Confirm the warning dialog
5. In the script shell widget, enter these code lines and confirm each with enter:

Code: Select all

di=getDocumentInterface();
view=di.getGraphicsViewWithFocus();
view.setMinimumLineweight(0.000001);
Screenshot 2023-02-13 at 09.48.55.png
Screenshot 2023-02-13 at 09.48.55.png (33.34 KiB) Viewed 12920 times
6. Now print to the laser printer driver

Since on many modern printers hairlines are completely invisible, QCAD sets a higher minimum lineweight to avoid support overload ("Help, QCAD prints empty pages", "Half of my drawing doesn't print", etc.).

pflumph
Newbie Member
Posts: 6
Joined: Fri Feb 10, 2023 1:31 am

Re: QCAD line weight question ("printing" to Co2 laser)

Post by pflumph » Tue Feb 14, 2023 12:15 am

Thanks Andrew.
I tried your suggestion, and got the same result:
cma> di=getDocumentInterface();
RDocumentInterface(0x8d92c550)
ecma> view=di.getGraphicsViewWithFocus();
RGraphicsViewQt(0x87fab0f0)
ecma> view.setMinimumLineweight(0.000001);
undefined

I noticed view.setMinimumLineweight Is there a related command for printing?

Also, is this setting persistent? Or, does it have to be set each time QCAD is launched?

User avatar
andrew
Site Admin
Posts: 8766
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD line weight question ("printing" to Co2 laser)

Post by andrew » Tue Feb 14, 2023 8:13 am

The command does affect printing. If this does not make any difference, I don't think QCAD can produce lines that are recognized by your printer driver (for unknown reasons).

CVH
Premier Member
Posts: 4874
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD line weight question ("printing" to Co2 laser)

Post by CVH » Tue Feb 14, 2023 8:43 am

pflumph,

Have you tried printing in step 6?
pflumph wrote:
Tue Feb 14, 2023 12:15 am
I tried your suggestion, and got the same result:
With the sequence you set a new minimum Lineweight that also affects the export ... For that instance.
andrew wrote:
Mon Feb 13, 2023 9:53 am
QCAD sets a higher minimum lineweight to avoid support overload
Normally zero (view.getMinimumLineweight()) but QCAD will then revert to a higher minimum by default as explained by Andrew.
pflumph wrote:
Tue Feb 14, 2023 12:15 am
Also, is this setting persistent? Or, does it have to be set each time QCAD is launched?
No it is not:
andrew wrote:
Mon Feb 13, 2023 9:53 am
(without restarting QCAD or reloading your drawing anywhere in between)
Regards,
CVH

Trems01
Registered Member
Posts: 1
Joined: Wed Dec 20, 2023 12:01 pm

Re: QCAD line weight question ("printing" to Co2 laser)

Post by Trems01 » Wed Dec 20, 2023 12:06 pm

When it comes to Laser, I got you. I recommend Monport laser ,i have mine and I got a lot of works done in an instant and it works will blow your mind. There are a lot of testimonies from other users that will convince you that there machines are awesome.

Post Reply

Return to “QCAD 'How Do I' Questions”