# netDxf
netDxf Copyright(C) 2009-2022 Daniel Carvajal, licensed under MIT License
## Description
netDxf is a .net library programmed in C# to read and write AutoCAD DXF files. It supports AutoCad2000, AutoCad2004, AutoCad2007, AutoCad2010, AutoCad2013, and AutoCad2018 DXF database versions, in both text and binary format.
The library is easy to use and I tried to keep the procedures as straightforward as possible, for example you will not need to fill up the table section with layers, styles or line type definitions. The DxfDocument will take care of that every time a new item is added.
If you need more information, you can find the official DXF documentation [here](https://help.autodesk.com/view/OARX/2021/ENU/?guid=GUID-235B22E0-A567-4CF6-92D3-38A2306D73F3).
Code example:
```c#
public static void Main()
{
// your DXF file name
string file = "sample.dxf";
// create a new document, by default it will create an AutoCad2000 DXF version
DxfDocument doc = new DxfDocument();
// an entity
Line entity = new Line(new Vector2(5, 5), new Vector2(10, 5));
// add your entities here
doc.Entities.Add(entity);
// save to file
doc.Save(file);
// this check is optional but recommended before loading a DXF file
DxfVersion dxfVersion = DxfDocument.CheckDxfFileVersion(file);
// netDxf is only compatible with AutoCad2000 and higher DXF versions
if (dxfVersion < DxfVersion.AutoCad2000) return;
// load file
DxfDocument loaded = DxfDocument.Load(file);
}
```
## Samples and Demos
Are contained in the source code.
Well, at the moment they are just tests for the work in progress.
## Dependencies and distribution
Multitarget project, predefined frameworks for Net Framework 4.5, Net Standard 2.1, Net Core 3.1, NET 5.0, and NET 6.0.
Additionally the Net Standard 2.1 build requires a reference to the external library "System.Text.Encoding.CodePages".
## Compiling
Visual Studio 2022. The solution file is still usable by Visual Studio 2019 but it does not support NET 6.0.
## Development Status
See [changelog.txt](https://github.com/haplokuon/netDxf/blob/master/doc/Changelog.txt) or the [wiki page](https://github.com/haplokuon/netDxf/wiki) for information on the latest changes.
## Supported DXF entities
* 3dFace
* Arc
* Circle
* Dimensions (aligned, linear, radial, diametric, 3 point angular, 2 line angular, and ordinate)
* Ellipse
* Hatch (including Gradient patterns)
* Image
* Insert (block references and attributes, dynamic blocks are not supported)
* Leader
* Line
* LwPolyline (light weight polyline)
* Mesh
* MLine
* MText
* Point
* Polyline (Polyline2D, Polyline3D, PolyfaceMesh, and PolygonMesh)
* Ray
* Shape
* Solid
* Spline
* Text
* Tolerance
* Trace
* Underlay (DGN, DWF, and PDF underlays)
* Wipeout
* XLine (aka construction line)
All entities can be grouped.
All DXF objects may contain extended data information.
AutoCad Table entities will be imported as Inserts (block references).
Both simple and complex line types are supported.
The library will never be able to read some entities like REGIONs, SURFACEs, and 3DSOLIDs, since they depend on undocumented proprietary data.
没有合适的资源?快使用搜索试试~ 我知道了~
netDxf 2.4.2
共293个文件
cs:271个
shx:2个
dxf:2个
需积分: 14 7 下载量 84 浏览量
2023-02-02
17:08:41
上传
评论
收藏 1.11MB ZIP 举报
温馨提示
netDxf是一个用C#编程的.net库,用于读取和写入AutoCAD DXF文件。它支持文本和二进制格式的AutoCad2000、AutoCad2004、AutoCad2007、AutoCad2010、AutoCad2013和AutoCad2018 DXF数据库版本。 该库很容易使用,我试图使过程尽可能简单,例如,您不需要用图层、样式或线型定义填充表格部分。每次添加新项目时,DxfDocument都会处理这个问题。
资源推荐
资源详情
资源评论
收起资源包目录
netDxf 2.4.2 (293个子文件)
DxfReader.cs 494KB
Program.cs 381KB
DxfWriter.cs 232KB
DxfDocument.cs 78KB
DimensionBlock.cs 65KB
Matrix4.cs 46KB
DimensionStyle.cs 46KB
Leader.cs 42KB
MText.cs 41KB
RootsPolynominal.cs 40KB
DimensionStyleOverride.cs 38KB
Spline.cs 36KB
AciColor.cs 36KB
HatchBoundaryPath.cs 34KB
HeaderVariables.cs 34KB
Matrix3.cs 33KB
MLine.cs 33KB
Block.cs 31KB
Insert.cs 30KB
Linetype.cs 30KB
Tolerance.cs 28KB
ShapeStyle.cs 28KB
Polyline2D.cs 28KB
MathHelper.cs 27KB
Ellipse.cs 27KB
AttributeDefinition.cs 27KB
Angular2LineDimension.cs 26KB
Attribute.cs 26KB
Vector2.cs 26KB
Vector3.cs 25KB
DimensionArrowhead.cs 24KB
Hatch.cs 24KB
PolygonMesh.cs 23KB
Viewport.cs 23KB
IntrIntervals.cs 22KB
Vector4.cs 22KB
GMatrix.cs 22KB
Matrix2.cs 21KB
LinearDimension.cs 21KB
Text.cs 20KB
Angular3PointDimension.cs 19KB
BasisFunction.cs 19KB
HatchPattern.cs 19KB
OrdinateDimension.cs 18KB
TextStyle.cs 18KB
AlignedDimension.cs 18KB
GVector.cs 18KB
BandedMatrix.cs 17KB
DiametricDimension.cs 17KB
Image.cs 17KB
RadialDimension.cs 16KB
DrawingEntities.cs 16KB
ImageDefinition.cs 15KB
LayerState.cs 15KB
DimensionStyleOverrideDictionary.cs 15KB
Dimension.cs 15KB
Polyline3D.cs 15KB
TextCodeValueReader.cs 15KB
ObservableCollection.cs 15KB
AttributeDefinitionDictionary.cs 14KB
DimensionStyleOverrideType.cs 14KB
BinaryCodeValueWriter.cs 14KB
EntityCollection.cs 14KB
TableObject.cs 14KB
TextCodeValueWriter.cs 14KB
DxfObjectCode.cs 14KB
PolyfaceMesh.cs 13KB
MLineStyle.cs 13KB
Underlay.cs 13KB
Linetypes.cs 13KB
Layout.cs 13KB
UCS.cs 13KB
XDataDictionary.cs 13KB
BezierCurveCubic.cs 13KB
LinearUnitFormat.cs 13KB
Shape.cs 12KB
PlotSettings.cs 12KB
BinaryCodeValueReader.cs 12KB
ParametricCurve.cs 12KB
Arc.cs 12KB
LayerStateManager.cs 12KB
BSplineReduction.cs 11KB
LayerStateProperties.cs 11KB
Layouts.cs 11KB
BSplineSurfaceFit.cs 11KB
EntityObject.cs 10KB
DimensionStyleTolerances.cs 10KB
TableObjects.cs 10KB
Group.cs 10KB
HeaderVariableCode.cs 10KB
HatchGradientPattern.cs 10KB
BSplineCurveFit.cs 10KB
DimensionStyleAlternateUnits.cs 10KB
BoundingRectangle.cs 10KB
DimensionStyles.cs 10KB
UnitStyleFormat.cs 10KB
MTextFormattingOptions.cs 10KB
SupportFolders.cs 10KB
StringEnum.cs 9KB
Integration.cs 9KB
共 293 条
- 1
- 2
- 3
资源评论
mxxxxxxx
- 粉丝: 4
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功