for ( size_t i = 0; i < _maEdges.size(); ++i )
twins[i] = _maEdges[i]->twin();
+ // size_t lastConcaE1 = _boundary.nbEdges();
+ // size_t lastConcaE2 = _boundary.nbEdges();
+
+ BranchPoint divisionPnt;
+ divisionPnt._branch = this;
+
+ for ( size_t i = 0; i < _maEdges.size(); ++i )
+ {
+ size_t ie1 = getGeomEdge( _maEdges[i] );
+ size_t ie2 = getGeomEdge( _maEdges[i]->twin() );
+
+ if ( edgeIDs1.back() != ie1 || edgeIDs2.back() != ie2 )
+ {
+ bool isConcaveV = false;
+ if ( edgeIDs1.back() != ie1 && edgeIDs2.back() == ie2 )
+ {
+ isConcaveV = addDivPntForConcaVertex( edgeIDs1, edgeIDs2, divPoints, _maEdges, twins, i );
+ }
+ if ( edgeIDs1.back() == ie1 && edgeIDs2.back() != ie2 )
+ {
+ isConcaveV = addDivPntForConcaVertex( edgeIDs2, edgeIDs1, divPoints, twins, _maEdges, i );
+ BranchIterator maIter ( _maEdges, 0 );
+ BranchIterator twIter ( twins, 0 );
+ // size_t lastConcaE1 = _boundary.nbEdges();
+ // size_t lastConcaE2 = _boundary.nbEdges();
+
+ // if ( maIter._closed ) // closed branch
+ // {
+ // edgeIDs1.push_back( getGeomEdge( _maEdges.back() ));
+ // edgeIDs2.push_back( getGeomEdge( _maEdges.back()->twin() ));
+ // }
+ // else
+ {
+ edgeIDs1.push_back( getGeomEdge( maIter.edge() ));
+ edgeIDs2.push_back( getGeomEdge( twIter.edge() ));
+ }
+
+ BranchPoint divisionPnt;
+ divisionPnt._branch = this;
+
+ for ( ++maIter, ++twIter; maIter.index() < _maEdges.size(); ++maIter, ++twIter )
+ {
+ size_t ie1 = getGeomEdge( maIter.edge() );
+ size_t ie2 = getGeomEdge( twIter.edge() );
+
+ bool otherE1 = ( edgeIDs1.back() != ie1 );
+ bool otherE2 = ( edgeIDs2.back() != ie2 );
+
+ if ( !otherE1 && !otherE2 && maIter._closed )
+ {
+ int iSegPrev1 = getBndSegment( maIter.edgePrev() );
+ int iSegCur1 = getBndSegment( maIter.edge() );
+ otherE1 = Abs( iSegPrev1 - iSegCur1 ) != 1;
+ int iSegPrev2 = getBndSegment( twIter.edgePrev() );
+ int iSegCur2 = getBndSegment( twIter.edge() );
+ otherE2 = Abs( iSegPrev2 - iSegCur2 ) != 1;
+ }
+
+ if ( otherE1 || otherE2 )
+ {
+ bool isConcaveV = false;
+ if ( otherE1 && !otherE2 )
+ {
+ isConcaveV = addDivPntForConcaVertex( edgeIDs1, edgeIDs2, divPoints,
+ _maEdges, twins, maIter._i );
+ }
+ if ( !otherE1 && otherE2 )
+ {
+ isConcaveV = addDivPntForConcaVertex( edgeIDs2, edgeIDs1, divPoints,
+ twins, _maEdges, maIter._i );
}
if ( isConcaveV )