dxf icon indicating copy to clipboard operation
dxf copied to clipboard

Use color of entity even no corresponding layer is found

Open apriljunge opened this issue 10 months ago • 1 comments

In .toPolyLines() the color of the entity is only parsed when a matching layer is found. If theres no layer found, the color is set to black even when the entity has an color attribute. Is this intended?

https://github.com/skymakerolof/dxf/blob/9895f4f23dbda0ce504dc7b5cc1715a3c66f5ba8/src/toPolylines.js#L14-L25

apriljunge avatar Apr 10 '24 16:04 apriljunge

It seems strange that the color attribute of the entity is only parsed when a matching layer is found, and defaults to black otherwise, even if the entity has a specified color. I'm not entirely sure about the intended behavior here, but it does raise some questions. A pull request to address this would be welcome.

skymakerolof avatar May 27 '24 05:05 skymakerolof

https://github.com/skymakerolof/dxf/pull/140 Released as 5.1.1

skymakerolof avatar Aug 30 '24 11:08 skymakerolof