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

Commit

Permalink
[2021/03/11]
Browse files Browse the repository at this point in the history
* Now the ShapeStyle does not require the SHP file to read the shape information only the SHX must be present.
* Deleted the Insert constructor "public Insert(Block block, Vector3 position, double scale)", change the Scale property instead.
  • Loading branch information
haplokuon committed Mar 11, 2021
1 parent aee2e64 commit 67636f0
Show file tree
Hide file tree
Showing 3 changed files with 463 additions and 167 deletions.
4 changes: 4 additions & 0 deletions doc/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Change history

### [2021/03/11]
* Now the ShapeStyle does not require the SHP file to read the shape information only the SHX must be present.
* Deleted the Insert constructor "public Insert(Block block, Vector3 position, double scale)", change the Scale property instead.

### [2021/03/08]
* The Insert Sync method will not modify any value assigned to the attribute Value property.
* (fixed) A couple errors when writing the style overrides of a dimension to the extended data.
Expand Down
20 changes: 3 additions & 17 deletions netDxf/Entities/Insert.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#region netDxf library, Copyright (C) 2009-2019 Daniel Carvajal (haplokuon@gmail.com)
#region netDxf library, Copyright (C) 2009-2021 Daniel Carvajal (haplokuon@gmail.com)

// netDxf library
// Copyright (C) 2009-2019 Daniel Carvajal (haplokuon@gmail.com)
// Copyright (C) 2009-2021 Daniel Carvajal (haplokuon@gmail.com)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -138,16 +138,6 @@ public Insert(Block block, Vector2 position)
/// <param name="block">Insert block definition.</param>
/// <param name="position">Insert <see cref="Vector3">point</see> in world coordinates.</param>
public Insert(Block block, Vector3 position)
: this(block, position, 1.0)
{
}

/// <summary>
/// Initializes a new instance of the <c>Insert</c> class.
/// </summary>
/// <param name="block">Insert block definition.</param>
/// <param name="position">Insert <see cref="Vector3">point</see> in world coordinates.</param>
public Insert(Block block, Vector3 position, double scale)
: base(EntityType.Insert, DxfObjectCode.Insert)
{
if (block == null)
Expand All @@ -157,11 +147,7 @@ public Insert(Block block, Vector3 position, double scale)

this.block = block;
this.position = position;
if (scale <= 0)
{
throw new ArgumentOutOfRangeException(nameof(scale), scale, "The Insert scale must be greater than zero.");
}
this.scale = new Vector3(scale);
this.scale = new Vector3(1.0);
this.rotation = 0.0;
this.endSequence = new EndSequence(this);

Expand Down
Loading

0 comments on commit 67636f0

Please sign in to comment.