-
Notifications
You must be signed in to change notification settings - Fork 285
Added lineWeight support to dxf exporter #624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
Wow, thank you so much! Is this backward compatible with older DXF versions? |
To be honest, I'm not sure. According to a gemini result, DXF R2000 came out in March 1999, though it might be confusing DXF R2000 with AutoCAD 2000 and/or DWG 2000 (or maybe they all came out at the same time! I'm not sure). In either case, support for Line Weight seems fairly well established Also, I think, I read some where that most DXF readers ignore codes that they don't recognize so it should be backwards compatible |
Okay a bit more research and it seems DXF AC1015 is synonymous with DXF R2000, which indeed came out in March 1999. See https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf (page 11) |
Thanks for doing the research. I think then that we can remove |
Sounds good. I can make the |
Looks like the DXF test is failing |
Should be working with latest commit |
@@ -348,6 +353,7 @@ namespace MakerJs.exporter { | |||
|
|||
map["POLYLINE"] = function (polyline: DxfParser.EntityPOLYLINE) { | |||
append("0", "POLYLINE", | |||
"370", "-1", // Set line weight to -1 to use the layer's line weight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for these 3 "370"s - can we inject only if a layer lineweight exists?
This PR exposes the ability to change the Line Weight of lines drawn in a particular layer. This is a feature that was added in DXF R2000 and is supported by other DXF libraries. Ex: https://ezdxf.readthedocs.io/en/stable/concepts/lineweights.html
The hope was to also make the DXF exporter in closer parity with the SVG exporter, specifically in terms of strokeWidth