diff --git a/IFoxCAD.sln b/IFoxCAD.sln index 3480358ab6ecb615ff523bf09f225ee243f9c9a8..8419ced9f3ffd1c081ba1839c0e566c1d5cc060a 100644 --- a/IFoxCAD.sln +++ b/IFoxCAD.sln @@ -62,7 +62,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{DA8EA8E7-A EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestGcad2024", "tests\TestGcad2024\TestGcad2024.csproj", "{FEC39964-9ECB-4567-8F68-94F80A39FA02}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestZcad2024", "tests\TestZcad2024\TestZcad2024.csproj", "{890D0AA3-1621-47F2-9E47-75D16A51D36E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestZcad2024", "tests\TestZcad2024\TestZcad2024.csproj", "{890D0AA3-1621-47F2-9E47-75D16A51D36E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -141,6 +141,7 @@ Global src\CAD\IFox.CAD.Shared\IFox.CAD.Shared.projitems*{20f254f7-aee5-42ae-a9b3-149bbdc7397f}*SharedItemsImports = 13 src\CAD\IFox.CAD.Shared\IFox.CAD.Shared.projitems*{3d7d095d-ef0a-40b3-9776-5f08c61fd614}*SharedItemsImports = 5 tests\TestShared\TestShared.projitems*{5f478f68-19bc-4a3a-af39-8728f8d396dd}*SharedItemsImports = 5 + tests\TestShared\TestShared.projitems*{890d0aa3-1621-47f2-9e47-75d16a51d36e}*SharedItemsImports = 5 src\Basal\IFox.Basal.Shared\IFox.Basal.Shared.projitems*{c823514a-2bc2-45c2-aced-18924a7b80bf}*SharedItemsImports = 13 tests\TestShared\TestShared.projitems*{ced63d2d-0af6-4831-806d-5e8e9b0d0a07}*SharedItemsImports = 13 src\CAD\IFox.CAD.Shared\IFox.CAD.Shared.projitems*{ef20e632-70a9-40eb-8c9a-539fd85fafad}*SharedItemsImports = 5 diff --git a/src/CAD/IFox.CAD.Shared/ExtensionMethod/Entity/EntityBoundingInfo.cs b/src/CAD/IFox.CAD.Shared/ExtensionMethod/Entity/EntityBoundingInfo.cs index be4b7708d01f86abacce4bfd738356d9a52873a9..ed1f8473c12daa7be67bb4f75a2129578d3e2afd 100644 --- a/src/CAD/IFox.CAD.Shared/ExtensionMethod/Entity/EntityBoundingInfo.cs +++ b/src/CAD/IFox.CAD.Shared/ExtensionMethod/Entity/EntityBoundingInfo.cs @@ -23,7 +23,7 @@ public static class EntityBoundingInfo static Extents3d GetMTextBox(MText mText) { var ext = new Extents3d(); - GetMTextBoxCorners(mText).ForEach(p=>ext.AddPoint(p)); + GetMTextBoxCorners(mText).ForEach(p => ext.AddPoint(p)); return ext; } /// @@ -175,6 +175,17 @@ public static Point3d[] GetMTextBoxCorners(MText mtext) Extents3d? ext = null; switch (ent) { + case Hatch hatch: + var hc = new HatchConverter(hatch); + hc.GetBoundarysData(); + var extTmp = new Extents3d(); + foreach (var curve in hc.CreateBoundary()) + { + extTmp.AddExtents(GetEntityBoxEx(curve)!.Value); + curve.Dispose(); + } + ext = extTmp; + break; case Spline spl: ext = spl.ToPolyline().GeometricExtents; break; @@ -198,7 +209,7 @@ public static Point3d[] GetMTextBoxCorners(MText mtext) var mat = Matrix3d.Identity; block!.GetBlockBox(ref blockExt, ref mat); if (!blockExt.IsEmptyExt()) - ext = blockExt; + ext = blockExt; break; default: if (ent.Bounds.HasValue)