gdsestimating / dxf-parser

A javascript parser for DXF files. It reads DXF file strings into one large javascript object with more readable properties and a more logical structure.
MIT License
462 stars 143 forks source link

Add extrusion direction to ARC entities #82

Closed gpbmike closed 2 years ago

gpbmike commented 2 years ago

I have a DXF with extrusion direction values for ARC entities that I need to account for.

Codes 210, 220, and 230 in ARC entitiy reference

This PR adds the following to the parsed ARC entity:

The implementation is the same as the following:

bzuillsmith commented 2 years ago

Nice, thorough PR. Thanks! I'm sad we didn't originally implement it as an { x, y, z } object. But as you pointed out, the implementation is the same as other objects so the consistency is probably best.

gpbmike commented 2 years ago

Thanks @bzuillsmith. Can I trouble you for a new release (NPM) when you have the time? Thanks.

bzuillsmith commented 2 years ago

For sure! I'll try to do that this evening. I actually tried last night but I hit a minor issue with line-endings and the approval tests. I tried to fix it once and for all last night and got frustrated around 1am after struggling with it for over 2 hours. For some reason, hidden line endings or other invisible characters were causing it to fail the latest test you added (not your fault though). Approvals is supposed to ignore that stuff so I don't really get what's happening. I can just resave the file with \n endings but I shouldn't have to. Git actually changes these automatically as you check things in an out depending on the OS.

I'll skip all that for now and just publish it for you sometime after I get off work.

gpbmike commented 2 years ago

I appreciate it @bzuillsmith. Also, happy to help if you need/want it.