# 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.
mxxxxxxx
- 粉丝: 4
- 资源: 13
最新资源
- formatted_task085_unnatural_addsub_arithmetic.json
- formatted_task086_translated_symbol_arithmetic.json
- 将易语言的接口的主要功能转接成对外的HTTP请求.zip
- formatted_task089_swap_words_verification.json
- formatted_task088_identify_typo_verification.json
- formatted_task087_new_operator_addsub_arithmetic.json
- formatted_task092_check_prime_classification.json
- formatted_task091_all_elements_from_index_i_to_j.json
- formatted_task090_equation_learner_algebra.json
- formatted_task094_conala_calculate_mean.json
- formatted_task095_conala_max_absolute_value.json
- formatted_task093_conala_normalize_lists.json
- 基于JAVA+SpringBoot+Vue+MySQL的小型图书管理系统源码+数据库+论文(高分毕业设计).zip
- formatted_task097_conala_remove_duplicates.json
- formatted_task098_conala_list_intersection.json
- formatted_task096_conala_list_index_subtraction.json
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈