mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-20 03:07:56 +05:00
0020575: EDF 1162 SMESH: Mesh is displayed in "Nodes" mode after compute
This commit is contained in:
parent
61d2e99a72
commit
3ba3d8a91d
@ -520,6 +520,19 @@ bool SMESH_VisualObjDef::GetEdgeNodes( const int theElemId,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : IsValid
|
||||||
|
// purpose : Return true if there are some entities
|
||||||
|
//=================================================================================
|
||||||
|
bool SMESH_VisualObjDef::IsValid() const
|
||||||
|
{
|
||||||
|
return GetNbEntities(SMDSAbs_Node) > 0 ||
|
||||||
|
GetNbEntities(SMDSAbs_0DElement) > 0 ||
|
||||||
|
GetNbEntities(SMDSAbs_Edge) > 0 ||
|
||||||
|
GetNbEntities(SMDSAbs_Face) > 0 ||
|
||||||
|
GetNbEntities(SMDSAbs_Volume) > 0 ;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : SMESH_MeshObj
|
Class : SMESH_MeshObj
|
||||||
Description : Class for visualisation of mesh
|
Description : Class for visualisation of mesh
|
||||||
|
@ -65,6 +65,7 @@ public:
|
|||||||
const int theEdgeNum,
|
const int theEdgeNum,
|
||||||
int& theNodeId1,
|
int& theNodeId1,
|
||||||
int& theNodeId2 ) const = 0;
|
int& theNodeId2 ) const = 0;
|
||||||
|
virtual bool IsValid() const = 0;
|
||||||
|
|
||||||
virtual vtkUnstructuredGrid* GetUnstructuredGrid() = 0;
|
virtual vtkUnstructuredGrid* GetUnstructuredGrid() = 0;
|
||||||
|
|
||||||
|
@ -69,6 +69,8 @@ public:
|
|||||||
virtual bool IsNodePrs() const = 0;
|
virtual bool IsNodePrs() const = 0;
|
||||||
virtual SMDS_Mesh* GetMesh() const = 0;
|
virtual SMDS_Mesh* GetMesh() const = 0;
|
||||||
|
|
||||||
|
virtual bool IsValid() const;
|
||||||
|
|
||||||
virtual bool GetEdgeNodes( const int theElemId,
|
virtual bool GetEdgeNodes( const int theElemId,
|
||||||
const int theEdgeNum,
|
const int theEdgeNum,
|
||||||
int& theNodeId1,
|
int& theNodeId1,
|
||||||
|
@ -712,7 +712,8 @@ namespace SMESH
|
|||||||
_PTR(Study) aDocument = aStudy->studyDS();
|
_PTR(Study) aDocument = aStudy->studyDS();
|
||||||
// Pass non-visual objects (hypotheses, etc.), return true in this case
|
// Pass non-visual objects (hypotheses, etc.), return true in this case
|
||||||
CORBA::Long anId = aDocument->StudyId();
|
CORBA::Long anId = aDocument->StudyId();
|
||||||
if (TVisualObjPtr aVisualObj = GetVisualObj(anId,theEntry))
|
TVisualObjPtr aVisualObj;
|
||||||
|
if ( (aVisualObj = GetVisualObj(anId,theEntry)) && aVisualObj->IsValid())
|
||||||
{
|
{
|
||||||
if ((anActor = CreateActor(aDocument,theEntry,true))) {
|
if ((anActor = CreateActor(aDocument,theEntry,true))) {
|
||||||
bool needFitAll = noSmeshActors(theWnd); // fit for the first object only
|
bool needFitAll = noSmeshActors(theWnd); // fit for the first object only
|
||||||
|
Loading…
x
Reference in New Issue
Block a user