public DSGeometry[] Intersect(DSGeometry other) { if (null == other) { throw new ArgumentNullException("other"); } IGeometryEntity[] geoms = null; DSPlane plane = other as DSPlane; if (plane != null) { geoms = IntersectWithPlane(plane); } else { DSSurface surf = other as DSSurface; if (surf != null) { geoms = IntersectWithSurface(surf); } else { DSSolid solid = other as DSSolid; if (solid != null) { geoms = IntersectWithSolid(solid); } else { DSCurve curve = other as DSCurve; if (curve != null) { geoms = IntersectWithCurve(curve); } else { DSPoint point = other as DSPoint; if (null != point) { geoms = IntersectWithPoint(point); } else { throw new System.InvalidOperationException(string.Format(Properties.Resources.InvalidIntersect, GetType().Name, other.GetType().Name)); } } } } } return(geoms.ToArray <DSGeometry, IGeometryEntity>(true)); }
internal virtual IGeometryEntity[] ProjectOn(DSGeometry other, DSVector direction) { throw new InvalidOperationException(string.Format(Properties.Resources.InvalidProjection, GetType().Name, other.GetType().Name)); }