Ejemplo n.º 1
0
        protected string GetTopologyInfo()
        {
            int nFaces    = SolidEntity.GetFaceCount();
            int nShells   = SolidEntity.GetShellCount();
            int nEdges    = SolidEntity.GetEdgeCount();
            int nVertices = SolidEntity.GetVertexCount();

            return(string.Format("Vertices = {0}, Edges = {1}, Faces = {2}, Shells = {3}", nVertices, nEdges, nFaces, nShells));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public DSSolid Regularise()
        {
            ISolidEntity host = SolidEntity.Regularise();

            if (host == null)
            {
                throw new System.Exception(string.Format(Properties.Resources.OperationFailed, "DSSolid.Regularise"));
            }
            return(host.ToSolid(true, this));
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="internalFaceThickness"></param>
        /// <param name="externalFaceThickness"></param>
        /// <returns></returns>
        public DSSolid ThinShell(double internalFaceThickness, double externalFaceThickness)
        {
            if (internalFaceThickness.EqualsTo(0.0) || internalFaceThickness < 0)
            {
                return(null);
            }

            if (externalFaceThickness.EqualsTo(0.0) || externalFaceThickness < 0)
            {
                return(null);
            }

            ISolidEntity host = SolidEntity.ThinShell(internalFaceThickness, externalFaceThickness);

            if (null == host)
            {
                return(null);
            }

            return(host.ToSolid(true, this));
        }
Ejemplo n.º 4
0
        public override string ToString()
        {
            int nCells = SolidEntity.GetCellCount();

            return(string.Format("DSNonManifoldSolid({0}, Cells = {1})", GetTopologyInfo(), nCells));
        }
Ejemplo n.º 5
0
 internal override IGeometryEntity[] IntersectWithSurface(DSSurface surf)
 {
     return(SolidEntity.IntersectWith(surf.SurfaceEntity));
 }
Ejemplo n.º 6
0
 internal override IGeometryEntity[] IntersectWithSolid(DSSolid solid)
 {
     return(SolidEntity.IntersectWith(solid.SolidEntity));
 }
Ejemplo n.º 7
0
 internal override IGeometryEntity[] IntersectWithPlane(DSPlane plane)
 {
     return(SolidEntity.IntersectWith(plane.PlaneEntity));
 }