diff --git a/ExportDXF/IViewFlipDecider.cs b/ExportDXF/IViewFlipDecider.cs index d928bfb..54da119 100644 --- a/ExportDXF/IViewFlipDecider.cs +++ b/ExportDXF/IViewFlipDecider.cs @@ -29,7 +29,7 @@ namespace ExportDXF if (up.Count == 0) return true; - var bend = ViewHelper.ClosestToBounds(bounds, bends); + var bend = ViewHelper.GetBendClosestToBounds(bounds, bends); return bend.Direction == BendDirection.Down; } diff --git a/ExportDXF/ViewHelper.cs b/ExportDXF/ViewHelper.cs index 4096e8a..5554385 100644 --- a/ExportDXF/ViewHelper.cs +++ b/ExportDXF/ViewHelper.cs @@ -8,7 +8,7 @@ namespace ExportDXF { internal static class ViewHelper { - public static Bounds GetBounds(SolidWorks.Interop.sldworks.View view) + public static Bounds GetBounds(View view) { var outline = view.GetOutline() as double[]; @@ -29,7 +29,7 @@ namespace ExportDXF }; } - public static Bend ClosestToBounds(Bounds bounds, IList bends) + public static Bend GetBendClosestToBounds(Bounds bounds, IList bends) { var hBends = bends.Where(b => GetAngleOrientation(b.BendLineAngle) == BendOrientation.Horizontal).ToList(); var vBends = bends.Where(b => GetAngleOrientation(b.BendLineAngle) == BendOrientation.Vertical).ToList(); @@ -71,7 +71,7 @@ namespace ExportDXF return minHBendDist < minVBendDist ? minHBend : minVBend; } - public static Bend SmallestYCoordinate(IList bends) + public static Bend GetBendWithSmallestYCoordinate(IList bends) { double dist = double.MaxValue; int index = -1; @@ -90,7 +90,7 @@ namespace ExportDXF return index == -1 ? null : bends[index]; } - public static Bend SmallestXCoordinate(IList bends) + public static Bend GetBendWithSmallestXCoordinate(IList bends) { double dist = double.MaxValue; int index = -1; @@ -116,12 +116,12 @@ namespace ExportDXF return txt.ToUpper().Contains("UP") ? BendDirection.Up : BendDirection.Down; } - public static IEnumerable GetBendNotes(SolidWorks.Interop.sldworks.View view) + public static IEnumerable GetBendNotes(View view) { return (view.GetNotes() as Array)?.Cast(); } - public static Note GetLeftMostNote(SolidWorks.Interop.sldworks.View view) + public static Note GetLeftMostNote(View view) { var notes = GetBendNotes(view); @@ -143,7 +143,7 @@ namespace ExportDXF return leftMostNote; } - public static Note GetBottomMostNote(SolidWorks.Interop.sldworks.View view) + public static Note GetBottomMostNote(View view) { var notes = GetBendNotes(view); @@ -165,7 +165,7 @@ namespace ExportDXF return btmMostNote; } - public static IEnumerable GetBendAngles(SolidWorks.Interop.sldworks.View view) + public static IEnumerable GetBendAngles(View view) { var angles = new List(); var notes = GetBendNotes(view); @@ -179,7 +179,7 @@ namespace ExportDXF return angles; } - public static List GetBends(SolidWorks.Interop.sldworks.View view) + public static List GetBends(View view) { var bends = new List(); var notes = GetBendNotes(view); @@ -217,7 +217,7 @@ namespace ExportDXF return bends; } - public static BendOrientation GetOrientation(SolidWorks.Interop.sldworks.View view) + public static BendOrientation GetOrientation(View view) { var angles = GetBendAngles(view);