コード例 #1
0
 public ICartGridData Unroll(double scaling, double unrollRadius)
 {
     try
     {
         ICartGridData stripList = new CartGridData();
         int           i         = 0;
         double        dTh       = 0;
         if (Count > 1)
         {
             var strip0 = this[0];
             var strip1 = this[1];
             dTh = strip1[0].ThetaRad - strip0[0].ThetaRad;
         }
         foreach (ICylData cylstrip in this)
         {
             cylstrip.RotateAbtZ(-1 * i * dTh);
             stripList.Add(cylstrip.Unroll(scaling, unrollRadius));
             i++;
         }
         return(stripList);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #2
0
 /// <summary>
 /// unroll cylinder into grid
 /// </summary>
 /// <param name="correctedRingList"></param>
 /// <param name="scaling"></param>
 /// <param name="unrollRadius"></param>
 /// <returns></returns>
 static public CartGridData UnrollCylinder(CylGridData correctedRingList, double scaling, double unrollRadius)
 {
     try
     {
         var stripList = new CartGridData();
         foreach (var cylstrip in correctedRingList)
         {
             stripList.Add(UnrollCylinderRing(cylstrip, scaling, unrollRadius));
         }
         return(stripList);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #3
0
 /// <summary>
 /// convert cylinder grid to cartesian grid
 /// </summary>
 /// <param name="correctedRingList"></param>
 /// <returns></returns>
 public CartGridData AsCartGridData()
 {
     try
     {
         var stripList = new CartGridData();
         foreach (var cylstrip in this)
         {
             var strip = new CartData(cylstrip.FileName);
             foreach (var ptCyl in cylstrip)
             {
                 strip.Add(new Vector3(ptCyl));
             }
             stripList.Add(strip);
         }
         return(stripList);
     }
     catch (Exception)
     {
         throw;
     }
 }