libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

Parsing problem of various versions

Open erfansn opened this issue 6 months ago • 3 comments

I noticed a problem reading DWG files

  1. The extents value in header_vars is not read correctly for 2007+
  2. I noticed that the text content for 2000+ is only read the first character
  3. When I read a file, I encountered a series of objects whose internal values ​​are null (for image def and mline style)

I use the latest version of the library 0.3.13.7778

DWG files

erfansn avatar Jun 25 '25 06:06 erfansn

ad 1) I guess you mean HEADER.EXTMIN and EXTMAX. Not repro:

e.g. examples_2007.log vs examples_2007.dxf

EXTMIN: (-2.68043e+06, -1.67255e+06, -299.289) [3BD 10]
EXTMAX: (860276, 1.05382e+06, 299.289) [3BD 10]
$EXTMIN
 10
-2680430.068109198
 20
-1672547.179547557
 30
-299.2890450820102
  9
$EXTMAX
 10
860276.0217899826
 20
1053820.515069022
 30
299.289045082009

ad 2) ~~In some dxf2dwg conversions the text is logged wrong, but the written text seems to be ok (TU vs TV). not repro~~ wait, repro. r2007+ TABLE.name strings are not correctly converted from DXF UTF-8 to TU.

ad 3) yes, that's expected. many refs are empty.

rurban avatar Jun 30 '25 12:06 rurban

I meant versions higher than 2007 and 2000, not themselves. Also, when I say that the internal value of objects, for example, Dwg_Object_MLINESTYLE->name, has a null value.

erfansn avatar Jun 30 '25 13:06 erfansn

I updated the library to the latest version 0.13.3.7835, but there are the following issues even

"Extents" reading issue:

R2007 and earlier R2010 and later
Image Image

"Text" reading issue:

R2004 and earlier R2007 and later
Image Image

I use the library on the Android platform, and I also noticed a strange thing about strings for versions 2007 and later:

Image

erfansn avatar Sep 08 '25 06:09 erfansn