[gdal-dev] dxf linewidth

Even Rouault even.rouault at mines-paris.org
Tue Jan 29 14:41:07 PST 2013


Le mardi 29 janvier 2013 10:48:11, Marco Hugentobler a écrit :
> Hi
> 
> I have a question regarding writing the linewith from ogr feature style
> in the dxf driver.
> In ogrdxfwriterlayer.cpp, linewith is written using code 370. This seems
> to work if I open the dxf file with inkscape. However, if I open it with
> TrueView (AutoCAD engine), code 370 has no effect on line width.
> Furthermore, the application refuses to open a file if the 370 value is
> not one contained in
> (http://docs.autodesk.com/ACDMAC/2012/ENU/ObjectARX%20Reference/index.html?
> frmname=topic&frmfile=AcDbLayerTableRecord__lineWeight at const.html).
> 
> 
> Looking at a file generated with AutoCAD engine, I see that it uses code
> 43. Now I'm not a dxf expert at all, so I don't know if it has to do
> with different dxf versions or if we should simply change the 370 for 43
> in the dxf writer? Shall I provide a patch?

That might be usefull to open a ticket on that with the patch, as well as with 
data to reproduce and the file generated by AutoCAD.
Note that my grepping of 370 shows that the DXF reader should likely be 
enhanced to recognize code 43 in addition to 370, so that round-tripping 
through OGR works.
Note that I don't feel myself as a DXF expert. I may just apply it more or 
less blindly it if you are confident in the patch through your testing. 

> 
> Regards,
> Marco


More information about the gdal-dev mailing list