skymakerolof / dxf

DXF parser for node/browser
https://www.npmjs.com/package/dxf
MIT License
335 stars 122 forks source link

Adds a way to incorporate dashed line into generated svg #98

Closed moseskarunia closed 1 year ago

moseskarunia commented 2 years ago

in some use case, dashed line is used to represent bending operations.

in this PR, i add a way to read non-continuous lineTypeName, and if any of an entity doesn't continuous, I add stroke-dasharray="5,5" to the generated path / g.

Why strictly only 5,5? Just to simplify the code. It's still better than making it all solid lines in my opinion.

But feel free to make more complex conditional regarding stroke dashline in the future.