-
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
|
Can you use CSS in your use case? If so you can use https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/border-style |
Beta Was this translation helpful? Give feedback.
-
|
The codebase currently only outputs continuous lines in DXF. see https://github.com/microsoft/maker.js/blob/master/packages/maker.js/src/core/dxf.ts#L179 Perhaps this should be an option to DXF LayerOptions: https://maker.js.org/docs/api/interfaces/makerjs.exporter.idxflayeroptions.html But until then, you can try to modify the DXF yourself. I haven't done it, but here's a conversation with ChatGPT: UserHere's square in dxf: Is there a way to make the line dashed? AssistantYes. In DXF, whether a line appears dashed is controlled entirely by its linetype. Your file currently defines only the To make lines dashed, you must do two things:
1. Add a dashed linetype definition2. Assign the dashed linetype to a lineOptional: set linetype scale |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for helping us understand that exporting dashed lines in DXF is indeed possible. Your explanation clarified the approach and limitations very clearly. We’ll take these learnings forward and implement a way on our side to patch the exports so that dashed lines are handled via dedicated dashed layers. Really appreciate your support and insights. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @danmarshall, Here is a small brief on what i was able to achive locally so far. Supported Line TypesThe following DXF linetypes are supported:
If no linetype is explicitly provided, the exporter will fall back to DXF LTYPE DefinitionsThe linetypes are defined in the DXF LTYPE table as follows: lineTypes: {
CONTINUOUS: {
name: "CONTINUOUS",
description: "______",
patternLength: 0,
elements: []
},
DASHED: {
name: "DASHED",
description: "_ _ _ ",
elements: [5, -2.5],
patternLength: 7.5
},
DOTTED: {
name: "DOTTED",
description: ". . . ",
elements: [0.5, -1.0],
patternLength: 1.5
}
}
LINE Entity AssignmentThe selected linetype is applied to LINE entities using DXF group code 6.
This ensures that CAD applications correctly render dashed or dotted lines based on the assigned linetype. Backward Compatibility
Could you please let me know if there’s anything else I should handle or adjust for DXF compatibility or Maker.js conventions? Thanks again for your guidance! |
Beta Was this translation helpful? Give feedback.
-
|
The solution to this has been implemented in PR dedcdd1 |
Beta Was this translation helpful? Give feedback.


Hi @danmarshall,
Here is a small brief on what i was able to achive locally so far.
I made changes to https://github.com/microsoft/maker.js/blob/master/packages/maker.js/src/core/dxf.ts as poined to allow LINE entities to be exported with different linetypes instead of always defaulting to
CONTINUOUS.Supported Line Types
The following DXF linetypes are supported:
CONTINUOUS(default)DASHEDDOTTEDIf no linetype is explicitly provided, the exporter will fall back to
CONTINUOUS, preserving backward compatibility.DXF LTYPE Definitions
The linetypes are defined in the DXF LTYPE table as follows: