Replies: 1 comment
-
Maker.js ought to have a better way of handling DXF entities. Until then, you might be able to inject into the entities section. Here is example DXF for a drawing with only a circle:
I believe you can add your points before the end of the final section. I haven't tried this, but here's a function written by ChatGPT: function injectPoint(dxfData, pointData) {
// Find the index of the last line of the ENTITIES section before it ends
const endEntitiesIndex = dxfData.lastIndexOf('0\nENDSEC\n', dxfData.indexOf('0\nSECTION\n2\nENTITIES'));
if (endEntitiesIndex === -1) {
return "Invalid DXF data"; // or handle error more appropriately
}
// Insert the point data before the end of the ENTITIES section
return dxfData.substring(0, endEntitiesIndex) + pointData + dxfData.substring(endEntitiesIndex);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
POINT
5
30F
8
NOTCH$CCW$L
10
1871.0
20
6.8011667117243633
30
0.0
0
HI! I need the simple point information to be in the exported file. How can I do this? I didn't find the solution I needed in the documentation
Beta Was this translation helpful? Give feedback.
All reactions