kienerj / pycdxml

Tools to automatically convert and proccess cdx and cdxml files in python
GNU General Public License v3.0
35 stars 5 forks source link

Fix enums that are bit-encoded (have combined) values like RectangleType #8

Closed kienerj closed 1 year ago

kienerj commented 1 year ago

For example RectangleType is documented as enumerated property in the specification:

This is an enumerated property. Acceptible values are shown in the following list: Value | CDXML Name -- | -- | 0 | Plain 1 | RoundEdge 2 | Shadow 4 | Shaded 8 | Filled 16 | Dashed 32 | Bold

The specification omits mentioning that all combinations of features are also allowed and that the lowest features appears first in cdxml name eg:

Value | CDXML Name -- | -- | 0 | Plain 1 | RoundEdge 2 | Shadow 3 | RoundEdge Shadow 4 | Shaded 5 | RoundEdge Shaded

RectangeType, OvalType, CDXFillType? and potentially others need to take the possible combined values into account

kienerj commented 1 year ago

fixed by 080717fdf18331dccfcfeb53c5130b49087e7a6b and fa56955