From: Paul RASCLE Date: Mon, 1 Feb 2016 14:23:06 +0000 (+0100) Subject: merge V7_7_BR X-Git-Tag: V7_8_0a2~25^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=193c49c87753b6ccabb2b5e6dc935aa480d2d43e;p=modules%2Fsmesh.git merge V7_7_BR --- 193c49c87753b6ccabb2b5e6dc935aa480d2d43e diff --cc src/SMESHUtils/SMESH_MAT2d.cxx index 66ac2ff30,970d560e5..dc445146c --- a/src/SMESHUtils/SMESH_MAT2d.cxx +++ b/src/SMESHUtils/SMESH_MAT2d.cxx @@@ -1774,27 -1890,55 +1890,76 @@@ void SMESH_MAT2d::Branch::getOppositeGe 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 )