Beispiel #1
0
        private void method_4()
        {
            int       count     = this.m_arrPipePointsDraw.Count;
            PipePoint pipePoint = new PipePoint();
            double    num       = 0.0;
            double    num2      = 0.0;

            for (int i = 0; i < count; i++)
            {
                PipePoint pipePoint2 = (PipePoint)this.m_arrPipePointsDraw[i];
                if (i < count - 1)
                {
                    PipePoint deepCopy = ((PipePoint)this.m_arrPipePointsDraw[i + 1]).GetDeepCopy();
                    num = pipePoint2.DistanceToPipePoint(deepCopy);
                }
                if (i != 0)
                {
                    pipePoint2.x = pipePoint.x + num2;
                }
                num2      = num;
                pipePoint = pipePoint2.GetDeepCopy();
            }
        }
Beispiel #2
0
 private void fEswZsmwIx(PipePoint ppDst)
 {
     if (this.m_arrPipePoints.Count != 0)
     {
         int count = this.m_arrPipePoints.Count;
         for (int i = count - 1; i > 0; i--)
         {
             for (int j = 0; j < i; j++)
             {
                 PipePoint pipePoint  = (PipePoint)this.m_arrPipePoints[j];
                 PipePoint pipePoint2 = (PipePoint)this.m_arrPipePoints[j + 1];
                 double    num        = pipePoint.DistanceToPipePoint(ppDst);
                 double    num2       = pipePoint2.DistanceToPipePoint(ppDst);
                 if (num > num2)
                 {
                     PipePoint value = pipePoint;
                     this.m_arrPipePoints[j]     = pipePoint2;
                     this.m_arrPipePoints[j + 1] = value;
                 }
             }
         }
     }
 }