------------------------------------------------------------------------------
| 909 | |
| 910 | //------------------------------------------------------------------------------ |
| 911 | vtkIdType vtkReebGraph::Implementation::FindJoinNode( |
| 912 | vtkIdType arcId, vtkReebLabelTag label, bool onePathOnly) |
| 913 | { |
| 914 | vtkIdType N = this->GetArc(arcId)->NodeId1; |
| 915 | vtkIdType Ret; |
| 916 | |
| 917 | if (this->GetArc(arcId)->LabelId0 || !this->GetNode(N)->IsFinalized) |
| 918 | // other labels or not final node |
| 919 | return 0; |
| 920 | |
| 921 | if (onePathOnly && (this->GetArc(arcId)->ArcDwId0 || this->GetArc(arcId)->ArcUpId0)) |
| 922 | return 0; |
| 923 | |
| 924 | // base case |
| 925 | if (this->GetArc(arcId)->ArcDwId1 || this->GetArc(arcId)->ArcUpId1) |
| 926 | { |
| 927 | if (label) |
| 928 | SetLabel(arcId, label); |
| 929 | return N; |
| 930 | } |
| 931 | |
| 932 | for (vtkIdType C = this->GetNode(N)->ArcUpId; C; C = this->GetArc(C)->ArcDwId0) |
| 933 | { |
| 934 | Ret = FindJoinNode(C, label, onePathOnly); |
| 935 | |
| 936 | if (Ret) |
| 937 | { |
| 938 | if (label) |
| 939 | SetLabel(arcId, label); |
| 940 | return Ret; |
| 941 | } |
| 942 | } |
| 943 | |
| 944 | return 0; |
| 945 | } |
| 946 | |
| 947 | //------------------------------------------------------------------------------ |
| 948 | vtkIdType vtkReebGraph::Implementation::FindSplitNode( |