예제 #1
0
 private void find_sub_elements(IMultiCurve2d multicurve, List <IParametricCurve2d> vAdd)
 {
     foreach (IParametricCurve2d curve in multicurve.Curves)
     {
         if (curve is IMultiCurve2d)
         {
             find_sub_elements(curve as IMultiCurve2d, vAdd);
         }
         else
         {
             vAdd.Add(curve);
         }
     }
 }
예제 #2
0
        public int CountType(IMultiCurve2d curve, Type t)
        {
            int count = 0;

            foreach (IParametricCurve2d c in curve.Curves)
            {
                if (c.GetType() == t)
                {
                    count++;
                }
                if (c is IMultiCurve2d)
                {
                    count += CountType(c as IMultiCurve2d, t);
                }
            }
            return(count);
        }