libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

dwg2SVG wrong viewBox

Open hoangmt opened this issue 2 years ago • 10 comments

Hi, I am using dwg2SVG from docker. Have not managed to use this command for any of the files in the test folder libredwg/test/test-data/. For example: dwg2SVG example_r14.dwg > example_r14.svg this gives an empty content file as attached. example_r14 or dwg2SVG example_2018.dwg > example_2018.svg example_2018 .dwg files and .svg output , just in case examples 2.zip

hoangmt avatar Nov 11 '22 08:11 hoangmt

It is working if used correctly, because it's part of the test suite. My guess is that the shared library couldn't be loaded, or such an external error.

rurban avatar Nov 12 '22 15:11 rurban

Thank you so much for replying! How to use it correctly? I also tried with my own .dwg but they it not work,i.e., same problem. Maybe I should compile from source, instead of using docker?

hoangmt avatar Nov 13 '22 07:11 hoangmt

Tried again with compiling from source. Still see empty svg generated. Got these on dwg2SVG example_2018.dwg > example_2018.svg ATTDEF ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored MTEXT ignored

hoangmt avatar Nov 13 '22 20:11 hoangmt

Sorry, cannot repro. dwg2SVG is part of the test-suite and works on all tested platforms. The messages you see are expected.

rurban avatar Nov 22 '22 15:11 rurban

I see.

 width="100%" height="100%"
   viewBox="-2680430.068109 -1672547.179548 3540706.089899 2726367.694617">

is way too large, and you cannot see anything there. the entities are around 2680701.618090,1052992.241139

rurban avatar Dec 01 '22 09:12 rurban

any update on this? I check the latest code still have the same problem, the svg is empty.

yangxiaomin08 avatar Feb 14 '23 09:02 yangxiaomin08

It's not empty, you just ont see the entities, because the view is is way too large.

No, other priorities now

rurban avatar Feb 14 '23 11:02 rurban

I have a same problem..Is it fixed?

yzygenuine avatar Jul 24 '23 09:07 yzygenuine

I have a same problem..Is it fixed?

See https://github.com/LibreDWG/libredwg/discussions/770#discussioncomment-6528614

rurban avatar Jul 27 '23 08:07 rurban

first you should delete the label "defs" and "/defs" of the xxx.svg

insertintosb avatar Mar 08 '24 03:03 insertintosb