bert / libdxf

Library with DXF related functions (work in progress)
http://www.xs4all.nl/~ljh4timm
GNU General Public License v2.0
63 stars 15 forks source link

apparently wrong order of the group code of the entity #10

Open paolo-caroni opened 11 years ago

paolo-caroni commented 11 years ago

to explain better take for example the file line.c the order of group code in a line is: 100 39 (if present) 10 20 30 11 21 31 210 220 230 but in the "dxf_line_write_lowlevel" the order is different (39 is later than 31). I think this isn't a big problem in line entities, but for example the mtext entities (not write at the moment) have two different group code 50, the order can be very important. It's a mistake or I just do not understand anything?

bert commented 11 years ago

Hi Paolo,

Looking at the Autodesk DXF reference manual of 2004 I see just a single group code 50 argument: rotation angle, if ommitted this defaults to 0.

There is another angle with group code 51 argument: the oblique angle, if ommitted this defaults to 0.

Group codes 50-58 are angles (output in degrees to DXF files and radians through AutoLISP and ObjectARX applications)

Another text from the manual warns against order of group codes, the only sure thing is that a group code 0 is the end of an entity.

quote

Do not write programs that rely on the order given here. The end of an entity is indicated by the next 0 group, which begins the next entity or indicates the end of the section.

end of quote

Kind regards,

Bert Timmerman.

paolo-caroni commented 11 years ago

Hi Bert, Thank you very much for the quote, I don't see it. However, the problem of double 50 in the mtext entities arises from the 2007 version and next release. (for example see the new 2013 reference manual): http://docs.autodesk.com/ACD/2013/ENU/files/GUID-5E5DB93B-F8D3-4433-ADF7-E92E250D2BAB.htm

I hope to be helpful, kind regards, Paolo Caroni

bert commented 11 years ago

Hi Paolo,

It's about time I pick up libdxf, add more code and push commits, thanks for the wake-up call ;-)

Kind regards,

Bert Timmerman.