Re: Thickness of line for DXF export



Le Tue, Aug 10, 2004, à 11:30:49AM +0000, hma syd odn ne jp a écrit:

does anyone know why thickness of line is multiplied 10 times in 
plug-ins/dxf/dxf-export.c ?
For instance, in function draw_line(), 

    fprintf(renderer->file, " 39\n%d\n", (int)(10*renderer->lcurrent.width));
    /* Thickness */

In dxf-import.c, thickness is not modified, so I'm curious why
dxf-export.c does this.

I *guess* this is a bug, though a very deliberate one.... It might have 
slipped through when I gave that code some exercise eons ago, if 
SolidWorks 2000's DXF export has the same bug. 
Which software are you using to read DXF?

I see that the code comes from James H; I don't know what he tested
against, but I'd guess he too had an implementation that stores "10
times the thickness".

As you can imagine easily,
this difference between export and import makes lines very thick
when you load the same dxf file right after you exported a diagram 
in dxf format.

Yup. I wonder if the right solution is not to make this configurable
("DXF line thickness factor" in the preferences), and to make import
and export use the same value.

DXF is one of the worst implemented formats I know of; I'm not sure which of 
it and IGES owns the crown, but "mess" probably best describes the
ecosystem of DXF and IGES readers & writers.

        -- Cyrille

--



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]