dxf文件格式的研究
dxf文件比dwg文件更轻巧,而且其文件结构是公开的
官方文档:http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=12272454&linkID=10809853
推荐一个好用的开源dxf类库 .net DXF Reader-Writer, 目前支持的对象有以下几种:
- 3dFace
- Arc
- Circle
- Ellipse
- Insert (block references and attributes)
- LightweightPolylines
- Line
- Point
- Polyline
- Polyline3d
- PolyfaceMesh
- Solid
- Text
代码示例:
public static void Main() { DxfDocument dxf = new DxfDocument(); // add your entities here dxfDocument.AddEntity(entity); // save to file dxf.Save(filename); // load file dxf.Load(filename); }
猛击我下载