[gdal-dev] dxf linewidth

Marco Hugentobler marco at sourcepole.ch
Thu Jan 31 02:23:54 PST 2013


Hi Even

Ok, done (http://trac.osgeo.org/gdal/ticket/4978).

One thing that I did not do in the patch ( and should probably be done)
is considering the symbology units. I saw that it is possible to query
the unit type of the OGRStylePen. Is it possible to define e.g. the dpi
in the featurestyle such that a driver might convert between pixel / mm?


Regards,
Marco




On 29.01.2013 23:41, Even Rouault wrote:
> 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