Salome HOME
22812: EDF 9218 SMESH: An empty group is created when using the duplicate nodes and...
authoreap <eap@opencascade.com>
Mon, 8 Dec 2014 17:18:59 +0000 (20:18 +0300)
committereap <eap@opencascade.com>
Mon, 8 Dec 2014 17:18:59 +0000 (20:18 +0300)
doc/salome/gui/SMESH/input/extrusion.doc
src/SMESH/SMESH_MeshEditor.cxx
src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.cxx
src/SMESH_SWIG/smeshBuilder.py

index a28af48d4673c0db26d087a53363270c2fdc13b1..126e3b0e91ddd94592c1ecefa29d714d01aed622 100644 (file)
@@ -3,8 +3,11 @@
 \page extrusion_page Extrusion
 
 \n Extrusion is used to build mesh elements of plus one
 \page extrusion_page Extrusion
 
 \n Extrusion is used to build mesh elements of plus one
-dimension than the input ones. Any node, segment or 2D element can be
-extruded. Each type of elements has a corresponding type of extruded elements:
+dimension than the input ones. Boundary elements around elements of
+plus one dimension are additionally created. All created elements
+can be automatically grouped.
+<p>Any node, segment or 2D element can be extruded. Each type of
+elements is extruded into a corresponding type of result elements:
 <table>
 <tr><td><b>Extruded element</b></td><td><b> Result element </b></td></tr>
 <tr><td>Node              </td><td> Segment </td></tr>
 <table>
 <tr><td><b>Extruded element</b></td><td><b> Result element </b></td></tr>
 <tr><td>Node              </td><td> Segment </td></tr>
index 08cc1d9c2338fe8f628a01af17d75fa9593bd045..75a8f216ea9f3f92946928069082fbcf0a4e0a22 100644 (file)
@@ -11247,6 +11247,14 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
         }
     }
 
         }
     }
 
+  // Remove empty groups (issue 0022812)
+  std::map<std::string, SMESH_Group*>::iterator name_group = mapOfJunctionGroups.begin();
+  for ( ; name_group != mapOfJunctionGroups.end(); ++name_group )
+  {
+    if ( name_group->second && name_group->second->GetGroupDS()->IsEmpty() )
+      myMesh->RemoveGroup( name_group->second->GetGroupDS()->GetID() );
+  }
+
   meshDS->CleanDownWardConnectivity(); // Mesh has been modified, downward connectivity is no more usable, free memory
   grid->BuildLinks();
 
   meshDS->CleanDownWardConnectivity(); // Mesh has been modified, downward connectivity is no more usable, free memory
   grid->BuildLinks();
 
index 57428add241d7cb5f2e65714425fc341cc34bb3f..8b3c6eac18cc74f602745ecd87a3db54f15e6a0f 100644 (file)
@@ -602,7 +602,7 @@ void SMESHGUI_DuplicateNodesDlg::onSelectionChanged()
         break;
       case 3:
         ok = ( aGroupType == SMESH::VOLUME || 
         break;
       case 3:
         ok = ( aGroupType == SMESH::VOLUME || 
-              aGroupType == SMESH::FACE );
+               aGroupType == SMESH::FACE );
         break;
       }
     }
         break;
       }
     }
index fe63e726b055c95b706df6619fa9836ee80927ae..30847284128d82c38b6b2b04484cb7f5bb2e6cd2 100644 (file)
@@ -3391,7 +3391,7 @@ class Mesh:
     #  @param theSubMesh a group or a sub-mesh to convert; WARNING: in this case the mesh can become not conformal
     #  @param theToBiQuad If True, converts the mesh to bi-quadratic
     #  @ingroup l2_modif_tofromqu
     #  @param theSubMesh a group or a sub-mesh to convert; WARNING: in this case the mesh can become not conformal
     #  @param theToBiQuad If True, converts the mesh to bi-quadratic
     #  @ingroup l2_modif_tofromqu
-    def ConvertToQuadratic(self, theForce3d, theSubMesh=None, theToBiQuad=False):
+    def ConvertToQuadratic(self, theForce3d=False, theSubMesh=None, theToBiQuad=False):
         if isinstance( theSubMesh, Mesh ):
             theSubMesh = theSubMesh.mesh
         if theToBiQuad:
         if isinstance( theSubMesh, Mesh ):
             theSubMesh = theSubMesh.mesh
         if theToBiQuad: