Is it possible to disable warning message in the terminal, when executing a batch script?
I have managed to disable debug messages. I just cannot find a way to disable warning messages....
How do I stop warning messages in the terminal?
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Re: How do I stop warning messages in the terminal?
Debug and warning messages are streamed to stderr.
You can stream stderr to nul with (Windows):
Or (Linux / macOS):
You can stream stderr to nul with (Windows):
Code: Select all
./dwg2svg.bat ... 2> nul
Code: Select all
dwg2svg.sh ... 2>/dev/null
Re: How do I stop warning messages in the terminal?
Thank you, Andrew.
Unfortunately, I have found that was not my problem...
Original and output drawings attached.
1. Is it possible to disable debugging and warning messages all together?
- There are ~500 warnings being thrown for invalid splines.
2. Currently, I have a drawing that has some very poorly constructed splines and it takes ~70 seconds to 'clean up' using command line.
- Using the exact same functions through the GUI takes about 3 seconds.
- Functions are removing zero length entities and conversion to polyline from selection.
3. If the drawing is first opened and closed with QCAD, the problem goes away. Then the functions can be executed in a reasonable time.
- No modifications/functions applied. Simply opened and closed.
- It is also strange that the input file is modified when opened and closed by QCAD. A significant number of the splines are removed (~500). I suspect
this is a large part of the reason.
Looking forward to hearing your thoughts on the time discrepancy.
Unfortunately, I have found that was not my problem...
Original and output drawings attached.
1. Is it possible to disable debugging and warning messages all together?
- There are ~500 warnings being thrown for invalid splines.
2. Currently, I have a drawing that has some very poorly constructed splines and it takes ~70 seconds to 'clean up' using command line.
- Using the exact same functions through the GUI takes about 3 seconds.
- Functions are removing zero length entities and conversion to polyline from selection.
3. If the drawing is first opened and closed with QCAD, the problem goes away. Then the functions can be executed in a reasonable time.
- No modifications/functions applied. Simply opened and closed.
- It is also strange that the input file is modified when opened and closed by QCAD. A significant number of the splines are removed (~500). I suspect
this is a large part of the reason.
Looking forward to hearing your thoughts on the time discrepancy.
- Attachments
-
- cleaned.dxf
- (522.16 KiB) Downloaded 207 times
-
- hummingbird.dxf
- (637.15 KiB) Downloaded 191 times
Re: How do I stop warning messages in the terminal?
Hi,
There are indeed (almost) zero length entities in the drawing.
Bridging gaps between splines:
On loading QCAD or Open Design libraries may already fix entity issues.
May I ask what application created this DXF file?
The meaningful splines look more like Beziers segments.
In general they are not all perfectly tangentially connected.
QCAD has no method merging them back into longer spline chains.
I think you are better of with re-coding your tool.
Select all (visible) entities, reject invalid and (almost) Null-length entities.
Explode remaining to line and arcs.
Optional remove all duplicate segments.
Convert these segments to polylines given a certain tolerance.
Replace all initial content by new polylines. (... Always keep a copy or store as new file just in case of ...)
BTW: QCAD kept on failing on the 'Cleaned' file zooming in deeper and back out.
Once I normalized the 87 polylines that didn't occur anymore, still, the screen update in high zoom seems to slow down.
Could be a second selection color issue ...?
Regards,
CVH
There are indeed (almost) zero length entities in the drawing.
Bridging gaps between splines:
- 70 Lines, summed 0.00704 long
2 arcs with radius 0.000098
- 36 polylines, total length = zero
480 splines, total length = zero
On loading QCAD or Open Design libraries may already fix entity issues.
May I ask what application created this DXF file?
The meaningful splines look more like Beziers segments.
In general they are not all perfectly tangentially connected.
QCAD has no method merging them back into longer spline chains.
Not aware of such Command Line tool thus I suspect a custom tool.
I think you are better of with re-coding your tool.
Select all (visible) entities, reject invalid and (almost) Null-length entities.
Explode remaining to line and arcs.
Optional remove all duplicate segments.
Convert these segments to polylines given a certain tolerance.
Replace all initial content by new polylines. (... Always keep a copy or store as new file just in case of ...)
BTW: QCAD kept on failing on the 'Cleaned' file zooming in deeper and back out.
Once I normalized the 87 polylines that didn't occur anymore, still, the screen update in high zoom seems to slow down.
Could be a second selection color issue ...?
Regards,
CVH
Last edited by CVH on Sun Sep 17, 2023 6:17 pm, edited 1 time in total.
Re: How do I stop warning messages in the terminal?
Thank you, CVH.
1. I'll look to make changes, based on your feedback and see how I get on.
2. I do not know the tool that created the original SVG drawing.
4. I have not much failure in QCAD. Though, my experience is limited.
5. Do you know how to process multiple files through command line tools without opening and closing QCAD each time?
1. I'll look to make changes, based on your feedback and see how I get on.
2. I do not know the tool that created the original SVG drawing.
- The 'file' is acquired as an svg/collection of vectors. Then imported into QCAD for processing.
Probably COREL. Given my past experiences with their work...
4. I have not much failure in QCAD. Though, my experience is limited.
5. Do you know how to process multiple files through command line tools without opening and closing QCAD each time?
- I'm not at all familiar with bash scripting. Assuming that's what it is...
Last edited by jay on Sun Sep 17, 2023 10:50 am, edited 1 time in total.
Re: How do I stop warning messages in the terminal?
Please open a new topic for unrelated questions.
That makes the forum searchable.
Bash scripting see:
https://www.qcad.org/rsforum/viewtopic. ... 640#p29644
On windows called a batch file ...
I don't think you need to open the QCAD GUI for each ... QCAD can run without the GUI.
Regards,
CVH
That makes the forum searchable.
Unrelated to QCAD.
Bash scripting see:
https://www.qcad.org/rsforum/viewtopic. ... 640#p29644
On windows called a batch file ...
I don't think you need to open the QCAD GUI for each ... QCAD can run without the GUI.
Regards,
CVH