Page 1 of 1

Layers with `$` symbol in their name do not rasterize with dwg2bmp

Posted: Thu Jul 18, 2019 7:33 pm
by garciadelcastillo
Hi!

I am having problems rasterizing layers with `$` symbols in their names: they always show up empty.

Given the following file:
layernames.dwg
(36.09 KiB) Downloaded 574 times
A full raster yields no problem:
layernames.dwg.png
layernames.dwg.png (21.31 KiB) Viewed 6497 times
Running rasterization on a layer without `$` in its name works fine:

Code: Select all

qcad.exe -no-gui -allow-multiple-instances -autostart scripts\Pro\Tools\Dwg2Bmp\Dwg2Bmp.js -background=white -width=1024 -height=1024 -force -antialiasing -monochrome -color-correction -zoom-all -no-weight-margin -layer=0 -outfile="layer0.png" layernames.dwg
layer0.png
layer0.png (10.1 KiB) Viewed 6497 times
However, running it on "Layer_with_$", yields a full white image:

Code: Select all

qcad.exe -no-gui -allow-multiple-instances -autostart scripts\Pro\Tools\Dwg2Bmp\Dwg2Bmp.js -background=white -width=1024 -height=1024 -force -antialiasing -monochrome -color-correction -zoom-all -no-weight-margin -layer="Layer_with_$" -outfile="Layer_with_$.png" layernames.dwg
I am assuming this is a problem with the CLI and system escaping of characters? Or the layer parser believing `$` is being used to escape a regexp? Any thoughts?

Thanks!

Re: Layers with `$` symbol in their name do not rasterize with dwg2bmp

Posted: Thu Jul 18, 2019 7:39 pm
by garciadelcastillo
Oooooh, ok, `$` have to escaped...! This works:

Code: Select all

qcad.exe -no-gui -allow-multiple-instances -autostart scripts\Pro\Tools\Dwg2Bmp\Dwg2Bmp.js -background=white -width=1024 -height=1024 -force -antialiasing -monochrome -color-correction -zoom-all -no-weight-margin -layer="Layer_with_\$" -outfile="Layer_with_$.png" layernames.dwg

Re: Layers with `$` symbol in their name do not rasterize with dwg2bmp

Posted: Thu Jul 18, 2019 7:56 pm
by garciadelcastillo
Feature request: it would be nice if QCAD spit some kind of warning message when trying to render a layer with a name that doesn't exist (and perhaps render nothing), rather than silently rendering an empty image. :D