mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-12 01:30:34 +05:00
PAL9199. add SetMeshIcon()
This commit is contained in:
parent
9781d40b04
commit
ad9d3ea3e7
@ -32,13 +32,16 @@ using namespace std;
|
||||
#include "Utils_ORB_INIT.hxx"
|
||||
#include "Utils_SINGLETON.hxx"
|
||||
|
||||
#include <SMESHGUI.h>
|
||||
#include <SMESHGUI_GEOMGenUtils.h>
|
||||
#include "SMESHGUI.h"
|
||||
#include "SMESHGUI_Utils.h"
|
||||
#include "SMESHGUI_GEOMGenUtils.h"
|
||||
|
||||
// SALOME Includes
|
||||
#include "SUIT_ResourceMgr.h"
|
||||
#include "SUIT_Session.h"
|
||||
|
||||
#include "SALOMEDS_SObject.hxx"
|
||||
|
||||
#include "SalomeApp_Application.h"
|
||||
|
||||
#include "utilities.h"
|
||||
@ -54,11 +57,6 @@ using namespace std;
|
||||
|
||||
static CORBA::ORB_var _orb;
|
||||
|
||||
static char* ObjectToString (CORBA::Object_ptr obj)
|
||||
{
|
||||
return _orb->object_to_string(obj);
|
||||
}
|
||||
|
||||
static CORBA::Object_ptr StringToObject (const char* ior)
|
||||
{
|
||||
return _orb->string_to_object(ior);
|
||||
@ -150,7 +148,6 @@ SMESH_Swig::~SMESH_Swig()
|
||||
MESSAGE("Destructeur");
|
||||
}
|
||||
|
||||
|
||||
const char* SMESH_Swig::AddNewMesh(const char* IOR)
|
||||
{
|
||||
MESSAGE("AddNewMesh");
|
||||
@ -346,6 +343,7 @@ void SMESH_Swig::SetHypothesis(const char* Mesh_Or_SubMesh_Entry, const char* Hy
|
||||
myStudyBuilder->Addreference (SO,SO_Hypothesis);
|
||||
}
|
||||
}
|
||||
|
||||
void SMESH_Swig::SetAlgorithms(const char* Mesh_Or_SubMesh_Entry, const char* Algorithms_Entry)
|
||||
{
|
||||
SALOMEDS::SObject_var SO_MorSM = myStudy->FindObjectID( Mesh_Or_SubMesh_Entry );
|
||||
@ -382,7 +380,6 @@ void SMESH_Swig::UnSetHypothesis(const char* Applied_Hypothesis_Entry )
|
||||
myStudyBuilder->RemoveObject(SO_Applied_Hypothesis);
|
||||
}
|
||||
|
||||
|
||||
const char* SMESH_Swig::AddSubMesh(const char* SO_Mesh_Entry, const char* SM_IOR, int ST)
|
||||
{
|
||||
SALOMEDS::SObject_var SO_Mesh = myStudy->FindObjectID( SO_Mesh_Entry );
|
||||
@ -456,7 +453,6 @@ void SMESH_Swig::SetName(const char* Entry, const char* Name)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SMESH_Swig::setOrb()
|
||||
{
|
||||
try {
|
||||
@ -469,3 +465,21 @@ void SMESH_Swig::setOrb()
|
||||
}
|
||||
ASSERT(! CORBA::is_nil(_orb));
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Set mesh icon according to compute status
|
||||
* \param Mesh_Entry - entry of a mesh
|
||||
* \param isComputed - is mesh computed or not
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
void SMESH_Swig::SetMeshIcon(const char* Mesh_Entry, const bool isComputed)
|
||||
{
|
||||
SALOMEDS::SObject_var mesh_var = myStudy->FindObjectID( Mesh_Entry );
|
||||
if ( !mesh_var->_is_nil() ) {
|
||||
_PTR(SObject) mesh = _PTR(SObject)(new SALOMEDS_SObject( mesh_var ));
|
||||
if ( mesh )
|
||||
SMESH::ModifiedMesh( mesh, isComputed );
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,13 @@ public:
|
||||
|
||||
void SetName(const char* Entry, const char* Name);
|
||||
|
||||
/*!
|
||||
* \brief Set mesh icon according to compute status
|
||||
* \param Mesh_Entry - entry of a mesh
|
||||
* \param isComputed - is mesh computed or not
|
||||
*/
|
||||
void SetMeshIcon(const char* Mesh_Entry, const bool isComputed);
|
||||
|
||||
private:
|
||||
SALOMEDS::Study_var myStudy;
|
||||
SALOMEDS::StudyBuilder_var myStudyBuilder;
|
||||
|
@ -55,4 +55,6 @@ class SMESH_Swig
|
||||
const char* AddSubMeshOnShape (const char* Mesh_Entry, const char* GeomShape_Entry, const char* SM_IOR, int ST);
|
||||
|
||||
void SetName(const char* Entry, const char* Name);
|
||||
|
||||
void SetMeshIcon(const char* Mesh_Entry, const bool isComputed);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user