haplokuon / netDxf

.net dxf Reader-Writer
MIT License
996 stars 404 forks source link

Line types are read with an error #250

Closed iborzenkov closed 3 years ago

iborzenkov commented 3 years ago

At class Linetype I see two methods for serializing the line type.

I see an error when reading the value of LinetypeSegmentRotationType.Absolute It is read using "Q=" string at private static LinetypeSegment ReadLineTypeComplexSegment(string[] data, double length) method:

else if (data[i].StartsWith("Q=", StringComparison.InvariantCultureIgnoreCase))
{
    rotationType = LinetypeSegmentRotationType.Absolute;
    rotation = ReadRotation(value);
}

It is written using another string "A=" at public void Save(string file) method:

case LinetypeSegmentRotationType.Absolute:
    srt = "A=";
    break;
haplokuon commented 3 years ago

Yes, the Q is wrong it should be A for Absolute.