Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="vertices"></param>
        /// <param name="edgeIndices"></param>
        /// <returns></returns>
        private static DSMesh ByVerticesEdgeIndices(DSPoint[] vertices, int[] edgeIndices)
        {
            IPointEntity[] points = vertices.ConvertAll(DSGeometryExtension.ToEntity <DSPoint, IPointEntity>);
            IMeshEntity    entity = ByVerticesEdgeIndicesCore(points, edgeIndices);
            DSMesh         mesh   = new DSMesh(entity);

            mesh.EdgeIndices     = edgeIndices;
            mesh.VertexPositions = vertices;
            return(mesh);
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="vertices"></param>
        /// <param name="faceIndices"></param>
        /// <returns></returns>
        public static DSMesh ByVerticesFaceIndices(DSPoint[] vertices, int[][] faceIndices)
        {
            IPointEntity[] points = vertices.ConvertAll(DSGeometryExtension.ToEntity <DSPoint, IPointEntity>);
            IMeshEntity    entity = ByVerticesFaceIndicesCore(points, faceIndices);
            DSMesh         mesh   = new DSMesh(entity, true);

            mesh.FaceIndices     = faceIndices;
            mesh.VertexPositions = vertices;
            return(mesh);
        }