Exemplo n.º 1
0
        internal IGeometryEntity[] IntersectWithPoint(DSPoint point)
        {
            if (GeomEntity.DistanceTo(point.PointEntity).EqualsTo(0.0))
            {
                return new IGeometryEntity[] { point.PointEntity }
            }
            ;

            return(null);
        }
Exemplo n.º 2
0
        protected override DSGeometry Translate(DSVector offset)
        {
            IConeEntity clone = GeomEntity.CopyAndTranslate(offset.IVector) as IConeEntity;

            if (null == clone)
            {
                throw new System.InvalidOperationException("Failed to clone and translate geometry.");
            }

            return(new DSCone(clone, true));
        }
Exemplo n.º 3
0
 internal virtual IPointEntity ClosestPointTo(IPointEntity otherPoint)
 {
     try
     {
         return(GeomEntity.GetClosestPoint(otherPoint));
     }
     catch (System.NotImplementedException)
     {
         throw new System.InvalidOperationException(string.Format(Properties.Resources.NotSupported, "ClosestPointTo", GetType().Name));
     }
 }
Exemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="offset"></param>
        /// <returns></returns>
        protected virtual DSGeometry Translate(DSVector offset)
        {
            IGeometryEntity clone = GeomEntity.CopyAndTranslate(offset.IVector);

            if (null == clone)
            {
                throw new InvalidOperationException("Failed to clone and translate geometry.");
            }

            DSGeometry geom = ToGeometry(clone, true);

            return(geom);
        }
Exemplo n.º 5
0
        internal override DSGeometry TransformBy(ICoordinateSystemEntity csEntity)
        {
            IGeometryEntity clone = GeomEntity.CopyAndTransform(DSCoordinateSystem.WCS.CSEntity, csEntity);

            if (null == clone)
            {
                throw new System.InvalidOperationException("Failed to clone and transform cone.");
            }

            IConeEntity cone = clone as IConeEntity;

            if (null != cone)
            {
                return(new DSCone(cone, true));
            }
            return(ToGeometry(clone, true));
        }
Exemplo n.º 6
0
        internal virtual DSGeometry TransformBy(ICoordinateSystemEntity csEntity)
        {
            IGeometryEntity clone = GeomEntity.CopyAndTransform(DSCoordinateSystem.WCS.CSEntity, csEntity);

            return(ToGeometry(clone, true));
        }