Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/DwgWriter-entities' into DwgWrit…
Browse files Browse the repository at this point in the history
…er-dictionaries
  • Loading branch information
DomCR committed Oct 14, 2023
2 parents c3271e5 + 20b5fd8 commit b592fac
Show file tree
Hide file tree
Showing 7 changed files with 414 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ACadSharp.Tests/IO/LocalSampleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void ReadUserDwg(string test)

CadDocument doc = DwgReader.Read(test, this._dwgConfiguration, this.onNotification);

//return;
return;

string outPath = Path.Combine(Path.GetDirectoryName(test), $"{Path.GetFileNameWithoutExtension(test)}.out.dxf");
using (DxfWriter writer = new DxfWriter(outPath, doc, false))
Expand Down
2 changes: 1 addition & 1 deletion ACadSharp/ACadSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Version>1.5.0-alpha</Version>
<Version>1.5.1-alpha</Version>
</PropertyGroup>

<Import Project="..\CSUtilities\CSMath\CSMath.projitems" Label="Shared" />
Expand Down
11 changes: 6 additions & 5 deletions ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2272,7 +2272,8 @@ private CadTemplate readViewport()
if (this.R2000Plus)
{
for (int i = 0; i < frozenLayerCount; ++i)
//H 341 Frozen Layer Handles(use count from above)(hard pointer until R2000, soft pointer from R2004 onwards)
//H 341 Frozen Layer Handles(use count from above)
//(hard pointer until R2000, soft pointer from R2004 onwards)
template.FrozenLayerHandles.Add(this.handleReference());

//H 340 Clip boundary handle(soft pointer)
Expand Down Expand Up @@ -2922,9 +2923,10 @@ private CadTemplate readBlockHeader()

//R2000+:
if (this.R2000Plus)
{
//Loaded Bit B 0 indicates loaded for an xref
if (this._objectReader.ReadBit())
block.Flags |= BlockTypeFlags.XRef;
this._objectReader.ReadBit();
}

//R2004+:
int nownedObjects = 0;
Expand All @@ -2946,7 +2948,7 @@ private CadTemplate readBlockHeader()
if (this.R2000Plus)
{
//Insert Count RC A sequence of zero or more non-zero RC’s, followed by a terminating 0 RC.The total number of these indicates how many insert handles will be present.
for (byte i = this._objectReader.ReadByte(); i > 0; i = this._objectReader.ReadByte())
for (byte i = this._objectReader.ReadByte(); i != 0; i = this._objectReader.ReadByte())
++insertCount;

//Block Description TV 4 Block description.
Expand Down Expand Up @@ -4433,7 +4435,6 @@ private CadTemplate readHatch()

//numboundaryobjhandles BL 97 Number of boundary object handles for this path
int numboundaryobjhandles = this._objectReader.ReadBitLong();

for (int h = 0; h < numboundaryobjhandles; h++)
{
//boundaryhandle H 330 boundary handle(soft pointer)
Expand Down
Loading

0 comments on commit b592fac

Please sign in to comment.