|
@@ -231,25 +231,25 @@ namespace Compdfkit_Tools.Measure
|
|
|
|
|
|
MeasureEventArgs measureEvent = new MeasureEventArgs();
|
|
|
measureEvent.Angle = 0;
|
|
|
- if (polylineAnnot.Points.Count() >= 3)
|
|
|
- {
|
|
|
- int count = polylineAnnot.Points.Count();
|
|
|
- Point endLinePoint = new Point(
|
|
|
- polylineAnnot.Points[count - 1].x,
|
|
|
- polylineAnnot.Points[count - 1].y
|
|
|
- );
|
|
|
- Point cornerLinePoint = new Point(
|
|
|
- polylineAnnot.Points[count - 2].x,
|
|
|
- polylineAnnot.Points[count - 2].y
|
|
|
- );
|
|
|
- Point startLinePoint = new Point(
|
|
|
- polylineAnnot.Points[count - 3].x,
|
|
|
- polylineAnnot.Points[count - 3].y
|
|
|
- );
|
|
|
- Vector startVector = startLinePoint - cornerLinePoint;
|
|
|
- Vector endvector = endLinePoint - cornerLinePoint;
|
|
|
- measureEvent.Angle = (int)Math.Abs(Vector.AngleBetween(endvector, startVector));
|
|
|
- }
|
|
|
+ //if (polylineAnnot.Points.Count() >= 3)
|
|
|
+ //{
|
|
|
+ // int count = polylineAnnot.Points.Count();
|
|
|
+ // Point endLinePoint = new Point(
|
|
|
+ // polylineAnnot.Points[count - 1].x,
|
|
|
+ // polylineAnnot.Points[count - 1].y
|
|
|
+ // );
|
|
|
+ // Point cornerLinePoint = new Point(
|
|
|
+ // polylineAnnot.Points[count - 2].x,
|
|
|
+ // polylineAnnot.Points[count - 2].y
|
|
|
+ // );
|
|
|
+ // Point startLinePoint = new Point(
|
|
|
+ // polylineAnnot.Points[count - 3].x,
|
|
|
+ // polylineAnnot.Points[count - 3].y
|
|
|
+ // );
|
|
|
+ // Vector startVector = startLinePoint - cornerLinePoint;
|
|
|
+ // Vector endvector = endLinePoint - cornerLinePoint;
|
|
|
+ // measureEvent.Angle = (int)Math.Abs(Vector.AngleBetween(endvector, startVector));
|
|
|
+ //}
|
|
|
measureEvent.RulerTranslateUnit = measureInfo.RulerTranslateUnit;
|
|
|
measureEvent.RulerTranslate = measureInfo.RulerTranslate;
|
|
|
measureEvent.RulerBase = measureInfo.RulerBase;
|