Salome HOME
bos #24596 [CEA] New MeshGems license
[modules/smesh.git] / src / SMESHUtils / SMESH_PolyLine.cxx
index b244a7560e99a2a3227776a50b61fd61e40ffa03..b19c5be55e1b1092d42bd4c46b1c4fd2f97aaba9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-2019  OPEN CASCADE
+// Copyright (C) 2018-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -154,7 +154,10 @@ namespace
       if ( !path.SetCutAtCorner( cornerNode, fIt->next(), plnNorm, plnOrig ))
         continue;
 
-      if ( !myAvoidSet.insert( path.myNode1.Node() ).second ||
+      if ( path.myDot1 == 0 &&
+           !myAvoidSet.insert( path.myNode1.Node() ).second )
+        continue;
+      if ( path.myDot2 == 0 &&
            !myAvoidSet.insert( path.myNode2.Node() ).second )
         continue;
 
@@ -356,7 +359,7 @@ namespace
     {
       SMESH_MeshAlgos::PolySegment& polySeg = mySegments[ iSeg ];
 
-      if ( ( polySeg.myXYZ[0] - polySeg.myXYZ[1] ).SquareModulus() == 0 )
+      if (( polySeg.myXYZ[0] - polySeg.myXYZ[1] ).SquareModulus() == 0 )
       {
         myPaths[ iSeg ].AddPoint( polySeg.myXYZ[0] );
         myPaths[ iSeg ].AddPoint( polySeg.myXYZ[1] );
@@ -418,7 +421,7 @@ namespace
                 if ( face2 )
                   polySeg.myFace[ iP ] = face2;
                 else
-                  ;// ??
+                  {} // todo: ??
                 for ( int i = 0; i < 3; ++i )
                 {
                   nodes[ i ] = polySeg.myFace[ iP ]->GetNode( i );