Renamed ParallelBendAngle to BendLineAngle

This commit is contained in:
AJ
2019-11-21 13:42:14 -05:00
parent ed32bb1c27
commit 502a216de9
2 changed files with 5 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
{ {
public BendDirection Direction { get; set; } public BendDirection Direction { get; set; }
public double ParallelBendAngle { get; set; } public double BendLineAngle { get; set; }
public double Angle { get; set; } public double Angle { get; set; }

View File

@@ -31,8 +31,8 @@ namespace ExportDXF
public static Bend ClosestToBounds(Bounds bounds, IList<Bend> bends) public static Bend ClosestToBounds(Bounds bounds, IList<Bend> bends)
{ {
var hBends = bends.Where(b => GetAngleOrientation(b.ParallelBendAngle) == BendOrientation.Horizontal).ToList(); var hBends = bends.Where(b => GetAngleOrientation(b.BendLineAngle) == BendOrientation.Horizontal).ToList();
var vBends = bends.Where(b => GetAngleOrientation(b.ParallelBendAngle) == BendOrientation.Vertical).ToList(); var vBends = bends.Where(b => GetAngleOrientation(b.BendLineAngle) == BendOrientation.Vertical).ToList();
Bend minVBend = null; Bend minVBend = null;
double minVBendDist = double.MaxValue; double minVBendDist = double.MaxValue;
@@ -92,6 +92,7 @@ namespace ExportDXF
public static Bend SmallestXCoordinate(IList<Bend> bends) public static Bend SmallestXCoordinate(IList<Bend> bends)
{ {
return bends.Min(b => b.X);
double dist = double.MaxValue; double dist = double.MaxValue;
int index = -1; int index = -1;
@@ -204,7 +205,7 @@ namespace ExportDXF
var bend = new Bend var bend = new Bend
{ {
ParallelBendAngle = RadiansToDegrees(note.Angle), BendLineAngle = RadiansToDegrees(note.Angle),
Angle = angle, Angle = angle,
Direction = direection == "UP" ? BendDirection.Up : BendDirection.Down, Direction = direection == "UP" ? BendDirection.Up : BendDirection.Down,
X = x, X = x,