Salome HOME
[bos #24169] [CEA 24168] Error in AffectedElemGroupsInRegion
authoreap <eap@opencascade.com>
Fri, 23 Apr 2021 11:10:04 +0000 (14:10 +0300)
committereap <eap@opencascade.com>
Fri, 23 Apr 2021 11:10:04 +0000 (14:10 +0300)
src/SMDS/SMDS_Mesh.cxx
src/SMESH/SMESH_MeshEditor.cxx
src/SMESH/SMESH_MesherHelper.hxx
src/SMESH_I/SMESH_MeshEditor_i.cxx

index b01e7c9c4357722df36f029abcbe537bfc97d8c7..eaaea68034209efe0ebe0757602d7eaf2ba184a7 100644 (file)
@@ -1438,7 +1438,7 @@ int SMDS_Mesh::GetElementsByNodes(const std::vector<const SMDS_MeshNode *>& node
     }
 
   foundElems.clear();
     }
 
   foundElems.clear();
-  if ( n0 )
+  if ( n0 && minNbInverse > 0 )
   {
     foundElems.reserve( minNbInverse );
     SMDS_ElemIteratorPtr eIt = n0->GetInverseElementIterator( type );
   {
     foundElems.reserve( minNbInverse );
     SMDS_ElemIteratorPtr eIt = n0->GetInverseElementIterator( type );
index 0d5a0a91c54f499f286e573cf7c7c0e4cbcbdc47..22695bac0567cc812b241097973dc6ae7a5bc028 100644 (file)
@@ -10241,7 +10241,8 @@ namespace // automatically find theAffectedElems for DoubleNodes()
       if ( maxX < 0 )
       {
         _elems[0]->setIsMarked( false );
       if ( maxX < 0 )
       {
         _elems[0]->setIsMarked( false );
-        _elems[1]->setIsMarked( true );
+        if ( _elems[1] )
+          _elems[1]->setIsMarked( true );
       }
     }
 
       }
     }
 
@@ -10413,7 +10414,11 @@ namespace // automatically find theAffectedElems for DoubleNodes()
     {
       fissure.reserve( theElemsOrNodes.size() );
       for ( ; elIt != theElemsOrNodes.end(); ++elIt )
     {
       fissure.reserve( theElemsOrNodes.size() );
       for ( ; elIt != theElemsOrNodes.end(); ++elIt )
+      {
         fissure.push_back( std::move( FissureBorder( *elIt, elemsByFacet )));
         fissure.push_back( std::move( FissureBorder( *elIt, elemsByFacet )));
+        if ( !fissure.back()._elems[1] )
+          fissure.pop_back();
+      }
     }
     if ( fissure.empty() )
       return;
     }
     if ( fissure.empty() )
       return;
@@ -10920,7 +10925,7 @@ namespace {
   \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
   This method is the first step of DoubleNodeElemGroupsInRegion.
   \param theElems - list of groups of elements (edges or faces) to be replicated
   \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
   This method is the first step of DoubleNodeElemGroupsInRegion.
   \param theElems - list of groups of elements (edges or faces) to be replicated
-  \param theNodesNot - list of groups of nodes not to replicated
+  \param theNodesNot - list of groups of nodes not to replicate
   \param theShape - shape to detect affected elements (element which geometric center
          located on or inside shape). If the shape is null, detection is done on faces orientations
          (select elements with a gravity center on the side given by faces normals).
   \param theShape - shape to detect affected elements (element which geometric center
          located on or inside shape). If the shape is null, detection is done on faces orientations
          (select elements with a gravity center on the side given by faces normals).
index 5950ec9315c33da59edd2eb53458f2459305ff8e..d48318877d2043cc7f96e8a7d11a37d8fe29e32b 100644 (file)
@@ -100,7 +100,7 @@ class SMESH_EXPORT SMESH_MesherHelper
    * \brief Load nodes bound to face into a map of node columns
     * \param theParam2ColumnMap - map of node columns to fill
     * \param theFace - the face on which nodes are searched for
    * \brief Load nodes bound to face into a map of node columns
     * \param theParam2ColumnMap - map of node columns to fill
     * \param theFace - the face on which nodes are searched for
-    * \param theBaseSide - the edges holding nodes on which columns' bases
+    * \param theBaseSide - the edges holding nodes on which columns base
     * \param theMesh - the mesh containing nodes
     * \retval bool - false if something is wrong
    * 
     * \param theMesh - the mesh containing nodes
     * \retval bool - false if something is wrong
    * 
index 14ed601a62739d64bfc82f9a65683f065f269a31..d96c5c99e22847b2bf173ea69fe6865630028480 100644 (file)
@@ -6671,7 +6671,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroupsInRegion(const SMESH::ListOfGroups& theE
          duplication is not performed.
   This method is the first step of DoubleNodeElemGroupsInRegion.
   \param theElems - list of groups of elements (edges or faces) to be replicated
          duplication is not performed.
   This method is the first step of DoubleNodeElemGroupsInRegion.
   \param theElems - list of groups of elements (edges or faces) to be replicated
-  \param theNodesNot - list of groups of nodes not to replicated
+  \param theNodesNot - list of groups of nodes not to replicate
   \param theShape - shape to detect affected elements (element which geometric center
          located on or inside shape).
          The replicated nodes should be associated to affected elements.
   \param theShape - shape to detect affected elements (element which geometric center
          located on or inside shape).
          The replicated nodes should be associated to affected elements.