76 Info <<
"Finding point belonging to a chain" <<
endl;
79 chainEdges.
setSize(bEdges_.size());
82 if( edgesAtPoint_[currPos].size() != 2 )
85 const label commonVrt =
86 bEdges_[edgesAtPoint_[currPos][0]].commonVertex
88 bEdges_[edgesAtPoint_[currPos][1]]
90 label prevVrt = bEdges_[edgesAtPoint_[currPos][0]].otherVertex(commonVrt);
91 label nextVrt = bEdges_[edgesAtPoint_[currPos][1]].otherVertex(commonVrt);
92 forAll(edgesAtPoint_[currPos], posI)
93 chainEdges[edgesAtPoint_[currPos][posI]] =
true;
96 Info <<
"commonVrt " << commonVrt <<
endl;
97 Info <<
"prevVrt " << prevVrt <<
endl;
98 Info <<
"nextVrt " << nextVrt <<
endl;
106 const DynList<label>& vEdges = edgesAtPoint_[newNodeLabel_[prevVrt]];
107 if( vEdges.
size() == 2 )
110 if( !chainEdges[vEdges[eI]] )
113 chainEdges[vEdges[eI]] =
true;
114 prevVrt = bEdges_[vEdges[eI]].otherVertex(prevVrt);
123 const DynList<label>& vEdges = edgesAtPoint_[newNodeLabel_[nextVrt]];
124 if( vEdges.
size() == 2 )
127 if( !chainEdges[vEdges[eI]] )
130 chainEdges[vEdges[eI]] =
true;
131 nextVrt = bEdges_[vEdges[eI]].otherVertex(nextVrt);
137 (edgesAtPoint_[newNodeLabel_[nextVrt]].size() != 2) &&
138 (edgesAtPoint_[newNodeLabel_[prevVrt]].size() != 2) &&
147 Info <<
"Chain edges " << chainEdges <<
endl;
184 chainPoints[i++] =
bEdges_[eI].start();
185 chainPoints[i++] =
bEdges_[eI].end();
188 Info <<
"Init chainPoints " << chainPoints <<
endl;
203 if( chainEdges[pEdges[peI]] )
205 const label otherPoint =
206 bEdges_[pEdges[peI]].otherVertex(chainPoints[i-1]);
209 Info <<
"Other point " << otherPoint <<
endl;
211 if( otherPoint == -1 )
213 if( chainPoints[i-2] == otherPoint )
215 if( chainPoints[0] == otherPoint )
219 chainPoints[i++] = otherPoint;