My university recently bought an Universal Laser Systems (ULS) ILS12.150D which supports PDF File Format Direct File Import. (This is a laser cutter.)
In QCAD v3.21.2.9-27-g27ada28e1 on Linux, I'm converting my DXF (created in OpenSCAD) to a PDF by using "File > PDF Export". QCAD performs the "final touches" on my 2D parts.
I encounter a snag: The ULS control software requires lines in the PDF to be 0.025 mm lineweight to produce vector output. The thinnest lineweight provided in my version of QCAD is .05 mm. I verified that the lineweight QCAD produced is .05 mm by measuring the line's width in Inkscape.
I would like to add another lineweight to QCAD and rebuild the source, but I can not find the file where the lineweights are defined. Can you point me to this file?
[solved] Can you point me to the file where lineweights are defined?
Moderator: andrew
Re: Can you point me to the file where lineweights are defined?
I found the changes I needed to make, and I made them, but the new lineweight is being interpreted as ~.21 mm when I viewed it in Inkscape. I don't know how to make the code know "2" is in the hundred's place and the "5" is in the thousant's place.
Code: Select all
Add lineweight ULS control program requires for producing vector output
diff --git a/src/core/RLineweight.cpp b/src/core/RLineweight.cpp
index a9092e767..21270d5b1 100644
--- a/src/core/RLineweight.cpp
+++ b/src/core/RLineweight.cpp
@@ -36,6 +36,7 @@ void RLineweight::init() {
init(tr("By Block"), RLineweight::WeightByBlock);
init(tr("Default"), RLineweight::WeightByLwDefault);
init(tr("0.00mm"), RLineweight::Weight000);
+ init(tr("0.025mm"), RLineweight::Weight0025);
init(tr("0.05mm"), RLineweight::Weight005);
init(tr("0.09mm"), RLineweight::Weight009);
init(tr("0.13mm (ISO)"), RLineweight::Weight013);
diff --git a/src/core/RLineweight.h b/src/core/RLineweight.h
index 77cb284e2..4eaaceaeb 100644
--- a/src/core/RLineweight.h
+++ b/src/core/RLineweight.h
@@ -45,6 +45,7 @@ class QCADCORE_EXPORT RLineweight {
public:
enum Lineweight {
Weight000 = 0,
+ Weight0025 = 025,
Weight005 = 5,
Weight009 = 9,
Weight013 = 13,
Re: Can you point me to the file where lineweights are defined?
Try:
025 in C++ would be the octagonal number 25 which is 21, i.e. 0.21mm.
Code: Select all
Weight0025 = 25
Re: Can you point me to the file where lineweights are defined?
Trying this code
results in 0.25 mm, but I need my number to be one magnitude smaller, i.e. 0.025 mm.andrew wrote: ↑Thu Sep 27, 2018 8:48 amTry:
025 in C++ would be the octagonal number 25 which is 21, i.e. 0.21mm.Code: Select all
Weight0025 = 25
Re: Can you point me to the file where lineweights are defined?
Ah, yes, my bad. You're out of luck. Your value would have to be 2.5 (i.e. 2.5 hundredths) which won't work for the C++ enum.
In any case, even if you could do it, you wouldn't be able to write that back into a (valid) DXF file.
The only way I can think of (without adjusting lots of code and in the process breaking the DXF standard) is to use custom widths for polylines. However, this is only implemented in QCAD Professional:
viewtopic.php?f=47&t=4534&p=16517#p16517
You might want to try this with the free trial version:
https://qcad.org/en/download
In any case, even if you could do it, you wouldn't be able to write that back into a (valid) DXF file.
The only way I can think of (without adjusting lots of code and in the process breaking the DXF standard) is to use custom widths for polylines. However, this is only implemented in QCAD Professional:
viewtopic.php?f=47&t=4534&p=16517#p16517
You might want to try this with the free trial version:
https://qcad.org/en/download
Re: Can you point me to the file where lineweights are defined?
Thank you for the explanation!
Today I learned the ULS control software is interpreting 0.01 and 0.02 mm lines as "vector data". And, I found this in Chapter 04 of the ULS manual: "In order to print vector elements, the software you are printing from must support creation of lines with a thickness of .001”(.0254 mm) or less."
My issue is solved.
Today I learned the ULS control software is interpreting 0.01 and 0.02 mm lines as "vector data". And, I found this in Chapter 04 of the ULS manual: "In order to print vector elements, the software you are printing from must support creation of lines with a thickness of .001”(.0254 mm) or less."
My issue is solved.