代码拉取完成,页面将自动刷新
Simple DXF writer.
npm install dxf-writer
const Drawing = require('dxf-writer');
const fs = require('fs');
let d = new Drawing();
d.setUnits('Decimeters');
d.drawText(10, 0, 10, 0, 'Hello World'); // draw text in the default layer named "0"
d.addLayer('l_green', Drawing.ACI.GREEN, 'CONTINUOUS');
d.setActiveLayer('l_green');
d.drawText(20, -70, 10, 0, 'go green!');
//or fluent
d.addLayer('l_yellow', Drawing.ACI.YELLOW, 'DOTTED')
.setActiveLayer('l_yellow')
.drawCircle(50, -30, 25);
fs.writeFileSync(__filename + '.dxf', d.toDxfString());
Example preview in the LibreCAD:
3 line type out of the box (CONTINUOUS, DASHED, DOTTED) with the ability to add a custom line type.
let d = new Drawing();
d.addLineType('DASHDOT', '_ . _ ', [0.5, -0.5, 0.0, -0.5]);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。