/// <summary> /// Copy all nodes from an arg geometry into this graph. /// The node label in the arg geometry overrides any previously computed /// label for that argIndex. /// (E.g. a node may be an intersection node with /// a previously computed label of BOUNDARY, /// but in the original arg Geometry it is actually /// in the interior due to the Boundary Determination Rule) /// </summary> private void CopyPoints(int argIndex) { for (IEnumerator i = arg[argIndex].NodeIterator; i.MoveNext(); ) { Node graphNode = (Node) i.Current; Node newNode = graph.AddNode(graphNode.Coordinate); newNode.SetLabel(argIndex, graphNode.Label.GetLocation(argIndex)); } }
} // private void ReplaceCollapsedEdges() /// <summary> /// Copy all nodes from an arg geometry into this graph. /// The node label in the arg geometry overrides any previously computed /// label for that argIndex. /// (E.g. a node may be an intersection node with /// a previously computed label of BOUNDARY, /// but in the original arg Geometry it is actually /// in the interior due to the Boundary Determination Rule) /// </summary> /// <param name="argIndex"></param> private void CopyPoints(int argIndex) { foreach (DictionaryEntry obj in _arg[argIndex].Nodes) { Node graphNode = (Node)obj.Value; Node newNode = _graph.AddNode(graphNode.GetCoordinate()); newNode.SetLabel(argIndex, graphNode.Label.GetLocation(argIndex)); } } // private void CopyPoints( int argIndex )
/// <summary> /// Copy all nodes from an arg point into this graph. /// The node label in the arg point overrides any previously computed /// label for that argIndex. /// (E.g. a node may be an intersection node with /// a previously computed label of Boundary, /// but in the original arg Geometry it is actually /// in the interior due to the Boundary Determination Rule) /// </summary> /// <param name="argIndex"></param> private void CopyPoints(int argIndex) { IEnumerator i = Arg[argIndex].GetNodeEnumerator(); while (i.MoveNext()) { Node graphNode = (Node)i.Current; Node newNode = _graph.AddNode(graphNode.Coordinate); newNode.SetLabel(argIndex, graphNode.Label.GetLocation(argIndex)); } }