]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
#17636 [CEA 17369] Extrusion by normal: along average normal option issue V9_4_0a1
authoreap <eap@opencascade.com>
Fri, 6 Sep 2019 16:02:21 +0000 (19:02 +0300)
committereap <eap@opencascade.com>
Fri, 6 Sep 2019 16:02:21 +0000 (19:02 +0300)
src/SMESH/SMESH_MeshEditor.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESH_SWIG/smeshBuilder.py

index d029fe5ca5a1df9aeb393334d36193c609fc74e2..7466070e46f335978bf01c4b6e44712c5ff055c7 100644 (file)
@@ -5850,6 +5850,11 @@ SMESH_MeshEditor::ExtrusionSweep (TIDSortedElemSet     theElemSets[2],
           }
           else
           {
+            if ( theParams.ToMakeBoundary() )
+            {
+              GetMeshDS()->Modified();
+              throw SALOME_Exception( SMESH_Comment("Can't extrude node #") << node->GetID() );
+            }
             break; // newNodesItVec will be shorter than nbNodes
           }
         }
index cb9c2d6bcb32c3877691489d509139a9ed5913eb..2fe9e92bcc5b7ec3b7e9138c963bf8cf47dcae42 100644 (file)
@@ -1223,8 +1223,8 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
         bool   byAverageNormal   = ByAverageNormalCheck->isChecked();
         int    dim               = (maxSelType == SMESH::FACE) ? 2 : 1;
 
-        groups = meshEditor->ExtrusionByNormal( faces, stepSize, nbSteps, useInputElemsOnly,
-                                                byAverageNormal, makeGroups, dim );
+        groups = meshEditor->ExtrusionByNormal( faces, stepSize, nbSteps, byAverageNormal,
+                                                useInputElemsOnly, makeGroups, dim );
       }
       else
       {
@@ -1261,9 +1261,9 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
       SMESH::Update( actor->getIO(), actor->GetVisibility() );
     if ( makeGroups )
       mySMESHGUI->updateObjBrowser(true); // new groups may appear
-    Init(false);
+
     mySelectionMgr->clearSelected();
-    SelectorWdg->Clear();
+    Init(false);
 
     SMESHGUI::Modified();
   }
@@ -1615,8 +1615,8 @@ void SMESHGUI_ExtrusionDlg::onDisplaySimulation( bool toDisplayPreview )
           bool   byAverageNormal   = ByAverageNormalCheck->isChecked();
           int    dim               = (maxSelType == SMESH::FACE) ? 2 : 1;
 
-          groups = meshEditor->ExtrusionByNormal( faces, stepSize, nbSteps, useInputElemsOnly,
-                                                  byAverageNormal, makeGroups, dim );
+          groups = meshEditor->ExtrusionByNormal( faces, stepSize, nbSteps, byAverageNormal,
+                                                  useInputElemsOnly, makeGroups, dim );
         }
         else
         {
index afa315b9bf416f38174e40f4819503fc1bd89d0d..df65f685f28da4cca6393f06636cde752b8d74c9 100644 (file)
@@ -5595,6 +5595,8 @@ class Mesh(metaclass = MeshMeta):
         if isinstance( Elements, list ):
             if not Elements:
                 raise RuntimeError("Elements empty!")
+            if isinstance( Elements[0], Mesh ):
+                Elements = [ Elements[0].GetMesh() ]
             if isinstance( Elements[0], int ):
                 Elements = self.GetIDSource( Elements, SMESH.ALL )
                 unRegister.set( Elements )