Пример #1
0
        public void ComputeEdgeNormals(out IVector3D[] normals, out IVector3D[] centers, out ITopologicEdge[] edges)
        {
            Int64[] eKeys = iM.Topology.GetUniqueEdges();
            edges   = new ITopologicEdge[eKeys.Length];
            normals = new IVector3D[eKeys.Length];
            centers = new IVector3D[eKeys.Length];
            int start, end;

            for (int i = 0; i < eKeys.Length; i++)
            {
                Int64 eK = eKeys[i];
                IHelpers.UnpackKey(eK, out start, out end);
                edges[i] = new ITopologicEdge(iM.GetVertexWithKey(start), iM.GetVertexWithKey(end));
                iM.Topology.ComputeEdgeNormal(start, end, out normals[i], out centers[i]);
            }
        }
Пример #2
0
        public void ComputeEdgeNormals(out Vector3d[] normals, out Point3d[] centers, out ITopologicEdge[] edges)
        {
            Int64[] eKeys = iM.Topology.GetUniqueEdges();
            edges   = new ITopologicEdge[eKeys.Length];
            normals = new Vector3d[eKeys.Length];
            centers = new Point3d[eKeys.Length];
            int       start, end;
            IVector3D vv, pp;

            for (int i = 0; i < eKeys.Length; i++)
            {
                Int64 eK = eKeys[i];
                IHelpers.UnpackKey(eK, out start, out end);
                edges[i] = new ITopologicEdge(iM.GetVertexWithKey(start), iM.GetVertexWithKey(end));

                iM.Topology.ComputeEdgeNormal(start, end, out vv, out pp);
                normals[i] = new Vector3d(vv.X, vv.Y, vv.Z);
                centers[i] = new Point3d(pp.X, pp.Y, pp.Z);
            }
        }