Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 178 #179

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,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 @@ -2917,9 +2918,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 @@ -2941,7 +2943,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
Loading