From 14d5b8633d36291b944e59ddb5cce4a0b028d952 Mon Sep 17 00:00:00 2001 From: nadir Date: Tue, 6 Jan 2004 15:17:32 +0000 Subject: [PATCH] Mounting the hypothesis LengthFromEdges in th GUI of SMESH. This functionality was only in the C++ API, and in the CORBA API. --- resources/SMESH_en.xml | 2 ++ resources/SMESH_fr.xml | 2 ++ src/SMESHGUI/SMESHGUI.cxx | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/resources/SMESH_en.xml b/resources/SMESH_en.xml index b04e051f2..e1bb694bf 100644 --- a/resources/SMESH_en.xml +++ b/resources/SMESH_en.xml @@ -41,6 +41,7 @@ + @@ -198,6 +199,7 @@ + diff --git a/resources/SMESH_fr.xml b/resources/SMESH_fr.xml index d0318c03b..5c29ab6ec 100644 --- a/resources/SMESH_fr.xml +++ b/resources/SMESH_fr.xml @@ -41,6 +41,7 @@ + @@ -198,6 +199,7 @@ + diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 3d20ebe47..5f56add8f 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -3156,6 +3156,28 @@ bool SMESHGUI::OnGUIEvent(int theCommandID, QAD_Desktop * parent) break; } + case 5034: // HYPOTHESIS - LENGTH FROM EDGES + { + SMESH::SMESH_Hypothesis_var Hyp; + try + { + Hyp = smeshGUI->myComponentMesh->CreateHypothesis("LengthFromEdges", smeshGUI->myStudyId); + + if (!Hyp->_is_nil()) + { + SALOMEDS::SObject_var SHyp = smeshGUI->myStudyAPI.AddNewHypothesis(Hyp); + smeshGUI->myStudyAPI.SetName(SHyp, "LengthFromEdges"); + } + } + catch(const SALOME::SALOME_Exception & S_ex) + { + QtCatchCorbaException(S_ex); + } + smeshGUI->myActiveStudy->updateObjBrowser(true); + + break; + } + case 6016: // CONTROLS case 6015: case 6014: -- 2.39.2