]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Mesh Offset failure
authoreap <eap@opencascade.com>
Tue, 6 Mar 2018 10:56:46 +0000 (13:56 +0300)
committereap <eap@opencascade.com>
Tue, 6 Mar 2018 10:56:46 +0000 (13:56 +0300)
src/SMESHUtils/SMESH_Offset.cxx

index 6f17aefca65ea963acf2f5ee2d29fcb86bdc1842..efd648a74092eb22624f7e6410f2eff4a8f11324 100644 (file)
@@ -682,9 +682,10 @@ namespace
           dot *= -1;
         if ( dot * theSign < 0 )
         {
-          gp_XYZ p1 = oldXYZ + faces[ i ].Norm()     * theOffset;
-          gp_XYZ p2 = oldXYZ + faces[ iPrev ].Norm() * theOffset;
-          useOneNormal = ( p1 - p2 ).SquareModulus() > theTol * theTol;
+          useOneNormal = true;
+          // gp_XYZ p1 = oldXYZ + faces[ i ].Norm()     * theOffset;
+          // gp_XYZ p2 = oldXYZ + faces[ iPrev ].Norm() * theOffset;
+          // useOneNormal = ( p1 - p2 ).SquareModulus() > theTol * theTol;
         }
       }
       if ( useOneNormal && theNewNode->isMarked() )
@@ -1393,7 +1394,8 @@ namespace
     for ( int is2nd = 0; is2nd < 2; ++is2nd )
     {
       const SMDS_MeshElement* f = is2nd ? myFace1 : myFace2;
-      const CutFace&         cf = myCutFaces.Added( CutFace( is2nd ? myFace2 : myFace1 ));
+      if ( !f ) continue;
+      const CutFace& cf = myCutFaces.Added( CutFace( is2nd ? myFace2 : myFace1 ));
       for ( size_t i = 0; i < cf.myLinks.size(); ++i )
         if ( cf.myLinks[i].myFace == f &&
              //cf.myLinks[i].myIndex != EdgePart::_COPLANAR &&