libredwg
libredwg copied to clipboard
Windows long and signed JSON conversion
The conversion from JSON to DWG is not same on Windows as on Linux.
Examples on libredwg.0.13.3: linux.tar.gz wine.tar.gz
Diff between dwgread output of Windows dwgrewrite and conversion versions:
1c1
< Reading DWG file line00-rewrite.dwg
---
> Reading DWG file out00.dwg
19,20c19,20
< section[2].address: 33136 [RL]
< section[2].size: 496 [RL]
---
> section[2].address: 32998 [RL]
> section[2].size: 498 [RL]
25c25
< section[4].address: 33780 [RL]
---
> section[4].address: 33644 [RL]
30c30
< crc: 1D68 [RSx] from 0-79
---
> crc: CA1D [RSx] from 0-79
272,273c272,273
< DIMLWD: -2 [BSd 70]
< DIMLWE: -2 [BSd 70]
---
> DIMLWD: -1 [BSd 70]
> DIMLWE: -1 [BSd 70]
316c316
< crc: 38FA [RSx] from 24955-25438=483
---
> crc: 68C1 [RSx] from 24955-25438=483
341,344c341,344
< =======> Handles (start) : 33136
< Handles (end) : 33632
< Length: 496
< Handles page size: 490 [RS_BE]
---
> =======> Handles (start) : 32998
> Handles (end) : 33496
> Length: 498
> Handles page size: 492 [RS_BE]
471c471
< Object number: 7/7, Size: 15 [MS], Type: 66 [BS]
---
> Object number: 7/7, Size: 18 [MS], Type: 66 [BS]
474c474
< Hdlsize: 0x30,
---
> Hdlsize: 0x48,
479c479
< num_entries: 2 [BS 70]
---
> num_entries: 3 [BS 70]
484,485c484,486
< crc: 5E17 [RSx]
< check_CRC 17: 5E17 == 5E17
---
> entries[2]: (2.2.12D) abs:301 [H* 0]
> crc: A957 [RSx]
> check_CRC 20: A957 == A957
801,802c802,803
< crc: 9910 [RSx]
< check_CRC 65: 9910 == 9910
---
> crc: 7CBD [RSx]
> check_CRC 65: 7CBD == 7CBD
990,991c991,992
< crc: 30AD [RSx]
< check_CRC 188: 30AD == 30AD
---
> crc: E321 [RSx]
> check_CRC 188: E321 == E321
1068,1069c1069,1070
< DIMLWD: -2 [BSd 371]
< DIMLWE: -2 [BSd 372]
---
> DIMLWD: -1 [BSd 371]
> DIMLWE: -1 [BSd 372]
1075,1076c1076,1077
< crc: 48DC [RSx]
< check_CRC 121: 48DC == 48DC
---
> crc: 375C [RSx]
> check_CRC 121: 375C == 375C
1740,1741c1741,1742
< crc: 5AF5 [RSx]
< check_CRC 157: 5AF5 == 5AF5
---
> crc: F08D [RSx]
> check_CRC 157: F08D == F08D
1745,1749c1746,1749
< Object number: 45/2D, Size: 90 [MS], Type: 505 [BS]
< Warning: Unstable Class object 505 MATERIAL (0x400) 45/0
< Add object MATERIAL [45] Decode object MATERIAL
< bitsize: 660 [RL] @4.2
< Hdlsize: 0x3C,
---
> Object number: 45/2D, Size: 33 [MS], Type: 501 [BS]
> Add object PLACEHOLDER [45] Decode object PLACEHOLDER
> bitsize: 208 [RL] @4.2
> Hdlsize: 0x38,
1750a1751,1754
> EED[0] size: 12 [BS]
> EED[0] handle: 5.2.12D
> EED[0] raw: 12
> EED[0] code: 0 [RC], string: len=8 [RC] cp=30 [RS_BE] "MATERIAL" [TF]
1752c1756,1758
< num_eed: 0
---
>
>
> num_eed: 1
1757,1900c1763,1764
< name: "ByLayer" [T 1]
< description: "" [T 2]
< ambient_color.flag: 0x0 [RC 70]
< ambient_color.factor: 1 [BD 40]
< diffuse_color.flag: 0x0 [RC 71]
< diffuse_color.factor: 1 [BD 41]
< diffusemap.blendfactor: 1 [BD 42]
< diffusemap.projection: 0x1 [RC 73]
< diffusemap.tiling: 0x1 [RC 74]
< diffusemap.autotransform: 0x1 [RC 75]
< diffusemap.transmatrix[0]: 1 [BD 43]
< diffusemap.transmatrix[1]: 0 [BD 43]
< diffusemap.transmatrix[2]: 0 [BD 43]
< diffusemap.transmatrix[3]: 0 [BD 43]
< diffusemap.transmatrix[4]: 0 [BD 43]
< diffusemap.transmatrix[5]: 1 [BD 43]
< diffusemap.transmatrix[6]: 0 [BD 43]
< diffusemap.transmatrix[7]: 0 [BD 43]
< diffusemap.transmatrix[8]: 0 [BD 43]
< diffusemap.transmatrix[9]: 0 [BD 43]
< diffusemap.transmatrix[10]: 1 [BD 43]
< diffusemap.transmatrix[11]: 0 [BD 43]
< diffusemap.transmatrix[12]: 0 [BD 43]
< diffusemap.transmatrix[13]: 0 [BD 43]
< diffusemap.transmatrix[14]: 0 [BD 43]
< diffusemap.transmatrix[15]: 1 [BD 43]
< diffusemap.source: 0x1 [RC 72]
< diffusemap.filename: "" [T 3]
< specular_color.flag: 0x0 [RC 76]
< specular_color.factor: 1 [BD 45]
< specularmap.blendfactor: 1 [BD 46]
< specularmap.projection: 0x1 [RC 78]
< specularmap.tiling: 0x1 [RC 79]
< specularmap.autotransform: 0x1 [RC 170]
< specularmap.transmatrix[0]: 1 [BD 47]
< specularmap.transmatrix[1]: 0 [BD 47]
< specularmap.transmatrix[2]: 0 [BD 47]
< specularmap.transmatrix[3]: 0 [BD 47]
< specularmap.transmatrix[4]: 0 [BD 47]
< specularmap.transmatrix[5]: 1 [BD 47]
< specularmap.transmatrix[6]: 0 [BD 47]
< specularmap.transmatrix[7]: 0 [BD 47]
< specularmap.transmatrix[8]: 0 [BD 47]
< specularmap.transmatrix[9]: 0 [BD 47]
< specularmap.transmatrix[10]: 1 [BD 47]
< specularmap.transmatrix[11]: 0 [BD 47]
< specularmap.transmatrix[12]: 0 [BD 47]
< specularmap.transmatrix[13]: 0 [BD 47]
< specularmap.transmatrix[14]: 0 [BD 47]
< specularmap.transmatrix[15]: 1 [BD 47]
< specularmap.source: 0x1 [RC 77]
< specularmap.filename: "" [T 4]
< specular_gloss_factor: 0.5 [BD 0]
< reflectionmap.blendfactor: 1 [BD 48]
< reflectionmap.projection: 0x1 [RC 172]
< reflectionmap.tiling: 0x1 [RC 173]
< reflectionmap.autotransform: 0x1 [RC 174]
< reflectionmap.transmatrix[0]: 1 [BD 49]
< reflectionmap.transmatrix[1]: 0 [BD 49]
< reflectionmap.transmatrix[2]: 0 [BD 49]
< reflectionmap.transmatrix[3]: 0 [BD 49]
< reflectionmap.transmatrix[4]: 0 [BD 49]
< reflectionmap.transmatrix[5]: 1 [BD 49]
< reflectionmap.transmatrix[6]: 0 [BD 49]
< reflectionmap.transmatrix[7]: 0 [BD 49]
< reflectionmap.transmatrix[8]: 0 [BD 49]
< reflectionmap.transmatrix[9]: 0 [BD 49]
< reflectionmap.transmatrix[10]: 1 [BD 49]
< reflectionmap.transmatrix[11]: 0 [BD 49]
< reflectionmap.transmatrix[12]: 0 [BD 49]
< reflectionmap.transmatrix[13]: 0 [BD 49]
< reflectionmap.transmatrix[14]: 0 [BD 49]
< reflectionmap.transmatrix[15]: 1 [BD 49]
< reflectionmap.source: 0x1 [RC 171]
< reflectionmap.filename: "" [T 6]
< opacity_percent: 1 [BD 140]
< opacitymap.blendfactor: 1 [BD 141]
< opacitymap.projection: 0x1 [RC 176]
< opacitymap.tiling: 0x1 [RC 177]
< opacitymap.autotransform: 0x1 [RC 178]
< opacitymap.transmatrix[0]: 1 [BD 142]
< opacitymap.transmatrix[1]: 0 [BD 142]
< opacitymap.transmatrix[2]: 0 [BD 142]
< opacitymap.transmatrix[3]: 0 [BD 142]
< opacitymap.transmatrix[4]: 0 [BD 142]
< opacitymap.transmatrix[5]: 1 [BD 142]
< opacitymap.transmatrix[6]: 0 [BD 142]
< opacitymap.transmatrix[7]: 0 [BD 142]
< opacitymap.transmatrix[8]: 0 [BD 142]
< opacitymap.transmatrix[9]: 0 [BD 142]
< opacitymap.transmatrix[10]: 1 [BD 142]
< opacitymap.transmatrix[11]: 0 [BD 142]
< opacitymap.transmatrix[12]: 0 [BD 142]
< opacitymap.transmatrix[13]: 0 [BD 142]
< opacitymap.transmatrix[14]: 0 [BD 142]
< opacitymap.transmatrix[15]: 1 [BD 142]
< opacitymap.source: 0x1 [RC 175]
< opacitymap.filename: "" [T 7]
< bumpmap.blendfactor: 1 [BD 143]
< bumpmap.projection: 0x1 [RC 270]
< bumpmap.tiling: 0x1 [RC 271]
< bumpmap.autotransform: 0x1 [RC 272]
< bumpmap.transmatrix[0]: 1 [BD 144]
< bumpmap.transmatrix[1]: 0 [BD 144]
< bumpmap.transmatrix[2]: 0 [BD 144]
< bumpmap.transmatrix[3]: 0 [BD 144]
< bumpmap.transmatrix[4]: 0 [BD 144]
< bumpmap.transmatrix[5]: 1 [BD 144]
< bumpmap.transmatrix[6]: 0 [BD 144]
< bumpmap.transmatrix[7]: 0 [BD 144]
< bumpmap.transmatrix[8]: 0 [BD 144]
< bumpmap.transmatrix[9]: 0 [BD 144]
< bumpmap.transmatrix[10]: 1 [BD 144]
< bumpmap.transmatrix[11]: 0 [BD 144]
< bumpmap.transmatrix[12]: 0 [BD 144]
< bumpmap.transmatrix[13]: 0 [BD 144]
< bumpmap.transmatrix[14]: 0 [BD 144]
< bumpmap.transmatrix[15]: 1 [BD 144]
< bumpmap.source: 0x1 [RC 179]
< bumpmap.filename: "" [T 8]
< refraction_index: 1 [BD 145]
< refractionmap.blendfactor: 1 [BD 146]
< refractionmap.projection: 0x1 [RC 274]
< refractionmap.tiling: 0x1 [RC 275]
< refractionmap.autotransform: 0x1 [RC 276]
< refractionmap.transmatrix[0]: 1 [BD 147]
< refractionmap.transmatrix[1]: 0 [BD 147]
< refractionmap.transmatrix[2]: 0 [BD 147]
< refractionmap.transmatrix[3]: 0 [BD 147]
< refractionmap.transmatrix[4]: 0 [BD 147]
< refractionmap.transmatrix[5]: 1 [BD 147]
< refractionmap.transmatrix[6]: 0 [BD 147]
< refractionmap.transmatrix[7]: 0 [BD 147]
< refractionmap.transmatrix[8]: 0 [BD 147]
< refractionmap.transmatrix[9]: 0 [BD 147]
< refractionmap.transmatrix[10]: 1 [BD 147]
< refractionmap.transmatrix[11]: 0 [BD 147]
< refractionmap.transmatrix[12]: 0 [BD 147]
< refractionmap.transmatrix[13]: 0 [BD 147]
< refractionmap.transmatrix[14]: 0 [BD 147]
< refractionmap.transmatrix[15]: 1 [BD 147]
< refractionmap.source: 0x0 [RC 273]
< crc: 01EB [RSx]
< check_CRC 92: 01EB == 01EB
---
> crc: EF1F [RSx]
> check_CRC 35: EF1F == EF1F
1904,1908c1768,1771
< Object number: 46/2E, Size: 90 [MS], Type: 505 [BS]
< Warning: Unstable Class object 505 MATERIAL (0x400) 46/0
< Add object MATERIAL [46] Decode object MATERIAL
< bitsize: 660 [RL] @4.2
< Hdlsize: 0x3C,
---
> Object number: 46/2E, Size: 33 [MS], Type: 501 [BS]
> Add object PLACEHOLDER [46] Decode object PLACEHOLDER
> bitsize: 208 [RL] @4.2
> Hdlsize: 0x38,
1909a1773,1776
> EED[0] size: 12 [BS]
> EED[0] handle: 5.2.12D
> EED[0] raw: 12
> EED[0] code: 0 [RC], string: len=8 [RC] cp=30 [RS_BE] "MATERIAL" [TF]
1911c1778,1780
< num_eed: 0
---
>
>
> num_eed: 1
1916,2059c1785,1786
< name: "ByBlock" [T 1]
< description: "" [T 2]
< ambient_color.flag: 0x0 [RC 70]
< ambient_color.factor: 1 [BD 40]
< diffuse_color.flag: 0x0 [RC 71]
< diffuse_color.factor: 1 [BD 41]
< diffusemap.blendfactor: 1 [BD 42]
< diffusemap.projection: 0x1 [RC 73]
< diffusemap.tiling: 0x1 [RC 74]
< diffusemap.autotransform: 0x1 [RC 75]
< diffusemap.transmatrix[0]: 1 [BD 43]
< diffusemap.transmatrix[1]: 0 [BD 43]
< diffusemap.transmatrix[2]: 0 [BD 43]
< diffusemap.transmatrix[3]: 0 [BD 43]
< diffusemap.transmatrix[4]: 0 [BD 43]
< diffusemap.transmatrix[5]: 1 [BD 43]
< diffusemap.transmatrix[6]: 0 [BD 43]
< diffusemap.transmatrix[7]: 0 [BD 43]
< diffusemap.transmatrix[8]: 0 [BD 43]
< diffusemap.transmatrix[9]: 0 [BD 43]
< diffusemap.transmatrix[10]: 1 [BD 43]
< diffusemap.transmatrix[11]: 0 [BD 43]
< diffusemap.transmatrix[12]: 0 [BD 43]
< diffusemap.transmatrix[13]: 0 [BD 43]
< diffusemap.transmatrix[14]: 0 [BD 43]
< diffusemap.transmatrix[15]: 1 [BD 43]
< diffusemap.source: 0x1 [RC 72]
< diffusemap.filename: "" [T 3]
< specular_color.flag: 0x0 [RC 76]
< specular_color.factor: 1 [BD 45]
< specularmap.blendfactor: 1 [BD 46]
< specularmap.projection: 0x1 [RC 78]
< specularmap.tiling: 0x1 [RC 79]
< specularmap.autotransform: 0x1 [RC 170]
< specularmap.transmatrix[0]: 1 [BD 47]
< specularmap.transmatrix[1]: 0 [BD 47]
< specularmap.transmatrix[2]: 0 [BD 47]
< specularmap.transmatrix[3]: 0 [BD 47]
< specularmap.transmatrix[4]: 0 [BD 47]
< specularmap.transmatrix[5]: 1 [BD 47]
< specularmap.transmatrix[6]: 0 [BD 47]
< specularmap.transmatrix[7]: 0 [BD 47]
< specularmap.transmatrix[8]: 0 [BD 47]
< specularmap.transmatrix[9]: 0 [BD 47]
< specularmap.transmatrix[10]: 1 [BD 47]
< specularmap.transmatrix[11]: 0 [BD 47]
< specularmap.transmatrix[12]: 0 [BD 47]
< specularmap.transmatrix[13]: 0 [BD 47]
< specularmap.transmatrix[14]: 0 [BD 47]
< specularmap.transmatrix[15]: 1 [BD 47]
< specularmap.source: 0x1 [RC 77]
< specularmap.filename: "" [T 4]
< specular_gloss_factor: 0.5 [BD 0]
< reflectionmap.blendfactor: 1 [BD 48]
< reflectionmap.projection: 0x1 [RC 172]
< reflectionmap.tiling: 0x1 [RC 173]
< reflectionmap.autotransform: 0x1 [RC 174]
< reflectionmap.transmatrix[0]: 1 [BD 49]
< reflectionmap.transmatrix[1]: 0 [BD 49]
< reflectionmap.transmatrix[2]: 0 [BD 49]
< reflectionmap.transmatrix[3]: 0 [BD 49]
< reflectionmap.transmatrix[4]: 0 [BD 49]
< reflectionmap.transmatrix[5]: 1 [BD 49]
< reflectionmap.transmatrix[6]: 0 [BD 49]
< reflectionmap.transmatrix[7]: 0 [BD 49]
< reflectionmap.transmatrix[8]: 0 [BD 49]
< reflectionmap.transmatrix[9]: 0 [BD 49]
< reflectionmap.transmatrix[10]: 1 [BD 49]
< reflectionmap.transmatrix[11]: 0 [BD 49]
< reflectionmap.transmatrix[12]: 0 [BD 49]
< reflectionmap.transmatrix[13]: 0 [BD 49]
< reflectionmap.transmatrix[14]: 0 [BD 49]
< reflectionmap.transmatrix[15]: 1 [BD 49]
< reflectionmap.source: 0x1 [RC 171]
< reflectionmap.filename: "" [T 6]
< opacity_percent: 1 [BD 140]
< opacitymap.blendfactor: 1 [BD 141]
< opacitymap.projection: 0x1 [RC 176]
< opacitymap.tiling: 0x1 [RC 177]
< opacitymap.autotransform: 0x1 [RC 178]
< opacitymap.transmatrix[0]: 1 [BD 142]
< opacitymap.transmatrix[1]: 0 [BD 142]
< opacitymap.transmatrix[2]: 0 [BD 142]
< opacitymap.transmatrix[3]: 0 [BD 142]
< opacitymap.transmatrix[4]: 0 [BD 142]
< opacitymap.transmatrix[5]: 1 [BD 142]
< opacitymap.transmatrix[6]: 0 [BD 142]
< opacitymap.transmatrix[7]: 0 [BD 142]
< opacitymap.transmatrix[8]: 0 [BD 142]
< opacitymap.transmatrix[9]: 0 [BD 142]
< opacitymap.transmatrix[10]: 1 [BD 142]
< opacitymap.transmatrix[11]: 0 [BD 142]
< opacitymap.transmatrix[12]: 0 [BD 142]
< opacitymap.transmatrix[13]: 0 [BD 142]
< opacitymap.transmatrix[14]: 0 [BD 142]
< opacitymap.transmatrix[15]: 1 [BD 142]
< opacitymap.source: 0x1 [RC 175]
< opacitymap.filename: "" [T 7]
< bumpmap.blendfactor: 1 [BD 143]
< bumpmap.projection: 0x1 [RC 270]
< bumpmap.tiling: 0x1 [RC 271]
< bumpmap.autotransform: 0x1 [RC 272]
< bumpmap.transmatrix[0]: 1 [BD 144]
< bumpmap.transmatrix[1]: 0 [BD 144]
< bumpmap.transmatrix[2]: 0 [BD 144]
< bumpmap.transmatrix[3]: 0 [BD 144]
< bumpmap.transmatrix[4]: 0 [BD 144]
< bumpmap.transmatrix[5]: 1 [BD 144]
< bumpmap.transmatrix[6]: 0 [BD 144]
< bumpmap.transmatrix[7]: 0 [BD 144]
< bumpmap.transmatrix[8]: 0 [BD 144]
< bumpmap.transmatrix[9]: 0 [BD 144]
< bumpmap.transmatrix[10]: 1 [BD 144]
< bumpmap.transmatrix[11]: 0 [BD 144]
< bumpmap.transmatrix[12]: 0 [BD 144]
< bumpmap.transmatrix[13]: 0 [BD 144]
< bumpmap.transmatrix[14]: 0 [BD 144]
< bumpmap.transmatrix[15]: 1 [BD 144]
< bumpmap.source: 0x1 [RC 179]
< bumpmap.filename: "" [T 8]
< refraction_index: 1 [BD 145]
< refractionmap.blendfactor: 1 [BD 146]
< refractionmap.projection: 0x1 [RC 274]
< refractionmap.tiling: 0x1 [RC 275]
< refractionmap.autotransform: 0x1 [RC 276]
< refractionmap.transmatrix[0]: 1 [BD 147]
< refractionmap.transmatrix[1]: 0 [BD 147]
< refractionmap.transmatrix[2]: 0 [BD 147]
< refractionmap.transmatrix[3]: 0 [BD 147]
< refractionmap.transmatrix[4]: 0 [BD 147]
< refractionmap.transmatrix[5]: 1 [BD 147]
< refractionmap.transmatrix[6]: 0 [BD 147]
< refractionmap.transmatrix[7]: 0 [BD 147]
< refractionmap.transmatrix[8]: 0 [BD 147]
< refractionmap.transmatrix[9]: 0 [BD 147]
< refractionmap.transmatrix[10]: 1 [BD 147]
< refractionmap.transmatrix[11]: 0 [BD 147]
< refractionmap.transmatrix[12]: 0 [BD 147]
< refractionmap.transmatrix[13]: 0 [BD 147]
< refractionmap.transmatrix[14]: 0 [BD 147]
< refractionmap.transmatrix[15]: 1 [BD 147]
< refractionmap.source: 0x0 [RC 273]
< crc: 435E [RSx]
< check_CRC 92: 435E == 435E
---
> crc: 2AC9 [RSx]
> check_CRC 35: 2AC9 == 2AC9
2063,2067c1790,1793
< Object number: 47/2F, Size: 89 [MS], Type: 505 [BS]
< Warning: Unstable Class object 505 MATERIAL (0x400) 47/0
< Add object MATERIAL [47] Decode object MATERIAL
< bitsize: 652 [RL] @4.2
< Hdlsize: 0x3C,
---
> Object number: 47/2F, Size: 33 [MS], Type: 501 [BS]
> Add object PLACEHOLDER [47] Decode object PLACEHOLDER
> bitsize: 208 [RL] @4.2
> Hdlsize: 0x38,
2068a1795,1798
> EED[0] size: 12 [BS]
> EED[0] handle: 5.2.12D
> EED[0] raw: 12
> EED[0] code: 0 [RC], string: len=8 [RC] cp=30 [RS_BE] "MATERIAL" [TF]
2070c1800,1802
< num_eed: 0
---
>
>
> num_eed: 1
2075,2218c1807,1808
< name: "Global" [T 1]
< description: "" [T 2]
< ambient_color.flag: 0x0 [RC 70]
< ambient_color.factor: 1 [BD 40]
< diffuse_color.flag: 0x0 [RC 71]
< diffuse_color.factor: 1 [BD 41]
< diffusemap.blendfactor: 1 [BD 42]
< diffusemap.projection: 0x1 [RC 73]
< diffusemap.tiling: 0x1 [RC 74]
< diffusemap.autotransform: 0x1 [RC 75]
< diffusemap.transmatrix[0]: 1 [BD 43]
< diffusemap.transmatrix[1]: 0 [BD 43]
< diffusemap.transmatrix[2]: 0 [BD 43]
< diffusemap.transmatrix[3]: 0 [BD 43]
< diffusemap.transmatrix[4]: 0 [BD 43]
< diffusemap.transmatrix[5]: 1 [BD 43]
< diffusemap.transmatrix[6]: 0 [BD 43]
< diffusemap.transmatrix[7]: 0 [BD 43]
< diffusemap.transmatrix[8]: 0 [BD 43]
< diffusemap.transmatrix[9]: 0 [BD 43]
< diffusemap.transmatrix[10]: 1 [BD 43]
< diffusemap.transmatrix[11]: 0 [BD 43]
< diffusemap.transmatrix[12]: 0 [BD 43]
< diffusemap.transmatrix[13]: 0 [BD 43]
< diffusemap.transmatrix[14]: 0 [BD 43]
< diffusemap.transmatrix[15]: 1 [BD 43]
< diffusemap.source: 0x1 [RC 72]
< diffusemap.filename: "" [T 3]
< specular_color.flag: 0x0 [RC 76]
< specular_color.factor: 1 [BD 45]
< specularmap.blendfactor: 1 [BD 46]
< specularmap.projection: 0x1 [RC 78]
< specularmap.tiling: 0x1 [RC 79]
< specularmap.autotransform: 0x1 [RC 170]
< specularmap.transmatrix[0]: 1 [BD 47]
< specularmap.transmatrix[1]: 0 [BD 47]
< specularmap.transmatrix[2]: 0 [BD 47]
< specularmap.transmatrix[3]: 0 [BD 47]
< specularmap.transmatrix[4]: 0 [BD 47]
< specularmap.transmatrix[5]: 1 [BD 47]
< specularmap.transmatrix[6]: 0 [BD 47]
< specularmap.transmatrix[7]: 0 [BD 47]
< specularmap.transmatrix[8]: 0 [BD 47]
< specularmap.transmatrix[9]: 0 [BD 47]
< specularmap.transmatrix[10]: 1 [BD 47]
< specularmap.transmatrix[11]: 0 [BD 47]
< specularmap.transmatrix[12]: 0 [BD 47]
< specularmap.transmatrix[13]: 0 [BD 47]
< specularmap.transmatrix[14]: 0 [BD 47]
< specularmap.transmatrix[15]: 1 [BD 47]
< specularmap.source: 0x1 [RC 77]
< specularmap.filename: "" [T 4]
< specular_gloss_factor: 0.5 [BD 0]
< reflectionmap.blendfactor: 1 [BD 48]
< reflectionmap.projection: 0x1 [RC 172]
< reflectionmap.tiling: 0x1 [RC 173]
< reflectionmap.autotransform: 0x1 [RC 174]
< reflectionmap.transmatrix[0]: 1 [BD 49]
< reflectionmap.transmatrix[1]: 0 [BD 49]
< reflectionmap.transmatrix[2]: 0 [BD 49]
< reflectionmap.transmatrix[3]: 0 [BD 49]
< reflectionmap.transmatrix[4]: 0 [BD 49]
< reflectionmap.transmatrix[5]: 1 [BD 49]
< reflectionmap.transmatrix[6]: 0 [BD 49]
< reflectionmap.transmatrix[7]: 0 [BD 49]
< reflectionmap.transmatrix[8]: 0 [BD 49]
< reflectionmap.transmatrix[9]: 0 [BD 49]
< reflectionmap.transmatrix[10]: 1 [BD 49]
< reflectionmap.transmatrix[11]: 0 [BD 49]
< reflectionmap.transmatrix[12]: 0 [BD 49]
< reflectionmap.transmatrix[13]: 0 [BD 49]
< reflectionmap.transmatrix[14]: 0 [BD 49]
< reflectionmap.transmatrix[15]: 1 [BD 49]
< reflectionmap.source: 0x1 [RC 171]
< reflectionmap.filename: "" [T 6]
< opacity_percent: 1 [BD 140]
< opacitymap.blendfactor: 1 [BD 141]
< opacitymap.projection: 0x1 [RC 176]
< opacitymap.tiling: 0x1 [RC 177]
< opacitymap.autotransform: 0x1 [RC 178]
< opacitymap.transmatrix[0]: 1 [BD 142]
< opacitymap.transmatrix[1]: 0 [BD 142]
< opacitymap.transmatrix[2]: 0 [BD 142]
< opacitymap.transmatrix[3]: 0 [BD 142]
< opacitymap.transmatrix[4]: 0 [BD 142]
< opacitymap.transmatrix[5]: 1 [BD 142]
< opacitymap.transmatrix[6]: 0 [BD 142]
< opacitymap.transmatrix[7]: 0 [BD 142]
< opacitymap.transmatrix[8]: 0 [BD 142]
< opacitymap.transmatrix[9]: 0 [BD 142]
< opacitymap.transmatrix[10]: 1 [BD 142]
< opacitymap.transmatrix[11]: 0 [BD 142]
< opacitymap.transmatrix[12]: 0 [BD 142]
< opacitymap.transmatrix[13]: 0 [BD 142]
< opacitymap.transmatrix[14]: 0 [BD 142]
< opacitymap.transmatrix[15]: 1 [BD 142]
< opacitymap.source: 0x1 [RC 175]
< opacitymap.filename: "" [T 7]
< bumpmap.blendfactor: 1 [BD 143]
< bumpmap.projection: 0x1 [RC 270]
< bumpmap.tiling: 0x1 [RC 271]
< bumpmap.autotransform: 0x1 [RC 272]
< bumpmap.transmatrix[0]: 1 [BD 144]
< bumpmap.transmatrix[1]: 0 [BD 144]
< bumpmap.transmatrix[2]: 0 [BD 144]
< bumpmap.transmatrix[3]: 0 [BD 144]
< bumpmap.transmatrix[4]: 0 [BD 144]
< bumpmap.transmatrix[5]: 1 [BD 144]
< bumpmap.transmatrix[6]: 0 [BD 144]
< bumpmap.transmatrix[7]: 0 [BD 144]
< bumpmap.transmatrix[8]: 0 [BD 144]
< bumpmap.transmatrix[9]: 0 [BD 144]
< bumpmap.transmatrix[10]: 1 [BD 144]
< bumpmap.transmatrix[11]: 0 [BD 144]
< bumpmap.transmatrix[12]: 0 [BD 144]
< bumpmap.transmatrix[13]: 0 [BD 144]
< bumpmap.transmatrix[14]: 0 [BD 144]
< bumpmap.transmatrix[15]: 1 [BD 144]
< bumpmap.source: 0x1 [RC 179]
< bumpmap.filename: "" [T 8]
< refraction_index: 1 [BD 145]
< refractionmap.blendfactor: 1 [BD 146]
< refractionmap.projection: 0x1 [RC 274]
< refractionmap.tiling: 0x1 [RC 275]
< refractionmap.autotransform: 0x1 [RC 276]
< refractionmap.transmatrix[0]: 1 [BD 147]
< refractionmap.transmatrix[1]: 0 [BD 147]
< refractionmap.transmatrix[2]: 0 [BD 147]
< refractionmap.transmatrix[3]: 0 [BD 147]
< refractionmap.transmatrix[4]: 0 [BD 147]
< refractionmap.transmatrix[5]: 1 [BD 147]
< refractionmap.transmatrix[6]: 0 [BD 147]
< refractionmap.transmatrix[7]: 0 [BD 147]
< refractionmap.transmatrix[8]: 0 [BD 147]
< refractionmap.transmatrix[9]: 0 [BD 147]
< refractionmap.transmatrix[10]: 1 [BD 147]
< refractionmap.transmatrix[11]: 0 [BD 147]
< refractionmap.transmatrix[12]: 0 [BD 147]
< refractionmap.transmatrix[13]: 0 [BD 147]
< refractionmap.transmatrix[14]: 0 [BD 147]
< refractionmap.transmatrix[15]: 1 [BD 147]
< refractionmap.source: 0x0 [RC 273]
< crc: 7116 [RSx]
< check_CRC 91: 7116 == 7116
---
> crc: A2BA [RSx]
> check_CRC 35: A2BA == A2BA
2859c2449
< display_brightness_bl: -50 [BLd 44]
---
> display_brightness_bl: 2147483647 [BLd 44]
2862,2863c2452,2453
< crc: 8F28 [RSx]
< check_CRC 105: 8F28 == 8F28
---
> crc: F288 [RSx]
> check_CRC 105: F288 == F288
3202,3203c2792,2793
< crc: E311 [RSx]
< check_CRC 51: E311 == E311
---
> crc: C494 [RSx]
> check_CRC 51: C494 == C494
3244,3245c2834,2835
< crc: 68B9 [RSx]
< check_CRC 189: 68B9 == 68B9
---
> crc: F690 [RSx]
> check_CRC 189: F690 == F690
3717c3307,3328
< Handles page crc: D691 [RSx_BE] (33136-33626 = 490)
---
> Next object: 89 Handleoff: 0x1 [UMC]
> ==========================================
> Object number: 89/59, Size: 25 [MS], Type: 67 [BS]
> Add table record APPID [89] Decode table record APPID
> bitsize: 164 [RL] @3.2
> Hdlsize: 0x24,
> handle: 0.2.12D [H 5]
>
> num_eed: 0
> num_reactors: 0 [BL 0]
> ownerhandle: (4.1.9) abs:9 [H 330]
> xdicobjhandle: (3.0.0) abs:0 [H 360]
> name: "LibreDWG" [T 2]
> is_xref_ref: 1 [B 0]
> is_xref_resolved: 0 [BS 0]
> is_xref_dep: 0 [B 0]
> xref: (5.0.0) abs:0 [H 0]
> unknown: 0x0 [RC 71]
> crc: F3C1 [RSx]
> check_CRC 27: F3C1 == F3C1
>
> Handles page crc: 449B [RSx_BE] (32998-33490 = 492)
3720,3721c3331,3332
< Handles page crc: 01D0 [RSx_BE] (33628-33630 = 2)
< Num objects: 89
---
> Handles page crc: 01D0 [RSx_BE] (33492-33494 = 2)
> Num objects: 90
3724,3725c3335,3336
< last object size: 20 [MS]
< Last Object (end): 33132
---
> last object size: 25 [MS]
> Last Object (end): 32994
3727c3338
< =======> Second Header (start): 33648
---
> =======> Second Header (start): 33512
3729c3340
< address: 33632 [BL 0]
---
> address: 33496 [BL 0]
3749,3750c3360,3361
< sections[2].address: 33136 [BL 0]
< sections[2].size: 496 [BL 0]
---
> sections[2].address: 32998 [BL 0]
> sections[2].size: 498 [BL 0]
3821,3833c3432,3442
< crc: 7AEE [RSx]
< check_CRC 106: 7AEE == 7AEE
< DEBUG_POS @33756.0 (270048)
< 529BCEB5E5F915362B84DE31D76C6040ACDBBFF6EDC355FE
< B :0 BB :1
< RS :39762 / 0x9b52 (16)
< BS :74 / 0x004a (10)
< RL :3050216274 / 0xb5ce9b52 (32)
< RD :3.75917e-48 (64)
< BL :74 / 0x0000004a (10)
< BD :1 (2)
< junk_r14: 0x3615F9E5B5CE9B52 [RLL 0]
< Second Header (end) : 33780
---
> crc: 0201 [RSx]
> check_CRC 106: 0201 == 0201
> DEBUG_POS @33620.0 (268960)
> FFFFFF7F000000002B84DE31D76C6040ACDBBFF6EDC355FE
> B :1 BB :3
> RS :65535 / 0xffff (16)
> BS :256 / 0x0100 (2)
> RL :2147483647 / 0x7fffffff (32)
> RD :1.061e-314 (64)
> junk_r14: 0x7FFFFFFF [RLL 0]
> Second Header (end) : 33644
3835,3836c3444,3445
< =======> Template 4 (start) : 33780
< Template 4 (end) : 33784
---
> =======> Template 4 (start) : 33644
> Template 4 (end) : 33648
3841,3842c3450,3451
< num_objects: 89
< num_object_refs: 252
---
> num_objects: 90
> num_object_refs: 254
3844d3452
< Warning: Object handle not found 301/0x12D
The first issue is the encoding of DIMLWD. Originally -2, from wine JSON to DWG conversion -1
It's FIELD_BSd() macro.
In log:
right:
DIMLWD: 4294967294 [BSd]
bad:
DIMLWD: 2147483647 [BSd]
The second problem: wine version adds extra APPID table
Next object: 89 Handleoff: 0x1 [UMC] Offset: 24 [MC] @32967
==========================================
Object number: 89/59, Size: 25 [MS], Type: 67 [BS], Address: 32969
Add table record APPID [89] Decode table record APPID
bitsize: 164 [RL] @3.2
Hdlsize: 0x24, hdl_dat: @20.4 - @25.0 (25)
handle: 0.2.12D [H 5]
EED[0] size: 0 (end)
num_eed: 0
num_reactors: 0 [BL 0]
ownerhandle: (4.1.9) abs:9 [H 330]
xdicobjhandle: (3.0.0) abs:0 [H 360]
--common_size: 60
name: "LibreDWG" [T 2]
is_xref_ref: 1 [B 0]
is_xref_resolved: 0 [BS 0]
is_xref_dep: 0 [B 0]
xref: (5.0.0) abs:0 [H 0]
unknown: 0x0 [RC 71]
padding: +4
object_map{12D} = 89
padding: 0/0 (4 bits)
crc: F3C1 [RSx]
check_CRC 32967-32994 = 27: F3C1 == F3C1
The third issue: Different Second Header junk_r14 value: Right:
junk_r14: 0x3615F9E5B5CE9B52 [RLL 0]
Bad:
junk_r14: 0x7FFFFFFF [RLL 0]
The fourth issue:
Different display_brightness_bl
in VISUALSTYLE object:
Right:
display_brightness_bl: -50 [BLd 44]
Bad:
display_brightness_bl: 2147483647 [BLd 44]
I see but they both still incur in the "Recovery Mode" issue? Right?
I see but they both still incur in the "Recovery Mode" issue? Right?
yes
My feeling is that you are so close to resolve the "Recovery Mode" issue but maybe I'm wrong. I also offered a donation many times if it could help.
The first and fourth issue is related to two things:
- Bad conversion from DWG to JSON (-2 → 4294967294)
- long in in_json.c on Windows is 32bit, so 4294967294 is not possible in this type.
- In PR: https://github.com/LibreDWG/libredwg/pull/952
@rurban What about 2) ? I created https://github.com/michal-josef-spacek/libredwg/commit/47c43c20c1f5519bb34b63eccfcbc11d6bc2b84c for fix.
I think that is better to not use long type when is different on systems.
The second problem: wine version adds extra APPID table
Not a problem, but on purpose for unhandled classes roundtrips
The first and fourth issue is related to two things:
1. Bad conversion from DWG to JSON (-2 → 4294967294) 2. long in in_json.c on Windows is 32bit, so 4294967294 is not possible in this type.
this must be uint32_t, not long. 4294967294 is MAX_UINT32 - 1
@rurban What about 2) ? I created michal-josef-spacek@47c43c2 for fix.
I think that is better to not use long type when is different on systems.
Sure, but we need strtol() which returns long, even on windows. But since we only need 32bit, it is ok
Should be fixed now
Should be fixed now
Thank you very much. I am going to test.
The second problem: wine version adds extra APPID table
Not a problem, but on purpose for unhandled classes roundtrips
I don't understand. On Linux not present, with mingw/wine present. :-)
The second problem: wine version adds extra APPID table
Not a problem, but on purpose for unhandled classes roundtrips
I don't understand. On Linux not present, with mingw/wine present. :-)
ok, I see :-D
if (fixup)
{
...
new_appid = add_LibreDWG_APPID (dwg);
...
}
I am closing this ticket.
Tested on last git branch on Linux and Windows with ./configure --disable-bindings --enable-write --enable-trace -- enable-debug
and working.
There are issues in compilation without --enable-debug
, see follow up: https://github.com/LibreDWG/libredwg/issues/954