Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.

Commit 0668886

Browse files
committed
[2020/08/20] netDxf 2.4.0 Release.
* See Changelog.txt for a list of changes since 2.3.0
1 parent f72be01 commit 0668886

File tree

5 files changed

+36
-65
lines changed

5 files changed

+36
-65
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
# netDxf
2-
netDxf 2.3.0 Copyright(C) 2009-2019 Daniel Carvajal, Licensed under LGPL
2+
netDxf 2.4.0 Copyright(C) 2009-2020 Daniel Carvajal, Licensed under LGPL
33
## Description
4-
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.
4+
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.
55

66
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.
77

8-
If you need more information, you can find the official dxf documentation [here](https://help.autodesk.com/view/OARX/2019/ENU/?guid=GUID-235B22E0-A567-4CF6-92D3-38A2306D73F3).
8+
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).
99

1010
Code example:
1111

1212
```c#
1313
public static void Main()
1414
{
15-
// your dxf file name
15+
// your DXF file name
1616
string file = "sample.dxf";
1717

18-
// by default it will create an AutoCad2000 DXF version
19-
DxfDocument dxf = new DxfDocument();
18+
// create a new document, by default it will create an AutoCad2000 DXF version
19+
DxfDocument doc = new DxfDocument();
2020
// an entity
2121
Line entity = new Line(new Vector2(5, 5), new Vector2(10, 5));
2222
// add your entities here
23-
dxf.AddEntity(entity);
23+
doc.AddEntity(entity);
2424
// save to file
25-
dxf.Save(file);
25+
doc.Save(file);
2626

2727
// this check is optional but recommended before loading a DXF file
2828
DxfVersion dxfVersion = DxfDocument.CheckDxfFileVersion(file);
29-
// netDxf is only compatible with AutoCad2000 and higher DXF version
29+
// netDxf is only compatible with AutoCad2000 and higher DXF versions
3030
if (dxfVersion < DxfVersion.AutoCad2000) return;
3131
// load file
3232
DxfDocument loaded = DxfDocument.Load(file);
@@ -72,7 +72,7 @@ See [changelog.txt](https://github.com/haplokuon/netDxf/blob/master/doc/Changelo
7272
* XLine (aka construction line)
7373

7474
All entities can be grouped.
75-
All entities and table objects may contain extended data information.
75+
All DXF objects may contain extended data information.
7676
AutoCad Table entities will be imported as Inserts (block references).
7777
Both simple and complex line types are supported.
7878
The library will never be able to read some entities like REGIONs, SURFACEs, and 3DSOLIDs, since they depend on undocumented proprietary data.

doc/Changelog.txt

Lines changed: 17 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,48 @@
11
## Change history
22

3-
### [2020/08/18]
4-
* The public classes PolylineVertex and PolyfaceMeshVertex can contain extended data information XData, but they will not be saved in the DXF AutoCad crashes if they are.
5-
* Deleted the AciColor methods ToTrueColor and FromTrueColor, they have no use outside the DxfWriter and DxfReader classes.
6-
7-
### [2020/08/13]
3+
### [2.4.0 - 2020/08/20]
84
* Added US Survey Feet, US Survey Inches, US Survey Yards, and US Survey Miles to the DrawingUnits.
9-
10-
### [2020/08/11]
11-
* The DxfDocument class derives from DxfObject for convenience of this library not because of the DXF structure. It can contain external data information XData, but it will not be saved in the DXF.
12-
* (fixed) Table collection handles that are saved in the DXF OBJECTS section were not preserved.
13-
* (fixed) The RasterVariables object didn't have an owner.
14-
15-
### [2020/08/10]
165
* All classes derived from DxfObject can contain XData (extended data).
176
The TextStyles and ShapeStyles extended data information will be combined into the DXF STYLE table.
18-
* Deleted the IHasXData interface, it is not needed anymore.
19-
* The RasterVariables object is always saved, regardless if the document contains images or not.
7+
The DxfDocument class derives from DxfObject for convenience of this library not because of the DXF structure. It can contain external data information XData, but it will not be saved in the DXF.
8+
The public classes PolylineVertex and PolyfaceMeshVertex can contain extended data information XData, but they will not be saved in the DXF AutoCad crashes if they are.
9+
* Removed the IHasXData interface, it is not needed anymore.
10+
* Removed the AciColor methods ToTrueColor and FromTrueColor, they have no use outside the DxfWriter and DxfReader classes.
2011
* Removed the MaxCapacity limits from the TableObject collections, except for layouts that it is 256 = 255 (paper space) + 1 (model space) exceeding this limit may crash AutoCad.
2112
According to the AutoCad ActiveX documentation there is no limit, therefore the DXF code 70 maximum number of entries in table is obsolete, it represents a 16-bit integer value.
2213
* Removed the MaxCapacity property from the TableObject collections.
23-
24-
### [2020/08/04]
14+
* The RasterVariables object is always saved, regardless if the document contains images or not.
15+
* Added a check for the binary data record of the extended data. It cannot exceed 127 bytes, if needed divide it into multiples XDataCode.BinaryData records.
16+
* Added the main Viewport of the Layout, that was deleted in v2.3.0.
17+
* Added Swap method to the MathHelper class.
18+
* The block description is now loaded and saved to the DXF.
19+
* Removed the scale restrictions for the complex linetype segments. Even thought I would recommend to always use values greater than zero, you might not get the desired results.
20+
* Renamed LeaderPathType.StraightLineSegements to LeaderPathType.StraightLineSegments.
2521
* Renamed DxfObjectCode.LightWeightPolyline to DxfObjectCode.LwPolyline.
2622
* Renamed SubclassMarker.LightWeightPolyline to SubclassMarker.LwPolyline.
2723
* Force the use of the ASCII.WindowsCodePage encoding in the DxfReader class, just for cases where there was a problem reading the codepage from the file.
24+
* Misspelling corrections.
25+
* (fixed) Table collection handles that are saved in the DXF OBJECTS section were not preserved.
26+
* (fixed) The RasterVariables object didn't have an owner.
2827
* (fixed) Index to RGB color equivalent in the AciColor class.
2928
* (fixed) The FrozenLayers list of the Viewport entity cannot contain null items or layers that belong to different documents.
3029
* (fixed) When an open LwPolyline is converted to a set of vertexes (PolygonalVertexes method) the last vertex will not be welded to the first if they fall inside the defined threshold.
31-
32-
### [2020/03/01]
33-
* Added a check for the binary data record of the extended data. It cannot exceed 127 bytes, if needed divide it into multiples XDataCode.BinaryData records.
34-
* Removed the scale restrictions for the complex linetype segments. Even thought I would recommend to always use values greater than zero, you might not get the desired results.
3530
* (fixed) Renaming Layouts associated blocks.
36-
37-
### [2020/01/26]
38-
* (fixed) More issues with the transformation of Ellipse arcs.
39-
40-
### [2020/01/07]
41-
* Misspelling corrections.
42-
* Renamed LeaderPathType.StraightLineSegements to LeaderPathType.StraightLineSegments
43-
44-
### [2019/12/30]
4531
* (fixed) Issue with the start and end angles when performing symmetries in Arc entities:
4632
* (fixed) Issue with the start and end angles when performing symmetries in Ellipse arc entities:
47-
48-
### [2019/12/21]
49-
* Additional change related to pull request #150. Force the use of the ASCII.WindowsCodePage encoding in the DxfReader class, just for cases where there was a problem reading the codepage from the file.
50-
51-
### [2019/12/19]
5233
* (fixed) Error when trying to copy to clipboard inside AutoCAD for DXF files saved with netDXF that contains the header variables $INTERFEREOBJVS and $INTERFEREVPVS, since this variables refer to visual style information that netDxf does not save. This variables will not be loaded in case they appear in a DXF.
5334
* (fixed) After loading a DXF the layouts associated blocks will be renamed to strictly follow *Paper_Space, *Paper_Space0, *Paper_Space1,...
5435
* (fixed) Transforming an ellipse might not show the correct result under special circumstances.
55-
56-
### [2019/09/20]
57-
* Added the main Viewport of the Layout, that was deleted in v2.3.0.
58-
* The block description is now loaded and saved to the DXF.
5936
* (fixed) Issue when renaming layouts.
6037
* (fixed) Issue when removing layouts.
61-
62-
### [2019/09/09]
6338
* (fixed) The LinearDimension block that represents the dimension drawing was not generated correctly. Now, the extension lines should not appear crossed under some circumstances.
6439
* (fixed) The MathHelper methods PointInSegment will consider the start and end points as part of the segment.
6540
* (fixed) The MathHelper method NormalizeAngle will not round almost zero angles automatically.
66-
67-
### [2019/08/30]
68-
* (fixed) Hotfix for previous update. The DimensionStyle FitDimLineInside (DIMSOXD value) now is read correctly when it is part of a dimension style override.
69-
70-
### [2019/08/30]
7141
* (fixed) The DimensionStyle FitDimLineInside (DIMSOXD value) was used incorrectly, when it was true is should be false and vice versa.
72-
73-
### [2019/08/16]
74-
* (fixed) When a Block is created form a DxfDocument or DXF file, any Hatch entity that it may contain will have its associative property set to false.
75-
This will avoid problems when the same entity its associated to multiple hatches, or when any of any of its paths is defined by the intersection of several entities.
42+
* (fixed) When a Block is created form a DxfDocument or DXF file, any Hatch entity that it may contain will have its associative property set to false. This will avoid problems when the same entity its associated to multiple hatches, or when any of any of its paths is defined by the intersection of several entities.
7643
* (fixed) When cloning (Clone) a Hatch entity its associative property will be set to false, to avoid problems when the same entity its associated to multiple hatches.
7744
* (fixed) When transforming (TransformBy) a Hatch entity its associative property will be set to false, to avoid problems when the same entity its associated to multiple hatches.
78-
79-
### [2019/08/12]
8045
* (fixed) Fixed a few issues with the tolerances display method in the dimension style and its equivalent override.
81-
82-
### [2019/07/01]
83-
* Added Swap method to the MathHelper class.
8446
* (fixed) Issue with LinearDimension entities related to its rotation, when the were loaded from a DXF file.
8547
* (fixed) Comment in TextVerticalPlacement property of the DimensionStyle class, the default value is Centered not Above.
8648

@@ -144,7 +106,7 @@
144106
* (fixed) Adding and removing the annotation of a leader, when it already belongs to a document, will be automatically add and remove, respectively, the entity from the document.
145107
* (fixed) When cloning a Viewport the frozen layers were not being cloned.
146108
* (fixed) When writing a DXF the Tolerance code 73 is 0 for both Text and MText annotations.
147-
* (fixed) Radial and Diametric dimensions not showing the "R" and "�" when no prefix is use in the dimension style.
109+
* (fixed) Radial and Diametric dimensions not showing the "R" and "�" when no prefix is use in the dimension style.
148110
* (fixed) The MLineStyleElements needs to be ordered from larger to smaller offset values.
149111
* (fixed) Bug when creating boundary paths for hatches when the normal was not the UnitZ (0,0,1).
150112
* (fixed) Only a single HatchBoundary.Edge of type Polyline can be used to initialize a hatch boundary, it also must always be closed.

doc/netDxf Documentation.chm

10.3 KB
Binary file not shown.

netDxf/netDxf.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@
7171
<PropertyGroup>
7272
<StartupObject />
7373
</PropertyGroup>
74+
<PropertyGroup>
75+
<SignAssembly>true</SignAssembly>
76+
</PropertyGroup>
77+
<PropertyGroup>
78+
<AssemblyOriginatorKeyFile>netDxf.snk</AssemblyOriginatorKeyFile>
79+
</PropertyGroup>
7480
<ItemGroup>
7581
<Reference Include="System" />
7682
<Reference Include="System.Drawing" />
@@ -348,6 +354,9 @@
348354
<Install>true</Install>
349355
</BootstrapperPackage>
350356
</ItemGroup>
357+
<ItemGroup>
358+
<None Include="netDxf.snk" />
359+
</ItemGroup>
351360
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
352361
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
353362
Other similar extension points exist, see Microsoft.Common.targets.

netDxf/netDxf.snk

596 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)