libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

Fix MATERIAL class

Open michal-josef-spacek opened this issue 11 months ago • 5 comments

When I compile libredwg without --enable-debug (tested on mingw cross compilation). The conversion of DWG with MATERIAL class to JSON and back is not working. Output DWG file is not possible to open in AutoCAD.

This is partially related to the implementation of MATERIAL class.

michal-josef-spacek avatar Mar 10 '24 10:03 michal-josef-spacek

MATERIAL.gentexture and several other MATERIAL features are not yet supported. These should be disabled without DEBUG

rurban avatar Mar 10 '24 11:03 rurban

If I understand correctly, we need to stable MATERIAL class and after this, we could remove hacks for roundtripping for MATERIAL (https://github.com/LibreDWG/libredwg/blob/master/src/encode.c#L3277). Am I right?

michal-josef-spacek avatar Mar 10 '24 14:03 michal-josef-spacek

We won't get procedural Materials stable anytime soon, but the rest would be great. So encode should warn and disable it. Just enable it with enable-debug

rurban avatar Mar 10 '24 20:03 rurban

renaming IMAGE,WIPEOUT.size to image_size fixed the debug json roundtrip

rurban avatar Jul 06 '24 10:07 rurban

I've re-enabled MATERIAL (and WIPEOUT) in the branch smoke/material. No oda errors with r2000 json roundtrips anymore. But still oda errors with r2004-2018

rurban avatar Jul 06 '24 13:07 rurban