haplokuon / netDxf

.net dxf Reader-Writer
MIT License
995 stars 405 forks source link

Dimension Overrides TolerancesUpperLimit and TolerancesLowerLimit is changed. #312

Closed YangseonJi closed 2 years ago

YangseonJi commented 3 years ago

Hi

It has a problem at Dxfwrite.AddDimensionStyleOverridesXData It need to modify DxfCodes of TolerancesLowerLimit and TolerancesUpperLimit.


case DimensionStyleOverrideType.TolerancesLowerLimit: xdataEntry.XDataRecord.Add(new XDataRecord(XDataCode.Int16, (short) 47)); //48 is right. xdataEntry.XDataRecord.Add(new XDataRecord(XDataCode.Real, (double) styleOverride.Value)); break; case DimensionStyleOverrideType.TolerancesUpperLimit: xdataEntry.XDataRecord.Add(new XDataRecord(XDataCode.Int16, (short) 48));//47 is right. xdataEntry.XDataRecord.Add(new XDataRecord(XDataCode.Real, (double) styleOverride.Value)); break;

haplokuon commented 3 years ago

That is correct, the DXF codes are switched, it only affects the writer, thought, the values are read correctly.