1创建dxf, 可以使用netdxf创建dxf文件
https://github.com/haplokuon/netDxf
官网例子如下:
public static void Main()
{// your DXF file namestring file = "sample.dxf";// create a new document, by default it will create an AutoCad2000 DXF versionDxfDocument doc = new DxfDocument();// an entityLine entity = new Line(new Vector2(5, 5), new Vector2(10, 5));// add your entities heredoc.Entities.Add(entity);// save to filedoc.Save(file);// this check is optional but recommended before loading a DXF fileDxfVersion dxfVersion = DxfDocument.CheckDxfFileVersion(file);// netDxf is only compatible with AutoCad2000 and higher DXF versionsif (dxfVersion < DxfVersion.AutoCad2000) return;// load fileDxfDocument loaded = DxfDocument.Load(file);
}