Ver Fonte

fix a bug in calculating the area of measure region.

gsp há 9 meses atrás
pai
commit
115be61bde
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSSample.cs

+ 3 - 3
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSSample.cs

@@ -312,14 +312,14 @@ namespace OTSDataType
             double totalArea;
             if (m_poMsrArea.GetShape() == DOMAIN_SHAPE.RECTANGLE)
             {
-                totalArea = m_poMsrArea.GetRectDomain().Width * m_poMsrArea.GetRectDomain().Height;
+                totalArea = m_poMsrArea.GetRectDomain().Width * m_poMsrArea.GetRectDomain().Height * 0.000001;
 
 
             }
             else if (m_poMsrArea.GetShape() == DOMAIN_SHAPE.ROUND)
             {
 
-                totalArea = (m_poMsrArea.GetRectDomain().Width / 2) * (m_poMsrArea.GetRectDomain().Width / 2) * 3.14159;
+                totalArea = (m_poMsrArea.GetRectDomain().Width / 2) * (m_poMsrArea.GetRectDomain().Width / 2) * 3.14159 * 0.000001;
 
             }
             else 
@@ -328,7 +328,7 @@ namespace OTSDataType
                 totalArea = m_listFieldData.Count * singleFldarea;
             
             }
-            return totalArea * 0.000001;
+            return totalArea ;
         
         }
         public bool InitFieldPosData(  out List<Point> lisFieldPos, out Size iSzie)