haplokuon / netDxf

.net dxf Reader-Writer
MIT License
986 stars 400 forks source link

9 as a value of LUPrec #313

Closed v-tsymbalistyi closed 2 years ago

v-tsymbalistyi commented 3 years ago

I have Autocad2000 dxf file which has 9 as a value of LUPrec header. And based on this 16-bit integer is a valid value. I know Autocad support 0-8 range (at least for 2022 version based on this). But maybe it is possible to use the default value or round to accepted range instead of returning null as a result of DxfDocument.Load?

haplokuon commented 3 years ago

Yes, values that fall out side of the required range should reset to the default value. There are lots of similar cases like this.