From ad9289b30c15eb20e0b55f1c0e2f5f3d8577c305 Mon Sep 17 00:00:00 2001 From: DomCR Date: Tue, 24 Sep 2024 12:01:52 +0200 Subject: [PATCH 1/4] submodules --- src/CSUtilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CSUtilities b/src/CSUtilities index bfd1ba4e..d03bb020 160000 --- a/src/CSUtilities +++ b/src/CSUtilities @@ -1 +1 @@ -Subproject commit bfd1ba4e2117d086850a1f01a81121fab08345d6 +Subproject commit d03bb0208febed107485abdabac4a466cd043bdc From 9d95a94f9fda365471e58c551f3f51634c665886 Mon Sep 17 00:00:00 2001 From: DomCR Date: Tue, 24 Sep 2024 12:13:08 +0200 Subject: [PATCH 2/4] update utilities --- src/ACadSharp/Entities/Arc.cs | 4 +- .../DxfStreamReader/DxfSectionReaderBase.cs | 4 +- .../DxfStreamReader/DxfStreamReaderBase.cs | 3 +- .../DxfStreamReader/DxfTablesSectionReader.cs | 2 +- .../DxfSectionWriterBase.Entities.cs | 2 +- .../DxfStreamWriter/DxfStreamWriterBase.cs | 5 ++- .../DxfStreamWriter/DxfTablesSectionWriter.cs | 3 +- src/ACadSharp/IO/Templates/CadArcTemplate.cs | 11 +---- src/ACadSharp/MathUtils.cs | 45 +------------------ src/ACadSharp/Tables/DimensionStyle.cs | 2 +- src/CSUtilities | 2 +- 11 files changed, 17 insertions(+), 66 deletions(-) diff --git a/src/ACadSharp/Entities/Arc.cs b/src/ACadSharp/Entities/Arc.cs index dc7cbba2..0d89dac9 100644 --- a/src/ACadSharp/Entities/Arc.cs +++ b/src/ACadSharp/Entities/Arc.cs @@ -118,8 +118,8 @@ public List PolygonalVertexes(int precision) double cosine = this.Radius * Math.Cos(angle); double sine = this.Radius * Math.Sin(angle); - cosine = MathUtils.IsZero(cosine) ? 0 : cosine; - sine = MathUtils.IsZero(sine) ? 0 : sine; + cosine = Utilities.IsZero(cosine) ? 0 : cosine; + sine = Utilities.IsZero(sine) ? 0 : sine; ocsVertexes.Add(new XY(cosine, sine)); } diff --git a/src/ACadSharp/IO/DXF/DxfStreamReader/DxfSectionReaderBase.cs b/src/ACadSharp/IO/DXF/DxfStreamReader/DxfSectionReaderBase.cs index 26030894..5573bc27 100644 --- a/src/ACadSharp/IO/DXF/DxfStreamReader/DxfSectionReaderBase.cs +++ b/src/ACadSharp/IO/DXF/DxfStreamReader/DxfSectionReaderBase.cs @@ -374,7 +374,7 @@ private bool readDimension(CadEntityTemplate template, DxfMap map, string subcla case 50: var dim = new DimensionLinear(); tmp.SetDimensionObject(dim); - dim.Rotation = CSMath.MathUtils.DegToRad(this._reader.ValueAsDouble); + dim.Rotation = CSMath.Utilities.DegToRad(this._reader.ValueAsDouble); map.SubClasses.Add(DxfSubclassMarker.LinearDimension, DxfClassMap.Create()); return true; case 70: @@ -1395,7 +1395,7 @@ protected bool tryAssignCurrentValue(CadObject cadObject, DxfClassMap map) if (dxfProperty.ReferenceType.HasFlag(DxfReferenceType.IsAngle)) { - value = (double)value * MathUtils.DegToRadFactor; + value = (double)value * Utilities.DegToRadFactor; } dxfProperty.SetValue(this._reader.Code, cadObject, value); diff --git a/src/ACadSharp/IO/DXF/DxfStreamReader/DxfStreamReaderBase.cs b/src/ACadSharp/IO/DXF/DxfStreamReader/DxfStreamReaderBase.cs index 8e34f3fc..a2235cb6 100644 --- a/src/ACadSharp/IO/DXF/DxfStreamReader/DxfStreamReaderBase.cs +++ b/src/ACadSharp/IO/DXF/DxfStreamReader/DxfStreamReaderBase.cs @@ -1,4 +1,5 @@ using ACadSharp.Exceptions; +using CSMath; using System; using System.IO; @@ -42,7 +43,7 @@ public string ValueAsString public double ValueAsDouble { get { return Convert.ToDouble(this.Value); } } - public double ValueAsAngle { get { return (double)(Convert.ToDouble(this.Value) * MathUtils.RadToDegFactor); } } + public double ValueAsAngle { get { return (double)(Convert.ToDouble(this.Value) * Utilities.RadToDegFactor); } } public ulong ValueAsHandle { get { return (ulong)this.Value; } } diff --git a/src/ACadSharp/IO/DXF/DxfStreamReader/DxfTablesSectionReader.cs b/src/ACadSharp/IO/DXF/DxfStreamReader/DxfTablesSectionReader.cs index c1978b2a..ec321f9a 100644 --- a/src/ACadSharp/IO/DXF/DxfStreamReader/DxfTablesSectionReader.cs +++ b/src/ACadSharp/IO/DXF/DxfStreamReader/DxfTablesSectionReader.cs @@ -356,7 +356,7 @@ private bool readDimensionStyle(CadTableEntryTemplate template, template.CadObject.FixedExtensionLineLength = this._reader.ValueAsDouble; return true; case 50: - template.CadObject.JoggedRadiusDimensionTransverseSegmentAngle = CSMath.MathUtils.DegToRad(this._reader.ValueAsDouble); + template.CadObject.JoggedRadiusDimensionTransverseSegmentAngle = CSMath.Utilities.DegToRad(this._reader.ValueAsDouble); return true; case 69: template.CadObject.TextBackgroundFillMode = (DimensionTextBackgroundFillMode)this._reader.ValueAsShort; diff --git a/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfSectionWriterBase.Entities.cs b/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfSectionWriterBase.Entities.cs index c3c679d2..e6da0ed1 100644 --- a/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfSectionWriterBase.Entities.cs +++ b/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfSectionWriterBase.Entities.cs @@ -406,7 +406,7 @@ private void writeHatchPattern(Hatch hatch, HatchPattern pattern) if (!hatch.IsSolid) { - this._writer.Write(52, pattern.Angle * MathUtils.RadToDegFactor); + this._writer.Write(52, pattern.Angle * Utilities.RadToDegFactor); this._writer.Write(41, pattern.Scale); this._writer.Write(77, (short)(hatch.IsDouble ? 1 : 0)); this._writer.Write(78, (short)pattern.Lines.Count); diff --git a/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfStreamWriterBase.cs b/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfStreamWriterBase.cs index d996f6d4..fef4446e 100644 --- a/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfStreamWriterBase.cs +++ b/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfStreamWriterBase.cs @@ -1,4 +1,5 @@ -using CSUtilities.Converters; +using CSMath; +using CSUtilities.Converters; using System; @@ -92,7 +93,7 @@ public void Write(int code, object value, DxfClassMap map) if (prop.ReferenceType.HasFlag(DxfReferenceType.IsAngle)) { - value = (double)value * MathUtils.RadToDegFactor; + value = (double)value * Utilities.RadToDegFactor; } } diff --git a/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfTablesSectionWriter.cs b/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfTablesSectionWriter.cs index e68dc619..1ce72c46 100644 --- a/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfTablesSectionWriter.cs +++ b/src/ACadSharp/IO/DXF/DxfStreamWriter/DxfTablesSectionWriter.cs @@ -1,5 +1,6 @@ using ACadSharp.Tables; using ACadSharp.Tables.Collections; +using CSMath; using System; using System.Linq; @@ -276,7 +277,7 @@ private void writeLineType(LineType linetype, DxfClassMap map) } this._writer.Write(46, s.Scale); - this._writer.Write(50, s.Rotation * MathUtils.DegToRadFactor); + this._writer.Write(50, s.Rotation * Utilities.DegToRadFactor); this._writer.Write(44, s.Offset.X); this._writer.Write(45, s.Offset.Y); this._writer.Write(9, s.Text); diff --git a/src/ACadSharp/IO/Templates/CadArcTemplate.cs b/src/ACadSharp/IO/Templates/CadArcTemplate.cs index 4ee4cfe7..af96f5da 100644 --- a/src/ACadSharp/IO/Templates/CadArcTemplate.cs +++ b/src/ACadSharp/IO/Templates/CadArcTemplate.cs @@ -1,6 +1,5 @@ using System; using ACadSharp.Entities; -using ACadSharp.IO.DXF; namespace ACadSharp.IO.Templates { @@ -13,17 +12,9 @@ public CadArcTemplate() : base(new Arc()) { } public CadArcTemplate(Entity entity) : base(entity) { } - public override void Build(CadDocumentBuilder builder) + public override void Build(CadDocumentBuilder builder) { base.Build(builder); - - return; - - if (builder is DxfDocumentBuilder && this.CadObject is Arc arc) - { - arc.StartAngle *= MathUtils.DegToRadFactor; - arc.EndAngle *= MathUtils.DegToRadFactor; - } } } } diff --git a/src/ACadSharp/MathUtils.cs b/src/ACadSharp/MathUtils.cs index 75e4c051..23966f60 100644 --- a/src/ACadSharp/MathUtils.cs +++ b/src/ACadSharp/MathUtils.cs @@ -5,49 +5,6 @@ namespace ACadSharp { public static class MathUtils { - /// - /// Factor for converting radians to degrees. - /// - public const double RadToDegFactor = (180 / Math.PI); - - /// - /// Factor for converting degrees to radians. - /// - public const double DegToRadFactor = (Math.PI / 180); - - public const double Epsilon = 1e-12; - - /// - /// Checks if a number is close to zero. - /// - /// Double precision number. - /// True if its close to one or false in any other case. - public static bool IsZero(double number) - { - return IsZero(number, Epsilon); - } - - /// - /// Checks if a number is close to zero. - /// - /// Double precision number. - /// Tolerance. - /// True if its close to one or false in any other case. - public static bool IsZero(double number, double threshold) - { - return number >= -threshold && number <= threshold; - } - - public static double RadToDeg(double value) - { - return value * RadToDegFactor; - } - - public static double DegToRad(double value) - { - return value * DegToRadFactor; - } - public static XY GetCenter(XY start, XY end, double bulge) { return GetCenter(start, end, bulge, out _); @@ -61,7 +18,7 @@ public static XY GetCenter(XY start, XY end, double bulge, out double radius) double gamma = (Math.PI - theta) / 2; double phi = (end - start).GetAngle() + Math.Sign(bulge) * gamma; - return new XY(start.X + radius * CSMath.MathUtils.Cos(phi), start.Y + radius * CSMath.MathUtils.Sin(phi)); + return new XY(start.X + radius * CSMath.Utilities.Cos(phi), start.Y + radius * CSMath.Utilities.Sin(phi)); } /// diff --git a/src/ACadSharp/Tables/DimensionStyle.cs b/src/ACadSharp/Tables/DimensionStyle.cs index d990d726..9a747f47 100644 --- a/src/ACadSharp/Tables/DimensionStyle.cs +++ b/src/ACadSharp/Tables/DimensionStyle.cs @@ -538,7 +538,7 @@ public double JoggedRadiusDimensionTransverseSegmentAngle set { //5 - 90 - if (value < CSMath.MathUtils.DegToRad(5) || value > Math.PI / 2) + if (value < CSMath.Utilities.DegToRad(5) || value > Math.PI / 2) { throw new ArgumentOutOfRangeException(nameof(value), value, $"The {nameof(JoggedRadiusDimensionTransverseSegmentAngle)} must be in range of 5 to 90 degrees."); } diff --git a/src/CSUtilities b/src/CSUtilities index d03bb020..c42c0e20 160000 --- a/src/CSUtilities +++ b/src/CSUtilities @@ -1 +1 @@ -Subproject commit d03bb0208febed107485abdabac4a466cd043bdc +Subproject commit c42c0e20dcaaadda45ee537041ac4312d2b2ad89 From 821b99710342d90a7add465b41365a9d3d8f27de Mon Sep 17 00:00:00 2001 From: DomCR Date: Tue, 24 Sep 2024 12:22:33 +0200 Subject: [PATCH 3/4] entity abstract methods --- src/ACadSharp/Entities/Entity.cs | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/ACadSharp/Entities/Entity.cs b/src/ACadSharp/Entities/Entity.cs index 0e1d9f2c..0ccb3c88 100644 --- a/src/ACadSharp/Entities/Entity.cs +++ b/src/ACadSharp/Entities/Entity.cs @@ -93,7 +93,32 @@ public LineType LineType public Entity() : base() { } /// - /// Gets the bounding box aligned with the axis XYZ that ocupies this entity + /// Apply a translation to this entity. + /// + /// + public abstract void Translate(XYZ translation); + + /// + /// Apply a rotation to this entity. + /// + /// + /// + public abstract void Rotate(double rotation, XYZ axis); + + /// + /// Apply a scale to this entity. + /// + /// + public abstract void Scale(XYZ scale); + + /// + /// Apply a transform matrix to this entity. + /// + /// + public abstract void ApplyTransform(Transform transform); + + /// + /// Gets the bounding box aligned with the axis XYZ that occupies this entity /// /// public abstract BoundingBox GetBoundingBox(); From cbcc68deaedbab17b3eb58e679ae3cbfc11340b0 Mon Sep 17 00:00:00 2001 From: DomCR Date: Tue, 24 Sep 2024 15:53:31 +0200 Subject: [PATCH 4/4] implementation --- .../Entities/CommonEntityTests.cs | 25 +++++++++++++ src/ACadSharp.Tests/Entities/PointTests.cs | 26 ++++++++++++++ src/ACadSharp.Tests/IO/IOTestsBase.cs | 2 +- src/ACadSharp/Blocks/Block.cs | 26 +++++++++++++- src/ACadSharp/Blocks/BlockEnd.cs | 24 +++++++++++++ src/ACadSharp/Entities/CadImageBase.cs | 20 +++++++++++ src/ACadSharp/Entities/Circle.cs | 20 +++++++++++ src/ACadSharp/Entities/Dimension.cs | 8 ++--- src/ACadSharp/Entities/DimensionAligned.cs | 20 +++++++++++ .../Entities/DimensionAngular2Line.cs | 20 +++++++++++ src/ACadSharp/Entities/DimensionAngular3Pt.cs | 20 +++++++++++ src/ACadSharp/Entities/DimensionDiameter.cs | 20 +++++++++++ src/ACadSharp/Entities/DimensionOrdinate.cs | 20 +++++++++++ src/ACadSharp/Entities/DimensionRadius.cs | 20 +++++++++++ src/ACadSharp/Entities/Ellipse.cs | 20 +++++++++++ src/ACadSharp/Entities/Face3D.cs | 20 +++++++++++ .../Entities/Hatch.BoundaryPath.Arc.cs | 12 +++---- src/ACadSharp/Entities/Hatch.cs | 21 +++++++++++ src/ACadSharp/Entities/Insert.cs | 20 +++++++++++ src/ACadSharp/Entities/Leader.cs | 20 +++++++++++ src/ACadSharp/Entities/Line.cs | 20 +++++++++++ src/ACadSharp/Entities/LwPolyLine.cs | 21 +++++++++++ src/ACadSharp/Entities/MLine.cs | 21 +++++++++++ src/ACadSharp/Entities/MText.cs | 20 +++++++++++ src/ACadSharp/Entities/Mesh.cs | 21 +++++++++++ src/ACadSharp/Entities/MultiLeader.cs | 36 ++++++++++++++----- src/ACadSharp/Entities/Point.cs | 20 +++++++++++ src/ACadSharp/Entities/PolyLine.cs | 21 +++++++++++ src/ACadSharp/Entities/Ray.cs | 20 +++++++++++ src/ACadSharp/Entities/Seqend.cs | 20 +++++++++++ src/ACadSharp/Entities/Shape.cs | 20 +++++++++++ src/ACadSharp/Entities/Solid.cs | 20 +++++++++++ src/ACadSharp/Entities/Solid3D.cs | 20 +++++++++++ src/ACadSharp/Entities/Spline.cs | 22 +++++++++++- src/ACadSharp/Entities/TextEntity.cs | 20 +++++++++++ src/ACadSharp/Entities/Tolerance.cs | 20 +++++++++++ src/ACadSharp/Entities/UnderlayEntity.cs | 20 +++++++++++ src/ACadSharp/Entities/UnknownEntity.cs | 21 +++++++++++ src/ACadSharp/Entities/Vertex.cs | 21 +++++++++++ src/ACadSharp/Entities/ViewPort.cs | 20 +++++++++++ src/ACadSharp/Entities/XLine.cs | 20 +++++++++++ .../IO/Templates/CadDimensionTemplate.cs | 20 +++++++++++ 42 files changed, 827 insertions(+), 21 deletions(-) create mode 100644 src/ACadSharp.Tests/Entities/CommonEntityTests.cs create mode 100644 src/ACadSharp.Tests/Entities/PointTests.cs diff --git a/src/ACadSharp.Tests/Entities/CommonEntityTests.cs b/src/ACadSharp.Tests/Entities/CommonEntityTests.cs new file mode 100644 index 00000000..bbbf5d08 --- /dev/null +++ b/src/ACadSharp.Tests/Entities/CommonEntityTests.cs @@ -0,0 +1,25 @@ +using ACadSharp.Entities; +using Xunit; + +namespace ACadSharp.Tests.Entities +{ + public abstract class CommonEntityTests + where T : Entity, new() + { + [Fact] + public void DefaultConstructor() + { + T entity = new T(); + + Assert.NotNull(entity); + Assert.True(0 == entity.Handle); + + Assert.NotEqual(ObjectType.UNDEFINED, entity.ObjectType); + + Assert.False(string.IsNullOrEmpty(entity.ObjectName)); + Assert.False(string.IsNullOrEmpty(entity.SubclassMarker)); + + Assert.Null(entity.XDictionary); + } + } +} diff --git a/src/ACadSharp.Tests/Entities/PointTests.cs b/src/ACadSharp.Tests/Entities/PointTests.cs new file mode 100644 index 00000000..f8bd6b36 --- /dev/null +++ b/src/ACadSharp.Tests/Entities/PointTests.cs @@ -0,0 +1,26 @@ +using ACadSharp.Entities; +using ACadSharp.Tests.Common; +using CSMath; +using Xunit; + +namespace ACadSharp.Tests.Entities +{ + public class PointTests : CommonEntityTests + { + private CSMathRandom _random = new CSMathRandom(); + + [Fact] + public void TranslateTest() + { + XYZ init = _random.Next(); + XYZ translation = _random.Next(); + XYZ result = init + translation; + + Point point = new Point(init); + + point.Translate(translation); + + AssertUtils.AreEqual(result, point.Location, "Point Location"); + } + } +} diff --git a/src/ACadSharp.Tests/IO/IOTestsBase.cs b/src/ACadSharp.Tests/IO/IOTestsBase.cs index 608165a8..abd0887d 100644 --- a/src/ACadSharp.Tests/IO/IOTestsBase.cs +++ b/src/ACadSharp.Tests/IO/IOTestsBase.cs @@ -97,7 +97,7 @@ protected static void loadSamples(string folder, string ext, TheoryData /// - /// Cloning a block will also unatach it from the record + /// Cloning a block will also unattached it from the record /// public override CadObject Clone() { @@ -86,6 +86,30 @@ public override CadObject Clone() return clone; } + /// + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + /// + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + /// + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } + + /// public override BoundingBox GetBoundingBox() { BoundingBox box = BoundingBox.Null; diff --git a/src/ACadSharp/Blocks/BlockEnd.cs b/src/ACadSharp/Blocks/BlockEnd.cs index 9629d02d..3850e7cd 100644 --- a/src/ACadSharp/Blocks/BlockEnd.cs +++ b/src/ACadSharp/Blocks/BlockEnd.cs @@ -43,5 +43,29 @@ public override BoundingBox GetBoundingBox() { return BoundingBox.Null; } + + /// + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + /// + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + /// + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + /// + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/CadImageBase.cs b/src/ACadSharp/Entities/CadImageBase.cs index d917d42e..93cf7486 100644 --- a/src/ACadSharp/Entities/CadImageBase.cs +++ b/src/ACadSharp/Entities/CadImageBase.cs @@ -189,6 +189,26 @@ internal ImageDefinitionReactor DefinitionReactor private ImageDefinition _definition; private ImageDefinitionReactor _definitionReactor; + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + /// public override BoundingBox GetBoundingBox() { diff --git a/src/ACadSharp/Entities/Circle.cs b/src/ACadSharp/Entities/Circle.cs index 3e7aa66d..9106feaf 100644 --- a/src/ACadSharp/Entities/Circle.cs +++ b/src/ACadSharp/Entities/Circle.cs @@ -73,5 +73,25 @@ public override BoundingBox GetBoundingBox() XYZ max = new XYZ(Math.Max(this.Center.X - this.Radius, this.Center.X + this.Radius), Math.Max(this.Center.Y - this.Radius, this.Center.Y + this.Radius), Math.Max(this.Center.Z, this.Center.Z)); return new BoundingBox(min, max); } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Dimension.cs b/src/ACadSharp/Entities/Dimension.cs index e98fb879..11904f55 100644 --- a/src/ACadSharp/Entities/Dimension.cs +++ b/src/ACadSharp/Entities/Dimension.cs @@ -128,8 +128,8 @@ public bool IsTextUserDefinedLocation /// true if the arrow is to be flipped; otherwise, false. /// /// - /// Arrows are by default drawn inside the extension lines if there is enaugh - /// space; otherwise, outside. This flag overrules the standard behaviour. + /// Arrows are by default drawn inside the extension lines if there is enough + /// space; otherwise, outside. This flag overrules the standard behavior. /// [DxfCodeValue(74)] public bool FlipArrow1 { get; set; } @@ -142,8 +142,8 @@ public bool IsTextUserDefinedLocation /// true if the arrow is to be flipped; otherwise, false. /// /// - /// Arrows are by default drawn inside the extension lines if there is enaugh - /// space; otherwise, outside. This flag overrules the standard behaviour. + /// Arrows are by default drawn inside the extension lines if there is enough + /// space; otherwise, outside. This flag overrules the standard behavior. /// [DxfCodeValue(75)] public bool FlipArrow2 { get; set; } diff --git a/src/ACadSharp/Entities/DimensionAligned.cs b/src/ACadSharp/Entities/DimensionAligned.cs index 74beb1ae..4ace48e0 100644 --- a/src/ACadSharp/Entities/DimensionAligned.cs +++ b/src/ACadSharp/Entities/DimensionAligned.cs @@ -64,5 +64,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.FirstPoint, this.SecondPoint); } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/DimensionAngular2Line.cs b/src/ACadSharp/Entities/DimensionAngular2Line.cs index ada1b1e2..a9c8e617 100644 --- a/src/ACadSharp/Entities/DimensionAngular2Line.cs +++ b/src/ACadSharp/Entities/DimensionAngular2Line.cs @@ -71,5 +71,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.FirstPoint, this.SecondPoint); } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/DimensionAngular3Pt.cs b/src/ACadSharp/Entities/DimensionAngular3Pt.cs index 3cc87510..9f487de1 100644 --- a/src/ACadSharp/Entities/DimensionAngular3Pt.cs +++ b/src/ACadSharp/Entities/DimensionAngular3Pt.cs @@ -74,5 +74,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.FirstPoint, this.SecondPoint); } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/DimensionDiameter.cs b/src/ACadSharp/Entities/DimensionDiameter.cs index bd8972df..a8482844 100644 --- a/src/ACadSharp/Entities/DimensionDiameter.cs +++ b/src/ACadSharp/Entities/DimensionDiameter.cs @@ -54,5 +54,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.InsertionPoint - this.AngleVertex, this.InsertionPoint + this.AngleVertex); } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/DimensionOrdinate.cs b/src/ACadSharp/Entities/DimensionOrdinate.cs index 72d03850..a9982e92 100644 --- a/src/ACadSharp/Entities/DimensionOrdinate.cs +++ b/src/ACadSharp/Entities/DimensionOrdinate.cs @@ -87,5 +87,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.FeatureLocation, this.LeaderEndpoint); } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/DimensionRadius.cs b/src/ACadSharp/Entities/DimensionRadius.cs index f8a0b5c6..4a63bda8 100644 --- a/src/ACadSharp/Entities/DimensionRadius.cs +++ b/src/ACadSharp/Entities/DimensionRadius.cs @@ -54,5 +54,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.InsertionPoint - this.AngleVertex, this.InsertionPoint + this.AngleVertex); } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Ellipse.cs b/src/ACadSharp/Entities/Ellipse.cs index 32716e56..b8c1cd45 100644 --- a/src/ACadSharp/Entities/Ellipse.cs +++ b/src/ACadSharp/Entities/Ellipse.cs @@ -72,10 +72,30 @@ public class Ellipse : Entity [DxfCodeValue(42)] public double EndParameter { get; set; } = Math.PI * 2; + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + /// public override BoundingBox GetBoundingBox() { return BoundingBox.Null; } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Face3D.cs b/src/ACadSharp/Entities/Face3D.cs index 8c80a8ae..162ab483 100644 --- a/src/ACadSharp/Entities/Face3D.cs +++ b/src/ACadSharp/Entities/Face3D.cs @@ -64,5 +64,25 @@ public override BoundingBox GetBoundingBox() { return BoundingBox.FromPoints(new List { this.FirstCorner, this.SecondCorner, this.ThirdCorner, this.FourthCorner }); } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Hatch.BoundaryPath.Arc.cs b/src/ACadSharp/Entities/Hatch.BoundaryPath.Arc.cs index 021d6990..e357292d 100644 --- a/src/ACadSharp/Entities/Hatch.BoundaryPath.Arc.cs +++ b/src/ACadSharp/Entities/Hatch.BoundaryPath.Arc.cs @@ -13,34 +13,34 @@ public class Arc : Edge public override EdgeType Type => EdgeType.CircularArc; /// - /// Center point (in OCS) + /// Center point (in OCS). /// [DxfCodeValue(10, 20)] public XY Center { get; set; } /// - /// Radius + /// Radius. /// /// - /// For the ellispe this is the length of minor axis (percentage of major axis length) + /// For the ellipse this is the length of minor axis (percentage of major axis length). /// [DxfCodeValue(40)] public double Radius { get; set; } /// - /// Start angle + /// Start angle. /// [DxfCodeValue(50)] public double StartAngle { get; set; } /// - /// End angle + /// End angle. /// [DxfCodeValue(51)] public double EndAngle { get; set; } /// - /// Is counterclockwise flag + /// Is counterclockwise flag. /// [DxfCodeValue(73)] public bool CounterClockWise { get; set; } diff --git a/src/ACadSharp/Entities/Hatch.cs b/src/ACadSharp/Entities/Hatch.cs index 0772261a..e16e7232 100644 --- a/src/ACadSharp/Entities/Hatch.cs +++ b/src/ACadSharp/Entities/Hatch.cs @@ -1,5 +1,6 @@ using ACadSharp.Attributes; using CSMath; +using System; using System.Collections.Generic; using System.Linq; @@ -132,6 +133,11 @@ public partial class Hatch : Entity /// public Hatch() : base() { } + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + /// public override BoundingBox GetBoundingBox() { @@ -154,5 +160,20 @@ public override CadObject Clone() return clone; } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Insert.cs b/src/ACadSharp/Entities/Insert.cs index 879f53b1..15c80789 100644 --- a/src/ACadSharp/Entities/Insert.cs +++ b/src/ACadSharp/Entities/Insert.cs @@ -229,5 +229,25 @@ private void attributesOnAdd(object sender, CollectionChangedEventArgs e) //TODO: Fix the relation between insert and block //this.Block?.Entities.Add(new AttributeDefinition(e.Item as AttributeEntity)); } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Leader.cs b/src/ACadSharp/Entities/Leader.cs index 1392ea11..0049873a 100644 --- a/src/ACadSharp/Entities/Leader.cs +++ b/src/ACadSharp/Entities/Leader.cs @@ -189,5 +189,25 @@ protected override void tableOnRemove(object sender, CollectionChangedEventArgs this.Style = this.Document.DimensionStyles[DimensionStyle.DefaultName]; } } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Line.cs b/src/ACadSharp/Entities/Line.cs index 959732ca..4cb85fb7 100644 --- a/src/ACadSharp/Entities/Line.cs +++ b/src/ACadSharp/Entities/Line.cs @@ -71,5 +71,25 @@ public override BoundingBox GetBoundingBox() return new BoundingBox(min, max); } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/LwPolyLine.cs b/src/ACadSharp/Entities/LwPolyLine.cs index e02c9690..e5fa0a95 100644 --- a/src/ACadSharp/Entities/LwPolyLine.cs +++ b/src/ACadSharp/Entities/LwPolyLine.cs @@ -1,6 +1,7 @@ using ACadSharp.Attributes; using CSMath; using CSUtilities.Extensions; +using System; using System.Collections.Generic; namespace ACadSharp.Entities @@ -117,5 +118,25 @@ public override BoundingBox GetBoundingBox() return new BoundingBox(min, max); } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/MLine.cs b/src/ACadSharp/Entities/MLine.cs index 79154276..00d25527 100644 --- a/src/ACadSharp/Entities/MLine.cs +++ b/src/ACadSharp/Entities/MLine.cs @@ -1,6 +1,7 @@ using ACadSharp.Attributes; using ACadSharp.Objects; using CSMath; +using System; using System.Collections.Generic; using System.Linq; @@ -116,6 +117,26 @@ public override BoundingBox GetBoundingBox() return BoundingBox.FromPoints(Vertices.Select(v => v.Position)); } + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + internal override void AssignDocument(CadDocument doc) { base.AssignDocument(doc); diff --git a/src/ACadSharp/Entities/MText.cs b/src/ACadSharp/Entities/MText.cs index 7f55e5ba..bb816c6e 100644 --- a/src/ACadSharp/Entities/MText.cs +++ b/src/ACadSharp/Entities/MText.cs @@ -212,6 +212,26 @@ public double Rotation /// public MText() : base() { } + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + /// public override BoundingBox GetBoundingBox() { diff --git a/src/ACadSharp/Entities/Mesh.cs b/src/ACadSharp/Entities/Mesh.cs index b1a10223..fb41aa0c 100644 --- a/src/ACadSharp/Entities/Mesh.cs +++ b/src/ACadSharp/Entities/Mesh.cs @@ -1,5 +1,6 @@ using ACadSharp.Attributes; using CSMath; +using System; using System.Collections.Generic; namespace ACadSharp.Entities @@ -80,5 +81,25 @@ public override BoundingBox GetBoundingBox() { return BoundingBox.FromPoints(this.Vertices); } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/MultiLeader.cs b/src/ACadSharp/Entities/MultiLeader.cs index 71daafa9..3d8a5cc7 100644 --- a/src/ACadSharp/Entities/MultiLeader.cs +++ b/src/ACadSharp/Entities/MultiLeader.cs @@ -30,13 +30,13 @@ public class MultiLeader : Entity public override string SubclassMarker => DxfSubclassMarker.MultiLeader; // TODO - // We ommit this class because we assumed that the multileader + // We omit this class because we assumed that the multileader // does not have a list of arrow heads associated (see below). // According to the OpenDesign_Specification_for_.dwg_files // each arrowhead shall be associated with an IsDefault flag // having the group code 94. This means the type of the field // is BL instead of B. - // According to the DXF refence the 94 group code refers to + // According to the DXF reference the 94 group code refers to // the index of the arrow head. /* /// @@ -162,7 +162,7 @@ public object Clone() // TODO Additional Line Weight? see Entity.LineWeight. /// - /// Gets or sets a value specifying the lineweight to be applied to all leader lines of this + /// Gets or sets a value specifying the line weight to be applied to all leader lines of this /// (see ). /// This property overrides the value from /// when the flag is set in the @@ -229,7 +229,7 @@ public object Clone() public BlockRecord Arrowhead { get; set; } /// - /// Gests or sets the arrowhead size (see ) + /// Gets or sets the arrowhead size (see ) /// for every leader line /// when the flag is set in the /// property. @@ -447,7 +447,7 @@ public object Clone() // We do not understand what a list of arroheads can be used for, // and we do not know how to create such a list. // The documentation for arrowheads list in OpenDesign_Specification_for_.dwg_files - // and the DXF Reference are contracicting. + // and the DXF Reference are contradicting. // Decision: // Ommit the Arrowheads property, // try to keep the block attributes. @@ -457,7 +457,7 @@ public object Clone() /// /// Gets a list of objects representing - /// a reference to a "block attribute"? and some proprties to adjust + /// a reference to a "block attribute"? and some properties to adjust /// the attribute. /// public IList BlockAttributes { get; } = new List(); @@ -478,8 +478,8 @@ public object Clone() /// Gets or sets a value indicating the text attachment point. /// /// - /// The Open Desisign Specification for DWG files documents this property as Justification, - /// the DXF referenece as Text Attachmenst point. + /// The Open Design Specification for DWG files documents this property as Justification, + /// the DXF reference as Text Attachments point. /// /// This property is also exposed by the class /// (). @@ -595,5 +595,25 @@ public override BoundingBox GetBoundingBox() { return BoundingBox.Null; } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Point.cs b/src/ACadSharp/Entities/Point.cs index fb2f1479..b1a70415 100644 --- a/src/ACadSharp/Entities/Point.cs +++ b/src/ACadSharp/Entities/Point.cs @@ -70,5 +70,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.Location); } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/PolyLine.cs b/src/ACadSharp/Entities/PolyLine.cs index 5dbc7f7f..c5bd558c 100644 --- a/src/ACadSharp/Entities/PolyLine.cs +++ b/src/ACadSharp/Entities/PolyLine.cs @@ -1,6 +1,7 @@ using ACadSharp.Attributes; using CSMath; using CSUtilities.Extensions; +using System; using System.Collections.Generic; using System.Linq; @@ -191,6 +192,26 @@ public override CadObject Clone() return clone; } + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + internal override void AssignDocument(CadDocument doc) { base.AssignDocument(doc); diff --git a/src/ACadSharp/Entities/Ray.cs b/src/ACadSharp/Entities/Ray.cs index 044251db..afeed723 100644 --- a/src/ACadSharp/Entities/Ray.cs +++ b/src/ACadSharp/Entities/Ray.cs @@ -35,10 +35,30 @@ public class Ray : Entity [DxfCodeValue(11, 21, 31)] public XYZ Direction { get; set; } = XYZ.Zero; + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } + /// public override BoundingBox GetBoundingBox() { return BoundingBox.Infinite; } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Seqend.cs b/src/ACadSharp/Entities/Seqend.cs index 037e0e60..311d93c9 100644 --- a/src/ACadSharp/Entities/Seqend.cs +++ b/src/ACadSharp/Entities/Seqend.cs @@ -31,5 +31,25 @@ public override BoundingBox GetBoundingBox() { return BoundingBox.Null; } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Shape.cs b/src/ACadSharp/Entities/Shape.cs index c36561cd..4c0de75e 100644 --- a/src/ACadSharp/Entities/Shape.cs +++ b/src/ACadSharp/Entities/Shape.cs @@ -122,5 +122,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.InsertionPoint); } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Solid.cs b/src/ACadSharp/Entities/Solid.cs index 646029bd..dfeccb0a 100644 --- a/src/ACadSharp/Entities/Solid.cs +++ b/src/ACadSharp/Entities/Solid.cs @@ -48,9 +48,29 @@ public class Solid : Entity [DxfCodeValue(210, 220, 230)] public XYZ Normal { get; set; } = XYZ.AxisZ; + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } + public override BoundingBox GetBoundingBox() { return BoundingBox.Null; } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Solid3D.cs b/src/ACadSharp/Entities/Solid3D.cs index 727e89ba..5d3ce0ce 100644 --- a/src/ACadSharp/Entities/Solid3D.cs +++ b/src/ACadSharp/Entities/Solid3D.cs @@ -23,10 +23,30 @@ public class Solid3D : Entity /// public override string SubclassMarker => DxfSubclassMarker.ModelerGeometry; + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } + /// public override BoundingBox GetBoundingBox() { return BoundingBox.Null; } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Spline.cs b/src/ACadSharp/Entities/Spline.cs index ce3f4b31..ce4b848b 100644 --- a/src/ACadSharp/Entities/Spline.cs +++ b/src/ACadSharp/Entities/Spline.cs @@ -28,7 +28,7 @@ public class Spline : Entity /// Specifies the three-dimensional normal unit vector for the object. /// /// - /// Omitted if the spline is nonplanar. + /// Omitted if the spline is non-planar. /// [DxfCodeValue(210, 220, 230)] public XYZ Normal { get; set; } = XYZ.AxisZ; @@ -114,5 +114,25 @@ public override BoundingBox GetBoundingBox() { return BoundingBox.FromPoints(this.ControlPoints); } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/TextEntity.cs b/src/ACadSharp/Entities/TextEntity.cs index 0f1e5613..4ed15335 100644 --- a/src/ACadSharp/Entities/TextEntity.cs +++ b/src/ACadSharp/Entities/TextEntity.cs @@ -203,5 +203,25 @@ protected override void tableOnRemove(object sender, CollectionChangedEventArgs this.Style = this.Document.TextStyles[TextStyle.DefaultName]; } } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/Tolerance.cs b/src/ACadSharp/Entities/Tolerance.cs index ece5f9fc..9888b7fd 100644 --- a/src/ACadSharp/Entities/Tolerance.cs +++ b/src/ACadSharp/Entities/Tolerance.cs @@ -81,5 +81,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.InsertionPoint); } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/UnderlayEntity.cs b/src/ACadSharp/Entities/UnderlayEntity.cs index 99f43d78..edbaa843 100644 --- a/src/ACadSharp/Entities/UnderlayEntity.cs +++ b/src/ACadSharp/Entities/UnderlayEntity.cs @@ -113,5 +113,25 @@ public override BoundingBox GetBoundingBox() { return BoundingBox.Null; } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/UnknownEntity.cs b/src/ACadSharp/Entities/UnknownEntity.cs index b078ba8b..0c47619b 100644 --- a/src/ACadSharp/Entities/UnknownEntity.cs +++ b/src/ACadSharp/Entities/UnknownEntity.cs @@ -1,5 +1,6 @@ using ACadSharp.Classes; using CSMath; +using System; namespace ACadSharp.Entities { @@ -56,6 +57,26 @@ internal UnknownEntity(DxfClass dxfClass) this.DxfClass = dxfClass; } + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } + /// /// /// An Unknown Entity does not have any geometric shape, therfore it's bounding box will be always 0 diff --git a/src/ACadSharp/Entities/Vertex.cs b/src/ACadSharp/Entities/Vertex.cs index 8dfd466c..641d5fc2 100644 --- a/src/ACadSharp/Entities/Vertex.cs +++ b/src/ACadSharp/Entities/Vertex.cs @@ -1,5 +1,6 @@ using ACadSharp.Attributes; using CSMath; +using System; namespace ACadSharp.Entities { @@ -59,5 +60,25 @@ public override BoundingBox GetBoundingBox() { return new BoundingBox(this.Location); } + + public override void ApplyTransform(Transform transform) + { + throw new NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/ViewPort.cs b/src/ACadSharp/Entities/ViewPort.cs index 17049b09..86e15b13 100644 --- a/src/ACadSharp/Entities/ViewPort.cs +++ b/src/ACadSharp/Entities/ViewPort.cs @@ -271,6 +271,11 @@ public class Viewport : Entity [DxfCodeValue(63, 421, 431)] public Color AmbientLightColor { get; set; } + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } + //361 Sun ID/Handle(optional) //335 @@ -304,5 +309,20 @@ public override BoundingBox GetBoundingBox() return new BoundingBox(min, max); } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/Entities/XLine.cs b/src/ACadSharp/Entities/XLine.cs index b77d97f0..09408980 100644 --- a/src/ACadSharp/Entities/XLine.cs +++ b/src/ACadSharp/Entities/XLine.cs @@ -35,10 +35,30 @@ public class XLine : Entity [DxfCodeValue(11, 21, 31)] public XYZ Direction { get; set; } + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } + /// public override BoundingBox GetBoundingBox() { return BoundingBox.Infinite; } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } } } diff --git a/src/ACadSharp/IO/Templates/CadDimensionTemplate.cs b/src/ACadSharp/IO/Templates/CadDimensionTemplate.cs index cca9c23b..98e2632b 100644 --- a/src/ACadSharp/IO/Templates/CadDimensionTemplate.cs +++ b/src/ACadSharp/IO/Templates/CadDimensionTemplate.cs @@ -47,6 +47,26 @@ public override BoundingBox GetBoundingBox() { throw new System.InvalidOperationException(); } + + public override void Translate(XYZ translation) + { + throw new System.NotImplementedException(); + } + + public override void Rotate(double rotation, XYZ axis) + { + throw new System.NotImplementedException(); + } + + public override void Scale(XYZ scale) + { + throw new System.NotImplementedException(); + } + + public override void ApplyTransform(Transform transform) + { + throw new System.NotImplementedException(); + } } public void SetDimensionFlags(DimensionType flags)