]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
22360: EDF SMESH: Body Fitting algorithm: incorporate edges
authoreap <eap@opencascade.com>
Fri, 27 Dec 2013 18:18:24 +0000 (18:18 +0000)
committereap <eap@opencascade.com>
Fri, 27 Dec 2013 18:18:24 +0000 (18:18 +0000)
src/StdMeshers/StdMeshers_Cartesian_3D.cxx

index 863c66cd6badcc4f863cd3d8aef2c6c04c0ad24c..36b2e2d486ba7abc93a35a86feec2001d705e019 100644 (file)
@@ -1704,6 +1704,21 @@ namespace
       if ( nbSplits < 2 && quad._edgeNodes.empty() )
         nbSplits = 0;
 
+      if ( nbSplits == 0 && !quad._edgeNodes.empty() )
+      {
+        // make _vertexNodes from _edgeNodes of an empty quad
+        const double tol2 = _grid->_tol * _grid->_tol;
+        for ( size_t iP = 0; iP < quad._edgeNodes.size(); ++iP )
+        {
+          _Node* equalNode =
+            FindEqualNode( _vertexNodes, quad._edgeNodes[ iP ].EdgeIntPnt(), tol2 );
+          if ( equalNode )
+            equalNode->Add( quad._edgeNodes[ iP ].EdgeIntPnt() );
+          else
+            _vertexNodes.push_back( quad._edgeNodes[ iP ]);
+        }
+      }
+
       while ( nbSplits > 0 )
       {
         size_t iS = 0;
@@ -1767,6 +1782,8 @@ namespace
               }
               else
               {
+                if ( n2->IsLinked( nFirst->_intPoint ))
+                  break;
                 polyLink._nodes[0] = n2;
                 polyLink._nodes[1] = n1;
                 polygon->_polyLinks.push_back( polyLink );