Пример #1
0
 private Edge CheckNeighbor(int x, int y, float weight, Edge.EdgeType type)
 {
     if (_path.Nodes[x, y] != null)
     {
         return(new Edge(this, _path.Nodes[x, y], weight, type));
     }
     return(null);
 }
Пример #2
0
        public override void getNXInfo()
        {
            for (int i = 0; i < nx_RefGeoms.Length; i++)
            {
                if (nx_RefGeoms[i].ToString().Contains("Face"))
                {
                    Face          tempconst = (Face)nx_RefGeoms[i];
                    Edge[]        circularedges = tempconst.GetEdges();
                    Edge          circularEdge = circularedges[0];
                    Edge.EdgeType edgeType = circularEdge.SolidEdgeType;
                    Point3d       a, b;
                    circularEdge.GetVertices(out a, out b); //a, b are same since circular edge starts and ends at same position

                    convertWorldToLocal worldToLocalConv = new convertWorldToLocal();
                    Point3d             tcad_Coord       = worldToLocalConv.calculateLocalCoord(a, refGeomPartPositions[i], refGeomPartOrientations[i]);

                    tcad_RefGeoms[i] = tcad_refGeomRelatedParts[i].SelectCurveBy3Points(tcad_Coord.X, tcad_Coord.Y, tcad_Coord.Z, tcad_Coord.X, tcad_Coord.Y, tcad_Coord.Z, tcad_Coord.X, tcad_Coord.Y, tcad_Coord.Z);
                    if (tcad_RefGeoms[i] == null)
                    {
                        tcad_RefGeoms[i] = tcad_refGeomRelatedParts[i].SelectCurveBy3Points(-tcad_Coord.X, tcad_Coord.Y, tcad_Coord.Z, -tcad_Coord.X, tcad_Coord.Y, tcad_Coord.Z, -tcad_Coord.X, tcad_Coord.Y, tcad_Coord.Z);
                    }
                }
            }
        }
Пример #3
0
 public static bool IsCodeModificationEdge(this Edge.EdgeType et)
 {
     return(et == Edge.EdgeType.CodeChanged || et == Edge.EdgeType.CodeChangedRename || et == Edge.EdgeType.NoCodeChange);
 }
Пример #4
0
 internal List <Edge> GetEdgesFrom(Node n, Edge.EdgeType edgeType)
 {
     return(this.Edges.FindAll(e => e.type.Equals(edgeType) && e.from.Equals(n)));
 }