]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
merge V7_7_BR
authorPaul RASCLE <paul.rascle@edf.fr>
Mon, 1 Feb 2016 14:23:06 +0000 (15:23 +0100)
committerPaul RASCLE <paul.rascle@edf.fr>
Mon, 1 Feb 2016 14:23:06 +0000 (15:23 +0100)
1  2 
src/SMESHUtils/SMESH_MAT2d.cxx

index 66ac2ff309a0487e65c931b1aa78ff2fe2299294,970d560e5f0a6d83097bf161c38e6f7c585c6b61..dc445146cabf54a1947e184fa5f8a20f672b1227
@@@ -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 )