Example #1
0
 /// <summary>
 /// Получить расширенное расстояние от геометрического объекта до геометрического объекта.
 /// </summary>
 /// <param name="geometric_this">Геометрический объект.</param>
 /// <param name="geometric">Геометрический объект.</param>
 /// <returns>Расширенное расстояние.</returns>
 public static double Расширенное_расстояние(Geometric2d geometric_this, Geometric2d geometric)
 {
     if (geometric_this is Point2d)
     {
         if (geometric is Point2d)
             return Point2dExt.Расширенное_расстояние(geometric_this as Point2d, geometric as Point2d);
         if (geometric is Geometric2dWithPointScalar)
             return Circle2dExt.Расширенное_расстояние(geometric as Geometric2dWithPointScalar, geometric_this as Point2d);
         if (geometric is Plane2d)
             return Plane2dExt.Расширенное_расстояние(geometric as Plane2d, geometric_this as Point2d);
     }
     if (geometric_this is Geometric2dWithPointScalar)
     {
         if (geometric is Point2d)
             return Circle2dExt.Расширенное_расстояние(geometric_this as Geometric2dWithPointScalar, geometric as Point2d);
         if (geometric is Geometric2dWithPointScalar)
             return Circle2dExt.Расширенное_расстояние(geometric_this as Geometric2dWithPointScalar, geometric as Geometric2dWithPointScalar);
         if (geometric is Plane2d)
             return Plane2dExt.Расширенное_расстояние(geometric as Plane2d, geometric_this as Geometric2dWithPointScalar);
     }
     if (geometric_this is Plane2d)
     {
         if (geometric is Point2d)
             return Plane2dExt.Расширенное_расстояние(geometric_this as Plane2d, geometric as Point2d);
         if (geometric is Geometric2dWithPointScalar)
             return Plane2dExt.Расширенное_расстояние(geometric_this as Plane2d, geometric as Geometric2dWithPointScalar);
         if (geometric is Plane2d)
             return Plane2dExt.Расширенное_расстояние(geometric_this as Plane2d, geometric as Plane2d);
     }
     return double.NaN;
 }
Example #2
0
 /// <summary>
 /// Получить годограф функции плотного размещения круга и геометрического объекта.
 /// </summary>
 /// <param name="geometric_this">Геометрический объект.</param>
 /// <param name="circle">Круг.</param>
 /// <returns>Годограф функции плотного размещения.</returns>
 public static Geometric2d Годограф_функции_плотного_размещения(Geometric2d geometric_this, Geometric2dWithPointScalar circle)
 {
     if (geometric_this is Geometric2dWithPointScalar)
         return Circle2dExt.Годограф_функции_плотного_размещения(geometric_this as Geometric2dWithPointScalar, circle);
     if (geometric_this is Plane2d)
         return Plane2dExt.Годограф_функции_плотного_размещения(geometric_this as Plane2d, circle);
     return null;
 }
Example #3
0
 /// <summary>
 /// Получить точку пересечения геометрического объекта и геометрического объекта.
 /// </summary>
 /// <param name="geometric_prev">Геометрический объект.</param>
 /// <param name="geometric_next">Геометрический объект.</param>
 /// <returns>Точка пересечения.</returns>
 public static Point2d Точка_пересечения_границ(Geometric2d geometric_prev, Geometric2d geometric_next)
 {
     if (geometric_prev is Geometric2dWithPointScalar)
     {
         if (geometric_next is Geometric2dWithPointScalar)
             return Circle2dExt.Точка_пересечения_границ(geometric_prev as Geometric2dWithPointScalar, geometric_next as Geometric2dWithPointScalar);
         if (geometric_next is Plane2d)
             return Circle2dExt.Точка_пересечения_границ(geometric_prev as Geometric2dWithPointScalar, geometric_next as Plane2d);
     }
     if (geometric_prev is Plane2d)
     {
         if (geometric_next is Geometric2dWithPointScalar)
             return Plane2dExt.Точка_пересечения_границ(geometric_prev as Plane2d, geometric_next as Geometric2dWithPointScalar);
         if (geometric_next is Plane2d)
             return Plane2dExt.Точка_пересечения_границ(geometric_prev as Plane2d, geometric_next as Plane2d);
     }
     return null;
 }
Example #4
0
 /// <summary>
 /// Получить серединную полуплоскость геометрического объекта и геометрического объекта.
 /// </summary>
 /// <param name="geometric_prev">Геометрический объект.</param>
 /// <param name="geometric_next">Геометрический объект.</param>
 /// <returns>Серединная полуплоскость.</returns>
 public static Plane2d Серединная_полуплоскость(Geometric2d geometric_prev, Geometric2d geometric_next)
 {
     if (geometric_prev is Geometric2dWithPointScalar)
     {
         if (geometric_next is Geometric2dWithPointScalar)
             return Circle2dExt.Серединная_полуплоскость(geometric_prev as Geometric2dWithPointScalar, geometric_next as Geometric2dWithPointScalar);
         if (geometric_next is Plane2d)
             return Circle2dExt.Серединная_полуплоскость(geometric_prev as Geometric2dWithPointScalar, geometric_next as Plane2d);
     }
     if (geometric_prev is Plane2d)
     {
         if (geometric_next is Geometric2dWithPointScalar)
             return Plane2dExt.Серединная_полуплоскость(geometric_prev as Plane2d, geometric_next as Geometric2dWithPointScalar);
         if (geometric_next is Plane2d)
             return Plane2dExt.Серединная_полуплоскость(geometric_prev as Plane2d, geometric_next as Plane2d);
     }
     return null;
 }
Example #5
0
 /// <summary>
 /// Получить точку близости второго рода для круга и множества (геометрический объект, геометрический объект).
 /// </summary>
 /// <param name="circle_this">Круг.</param>
 /// <param name="geometric_prev">Геометрический объект.</param>
 /// <param name="geometric_next">Геометрический объект.</param>
 /// <returns>Точка близости.</returns>
 public static Point2d Точка_близости_второго_рода(this Geometric2dWithPointScalar circle_this, Geometric2d geometric_prev, Geometric2d geometric_next)
 {
     if (geometric_prev is Geometric2dWithPointScalar)
     {
         if (geometric_next is Geometric2dWithPointScalar)
             return circle_this.Точка_близости_второго_рода(geometric_prev as Geometric2dWithPointScalar, geometric_next as Geometric2dWithPointScalar);
         if (geometric_next is Plane2d)
             return circle_this.Точка_близости_второго_рода(geometric_prev as Geometric2dWithPointScalar, geometric_next as Plane2d);
     }
     if (geometric_prev is Plane2d)
     {
         if (geometric_next is Geometric2dWithPointScalar)
             return circle_this.Точка_близости_второго_рода(geometric_prev as Plane2d, geometric_next as Geometric2dWithPointScalar);
         if (geometric_next is Plane2d)
             return circle_this.Точка_близости_второго_рода(geometric_prev as Plane2d, geometric_next as Plane2d);
     }
     return null;
 }