Back to index

salome-smesh  6.5.0
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
SMESH Namespace Reference

Namespaces

namespace  Controls

Classes

struct  HistogramRectangle
 Parameters of a reclangle of histogram. More...
interface  Functor
 Base interface for all functors ( i.e. More...
interface  NumericalFunctor
 Numerical functors are intended for calculating value by Id of mesh entity. More...
interface  MinimumAngle
interface  AspectRatio
interface  AspectRatio3D
interface  Warping
interface  Taper
interface  Skew
interface  Area
interface  Volume3D
interface  MaxElementLength2D
interface  MaxElementLength3D
interface  Length
interface  Length2D
interface  MultiConnection
interface  MultiConnection2D
interface  Predicate
 Predicates are intended for verification of criteria, must return bool value by mesh id. More...
interface  BadOrientedVolume
 Logical functor (predicate) "Bad Oriented Volume". More...
interface  BareBorderVolume
 Logical functor (predicate) "Volumes with bare border". More...
interface  BareBorderFace
 Logical functor (predicate) "Faces with bare border". More...
interface  OverConstrainedVolume
 Logical functor (predicate) "Over-constrained Volume" Verify whether a mesh volume has only one facet shared with other volumes. More...
interface  OverConstrainedFace
 Logical functor (predicate) "Over-constrained Face". More...
interface  EqualNodes
 Logical functor (predicate) "Equal Nodes". More...
interface  EqualEdges
 Logical functor (predicate) "Equal Edges". More...
interface  EqualFaces
 Logical functor (predicate) "Equal Faces". More...
interface  EqualVolumes
 Logical functor (predicate) "Equal Volumes". More...
interface  BelongToGeom
 Logical functor (predicate) "Belong To Geometry". More...
interface  BelongToSurface
 Logical functor (predicate) "Belong To Surface". More...
interface  BelongToPlane
 Logical functor (predicate) "Belong To Plane". More...
interface  BelongToCylinder
 Logical functor (predicate) "Belong To Cylinder". More...
interface  BelongToGenSurface
 Logical functor (predicate) "Belong To Generic Surface". More...
interface  LyingOnGeom
 Logical functor (predicate) "Lying On Geometry". More...
interface  FreeBorders
 Logical functor (predicate) "Free borders". More...
interface  FreeEdges
 Logical functor (predicate) "Free edges". More...
interface  FreeNodes
 Logical functor (predicate) "Free nodes". More...
interface  FreeFaces
 Logical functor (predicate) "Free faces". More...
interface  RangeOfIds
 Abstract logical functor (predicate) "RangeOfIds". More...
interface  Comparator
 Comparator. More...
interface  LessThan
interface  MoreThan
interface  EqualTo
interface  Logical
 Logical predicates are intended for compose predicates using boolean operations. More...
interface  LogicalNOT
interface  LogicalBinary
interface  LogicalAND
interface  LogicalOR
interface  LinearOrQuadratic
 Logical functor (predicate) "Is element Linear or Quadratic". More...
interface  GroupColor
 Functor "Group Color" Returns color of group to which mesh element belongs to. More...
interface  ElemGeomType
 Functor "Element geometry type" Returns is element has indicated geometry type. More...
interface  CoplanarFaces
 Functor "Coplanar faces" Returns true if a mesh face is a coplanar neighbour to a given one. More...
interface  Filter
 Filter. More...
interface  FilterLibrary
 Interface for working with library of filters. More...
interface  FilterManager
 Interface of Filter manager. More...
struct  AlgoStateError
 Hypothesis definintion error. More...
struct  ComputeError
interface  SMESH_Gen
interface  SMESH_GroupBase
 SMESH_Group: base interface of group object. More...
interface  SMESH_Group
 SMESH_Group: interface of a standalone group object. More...
interface  SMESH_GroupOnGeom
 SMESH_GroupOnGeom: interface of a group object linked to geometry. More...
interface  SMESH_GroupOnFilter
 SMESH_GroupOnFilter: interface of a group object defined by filter. More...
interface  SMESH_Hypothesis
interface  SMESH_Algo
interface  SMESH_0D_Algo
interface  SMESH_1D_Algo
interface  SMESH_2D_Algo
interface  SMESH_3D_Algo
struct  Measure
interface  Measurements
struct  log_block
struct  PointStruct
struct  DirStruct
struct  AxisStruct
struct  NodePosition
 Node location on a shape. More...
struct  ElementSubType
 Structure used in mesh edit preview data (MeshPreviewStruct) More...
struct  MeshPreviewStruct
 Structure containing mesh edit preview data. More...
interface  SMESH_IDSource
interface  SMESH_Mesh
interface  SMESH_subMesh
interface  SMESH_MeshEditor
interface  SMESH_Pattern
 SMESH_Pattern: interface of mesh pattern. More...
protocol  SMESH_I_EXPORT
 Object used to make TPythonDump know that its held value can be a varible. More...
class  BelongToGenSurface_i
struct  ClippingPlaneInfo
class  TElementSimulation
class  OrientedPlane
struct  TPlaneData
struct  MemoryReserve
 Allocate some memory at construction and release it at destruction. More...
class  TShapeDisplayer
 Class showing shapes without publishing. More...
class  TPolySimulation
class  TIdPreview
class  TNodeSimulation

Typedefs

typedef sequence
< HistogramRectangle
Histogram
typedef sequence
< GEOM::GEOM_Object > 
object_array
typedef sequence< SMESH_Meshmesh_array
typedef sequence< AlgoStateErroralgo_error_array
typedef sequence< ComputeErrorcompute_error_array
typedef sequence< string > ListOfParameters
typedef sequence< string > ListOfHypothesisName
typedef sequence
< SMESH_Hypothesis
ListOfHypothesis
typedef sequence< SMESH_GroupBaseListOfGroups
typedef sequence< SMESH_IDSourceListOfIDSources
typedef sequence< double > double_array
typedef sequence< long > long_array
typedef sequence< string > string_array
typedef sequence< long_arrayarray_of_long_array
typedef sequence< PointStructnodes_array
typedef sequence< ElementTypearray_of_ElementType
typedef sequence< log_blocklog_array
typedef sequence< ElementSubTypetypes_array
typedef sequence< SMESH_subMeshsubmesh_array
typedef sequence< submesh_arraysubmesh_array_array
typedef sequence
< SMESH::PointStruct
point_array
typedef vtkSmartPointer
< OrientedPlane
TPlane
typedef std::list< vtkActor * > TActorList
typedef std::vector< TPlaneTPlaneVector
typedef std::vector< TPlaneDataTPlaneDataVector
typedef IMap< QString,
HypothesisData * > 
THypothesisDataMap
typedef std::vector< _PTR(SObject)> SObjectList
typedef std::map
< TKeyOfVisualObj,
TVisualObjPtr
TVisualObjCont
typedef std::pair< int,
std::string > 
TKeyOfVisualObj

Enumerations

enum  FunctorType {
  FT_AspectRatio, FT_AspectRatio3D, FT_Warping, FT_MinimumAngle,
  FT_Taper, FT_Skew, FT_Area, FT_Volume3D,
  FT_MaxElementLength2D, FT_MaxElementLength3D, FT_FreeBorders, FT_FreeEdges,
  FT_FreeNodes, FT_FreeFaces, FT_EqualNodes, FT_EqualEdges,
  FT_EqualFaces, FT_EqualVolumes, FT_MultiConnection, FT_MultiConnection2D,
  FT_Length, FT_Length2D, FT_BelongToGeom, FT_BelongToPlane,
  FT_BelongToCylinder, FT_BelongToGenSurface, FT_LyingOnGeom, FT_RangeOfIds,
  FT_BadOrientedVolume, FT_BareBorderVolume, FT_BareBorderFace, FT_OverConstrainedVolume,
  FT_OverConstrainedFace, FT_LinearOrQuadratic, FT_GroupColor, FT_ElemGeomType,
  FT_CoplanarFaces, FT_LessThan, FT_MoreThan, FT_EqualTo,
  FT_LogicalNOT, FT_LogicalAND, FT_LogicalOR, FT_Undefined
}
 Enumeration of functor types. More...
enum  ComputeErrorName {
  COMPERR_OK, COMPERR_BAD_INPUT_MESH, COMPERR_STD_EXCEPTION, COMPERR_OCC_EXCEPTION,
  COMPERR_SLM_EXCEPTION, COMPERR_EXCEPTION, COMPERR_MEMORY_PB, COMPERR_ALGO_FAILED,
  COMPERR_BAD_SHAPE, COMPERR_WARNING
}
 Mesh computation error. More...
enum  Dimension { DIM_0D, DIM_1D, DIM_2D, DIM_3D }
enum  log_command {
  ADD_NODE, ADD_EDGE, ADD_TRIANGLE, ADD_QUADRANGLE,
  ADD_POLYGON, ADD_TETRAHEDRON, ADD_PYRAMID, ADD_PRISM,
  ADD_HEXAHEDRON, ADD_POLYHEDRON, REMOVE_NODE, REMOVE_ELEMENT,
  MOVE_NODE, CHANGE_ELEMENT_NODES, CHANGE_POLYHEDRON_NODES, RENUMBER,
  CLEAR_MESH, ADD_QUADEDGE, ADD_QUADTRIANGLE, ADD_QUADQUADRANGLE,
  ADD_QUADTETRAHEDRON, ADD_QUADPYRAMID, ADD_QUADPENTAHEDRON, ADD_QUADHEXAHEDRON,
  ADD_ELEM0D, ADD_BIQUAD_QUADRANGLE, ADD_TRIQUAD_HEXA, ADD_HEXAGONAL_PRISM
}
enum  ElementType {
  ALL, NODE, EDGE, FACE,
  VOLUME, ELEM0D
}
 Enumeration for element type, like in SMDS. More...
enum  GeometryType {
  Geom_POINT, Geom_EDGE, Geom_TRIANGLE, Geom_QUADRANGLE,
  Geom_POLYGON, Geom_TETRA, Geom_PYRAMID, Geom_HEXA,
  Geom_PENTA, Geom_HEXAGONAL_PRISM, Geom_POLYHEDRA
}
 Enumeration for element geometry type, like in SMDS. More...
enum  ElementOrder { ORDER_ANY, ORDER_LINEAR, ORDER_QUADRATIC }
 ElementOrder points out entities of what order are requested. More...
enum  EntityType {
  Entity_Node, Entity_0D, Entity_Edge, Entity_Quad_Edge,
  Entity_Triangle, Entity_Quad_Triangle, Entity_Quadrangle, Entity_Quad_Quadrangle,
  Entity_BiQuad_Quadrangle, Entity_Polygon, Entity_Quad_Polygon, Entity_Tetra,
  Entity_Quad_Tetra, Entity_Pyramid, Entity_Quad_Pyramid, Entity_Hexa,
  Entity_Quad_Hexa, Entity_TriQuad_Hexa, Entity_Penta, Entity_Quad_Penta,
  Entity_Hexagonal_Prism, Entity_Polyhedra, Entity_Quad_Polyhedra, Entity_Last
}
 Enumeration of entity type used in mesh info array, it should be synchronised with enum SMDSAbs_EntityType. More...
enum  Hypothesis_Status {
  HYP_OK, HYP_MISSING, HYP_CONCURENT, HYP_BAD_PARAMETER,
  HYP_HIDDEN_ALGO, HYP_HIDING_ALGO, HYP_UNKNOWN_FATAL, HYP_INCOMPATIBLE,
  HYP_NOTCONFORM, HYP_ALREADY_EXIST, HYP_BAD_DIM, HYP_BAD_SUBSHAPE,
  HYP_BAD_GEOMETRY, HYP_NEED_SHAPE
}
 Enumeration for hypothesis status (used by AddHypothesis() and RemoveHypothesis() methods) More...
enum  DriverMED_ReadStatus {
  DRS_OK, DRS_EMPTY, DRS_WARN_RENUMBER, DRS_WARN_SKIP_ELEM,
  DRS_FAIL
}
 Enumeration for DriverMED read status (used by ImportMEDFile() method) More...
enum  MED_VERSION { MED_V2_1, MED_V2_2 }
 Enumeration for DriverMED (used by Perform() method) More...
enum  Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D }
enum  Viewer2dActionType { UpdateIn2dViewer = 0, RemoveFrom2dViewer }
enum  Orientation { XY, YZ, ZX }
enum  SMESHGUI_FilterType {
  UnknownFilter = -1, NodeFilter = 0, EdgeFilter = 1, FaceFilter = 2,
  VolumeFilter = 3, AllElementsFilter = 4, QuadFilter = 5, TriaFilter = 6,
  LastFilter
}
enum  EDisplaing {
  eDisplayAll, eDisplay, eDisplayOnly, eErase,
  eEraseAll
}

Functions

vtkFloatingPointType GetFloat (const QString &theValue, vtkFloatingPointType theDefault)
vtkFloatingPointType GetFloat (const QString &theValue, const QString &theSection, vtkFloatingPointType theDefault)
void WriteUnstructuredGrid (vtkUnstructuredGrid *theGrid, const char *theFileName)
QColor GetColor (const QString &theSect, const QString &theName, const QColor &def)
void GetColor (const QString &theSect, const QString &theName, int &r, int &g, int &b, const QColor &def)
void GetColor (const QString &theSect, const QString &theName, vtkFloatingPointType &r, vtkFloatingPointType &g, vtkFloatingPointType &b, const QColor &def)
void GetColor (const QString &theSect, const QString &theName, QColor &color, int &delta, QString def)
std::map< SMDSAbs_ElementType,
int > 
GetEntitiesFromObject (SMESH_VisualObj *theObject)
void ProcessIn2DViewers (SMESH_Actor *theActor, Viewer2dActionType aType)
 Get histogram from the input actor Repaint/Remove the histogram in/from each opened Plot2D Viewer.
template<class TArray >
void DumpArray (const TArray &theArray, TPythonDump &theStream)
TCollection_AsciiString myLongStringStart ("TPythonDump::LongStringStart")
TCollection_AsciiString myLongStringEnd ("TPythonDump::LongStringEnd")
Predicate_i * GetPredicate (Predicate_ptr thePredicate)
Predicate_i * GetPredicate (SMESH::Predicate_ptr thePredicate)
const char * FunctorTypeToString (SMESH::FunctorType ft)
 Return a string corresponding to an item of enum FunctorType.
SMESH::FunctorType StringToFunctorType (const char *str)
 Converts a string to FunctorType.
template<class T >
DownCast (CORBA::Object_ptr theArg)
QString errorText (int errCode, const char *comment)
 _PTR (SObject) getSubShapeSO(int subShapeID = SMESH::FindSObject(aMainShape)
 Return SO of a sub-shape.
 if (subShapeID==1||!so) return so
 _PTR (ChildIterator) it
 if (_PTR(Study) study=SMESH::GetActiveStudyDocument()) it
 if (it)
GEOM::GEOM_Object_ptr getSubShape (int subShapeID, GEOM::GEOM_Object_var aMainShape)
 Return sub-shape by ID.
QString shapeTypeName (GEOM::GEOM_Object_var aShape, const char *dflt="")
QString shapeText (int subShapeID, GEOM::GEOM_Object_var aMainShape)
 Return text describing a sub-shape.
int getSelectedRows (QTableWidget *table, QList< int > &rows)
 Return a list of selected rows.
SMESH::FilterManager_var & GetFilterManager ()
GEOM::GEOM_Gen_var GetGEOMGen ()
GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh (_PTR(SObject) theMeshOrSubmesh, bool *isMesh)
GEOM::GEOM_Object_ptr GetGeom (_PTR(SObject) theSO)
GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape, long theID)
SMESH::SMESH_Group_var AddGroup (SMESH::SMESH_Mesh_ptr theMesh, SMESH::ElementType theType, const QString &theGroupName)
void processHypothesisStatus (const int theHypStatus, SMESH::SMESH_Hypothesis_ptr theHyp, const bool theIsAddition)
static QString mangledHypoSetName (HypothesesSet *hypSet)
 Prepends dimension and appends '[custom]' to the name of hypothesis set.
static QString demangledHypoSetName (QString name)
 Removes dimension and '[custom]' from the name of hypothesis set.
void InitAvailableHypotheses ()
QStringList GetAvailableHypotheses (const bool isAlgo, const int theDim, const bool isAux, const bool isNeedGeometry)
QStringList GetHypothesesSets (int maxDim)
HypothesesSetGetHypothesesSet (const QString &theSetName)
HypothesisDataGetHypothesisData (const QString &aHypType)
bool IsAvailableHypothesis (const HypothesisData *algoData, const QString &hypType, bool &isAuxiliary)
bool IsCompatibleAlgorithm (const HypothesisData *algo1Data, const HypothesisData *algo2Data)
SMESHGUI_GenericHypothesisCreator * GetHypothesisCreator (const QString &aHypType)
SMESH::SMESH_Hypothesis_ptr CreateHypothesis (const QString &aHypType, const QString &aHypName, const bool isAlgo)
bool AddHypothesisOnMesh (SMESH::SMESH_Mesh_ptr aMesh, SMESH::SMESH_Hypothesis_ptr aHyp)
bool AddHypothesisOnSubMesh (SMESH::SMESH_subMesh_ptr aSubMesh, SMESH::SMESH_Hypothesis_ptr aHyp)
bool RemoveHypothesisOrAlgorithmOnMesh (const Handle(SALOME_InteractiveObject)&IObject)
bool RemoveHypothesisOrAlgorithmOnMesh (_PTR(SObject) MorSM, SMESH::SMESH_Hypothesis_ptr anHyp)
SObjectList GetMeshesUsingAlgoOrHypothesis (SMESH::SMESH_Hypothesis_ptr AlgoOrHyp)
QString GetMessageOnAlgoStateErrors (const algo_error_array &errors)
SMESH_Mesh_var GetMeshByIO (const Handle(SALOME_InteractiveObject)&theIO)
QString UniqueMeshName (const QString &theBaseName, const QString &thePostfix)
QString UniqueName (const QString &theBaseName, _PTR(SObject) theParent, const QString &thePostfix)
SMESH::Measurements_var & GetMeasurements ()
long AddNode (SMESH::SMESH_Mesh_ptr theMesh, float x, float y, float z, const QStringList &theParameters)
SMESH::SMESH_Pattern_var GetPattern ()
SUIT_Desktop * GetDesktop (const CAM_Module *theModule)
LightApp_SelectionMgr * GetSelectionMgr (const SalomeApp_Module *theModule)
SUIT_ResourceMgr * GetResourceMgr (const SalomeApp_Module *)
 GetCStudy (const SalomeApp_Study *theStudy)
CORBA::Object_var DataOwnerToObject (const LightApp_DataOwnerPtr &theOwner)
SUIT_Study * GetActiveStudy ()
SUIT_ViewWindow * GetActiveWindow ()
 _PTR (Study) GetActiveStudyDocument()
void SetName (_PTR(SObject) theSObject, const QString &theName)
void SetValue (_PTR(SObject) theSObject, const QString &theValue)
void setFileName (_PTR(SObject) theSObject, const QString &theValue)
void setFileType (_PTR(SObject) theSObject, const QString &theValue)
CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject, _PTR(Study) theStudy)
CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject)
CORBA::Object_var IObjectToObject (const Handle(SALOME_InteractiveObject)&theIO)
CORBA::Object_var IORToObject (const QString &theIOR)
int GetNameOfSelectedIObjects (LightApp_SelectionMgr *theMgr, QString &theName)
void ModifiedMesh (_PTR(SObject) theSObject, bool theIsNotModif, bool isEmptyMesh)
void ShowHelpFile (const QString &theHelpFileName)
gp_XYZ getNormale (const SMDS_MeshFace *theFace)
 Return normale to a given face.
SMESHGUI_EXPORT SalomeApp_Study * GetAppStudy (const CAM_Module *)
template<class TInterface >
TInterface::_var_type DataOwnerToInterface (const LightApp_DataOwnerPtr &theDataOwner)
template<class TInterface >
TInterface::_var_type SObjectToInterface (_PTR(SObject) theSObject)
template<class TInterface >
TInterface::_var_type IObjectToInterface (const Handle(SALOME_InteractiveObject)&theIO)
template<class TInterface >
TInterface::_var_type IORToInterface (const QString &theIOR)
void RemoveVisualObjectWithActors (const char *theEntry, bool fromAllViews)
 Remove VisualObj and its actor from all views.
void RemoveAllObjectsWithActors ()
 Remove all VisualObjs and their actors from all views.
void RemoveVisuData (int studyID)
 Remove all VisualObjs of a study.
void OnVisuException ()
 Notify the user on problems during visualization.
TVisualObjPtr GetVisualObj (int theStudyId, const char *theEntry, bool nulData)
 Returns an updated visual object.
SVTK_ViewWindow * GetViewWindow (const SalomeApp_Module *theModule, bool createIfNotFound)
 Return active view window, if it instantiates SVTK_ViewWindow class, overwise find or create corresponding view window, make it active and return it.
SVTK_ViewWindow * FindVtkViewWindow (SUIT_ViewManager *theMgr, SUIT_ViewWindow *theWindow)
SVTK_ViewWindow * GetVtkViewWindow (SUIT_ViewWindow *theWindow)
SVTK_ViewWindow * GetCurrentVtkView ()
void RepaintCurrentView ()
void RepaintViewWindow (SVTK_ViewWindow *theWindow)
void RenderViewWindow (SVTK_ViewWindow *theWindow)
void FitAll ()
SMESH_Actor * FindActorByEntry (SUIT_ViewWindow *theWindow, const char *theEntry)
SMESH_Actor * FindActorByEntry (const char *theEntry)
SMESH_Actor * FindActorByObject (CORBA::Object_ptr theObject)
SMESH_Actor * CreateActor (_PTR(Study) theStudy, const char *theEntry, int theIsClear)
void DisplayActor (SUIT_ViewWindow *theWnd, SMESH_Actor *theActor)
void RemoveActor (SUIT_ViewWindow *theWnd, SMESH_Actor *theActor)
bool noSmeshActors (SUIT_ViewWindow *theWnd)
 Return true if there are no SMESH actors in a view.
bool UpdateView (SUIT_ViewWindow *theWnd, EDisplaing theAction, const char *theEntry)
bool UpdateView (EDisplaing theAction, const char *theEntry)
void UpdateView ()
bool Update (const Handle(SALOME_InteractiveObject)&theIO, bool theDisplay)
bool UpdateNulData (const Handle(SALOME_InteractiveObject)&theIO, bool theDisplay)
void UpdateSelectionProp (SMESHGUI *theModule)
SVTK_Selector * GetSelector (SUIT_ViewWindow *theWindow)
void SetFilter (const Handle(VTKViewer_Filter)&theFilter, SVTK_Selector *theSelector)
 Handle (VTKViewer_Filter) GetFilter(int theId
SMESHGUI_EXPORT void SetPointRepresentation (bool)
SMESHGUI_EXPORT void SetPickable (SMESH_Actor *=0)
SMESHGUI_EXPORT SVTK_Selector
*SMESHGUI_EXPORT bool 
IsFilterPresent (int, SVTK_Selector *=GetSelector())
SMESHGUI_EXPORT void RemoveFilter (int, SVTK_Selector *=GetSelector())
SMESHGUI_EXPORT void RemoveFilters (SVTK_Selector *=GetSelector())
SMESHGUI_EXPORT bool IsValid (SALOME_Actor *, int, SVTK_Selector *=GetSelector())
SMESHGUI_EXPORT int GetNameOfSelectedNodes (SVTK_Selector *, const Handle(SALOME_InteractiveObject)&, QString &)
SMESHGUI_EXPORT int GetNameOfSelectedElements (SVTK_Selector *, const Handle(SALOME_InteractiveObject)&, QString &)
SMESHGUI_EXPORT int GetEdgeNodes (SVTK_Selector *, const TVisualObjPtr &, int &, int &)
SMESHGUI_EXPORT int GetNameOfSelectedNodes (LightApp_SelectionMgr *, const Handle(SALOME_InteractiveObject)&, QString &)
SMESHGUI_EXPORT int GetNameOfSelectedNodes (LightApp_SelectionMgr *, QString &)
SMESHGUI_EXPORT int GetNameOfSelectedElements (LightApp_SelectionMgr *, const Handle(SALOME_InteractiveObject)&, QString &)
SMESHGUI_EXPORT int GetNameOfSelectedElements (LightApp_SelectionMgr *, QString &)
SMESHGUI_EXPORT int GetSelected (LightApp_SelectionMgr *, TColStd_IndexedMapOfInteger &, const bool=true)
SMESHGUI_EXPORT int GetEdgeNodes (LightApp_SelectionMgr *, int &, int &)
SMESHGUI_EXPORT void SetControlsPrecision (const long)
SMESHGUI_EXPORT void ClearPlot2Viewers (SUIT_ViewWindow *theWindow)
SMESHGUI_EXPORT bool ComputeClippingPlaneParameters (std::list< vtkActor * > theActorList, vtkFloatingPointType theNormal[3], vtkFloatingPointType theDist, vtkFloatingPointType theBounds[6], vtkFloatingPointType theOrigin[3])

Variables

const long Tag_HypothesisRoot = 1
 Tags definition.
const long Tag_AlgorithmsRoot = 2
const long Tag_FirstMeshRoot = 3
const long Tag_RefOnShape = 1
const long Tag_RefOnAppliedHypothesis = 2
const long Tag_RefOnAppliedAlgorithms = 3
const long Tag_FirstSubMesh = 4
const long Tag_SubMeshOnVertex = 4
const long Tag_SubMeshOnEdge = 5
const long Tag_SubMeshOnWire = 6
const long Tag_SubMeshOnFace = 7
const long Tag_SubMeshOnShell = 8
const long Tag_SubMeshOnSolid = 9
const long Tag_SubMeshOnCompound = 10
const long Tag_LastSubMesh = 10
const long Tag_FirstGroup = 11
const long Tag_NodeGroups = 11
const long Tag_EdgeGroups = 12
const long Tag_FaceGroups = 13
const long Tag_VolumeGroups = 14
const long Tag_0DElementsGroups = 15
const long Tag_LastGroup = 15
const long EXTRUSION_FLAG_BOUNDARY = 1
 Auxilary flags for advanced extrusion.
const long EXTRUSION_FLAG_SEW = 2
const vtkIdType DeleteActorEvent = vtkCommand::UserEvent + 100
return subSO
THypothesisDataMap myHypothesesMap
THypothesisDataMap myAlgorithmsMap
QList< HypothesesSet * > myListOfHypothesesSets
static TVisualObjCont VISUAL_OBJ_CONT
static MemoryReservetheVISU_MemoryReserve = new MemoryReserve

Class Documentation

struct SMESH::HistogramRectangle

Parameters of a reclangle of histogram.

Definition at line 91 of file SMESH_Filter.idl.

Class Members
double max
double min
long nbEvents
struct SMESH::AlgoStateError

Hypothesis definintion error.

Definition at line 79 of file SMESH_Gen.idl.

Class Members
long algoDim
string algoName
boolean isGlobalAlgo
Hypothesis_Status state
struct SMESH::ComputeError

Definition at line 104 of file SMESH_Gen.idl.

Class Members
string algoName
short code
string comment
boolean hasBadMesh
short subShapeID
struct SMESH::Measure

Definition at line 38 of file SMESH_Measurements.idl.

Class Members
long elem1
long elem2
double maxX
double maxY
double maxZ
double minX
double minY
double minZ
long node1
long node2
double value
struct SMESH::log_block

Definition at line 80 of file SMESH_Mesh.idl.

Class Members
long commandType
double_array coords
long_array indexes
long number
struct SMESH::PointStruct

Definition at line 88 of file SMESH_Mesh.idl.

Class Members
double x
double y
double z
struct SMESH::DirStruct

Definition at line 94 of file SMESH_Mesh.idl.

Collaboration diagram for SMESH::DirStruct:
Class Members
PointStruct PS
struct SMESH::AxisStruct

Definition at line 96 of file SMESH_Mesh.idl.

Class Members
double vx
double vy
double vz
double x
double y
double z
struct SMESH::NodePosition

Node location on a shape.

Definition at line 106 of file SMESH_Mesh.idl.

Class Members
double_array params
long shapeID
shape_type shapeType
struct SMESH::ElementSubType

Structure used in mesh edit preview data (MeshPreviewStruct)

Definition at line 245 of file SMESH_Mesh.idl.

Class Members
boolean isPoly
long nbNodesInElement
ElementType SMDS_ElementType
struct SMESH::MeshPreviewStruct

Structure containing mesh edit preview data.

Definition at line 254 of file SMESH_Mesh.idl.

Class Members
long_array elementConnectivities
types_array elementTypes
nodes_array nodesXYZ
struct SMESH::ClippingPlaneInfo

Definition at line 71 of file SMESHGUI.h.

Collaboration diagram for SMESH::ClippingPlaneInfo:
Class Members
list< vtkActor * > ActorList
OrientedPlane * Plane

Typedef Documentation

Definition at line 86 of file SMESH_Gen.idl.

Definition at line 124 of file SMESH_Mesh.idl.

Definition at line 46 of file SMESH_Mesh.idl.

Definition at line 112 of file SMESH_Gen.idl.

typedef sequence<double > SMESH::double_array

Definition at line 43 of file SMESH_Mesh.idl.

Definition at line 97 of file SMESH_Filter.idl.

Definition at line 38 of file SMESH_Mesh.idl.

Definition at line 36 of file SMESH_Mesh.idl.

typedef sequence<string> SMESH::ListOfHypothesisName

Definition at line 111 of file SMESH_Hypothesis.idl.

Definition at line 40 of file SMESH_Mesh.idl.

typedef sequence<string> SMESH::ListOfParameters

Definition at line 42 of file SMESH_Hypothesis.idl.

typedef sequence<log_block> SMESH::log_array

Definition at line 231 of file SMESH_Mesh.idl.

typedef sequence<long > SMESH::long_array

Definition at line 44 of file SMESH_Mesh.idl.

typedef sequence<SMESH_Mesh> SMESH::mesh_array

Definition at line 40 of file SMESH_Gen.idl.

typedef sequence<PointStruct> SMESH::nodes_array

Definition at line 92 of file SMESH_Mesh.idl.

typedef sequence<GEOM::GEOM_Object> SMESH::object_array

Definition at line 39 of file SMESH_Gen.idl.

Definition at line 36 of file SMESH_Pattern.idl.

typedef std::vector<_PTR(SObject)> SMESH::SObjectList

Definition at line 112 of file SMESHGUI_HypothesesUtils.h.

typedef sequence<string > SMESH::string_array

Definition at line 45 of file SMESH_Mesh.idl.

Definition at line 296 of file SMESH_Mesh.idl.

Definition at line 299 of file SMESH_Mesh.idl.

typedef std::list<vtkActor*> SMESH::TActorList

Definition at line 106 of file SMESHGUI_ClippingDlg.h.

typedef IMap<QString,HypothesisData*> SMESH::THypothesisDataMap

Definition at line 84 of file SMESHGUI_HypothesesUtils.cxx.

typedef std::pair<int,std::string> SMESH::TKeyOfVisualObj

Definition at line 65 of file SMESHGUI_VTKUtils.h.

typedef vtkSmartPointer<OrientedPlane> SMESH::TPlane

Definition at line 105 of file SMESHGUI_ClippingDlg.h.

typedef std::vector<TPlaneData> SMESH::TPlaneDataVector

Definition at line 121 of file SMESHGUI_ClippingDlg.h.

typedef std::vector<TPlane> SMESH::TPlaneVector

Definition at line 120 of file SMESHGUI_ClippingDlg.h.

Definition at line 80 of file SMESHGUI_VTKUtils.cxx.

Definition at line 249 of file SMESH_Mesh.idl.


Enumeration Type Documentation

Enumerator:
BND_2DFROM3D 
BND_1DFROM3D 
BND_1DFROM2D 

Definition at line 31 of file SMESH_MeshEditor.idl.

Mesh computation error.

Enumerator:
COMPERR_OK 
COMPERR_BAD_INPUT_MESH 
COMPERR_STD_EXCEPTION 
COMPERR_OCC_EXCEPTION 
COMPERR_SLM_EXCEPTION 
COMPERR_EXCEPTION 
COMPERR_MEMORY_PB 
COMPERR_ALGO_FAILED 
COMPERR_BAD_SHAPE 
COMPERR_WARNING 

Definition at line 91 of file SMESH_Gen.idl.

  {
    COMPERR_OK            ,
    COMPERR_BAD_INPUT_MESH,  // wrong mesh on lower submesh
    COMPERR_STD_EXCEPTION ,  // some std exception raised
    COMPERR_OCC_EXCEPTION ,  // OCC exception raised
    COMPERR_SLM_EXCEPTION ,  // SALOME exception raised
    COMPERR_EXCEPTION     ,  // other exception raised
    COMPERR_MEMORY_PB     ,  // memory allocation problem
    COMPERR_ALGO_FAILED   ,  // computation failed
    COMPERR_BAD_SHAPE     ,  // bad geometry
    COMPERR_WARNING          // algo reports error but sub-mesh is computed anyway
  };
Enumerator:
DIM_0D 
DIM_1D 
DIM_2D 
DIM_3D 

Definition at line 34 of file SMESH_Hypothesis.idl.

Enumeration for DriverMED read status (used by ImportMEDFile() method)

Enumerator:
DRS_OK 
DRS_EMPTY 
DRS_WARN_RENUMBER 
DRS_WARN_SKIP_ELEM 
DRS_FAIL 

Definition at line 212 of file SMESH_Mesh.idl.

  {
    DRS_OK,
    DRS_EMPTY,          // a MED file contains no mesh with the given name
    DRS_WARN_RENUMBER,  // a MED file has overlapped ranges of element numbers,
                        // so the numbers from the file are ignored
    DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
    DRS_FAIL            // general failure (exception etc.)
  };
Enumerator:
eDisplayAll 
eDisplay 
eDisplayOnly 
eErase 
eEraseAll 

Definition at line 114 of file SMESHGUI_VTKUtils.h.

ElementOrder points out entities of what order are requested.

Enumerator:
ORDER_ANY 
ORDER_LINEAR 

entities of any order

ORDER_QUADRATIC 

entities of 1st order

entities of 2nd order

Definition at line 147 of file SMESH_Mesh.idl.

Enumeration for element type, like in SMDS.

Enumerator:
ALL 
NODE 
EDGE 
FACE 
VOLUME 
ELEM0D 

Definition at line 115 of file SMESH_Mesh.idl.

Enumeration of entity type used in mesh info array, it should be synchronised with enum SMDSAbs_EntityType.

Enumerator:
Entity_Node 
Entity_0D 
Entity_Edge 
Entity_Quad_Edge 
Entity_Triangle 
Entity_Quad_Triangle 
Entity_Quadrangle 
Entity_Quad_Quadrangle 
Entity_BiQuad_Quadrangle 
Entity_Polygon 
Entity_Quad_Polygon 
Entity_Tetra 
Entity_Quad_Tetra 
Entity_Pyramid 
Entity_Quad_Pyramid 
Entity_Hexa 
Entity_Quad_Hexa 
Entity_TriQuad_Hexa 
Entity_Penta 
Entity_Quad_Penta 
Entity_Hexagonal_Prism 
Entity_Polyhedra 
Entity_Quad_Polyhedra 
Entity_Last 

Definition at line 158 of file SMESH_Mesh.idl.

Enumeration of functor types.

Enumerator:
FT_AspectRatio 
FT_AspectRatio3D 
FT_Warping 
FT_MinimumAngle 
FT_Taper 
FT_Skew 
FT_Area 
FT_Volume3D 
FT_MaxElementLength2D 
FT_MaxElementLength3D 
FT_FreeBorders 
FT_FreeEdges 
FT_FreeNodes 
FT_FreeFaces 
FT_EqualNodes 
FT_EqualEdges 
FT_EqualFaces 
FT_EqualVolumes 
FT_MultiConnection 
FT_MultiConnection2D 
FT_Length 
FT_Length2D 
FT_BelongToGeom 
FT_BelongToPlane 
FT_BelongToCylinder 
FT_BelongToGenSurface 
FT_LyingOnGeom 
FT_RangeOfIds 
FT_BadOrientedVolume 
FT_BareBorderVolume 
FT_BareBorderFace 
FT_OverConstrainedVolume 
FT_OverConstrainedFace 
FT_LinearOrQuadratic 
FT_GroupColor 
FT_ElemGeomType 
FT_CoplanarFaces 
FT_LessThan 
FT_MoreThan 
FT_EqualTo 
FT_LogicalNOT 
FT_LogicalAND 
FT_LogicalOR 
FT_Undefined 

Definition at line 40 of file SMESH_Filter.idl.

Enumeration for element geometry type, like in SMDS.

Enumerator:
Geom_POINT 
Geom_EDGE 
Geom_TRIANGLE 
Geom_QUADRANGLE 
Geom_POLYGON 
Geom_TETRA 
Geom_PYRAMID 
Geom_HEXA 
Geom_PENTA 
Geom_HEXAGONAL_PRISM 
Geom_POLYHEDRA 

Definition at line 129 of file SMESH_Mesh.idl.

Enumeration for hypothesis status (used by AddHypothesis() and RemoveHypothesis() methods)

Enumerator:
HYP_OK 
HYP_MISSING 
HYP_CONCURENT 
HYP_BAD_PARAMETER 
HYP_HIDDEN_ALGO 
HYP_HIDING_ALGO 
HYP_UNKNOWN_FATAL 
HYP_INCOMPATIBLE 
HYP_NOTCONFORM 
HYP_ALREADY_EXIST 
HYP_BAD_DIM 
HYP_BAD_SUBSHAPE 
HYP_BAD_GEOMETRY 
HYP_NEED_SHAPE 

Definition at line 190 of file SMESH_Mesh.idl.

  {
    HYP_OK,
    HYP_MISSING,      // algo misses a hypothesis
    HYP_CONCURENT,    // several applicable hypotheses
    HYP_BAD_PARAMETER,// hypothesis has a bad parameter value
    HYP_HIDDEN_ALGO,  // an algo is hidden by an upper dim algo generating all-dim elements
    HYP_HIDING_ALGO,  // an algo hides lower dim algos by generating all-dim elements
    HYP_UNKNOWN_FATAL,//  --- all statuses below should be considered as fatal
                      //      for Add/RemoveHypothesis operations
    HYP_INCOMPATIBLE, // hypothesis does not fit algo
    HYP_NOTCONFORM,   // not conform mesh is produced appling a hypothesis
    HYP_ALREADY_EXIST,// such hypothesis already exist
    HYP_BAD_DIM,      // bad dimension
    HYP_BAD_SUBSHAPE, // shape is neither the main one, nor its sub-shape, nor a group
    HYP_BAD_GEOMETRY, // geometry mismatches algorithm's expectation
    HYP_NEED_SHAPE    // algorithm can work on shape only
  };
Enumerator:
ADD_NODE 
ADD_EDGE 
ADD_TRIANGLE 
ADD_QUADRANGLE 
ADD_POLYGON 
ADD_TETRAHEDRON 
ADD_PYRAMID 
ADD_PRISM 
ADD_HEXAHEDRON 
ADD_POLYHEDRON 
REMOVE_NODE 
REMOVE_ELEMENT 
MOVE_NODE 
CHANGE_ELEMENT_NODES 
CHANGE_POLYHEDRON_NODES 
RENUMBER 
CLEAR_MESH 
ADD_QUADEDGE 
ADD_QUADTRIANGLE 
ADD_QUADQUADRANGLE 
ADD_QUADTETRAHEDRON 
ADD_QUADPYRAMID 
ADD_QUADPENTAHEDRON 
ADD_QUADHEXAHEDRON 
ADD_ELEM0D 
ADD_BIQUAD_QUADRANGLE 
ADD_TRIQUAD_HEXA 
ADD_HEXAGONAL_PRISM 

Definition at line 48 of file SMESH_Mesh.idl.

Enumeration for DriverMED (used by Perform() method)

Enumerator:
MED_V2_1 
MED_V2_2 

Definition at line 225 of file SMESH_Mesh.idl.

Enumerator:
XY 
YZ 
ZX 

Definition at line 65 of file SMESHGUI_ClippingDlg.h.

{ XY, YZ, ZX };
Enumerator:
UnknownFilter 
NodeFilter 
EdgeFilter 
FaceFilter 
VolumeFilter 
AllElementsFilter 
QuadFilter 
TriaFilter 
LastFilter 

Definition at line 44 of file SMESHGUI_Filter.h.

Enumerator:
UpdateIn2dViewer 
RemoveFrom2dViewer 

Definition at line 91 of file SMESH_ActorUtils.h.


Function Documentation

Definition at line 117 of file SMESHGUI_Utils.cxx.

  {
    SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(GetActiveStudy());
    if (aStudy)
      return aStudy->studyDS();
    else
      return _PTR(Study)();
  }

Here is the call graph for this function:

SMESHGUI_EXPORT SMESH::_PTR ( SObject  ) = SMESH::FindSObject(aMainShape)

Return SO of a sub-shape.

Definition at line 126 of file SMESHGUI_Utils.cxx.

  {
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
      (SUIT_Session::session()->activeApplication());
    if (app && !CORBA::is_nil(theObject)) {
      if(_PTR(Study) aStudy = GetActiveStudyDocument()){
        CORBA::String_var anIOR = app->orb()->object_to_string(theObject);
        if (strcmp(anIOR.in(), "") != 0)
          return aStudy->FindObjectIOR(anIOR.in());
      }
    }
    return _PTR(SObject)();
  }

Here is the caller graph for this function:

SMESH::_PTR ( ChildIterator  )
SMESHGUI_EXPORT SMESH::SMESH_Group_var SMESH::AddGroup ( SMESH::SMESH_Mesh_ptr  theMesh,
SMESH::ElementType  theType,
const QString &  theGroupName 
)

Definition at line 38 of file SMESHGUI_GroupUtils.cxx.

  {
    SMESH::SMESH_Group_var aGroup;
    try {
      if ( !theMesh->_is_nil() )
        aGroup = theMesh->CreateGroup( theType, theGroupName.toLatin1().data() );
    }
    catch( const SALOME::SALOME_Exception& S_ex ) {
      SalomeApp_Tools::QtCatchCorbaException( S_ex );
    }
    SMESHGUI::GetSMESHGUI()->updateObjBrowser();
    return aGroup._retn();
  }
SMESHGUI_EXPORT bool SMESH::AddHypothesisOnMesh ( SMESH::SMESH_Mesh_ptr  aMesh,
SMESH::SMESH_Hypothesis_ptr  aHyp 
)

Definition at line 503 of file SMESHGUI_HypothesesUtils.cxx.

  {
    if(MYDEBUG) MESSAGE ("SMESHGUI::AddHypothesisOnMesh");
    int res = SMESH::HYP_UNKNOWN_FATAL;
    SUIT_OverrideCursor wc;

    if (!aMesh->_is_nil()) {
      _PTR(SObject) SM = SMESH::FindSObject(aMesh);
      GEOM::GEOM_Object_var aShapeObject = SMESH::GetShapeOnMeshOrSubMesh(SM);
      try {
        res = aMesh->AddHypothesis(aShapeObject, aHyp);
        if (res < SMESH::HYP_UNKNOWN_FATAL) {
          _PTR(SObject) aSH = SMESH::FindSObject(aHyp);
          if (SM && aSH) {
            SMESH::ModifiedMesh(SM, false, aMesh->NbNodes()==0);
          }
        }
        if (res > SMESH::HYP_OK) {
          wc.suspend();
          processHypothesisStatus(res, aHyp, true);
          wc.resume();
        }
      }
      catch(const SALOME::SALOME_Exception& S_ex) {
        wc.suspend();
        SalomeApp_Tools::QtCatchCorbaException(S_ex);
        res = SMESH::HYP_UNKNOWN_FATAL;
      }
    }
    return res < SMESH::HYP_UNKNOWN_FATAL;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT bool SMESH::AddHypothesisOnSubMesh ( SMESH::SMESH_subMesh_ptr  aSubMesh,
SMESH::SMESH_Hypothesis_ptr  aHyp 
)

Definition at line 536 of file SMESHGUI_HypothesesUtils.cxx.

  {
    if(MYDEBUG) MESSAGE("SMESHGUI::AddHypothesisOnSubMesh() ");
    int res = SMESH::HYP_UNKNOWN_FATAL;
    SUIT_OverrideCursor wc;

    if (!aSubMesh->_is_nil() && ! aHyp->_is_nil()) {
      try {
        SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
        _PTR(SObject) SsubM = SMESH::FindSObject(aSubMesh);
        GEOM::GEOM_Object_var aShapeObject = SMESH::GetShapeOnMeshOrSubMesh(SsubM);
        if (!aMesh->_is_nil() && SsubM && !aShapeObject->_is_nil()) {
          res = aMesh->AddHypothesis(aShapeObject, aHyp);
          if (res < SMESH::HYP_UNKNOWN_FATAL)  {
            _PTR(SObject) meshSO = SMESH::FindSObject(aMesh);
            if (meshSO)
              SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0);
          }
          if (res > SMESH::HYP_OK) {
            wc.suspend();
            processHypothesisStatus(res, aHyp, true);
            wc.resume();
          }
        }
        else {
          SCRUTE(aHyp->_is_nil());
          SCRUTE(aMesh->_is_nil());
          SCRUTE(!SsubM);
          SCRUTE(aShapeObject->_is_nil());
        }
      }
      catch(const SALOME::SALOME_Exception& S_ex) {
        wc.suspend();
        SalomeApp_Tools::QtCatchCorbaException(S_ex);
        res = SMESH::HYP_UNKNOWN_FATAL;
      }
    }
    else {
      SCRUTE(aSubMesh->_is_nil());
      SCRUTE(aHyp->_is_nil());
    }
    return res < SMESH::HYP_UNKNOWN_FATAL;
  }

Here is the call graph for this function:

long SMESH::AddNode ( SMESH::SMESH_Mesh_ptr  theMesh,
float  x,
float  y,
float  z,
const QStringList &  theParameters 
)

Definition at line 96 of file SMESHGUI_NodesDlg.cxx.

  {
    long aNodeId = -1;
    SUIT_OverrideCursor wc;
    try {
      _PTR(SObject) aSobj = SMESH::FindSObject( theMesh );
      SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor();
      theMesh->SetParameters( theParameters.join(":").toLatin1().constData() );
      aNodeId = aMeshEditor->AddNode( x, y, z );
      _PTR(Study) aStudy = GetActiveStudyDocument();
      CORBA::Long anId = aStudy->StudyId();
      if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( anId, aSobj->GetID().c_str() ) ) {
        aVisualObj->Update( true );
      }
    } 
    catch ( SALOME::SALOME_Exception& exc ) {
      INFOS( "Follow exception was cought:\n\t" << exc.details.text );
    }
    catch ( const std::exception& exc ) {
      INFOS( "Follow exception was cought:\n\t" << exc.what() );
    } 
    catch ( ... ) {
      INFOS( "Unknown exception was cought !!!" );
    }
    return aNodeId;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT void SMESH::ClearPlot2Viewers ( SUIT_ViewWindow *  theWindow)
SMESHGUI_EXPORT bool SMESH::ComputeClippingPlaneParameters ( std::list< vtkActor * >  theActorList,
vtkFloatingPointType  theNormal[3],
vtkFloatingPointType  theDist,
vtkFloatingPointType  theBounds[6],
vtkFloatingPointType  theOrigin[3] 
)
SMESHGUI_EXPORT SMESH_Actor * SMESH::CreateActor ( _PTR(Study)  theStudy,
const char *  theEntry,
int  theIsClear 
)

Definition at line 594 of file SMESHGUI_VTKUtils.cxx.

  {
    SMESH_Actor *anActor = NULL;
    CORBA::Long anId = theStudy->StudyId();
    if(TVisualObjPtr aVisualObj = GetVisualObj(anId,theEntry)){
      _PTR(SObject) aSObj = theStudy->FindObjectID(theEntry);
      if(aSObj){
        _PTR(GenericAttribute) anAttr;
        if(aSObj->FindAttribute(anAttr,"AttributeName")){
          _PTR(AttributeName) aName = anAttr;
          std::string aNameVal = aName->Value();
          anActor = SMESH_Actor::New(aVisualObj,theEntry,aNameVal.c_str(),theIsClear);
        }

        SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( aSObj ));
        if(!CORBA::is_nil(aGroup) && anActor)
        {
         QColor c;int delta;
         SMESH::GetColor( "SMESH", "fill_color", c, delta, "0,170,255|-100"  );
          SALOMEDS::Color aColor = aGroup->GetColor();
          if( !( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 ))
          {
           aColor.R = (float)c.red() / 255.0;
           aColor.G = (float)c.green() / 255.0;
            aColor.B = (float)c.blue() / 255.0;
            aGroup->SetColor( aColor );
          }
          if( aGroup->GetType() == SMESH::NODE )
            anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
          else if( aGroup->GetType() == SMESH::EDGE )
            anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
          else if( aGroup->GetType() == SMESH::ELEM0D )
            anActor->Set0DColor( aColor.R, aColor.G, aColor.B );
          else
            anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta );
        }
      }
    }
    MESSAGE("CreateActor " << anActor);
    if( anActor )
      if( SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI() )
        aSMESHGUI->addActorAsObserver( anActor );
    return anActor;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT SMESH::SMESH_Hypothesis_ptr SMESH::CreateHypothesis ( const QString &  aHypType,
const QString &  aHypName,
const bool  isAlgo 
)

Definition at line 473 of file SMESHGUI_HypothesesUtils.cxx.

  {
    if(MYDEBUG) MESSAGE("Create " << aHypType.toLatin1().data() << 
                        " with name " << aHypName.toLatin1().data());
    HypothesisData* aHypData = GetHypothesisData(aHypType);
    QString aServLib = aHypData->ServerLibName;
    try {
      SMESH::SMESH_Hypothesis_var aHypothesis;
      aHypothesis = SMESHGUI::GetSMESHGen()->CreateHypothesis(aHypType.toLatin1().data(),
                                                              aServLib.toLatin1().data());
      if (!aHypothesis->_is_nil()) {
        _PTR(SObject) aHypSObject = SMESH::FindSObject(aHypothesis.in());
        if (aHypSObject) {
          if (!aHypName.isEmpty())
            SMESH::SetName(aHypSObject, aHypName);
          SMESHGUI::Modified();
          SMESHGUI::GetSMESHGUI()->updateObjBrowser();
          return aHypothesis._retn();
        }
      }
    } catch (const SALOME::SALOME_Exception & S_ex) {
      SalomeApp_Tools::QtCatchCorbaException(S_ex);
    }

    return SMESH::SMESH_Hypothesis::_nil();
  }

Here is the call graph for this function:

template<class TInterface >
TInterface::_var_type SMESH::DataOwnerToInterface ( const LightApp_DataOwnerPtr &  theDataOwner)

Definition at line 88 of file SMESHGUI_Utils.h.

    {
      CORBA::Object_var anObj = DataOwnerToObject(theDataOwner);
      if(!CORBA::is_nil(anObj))
        return TInterface::_narrow(anObj);
      return TInterface::_nil();
    }

Here is the call graph for this function:

SMESHGUI_EXPORT CORBA::Object_var SMESH::DataOwnerToObject ( const LightApp_DataOwnerPtr &  theOwner)

Definition at line 82 of file SMESHGUI_Utils.cxx.

  {
    CORBA::Object_var anObj;
    if(theOwner){
      const Handle(SALOME_InteractiveObject)& anIO = theOwner->IO();
      if(!anIO.IsNull()){
        if(anIO->hasEntry()){
          _PTR(Study) aStudy = GetActiveStudyDocument();
          _PTR(SObject) aSObj = aStudy->FindObjectID(anIO->getEntry());
          anObj = SObjectToObject(aSObj,aStudy);
        }
      }
    }
    return anObj;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

static QString SMESH::demangledHypoSetName ( QString  name) [static]

Removes dimension and '[custom]' from the name of hypothesis set.

Definition at line 159 of file SMESHGUI_HypothesesUtils.cxx.

  {
    name.remove(QRegExp("[0-3]D: "));
    name.remove(" [custom]");
    return name;
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::DisplayActor ( SUIT_ViewWindow *  theWnd,
SMESH_Actor *  theActor 
)

Definition at line 642 of file SMESHGUI_VTKUtils.cxx.

                                                                    {
    if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(theWnd)){
      try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
        OCC_CATCH_SIGNALS;
#endif
        MESSAGE("DisplayActor " << theActor);
        vtkWnd->AddActor(theActor);
        vtkWnd->Repaint();
      }
      catch (...) {
#ifdef _DEBUG_
        MESSAGE ( "Exception in SMESHGUI_VTKUtils::DisplayActor()" );
#endif
        OnVisuException();
      }
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T SMESH::DownCast ( CORBA::Object_ptr  theArg)

Definition at line 613 of file SMESH_Gen_i.hxx.

  {
    return dynamic_cast<T>(SMESH_Gen_i::GetServant(theArg).in());
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TArray >
void SMESH::DumpArray ( const TArray &  theArray,
TPythonDump &  theStream 
)

Definition at line 199 of file SMESH_DumpPython.cxx.

  {
    theStream << "[ ";
    for (int i = 1; i <= theArray.length(); i++) {
      theStream << theArray[i-1];
      if ( i < theArray.length() )
        theStream << ", ";
    }
    theStream << " ]";
  }
QString SMESH::errorText ( int  errCode,
const char *  comment 
)

Definition at line 336 of file SMESHGUI_ComputeDlg.cxx.

  {
    QString text;
    switch ( errCode ) {
      CASE2TEXT( COMPERR_OK            );
      CASE2TEXT( COMPERR_BAD_INPUT_MESH);
      CASE2TEXT( COMPERR_STD_EXCEPTION );
      CASE2TEXT( COMPERR_OCC_EXCEPTION );
    case SMESH::COMPERR_SLM_EXCEPTION: break; // avoid double "Salome exception"
      CASE2TEXT( COMPERR_EXCEPTION     );
      CASE2TEXT( COMPERR_MEMORY_PB     );
      CASE2TEXT( COMPERR_BAD_SHAPE     );
    case SMESH::COMPERR_ALGO_FAILED:
      if ( strlen(comment) == 0 )
        text = QObject::tr("COMPERR_ALGO_FAILED");
      break;
    case SMESH::COMPERR_WARNING:
      return comment ? QString(comment) : QObject::tr("COMPERR_UNKNOWN");
    default:
      text = QString("#%1").arg( -errCode );
    }
    if ( text.length() > 0 ) text += ". ";
    return text + comment;
  }
SMESHGUI_EXPORT SMESH_Actor * SMESH::FindActorByEntry ( SUIT_ViewWindow *  theWindow,
const char *  theEntry 
)

Definition at line 548 of file SMESHGUI_VTKUtils.cxx.

  {
    if(SVTK_ViewWindow* aViewWindow = GetVtkViewWindow(theWindow)){
      vtkRenderer *aRenderer = aViewWindow->getRenderer();
      VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
      vtkActorCollection *aCollection = aCopy.GetActors();
      aCollection->InitTraversal();
      while(vtkActor *anAct = aCollection->GetNextActor()){
        if(SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct)){
          if(anActor->hasIO()){
            Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
            if(anIO->hasEntry() && strcmp(anIO->getEntry(),theEntry) == 0){
              return anActor;
            }
          }
        }
      }
    }
    return NULL;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT SMESH_Actor * SMESH::FindActorByEntry ( const char *  theEntry)

Definition at line 571 of file SMESHGUI_VTKUtils.cxx.

                                                     {
    return FindActorByEntry(GetActiveWindow(),theEntry);
  }

Here is the call graph for this function:

SMESHGUI_EXPORT SMESH_Actor * SMESH::FindActorByObject ( CORBA::Object_ptr  theObject)

Definition at line 576 of file SMESHGUI_VTKUtils.cxx.

                                                           {
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
    if( !app )
      return NULL;

    if(!CORBA::is_nil(theObject)){
      _PTR(Study) aStudy = GetActiveStudyDocument();
      CORBA::String_var anIOR = app->orb()->object_to_string( theObject );
      _PTR(SObject) aSObject = aStudy->FindObjectIOR(anIOR.in());
      if(aSObject){
        CORBA::String_var anEntry = aSObject->GetID().c_str();
        return FindActorByEntry(anEntry.in());
      }
    }
    return NULL;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT SVTK_ViewWindow * SMESH::FindVtkViewWindow ( SUIT_ViewManager *  theMgr,
SUIT_ViewWindow *  theWindow 
)

Definition at line 441 of file SMESHGUI_VTKUtils.cxx.

  {
    if( !theMgr )
      return NULL;

    QVector<SUIT_ViewWindow*> views = theMgr->getViews();
    if( views.contains( theWindow ) )
      return GetVtkViewWindow( theWindow );
    else
      return NULL;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 529 of file SMESHGUI_VTKUtils.cxx.

               {
    if(SVTK_ViewWindow* wnd = GetCurrentVtkView() ){
      try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
        OCC_CATCH_SIGNALS;
#endif
        wnd->onFitAll();
        wnd->Repaint();
      }
      catch (...) {
#ifdef _DEBUG_
        MESSAGE ( "Exception in SMESHGUI_VTKUtils::FitAll()" );
#endif
        OnVisuException();
      }
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Return a string corresponding to an item of enum FunctorType.

Definition at line 3863 of file SMESH_Filter_i.cxx.

{
  if ( ft < 0 || ft > SMESH::FT_Undefined )
    return "FT_Undefined";
  return getFunctNames()[ ft ];
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 98 of file SMESHGUI_Utils.cxx.

  {
    SUIT_Application* app = SUIT_Session::session()->activeApplication();
    if (app)
      return app->activeStudy();
    else
      return NULL;
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT SUIT_ViewWindow * SMESH::GetActiveWindow ( )

Definition at line 107 of file SMESHGUI_Utils.cxx.

  {
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
      (SUIT_Session::session()->activeApplication());
    if (app && app->desktop() )
      return app->desktop()->activeWindow();
    else
      return NULL;
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT SalomeApp_Study* SMESH::GetAppStudy ( const CAM_Module *  )
SMESHGUI_EXPORT QStringList SMESH::GetAvailableHypotheses ( const bool  isAlgo,
const int  theDim,
const bool  isAux,
const bool  isNeedGeometry 
)

Definition at line 270 of file SMESHGUI_HypothesesUtils.cxx.

  {
    QStringList aHypList;

    // Init list of available hypotheses, if needed
    InitAvailableHypotheses();
    bool checkGeometry = ( !isNeedGeometry && isAlgo );
    // fill list of hypotheses/algorithms
    THypothesisDataMap& pMap = isAlgo ? myAlgorithmsMap : myHypothesesMap;
    THypothesisDataMap::ConstIterator anIter;
    for ( anIter = pMap.begin(); anIter != pMap.end(); anIter++ ) {
      HypothesisData* aData = anIter.value();
      if(!aData || aData->Label.isEmpty()) continue;
      if ( ( theDim < 0 || aData->Dim.contains( theDim ) ) && aData->IsAux == isAux) {
        if (checkGeometry) {
          if (aData->IsNeedGeometry == isNeedGeometry)
            aHypList.append(anIter.key());
        }
        else {
          aHypList.append(anIter.key());
        }
      }
    }
    return aHypList;
  }

Here is the call graph for this function:

SMESHOBJECT_EXPORT QColor SMESH::GetColor ( const QString &  theSect,
const QString &  theName,
const QColor &  def 
)

Definition at line 102 of file SMESH_ActorUtils.cxx.

  {
    QColor c = def;
    SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
    if ( mgr )
      c = mgr->colorValue( theSect, theName, def );
    return c;
  }

Here is the caller graph for this function:

SMESHOBJECT_EXPORT void SMESH::GetColor ( const QString &  theSect,
const QString &  theName,
int &  r,
int &  g,
int &  b,
const QColor &  def 
)

Definition at line 114 of file SMESH_ActorUtils.cxx.

  {
    QColor c = def;
    SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
    if ( mgr )
      c = mgr->colorValue( theSect, theName, def );

    SUIT_Tools::rgbSet( SUIT_Tools::rgbSet( c ), r, g, b );
  }
SMESHOBJECT_EXPORT void SMESH::GetColor ( const QString &  theSect,
const QString &  theName,
vtkFloatingPointType &  r,
vtkFloatingPointType &  g,
vtkFloatingPointType &  b,
const QColor &  def 
)

Definition at line 130 of file SMESH_ActorUtils.cxx.

  {
    int ir( 0 ), ig( 0 ), ib( 0 );
    GetColor( theSect, theName, ir, ig, ib, def );
    r = ir / 255.;
    g = ig / 255.;
    b = ib / 255.;
  }

Here is the call graph for this function:

SMESHOBJECT_EXPORT void SMESH::GetColor ( const QString &  theSect,
const QString &  theName,
QColor &  color,
int &  delta,
QString  def 
)

Definition at line 146 of file SMESH_ActorUtils.cxx.

  {
    
    SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
    if ( mgr ) {
      QString str = mgr->stringValue( theSect, theName, def );
      Qtx::stringToBiColor(str,color,delta);
    }
  }
SMESHGUI_EXPORT SMESH::GetCStudy ( const SalomeApp_Study *  theStudy)

Definition at line 76 of file SMESHGUI_Utils.cxx.

  {
    return theStudy->studyDS();
  }

Definition at line 470 of file SMESHGUI_VTKUtils.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT SUIT_Desktop * SMESH::GetDesktop ( const CAM_Module *  theModule)

Definition at line 58 of file SMESHGUI_Utils.cxx.

  {
    return theModule->application()->desktop();
  }
SMESHGUI_EXPORT int SMESH::GetEdgeNodes ( SVTK_Selector *  ,
const TVisualObjPtr ,
int &  ,
int &   
)
SMESHGUI_EXPORT int SMESH::GetEdgeNodes ( LightApp_SelectionMgr *  ,
int &  ,
int &   
)
SMESHOBJECT_EXPORT std::map< SMDSAbs_ElementType, int > SMESH::GetEntitiesFromObject ( SMESH_VisualObj *  theObject)

Definition at line 160 of file SMESH_ActorUtils.cxx.

                                                                                    {
    std::map<SMDSAbs_ElementType,int> entities;
       entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_0DElement,
              theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0));
    entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Edge,
              theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0));
    entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Face,
              theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0));
    entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Volume,
              theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0));
    return entities;
  }
SMESHGUI_EXPORT SMESH::FilterManager_var & SMESH::GetFilterManager ( )

Definition at line 34 of file SMESHGUI_FilterUtils.cxx.

  {
    static SMESH::FilterManager_var aFilterManager;
    if (CORBA::is_nil(aFilterManager)) {
        aFilterManager = SMESHGUI::GetSMESHGen()->CreateFilterManager();
    }
    return aFilterManager;
  }

Here is the caller graph for this function:

SMESHOBJECT_EXPORT vtkFloatingPointType SMESH::GetFloat ( const QString &  theValue,
vtkFloatingPointType  theDefault 
)

Definition at line 59 of file SMESH_ActorUtils.cxx.

  {
    int pos = theValue.indexOf( ":" );
    vtkFloatingPointType val = theDefault;
    if( pos>=0 ) 
    {
      QString name = theValue.right( theValue.length()-pos-1 ),
              sect = theValue.left( pos );
      if( !name.isEmpty() && !sect.isEmpty() )
        val = GetFloat( name, sect, theDefault );
    }
    return val;
  }

Here is the caller graph for this function:

SMESHOBJECT_EXPORT vtkFloatingPointType SMESH::GetFloat ( const QString &  theValue,
const QString &  theSection,
vtkFloatingPointType  theDefault 
)

Definition at line 75 of file SMESH_ActorUtils.cxx.

  {
    vtkFloatingPointType val = theDefault;
    SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
    if( mgr )
      val = (vtkFloatingPointType) mgr->doubleValue( theSection, theValue, theDefault );

    return val;
  }
SMESHGUI_EXPORT GEOM::GEOM_Object_ptr SMESH::GetGeom ( _PTR(SObject)  theSO)

Definition at line 81 of file SMESHGUI_GEOMGenUtils.cxx.

  {
    if (!theSO)
      return GEOM::GEOM_Object::_nil();

    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
    if (!aStudy)
      return GEOM::GEOM_Object::_nil();

    _PTR(ChildIterator) anIter (aStudy->NewChildIterator(theSO));
    for ( ; anIter->More(); anIter->Next()) {
      _PTR(SObject) aSObject = anIter->Value();
      _PTR(SObject) aRefSOClient;
      GEOM::GEOM_Object_var aMeshShape;

      if (aSObject->ReferencedObject(aRefSOClient)) {
        SALOMEDS_SObject* aRefSO = _CAST(SObject,aRefSOClient);
        aMeshShape = GEOM::GEOM_Object::_narrow(aRefSO->GetObject());
      } else {
        SALOMEDS_SObject* aSO = _CAST(SObject,aSObject);
        aMeshShape = GEOM::GEOM_Object::_narrow(aSO->GetObject());
      }

      if (!aMeshShape->_is_nil())
        return aMeshShape._retn();
    }
    return GEOM::GEOM_Object::_nil();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT GEOM::GEOM_Gen_var SMESH::GetGEOMGen ( )

Definition at line 43 of file SMESHGUI_GEOMGenUtils.cxx.

  {
    static GEOM::GEOM_Gen_var aGEOMGen;

    if(CORBA::is_nil(aGEOMGen)) {
      if ( GeometryGUI::GetGeomGen()->_is_nil() )
        GeometryGUI::InitGeomGen();
      aGEOMGen = GeometryGUI::GetGeomGen();
    }
    return aGEOMGen;
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT HypothesesSet * SMESH::GetHypothesesSet ( const QString &  theSetName)

Definition at line 329 of file SMESHGUI_HypothesesUtils.cxx.

  {
    QString name = demangledHypoSetName( theSetName );
    QList<HypothesesSet*>::iterator hypoSet;
    for ( hypoSet  = myListOfHypothesesSets.begin(); 
          hypoSet != myListOfHypothesesSets.end();
          ++hypoSet ) {
      HypothesesSet* aSet = *hypoSet;
      if ( aSet && aSet->name() == name )
        return aSet;
    }
    return 0;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT QStringList SMESH::GetHypothesesSets ( int  maxDim)

Definition at line 300 of file SMESHGUI_HypothesesUtils.cxx.

  {
    QStringList aSetNameList;

    // Init list of available hypotheses, if needed
    InitAvailableHypotheses();

    QList<HypothesesSet*>::iterator hypoSet;
    for ( hypoSet  = myListOfHypothesesSets.begin(); 
          hypoSet != myListOfHypothesesSets.end();
          ++hypoSet ) {
      HypothesesSet* aSet = *hypoSet;
      if ( aSet &&
           ( aSet->count( true ) || aSet->count( false )) &&
           aSet->maxDim() <= maxDim)
      {
        aSetNameList.append( mangledHypoSetName( aSet ));
      }
    }
    aSetNameList.sort();

    //  reverse order of aSetNameList
    QStringList reversedNames;
    for ( int i = 0; i < aSetNameList.count(); ++i )
      reversedNames.prepend( aSetNameList[i] );
    
    return reversedNames;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT SMESHGUI_GenericHypothesisCreator * SMESH::GetHypothesisCreator ( const QString &  aHypType)

Definition at line 392 of file SMESHGUI_HypothesesUtils.cxx.

  {
    if(MYDEBUG) MESSAGE("Get HypothesisCreator for " << aHypType.toLatin1().data());

    SMESHGUI_GenericHypothesisCreator* aCreator = 0;

    // check, if creator for this hypothesis type already exists
    // BUG 0020378
    //if (myHypCreatorMap.find(aHypType) != myHypCreatorMap.end()) {
    //  aCreator = myHypCreatorMap[aHypType];
    //}
    //else
    {
      // 1. Init list of available hypotheses, if needed
      InitAvailableHypotheses();

      // 2. Get names of plugin libraries
      HypothesisData* aHypData = GetHypothesisData(aHypType);
      if (!aHypData) 
        return aCreator;

      QString aClientLibName = aHypData->ClientLibName;
      QString aServerLibName = aHypData->ServerLibName;

      // 3. Load Client Plugin Library
      try {
        // load plugin library
        if(MYDEBUG) MESSAGE("Loading client meshers plugin library ...");
        LibHandle libHandle = LoadLib( aClientLibName.toLatin1().data() );
        if (!libHandle) {
          // report any error, if occured
          if ( MYDEBUG ) {
#ifdef WIN32
            const char* anError = "Can't load client meshers plugin library";
#else
            const char* anError = dlerror();      
#endif
            MESSAGE(anError);
          }
        }
        else {
          // get method, returning hypothesis creator
          if(MYDEBUG) MESSAGE("Find GetHypothesisCreator() method ...");
          typedef SMESHGUI_GenericHypothesisCreator* (*GetHypothesisCreator) \
            ( const QString& );
          GetHypothesisCreator procHandle =
            (GetHypothesisCreator)GetProc(libHandle, "GetHypothesisCreator");
          if (!procHandle) {
            if(MYDEBUG) MESSAGE("bad hypothesis client plugin library");
            UnLoadLib(libHandle);
          }
          else {
            // get hypothesis creator
            if(MYDEBUG) MESSAGE("Get Hypothesis Creator for " << aHypType.toLatin1().data());
            aCreator = procHandle( aHypType );
            if (!aCreator) {
              if(MYDEBUG) MESSAGE("no such a hypothesis in this plugin");
            }
            else {
              // map hypothesis creator to a hypothesis name
              // BUG 0020378
              //myHypCreatorMap[aHypType] = aCreator;

             //rnv : This dynamic property of the QObject stores the name of the plugin.
             //      It is used to obtain plugin root dir environment variable
              //      in the SMESHGUI_HypothesisDlg class. Plugin root dir environment 
             //      variable is used to display documentation.
             aCreator->setProperty(PLUGIN_NAME,aHypData->PluginName);
            }
          }
        }
      }
      catch (const SALOME::SALOME_Exception& S_ex) {
        SalomeApp_Tools::QtCatchCorbaException(S_ex);
      }
    }

    return aCreator;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT HypothesisData * SMESH::GetHypothesisData ( const QString &  aHypType)

Definition at line 343 of file SMESHGUI_HypothesesUtils.cxx.

  {
    HypothesisData* aHypData = 0;

    // Init list of available hypotheses, if needed
    InitAvailableHypotheses();

    if (myHypothesesMap.contains(aHypType)) {
      aHypData = myHypothesesMap[aHypType];
    }
    else if (myAlgorithmsMap.contains(aHypType)) {
      aHypData = myAlgorithmsMap[aHypType];
    }
    return aHypData;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT SMESH::Measurements_var & SMESH::GetMeasurements ( )

Definition at line 128 of file SMESHGUI_MeshUtils.cxx.

  {
    static SMESH::Measurements_var aMeasurements;
    if (CORBA::is_nil(aMeasurements)) {
      aMeasurements = SMESHGUI::GetSMESHGen()->CreateMeasurements();
    }
    return aMeasurements;
  }
SMESHGUI_EXPORT SMESH_Mesh_var SMESH::GetMeshByIO ( const Handle(SALOME_InteractiveObject)&  theIO)

Definition at line 46 of file SMESHGUI_MeshUtils.cxx.

  {
    CORBA::Object_var anObj = IObjectToObject(theIO);
    if(!CORBA::is_nil(anObj)){
      SMESH_Mesh_var aMesh = SMESH_Mesh::_narrow(anObj);
      if(!CORBA::is_nil(aMesh))
        return aMesh;
      SMESH_GroupBase_var aGroup = SMESH_GroupBase::_narrow(anObj);
      if(!CORBA::is_nil(aGroup))
        return aGroup->GetMesh();
      SMESH_subMesh_var aSubMesh = SMESH_subMesh::_narrow(anObj);
      if(!CORBA::is_nil(aSubMesh))
        return aSubMesh->GetFather();
    }
    return SMESH_Mesh::_nil();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SObjectList SMESH::GetMeshesUsingAlgoOrHypothesis ( SMESH::SMESH_Hypothesis_ptr  AlgoOrHyp)

Definition at line 665 of file SMESHGUI_HypothesesUtils.cxx.

  {
    SObjectList listSOmesh;
    listSOmesh.resize(0);

    unsigned int index = 0;
    if (!AlgoOrHyp->_is_nil()) {
      _PTR(SObject) SO_Hypothesis = SMESH::FindSObject(AlgoOrHyp);
      if (SO_Hypothesis) {
        SObjectList listSO =
          SMESHGUI::activeStudy()->studyDS()->FindDependances(SO_Hypothesis);

        if(MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency number ="<<listSO.size());
        for (unsigned int i = 0; i < listSO.size(); i++) {
          _PTR(SObject) SO = listSO[i];
          if (SO) {
            _PTR(SObject) aFather = SO->GetFather();
            if (aFather) {
              _PTR(SObject) SOfatherFather = aFather->GetFather();
              if (SOfatherFather) {
                if(MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency added to list");
                index++;
                listSOmesh.resize(index);
                listSOmesh[index - 1] = SOfatherFather;
              }
            }
          }
        }
      }
    }
    if (MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): completed");
    return listSOmesh;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT QString SMESH::GetMessageOnAlgoStateErrors ( const algo_error_array &  errors)

Definition at line 700 of file SMESHGUI_HypothesesUtils.cxx.

  {
    QString resMsg; // PAL14861 = QObject::tr("SMESH_WRN_MISSING_PARAMETERS") + ":\n";
    for ( int i = 0; i < errors.length(); ++i ) {
      const SMESH::AlgoStateError & error = errors[ i ];
      const bool hasAlgo = ( strlen( error.algoName ) != 0 );
      QString msg;
      if ( !hasAlgo )
        msg = QObject::tr( "STATE_ALGO_MISSING" );
      else 
        switch( error.state ) {
          CASE2MESSAGE( HYP_MISSING );
          CASE2MESSAGE( HYP_NOTCONFORM );
          CASE2MESSAGE( HYP_BAD_PARAMETER );
          CASE2MESSAGE( HYP_BAD_GEOMETRY );
        default: continue;
        }
      // apply args to message:
      // %1 - algo name
      if ( hasAlgo )
        msg = msg.arg( error.algoName.in() );
      // %2 - dimension
      msg = msg.arg( error.algoDim );
      // %3 - global/local
      msg = msg.arg( QObject::tr( error.isGlobalAlgo ? "GLOBAL_ALGO" : "LOCAL_ALGO" ));
      // %4 - hypothesis dim == algoDim
      msg = msg.arg( error.algoDim );

      if ( i ) resMsg += ";\n";
      resMsg += msg;
    }
    return resMsg;
  }
SMESHGUI_EXPORT int SMESH::GetNameOfSelectedElements ( SVTK_Selector *  ,
const Handle(SALOME_InteractiveObject)&  ,
QString &   
)

Here is the caller graph for this function:

SMESHGUI_EXPORT int SMESH::GetNameOfSelectedElements ( LightApp_SelectionMgr *  ,
const Handle(SALOME_InteractiveObject)&  ,
QString &   
)
SMESHGUI_EXPORT int SMESH::GetNameOfSelectedElements ( LightApp_SelectionMgr *  ,
QString &   
)
SMESHGUI_EXPORT int SMESH::GetNameOfSelectedIObjects ( LightApp_SelectionMgr *  theMgr,
QString &  theName 
)

Definition at line 245 of file SMESHGUI_Utils.cxx.

  {
    if (!theMgr)
      return 0;

    SALOME_ListIO selected;
    theMgr->selectedObjects(selected);
    int aNbSel = selected.Extent();
    if (aNbSel == 1) {
      Handle(SALOME_InteractiveObject) anIObject = selected.First();
      theName = QString( anIObject->getName() ).trimmed();
    } else {
      theName = QObject::tr("SMESH_OBJECTS_SELECTED").arg(aNbSel);
    }
    return aNbSel;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT int SMESH::GetNameOfSelectedNodes ( SVTK_Selector *  ,
const Handle(SALOME_InteractiveObject)&  ,
QString &   
)
SMESHGUI_EXPORT int SMESH::GetNameOfSelectedNodes ( LightApp_SelectionMgr *  ,
const Handle(SALOME_InteractiveObject)&  ,
QString &   
)
SMESHGUI_EXPORT int SMESH::GetNameOfSelectedNodes ( LightApp_SelectionMgr *  ,
QString &   
)
SMESHGUI_EXPORT gp_XYZ SMESH::getNormale ( const SMDS_MeshFace *  theFace)

Return normale to a given face.

Return the normal to a face.

Parameters:
theFace- input face
Return values:
gp_XYZ- normal to a face

Definition at line 369 of file SMESHGUI_Utils.cxx.

  {
    gp_XYZ n;
    int aNbNode = theFace->NbNodes();
    TColgp_Array1OfXYZ anArrOfXYZ(1,4);
    SMDS_ElemIteratorPtr aNodeItr = theFace->nodesIterator();
    int i = 1;
    for ( ; aNodeItr->more() && i <= 4; i++ ) {
      SMDS_MeshNode* aNode = (SMDS_MeshNode*)aNodeItr->next();
      anArrOfXYZ.SetValue(i, gp_XYZ( aNode->X(), aNode->Y(), aNode->Z() ) );
    }
    
    gp_XYZ q1 = anArrOfXYZ.Value(2) - anArrOfXYZ.Value(1);
    gp_XYZ q2 = anArrOfXYZ.Value(3) - anArrOfXYZ.Value(1);
    n  = q1 ^ q2;
    if ( aNbNode > 3 ) {
      gp_XYZ q3 = anArrOfXYZ.Value(4) - anArrOfXYZ.Value(1);
      n += q2 ^ q3;
    }
    double len = n.Modulus();
    if ( len > 0 )
      n /= len;
    return n;
  }
SMESHGUI_EXPORT SMESH::SMESH_Pattern_var SMESH::GetPattern ( )

Definition at line 34 of file SMESHGUI_PatternUtils.cxx.

  {
    return SMESHGUI::GetSMESHGen()->GetPattern();
  }
Predicate_i* SMESH::GetPredicate ( Predicate_ptr  thePredicate)

Definition at line 70 of file SMESH_Filter_i.cxx.

  {
    return DownCast<Predicate_i*>(thePredicate);
  }

Here is the caller graph for this function:

Predicate_i* SMESH::GetPredicate ( SMESH::Predicate_ptr  thePredicate)
SMESHGUI_EXPORT SUIT_ResourceMgr * SMESH::GetResourceMgr ( const SalomeApp_Module *  )

Definition at line 70 of file SMESHGUI_Utils.cxx.

  {
    return SUIT_Session::session()->resourceMgr();
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT int SMESH::GetSelected ( LightApp_SelectionMgr *  ,
TColStd_IndexedMapOfInteger &  ,
const bool  = true 
)
int SMESH::getSelectedRows ( QTableWidget *  table,
QList< int > &  rows 
)

Return a list of selected rows.

Definition at line 444 of file SMESHGUI_ComputeDlg.cxx.

  {
    rows.clear();
    QList<QTableWidgetSelectionRange> selRanges = table->selectedRanges();
    QTableWidgetSelectionRange range;
    foreach( range, selRanges )
    {
      for ( int row = range.topRow(); row <= range.bottomRow(); ++row )
        rows.append( row );
    }
    if ( rows.isEmpty() && table->currentRow() > -1 )
      rows.append( table->currentRow() );

    return rows.count();
  }
SMESHGUI_EXPORT LightApp_SelectionMgr * SMESH::GetSelectionMgr ( const SalomeApp_Module *  theModule)

Definition at line 64 of file SMESHGUI_Utils.cxx.

  {
    return theModule->getApp()->selectionMgr();
  }
SMESHGUI_EXPORT SVTK_Selector * SMESH::GetSelector ( SUIT_ViewWindow *  theWindow)

Definition at line 945 of file SMESHGUI_VTKUtils.cxx.

  {
    if(SVTK_ViewWindow* aWnd = GetVtkViewWindow(theWindow))
      return aWnd->GetSelector();

    return NULL;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT GEOM::GEOM_Object_var SMESH::GetShapeOnMeshOrSubMesh ( _PTR(SObject)  theMeshOrSubmesh,
bool *  isMesh 
)

Definition at line 55 of file SMESHGUI_GEOMGenUtils.cxx.

  {
    SALOMEDS_SObject* aMeshOrSubmesh = _CAST(SObject,theMeshOrSubmesh);
    if(aMeshOrSubmesh) {
      CORBA::Object_var Obj = aMeshOrSubmesh->GetObject();
      if ( !CORBA::is_nil( Obj ) ) {
        SMESH::SMESH_Mesh_var aMesh =
          SObjectToInterface<SMESH::SMESH_Mesh>( theMeshOrSubmesh );
        if ( !aMesh->_is_nil() )
        {
          if ( isMesh ) *isMesh = true;
          return aMesh->GetShapeToMesh();
        }
        SMESH::SMESH_subMesh_var aSubmesh =
          SObjectToInterface<SMESH::SMESH_subMesh>( theMeshOrSubmesh );
        if ( !aSubmesh->_is_nil() )
        {
          if ( isMesh ) *isMesh = false;
          return aSubmesh->GetSubShape();
        }
      }
    }
    return GEOM::GEOM_Object::_nil();
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT GEOM::GEOM_Object_ptr SMESH::GetSubShape ( GEOM::GEOM_Object_ptr  theMainShape,
long  theID 
)

Definition at line 110 of file SMESHGUI_GEOMGenUtils.cxx.

  {
    GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
    if (!aStudy || geomGen->_is_nil())
      return GEOM::GEOM_Object::_nil();
    GEOM::GEOM_IShapesOperations_var aShapesOp = geomGen->GetIShapesOperations(aStudy->StudyId());
    if (aShapesOp->_is_nil())
      return GEOM::GEOM_Object::_nil();
    GEOM::GEOM_Object_var subShape = aShapesOp->GetSubShape (theMainShape,theID);
    return subShape._retn();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

GEOM::GEOM_Object_ptr SMESH::getSubShape ( int  subShapeID,
GEOM::GEOM_Object_var  aMainShape 
)

Return sub-shape by ID.

Definition at line 389 of file SMESHGUI_ComputeDlg.cxx.

  {
    GEOM::GEOM_Object_var aSubShape;
    if ( subShapeID == 1 )
      aSubShape = aMainShape;
    else if ( _PTR(SObject) so = getSubShapeSO( subShapeID, aMainShape ))
      aSubShape = SMESH::SObjectToInterface<GEOM::GEOM_Object>( so );
    else
      aSubShape = SMESH::GetSubShape( aMainShape, subShapeID );
    return aSubShape._retn();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT SVTK_ViewWindow * SMESH::GetViewWindow ( const SalomeApp_Module *  theModule,
bool  createIfNotFound 
)

Return active view window, if it instantiates SVTK_ViewWindow class, overwise find or create corresponding view window, make it active and return it.

Note:
Active VVTK_ViewWindow can be returned, because it inherits SVTK_ViewWindow.

Definition at line 412 of file SMESHGUI_VTKUtils.cxx.

  {
    SalomeApp_Application* anApp;
    if (theModule)
      anApp = theModule->getApp();
    else
      anApp = dynamic_cast<SalomeApp_Application*>
        (SUIT_Session::session()->activeApplication());

    if (anApp) {
      if (SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(anApp->desktop()->activeWindow()))
        return aView;

      SUIT_ViewManager* aViewManager =
        anApp->getViewManager(SVTK_Viewer::Type(), createIfNotFound);
      if (aViewManager) {
        if (SUIT_ViewWindow* aViewWindow = aViewManager->getActiveView()) {
          if (SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
            aViewWindow->raise();
            aViewWindow->setFocus();
            return aView;
          }
        }
      }
    }
    return NULL;
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT TVisualObjPtr SMESH::GetVisualObj ( int  theStudyId,
const char *  theEntry,
bool  nulData 
)

Returns an updated visual object.

Definition at line 284 of file SMESHGUI_VTKUtils.cxx.

                                                                                {
    TVisualObjPtr aVisualObj;
    TVisualObjCont::key_type aKey(theStudyId,theEntry);
    try{
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
      OCC_CATCH_SIGNALS;
#endif
      TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(aKey);
      if(anIter != VISUAL_OBJ_CONT.end()){
        aVisualObj = anIter->second;
      }else{
        SalomeApp_Application* app =
          dynamic_cast<SalomeApp_Application*>( SMESHGUI::activeStudy()->application() );
        _PTR(Study) aStudy = SMESHGUI::activeStudy()->studyDS();
        _PTR(SObject) aSObj = aStudy->FindObjectID(theEntry);
        if(aSObj){
          _PTR(GenericAttribute) anAttr;
          if(aSObj->FindAttribute(anAttr,"AttributeIOR")){
            _PTR(AttributeIOR) anIOR = anAttr;
            CORBA::String_var aVal = anIOR->Value().c_str();
            CORBA::Object_var anObj = app->orb()->string_to_object( aVal.in() );
            if(!CORBA::is_nil(anObj)){
              //Try narrow to SMESH_Mesh interface
              SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow(anObj);
              if(!aMesh->_is_nil()){
                aVisualObj.reset(new SMESH_MeshObj(aMesh));
                TVisualObjCont::value_type aValue(aKey,aVisualObj);
                VISUAL_OBJ_CONT.insert(aValue);
              }
              //Try narrow to SMESH_Group interface
              SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(anObj);
              if(!aGroup->_is_nil()){
                _PTR(SObject) aFatherSObj = aSObj->GetFather();
                if(!aFatherSObj) return aVisualObj;
                aFatherSObj = aFatherSObj->GetFather();
                if(!aFatherSObj) return aVisualObj;
                CORBA::String_var anEntry = aFatherSObj->GetID().c_str();
                TVisualObjPtr aVisObj = GetVisualObj(theStudyId,anEntry.in());
                if(SMESH_MeshObj* aMeshObj = dynamic_cast<SMESH_MeshObj*>(aVisObj.get())){
                  aVisualObj.reset(new SMESH_GroupObj(aGroup,aMeshObj));
                  TVisualObjCont::value_type aValue(aKey,aVisualObj);
                  VISUAL_OBJ_CONT.insert(aValue);
                }
              }
              //Try narrow to SMESH_subMesh interface
              SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow(anObj);
              if(!aSubMesh->_is_nil()){
                _PTR(SObject) aFatherSObj = aSObj->GetFather();
                if(!aFatherSObj) return aVisualObj;
                aFatherSObj = aFatherSObj->GetFather();
                if(!aFatherSObj) return aVisualObj;
                CORBA::String_var anEntry = aFatherSObj->GetID().c_str();
                TVisualObjPtr aVisObj = GetVisualObj(theStudyId,anEntry.in());
                if(SMESH_MeshObj* aMeshObj = dynamic_cast<SMESH_MeshObj*>(aVisObj.get())){
                  aVisualObj.reset(new SMESH_subMeshObj(aSubMesh,aMeshObj));
                  TVisualObjCont::value_type aValue(aKey,aVisualObj);
                  VISUAL_OBJ_CONT.insert(aValue);
                }
              }
            }
          }
        }
      }
    }catch(...){
      INFOS("GetMeshObj - There is no SMESH_Mesh object for the SALOMEDS::Strudy and Entry!!!");
      return TVisualObjPtr();
    }
    // Update object
    bool objModified = false;
    if ( aVisualObj ) {
      try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
        OCC_CATCH_SIGNALS;
#endif
        //MESSAGE("GetVisualObj");
        if (nulData)
                objModified = aVisualObj->NulData();
        else
          objModified = aVisualObj->Update();
      }
      catch (...) {
#ifdef _DEBUG_
        MESSAGE ( "Exception in SMESHGUI_VTKUtils::GetVisualObj()" );
#endif
        RemoveVisualObjectWithActors( theEntry ); // remove this object
        OnVisuException();
        aVisualObj.reset();
      }
    }

    if ( objModified ) {
      // PAL16631. Mesurements showed that to show aVisualObj in SHADING(default) mode,
      // ~5 times more memory is used than it occupies.
      // Warn the user if there is less free memory than 30 sizes of a grid
      // TODO: estimate memory usage in other modes and take current mode into account
      int freeMB = SMDS_Mesh::CheckMemory(true);
      int usedMB = aVisualObj->GetUnstructuredGrid()->GetActualMemorySize() / 1024;
      MESSAGE("SMESHGUI_VTKUtils::GetVisualObj(), freeMB=" << freeMB << ", usedMB=" <<usedMB);
      if ( freeMB > 0 && usedMB * 5 > freeMB ) {
       bool continu = false;
       if ( usedMB * 3 > freeMB )
         // even dont try to show
         SUIT_MessageBox::warning(SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"),
                                  QObject::tr("SMESH_NO_MESH_VISUALIZATION"));
       else
         // there is a chance to succeed
         continu = SUIT_MessageBox::warning
           (SMESHGUI::desktop(),
            QObject::tr("SMESH_WRN_WARNING"),
            QObject::tr("SMESH_CONTINUE_MESH_VISUALIZATION"),
            SUIT_MessageBox::Yes | SUIT_MessageBox::No,
            SUIT_MessageBox::Yes ) == SUIT_MessageBox::Yes;
       if ( !continu ) {
         // remove the corresponding actors from all views
         RemoveVisualObjectWithActors( theEntry );
         aVisualObj.reset();
       }
      }
    }

    return aVisualObj;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT SVTK_ViewWindow * SMESH::GetVtkViewWindow ( SUIT_ViewWindow *  theWindow)

Definition at line 454 of file SMESHGUI_VTKUtils.cxx.

                                                               {
    return dynamic_cast<SVTK_ViewWindow*>(theWindow);
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT SMESH::Handle ( VTKViewer_Filter  )

Here is the caller graph for this function:

SMESH::if ( subShapeID  = =1||!so)

Here is the caller graph for this function:

SMESH::if ( _PTR(Study)  study = SMESH::GetActiveStudyDocument())
SMESH::if ( it  )

Definition at line 373 of file SMESHGUI_ComputeDlg.cxx.

              {
      for ( it->InitEx(true); !subSO && it->More(); it->Next() ) {
        GEOM::GEOM_Object_var geom = SMESH::SObjectToInterface<GEOM::GEOM_Object>( it->Value() );
        if ( !geom->_is_nil() ) {
          GEOM::ListOfLong_var list = geom->GetSubShapeIndices();
          if ( list->length() == 1 && list[0] == subShapeID )
            subSO = it->Value();
        }
      }
    }

Definition at line 166 of file SMESHGUI_HypothesesUtils.cxx.

  {
    SUIT_OverrideCursor wc;
    if (myHypothesesMap.empty() && myAlgorithmsMap.empty()) {
      // Resource manager
      SUIT_ResourceMgr* resMgr = SMESHGUI::resourceMgr();
      if (!resMgr) return;

      // Find name of a resource XML file ("SMESH_Meshers.xml");
      QString HypsXml;
      char* cenv = getenv("SMESH_MeshersList");
      if (cenv)
        HypsXml.sprintf("%s", cenv);

      QStringList HypsXmlList = HypsXml.split(":", QString::SkipEmptyParts);
      if (HypsXmlList.count() == 0) {
        SUIT_MessageBox::critical(SMESHGUI::desktop(),
                                  QObject::tr("SMESH_WRN_WARNING"),
                                  QObject::tr("MESHERS_FILE_NO_VARIABLE"));
        return;
      }
      // get full names of xml files from HypsXmlList
      QStringList xmlFiles;
      xmlFiles.append( QDir::home().filePath("CustomMeshers.xml")); // may be inexistent
      for (int i = 0; i < HypsXmlList.count(); i++) {
        QString HypsXml = HypsXmlList[ i ];

        // Find full path to the resource XML file
        QString xmlFile = resMgr->path("resources", "SMESH", HypsXml + ".xml");
        if ( xmlFile.isEmpty() ) // try PLUGIN resources
          xmlFile = resMgr->path("resources", HypsXml, HypsXml + ".xml");
        if ( !xmlFile.isEmpty() )
          xmlFiles.append( xmlFile );
      }

      // loop on xmlFiles
      QString aNoAccessFiles;
      for (int i = 0; i < xmlFiles.count(); i++)
      {
        QString xmlFile = xmlFiles[ i ];
        QFile file (xmlFile);
        if (file.exists() && file.open(QIODevice::ReadOnly))
        {
          file.close();

          SMESHGUI_XmlHandler* aXmlHandler = new SMESHGUI_XmlHandler();
          ASSERT(aXmlHandler);

          QXmlInputSource source (&file);
          QXmlSimpleReader reader;
          reader.setContentHandler(aXmlHandler);
          reader.setErrorHandler(aXmlHandler);
          bool ok = reader.parse(source);
          file.close();
          if (ok) {

            THypothesisDataMap::ConstIterator it1 = aXmlHandler->myHypothesesMap.begin();
            
            for( ;it1 != aXmlHandler->myHypothesesMap.end(); it1++)
              myHypothesesMap.insert( it1.key(), it1.value() );
            
            
            it1 = aXmlHandler->myAlgorithmsMap.begin();
            for( ;it1 != aXmlHandler->myAlgorithmsMap.end(); it1++)
              myAlgorithmsMap.insert( it1.key(), it1.value() );
            
            QList<HypothesesSet*>::iterator it, pos = myListOfHypothesesSets.begin();
            for ( it = aXmlHandler->myListOfHypothesesSets.begin(); 
                  it != aXmlHandler->myListOfHypothesesSets.end();
                  ++it )
            {
              (*it)->setIsCustom( i == 0 );
              myListOfHypothesesSets.insert( pos, *it );
            }
          }
          else {
            SUIT_MessageBox::critical(SMESHGUI::desktop(),
                                      QObject::tr("INF_PARSE_ERROR"),
                                      QObject::tr(aXmlHandler->errorProtocol().toLatin1().data()));
          }
          delete aXmlHandler;
        }
        else if ( i > 0 ) { // 1st is ~/CustomMeshers.xml
          if (aNoAccessFiles.isEmpty())
            aNoAccessFiles = xmlFile;
          else
            aNoAccessFiles += ", " + xmlFile;
        }
      } // end loop on xmlFiles


      if (!aNoAccessFiles.isEmpty()) {
        QString aMess = QObject::tr("MESHERS_FILE_CANT_OPEN") + " " + aNoAccessFiles + "\n";
        aMess += QObject::tr("MESHERS_FILE_CHECK_VARIABLE");
        wc.suspend();
        SUIT_MessageBox::warning(SMESHGUI::desktop(),
                                 QObject::tr("SMESH_WRN_WARNING"),
                                 aMess);
        wc.resume();
      }
    }
  }

Here is the caller graph for this function:

template<class TInterface >
TInterface::_var_type SMESH::IObjectToInterface ( const Handle(SALOME_InteractiveObject)&  theIO)

Definition at line 139 of file SMESHGUI_Utils.h.

    {
      CORBA::Object_var anObj = IObjectToObject(theIO);
      if(!CORBA::is_nil(anObj))
        return TInterface::_narrow(anObj);
      return TInterface::_nil();
    }

Here is the call graph for this function:

CORBA::Object_var SMESH::IObjectToObject ( const Handle(SALOME_InteractiveObject)&  theIO)

Definition at line 226 of file SMESHGUI_Utils.cxx.

  {
    if (!theIO.IsNull()) {
      if (theIO->hasEntry()) {
        _PTR(Study) aStudy = GetActiveStudyDocument();
        _PTR(SObject) anObj = aStudy->FindObjectID(theIO->getEntry());
        return SObjectToObject(anObj,aStudy);
      }
    }
    return CORBA::Object::_nil();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TInterface >
TInterface::_var_type SMESH::IORToInterface ( const QString &  theIOR)

Definition at line 151 of file SMESHGUI_Utils.h.

    {
      CORBA::Object_var anObj = IORToObject( theIOR );
      if ( !CORBA::is_nil( anObj ) )
        return TInterface::_narrow( anObj );
      return TInterface::_nil();
    }

Here is the call graph for this function:

SMESHGUI_EXPORT CORBA::Object_var SMESH::IORToObject ( const QString &  theIOR)

Definition at line 238 of file SMESHGUI_Utils.cxx.

  {
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
      (SUIT_Session::session()->activeApplication());
    return app->orb()->string_to_object(theIOR.toLatin1().data());
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT bool SMESH::IsAvailableHypothesis ( const HypothesisData algoData,
const QString &  hypType,
bool &  isAuxiliary 
)

Definition at line 359 of file SMESHGUI_HypothesesUtils.cxx.

  {
    isAuxiliary = false;
    if ( !algoData )
      return false;
    if ( algoData->NeededHypos.contains( hypType ))
      return true;
    if ( algoData->OptionalHypos.contains( hypType)) {
      isAuxiliary = true;
      return true;
    }
    return false;
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT bool SMESH::IsCompatibleAlgorithm ( const HypothesisData algo1Data,
const HypothesisData algo2Data 
)

Definition at line 375 of file SMESHGUI_HypothesesUtils.cxx.

  {
    if ( !algo1Data || !algo2Data )
      return false;
    const HypothesisData* algoIn = algo1Data, *algoMain = algo2Data;
    if ( algoIn->Dim.first() > algoMain->Dim.first() ) {
      algoIn = algo2Data; algoMain = algo1Data;
    }
    // look for any output type of algoIn between input types of algoMain
    QStringList::const_iterator inElemType = algoIn->OutputTypes.begin();
    for ( ; inElemType != algoIn->OutputTypes.end(); ++inElemType )
      if ( algoMain->InputTypes.contains( *inElemType ))
        return true;
    return false;
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT SVTK_Selector* SMESHGUI_EXPORT bool SMESH::IsFilterPresent ( int  ,
SVTK_Selector *  = GetSelector() 
)
SMESHGUI_EXPORT bool SMESH::IsValid ( SALOME_Actor *  ,
int  ,
SVTK_Selector *  = GetSelector() 
)
static QString SMESH::mangledHypoSetName ( HypothesesSet hypSet) [static]

Prepends dimension and appends '[custom]' to the name of hypothesis set.

Definition at line 137 of file SMESHGUI_HypothesesUtils.cxx.

  {
    QString name = hypSet->name();

    // prepend 'xD: '
    int dim = hypSet->maxDim();
    if ( dim > -1 )
      name = QString("%1D: %2").arg(dim).arg(name);

    // custom
    if ( hypSet->getIsCustom() )
      name = QString("%1 [custom]").arg(name);

    return name;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::ModifiedMesh ( _PTR(SObject)  theSObject,
bool  theIsNotModif,
bool  isEmptyMesh 
)

Definition at line 276 of file SMESHGUI_Utils.cxx.

  {
    _PTR(Study) aStudy = GetActiveStudyDocument();
    if (aStudy->GetProperties()->IsLocked())
      return;

    _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
    _PTR(GenericAttribute) anAttr =
      aBuilder->FindOrCreateAttribute(theSObject,"AttributePixMap");
    _PTR(AttributePixMap) aPixmap = anAttr;

    std::string pmName;
    if (theIsNotModif)
      pmName = "ICON_SMESH_TREE_MESH";
    else if ( isEmptyMesh )
      pmName = "ICON_SMESH_TREE_MESH_WARN";
    else
      pmName = "ICON_SMESH_TREE_MESH_PARTIAL";
    aPixmap->SetPixMap( pmName );

    _PTR(ChildIterator) anIter = aStudy->NewChildIterator(theSObject);
    for (int i = 1; anIter->More(); anIter->Next(), i++) {
      _PTR(SObject) aSObj = anIter->Value();
      if (i >= 4) {
        _PTR(ChildIterator) anIter1 = aStudy->NewChildIterator(aSObj);
        for ( ; anIter1->More(); anIter1->Next())
        {
          _PTR(SObject) aSObj1 = anIter1->Value();

          anAttr = aBuilder->FindOrCreateAttribute(aSObj1, "AttributePixMap");
          aPixmap = anAttr;

          std::string entry = aSObj1->GetID();
          int objType = SMESHGUI_Selection::type( entry.c_str(), aStudy );

          SMESH::SMESH_IDSource_var idSrc = SObjectToInterface<SMESH::SMESH_IDSource>( aSObj1 );
          if ( !idSrc->_is_nil() )
          {
            SMESH::SMESH_GroupOnFilter_var gof =
              SObjectToInterface<SMESH::SMESH_GroupOnFilter>( aSObj1 );
            const bool isGroupOnFilter = !gof->_is_nil();

            bool isEmpty = false;
            if ( !isGroupOnFilter ) // GetTypes() can be very long on isGroupOnFilter!
            {
              SMESH::array_of_ElementType_var elemTypes = idSrc->GetTypes();
              isEmpty = ( elemTypes->length() == 0 );
            }
            if ( isEmpty )
              aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_WARN");
            else if ( objType != GROUP )
              aPixmap->SetPixMap( "ICON_SMESH_TREE_MESH" );
            else if ( isGroupOnFilter )
              aPixmap->SetPixMap( "ICON_SMESH_TREE_GROUP_ON_FILTER" );
            else
              aPixmap->SetPixMap( "ICON_SMESH_TREE_GROUP" );
          }
          else
          {
            if ( !theIsNotModif )
              aPixmap->SetPixMap( pmName );
            else if ( objType == GROUP )
              aPixmap->SetPixMap( "ICON_SMESH_TREE_GROUP" );
            else
              aPixmap->SetPixMap( "ICON_SMESH_TREE_MESH" );
          }
        }
      }
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

TCollection_AsciiString SMESH::myLongStringEnd ( "TPythonDump::LongStringEnd"  )
TCollection_AsciiString SMESH::myLongStringStart ( "TPythonDump::LongStringStart"  )
bool SMESH::noSmeshActors ( SUIT_ViewWindow *  theWnd)

Return true if there are no SMESH actors in a view.

Definition at line 687 of file SMESHGUI_VTKUtils.cxx.

  {
    if(SVTK_ViewWindow* aViewWindow = GetVtkViewWindow(theWnd)) {
      vtkRenderer *aRenderer = aViewWindow->getRenderer();
      VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
      vtkActorCollection *aCollection = aCopy.GetActors();
      aCollection->InitTraversal();
      while(vtkActor *anAct = aCollection->GetNextActor())
        if(dynamic_cast<SMESH_Actor*>(anAct))
          return false;
    }
    return true;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Notify the user on problems during visualization.

Definition at line 252 of file SMESHGUI_VTKUtils.cxx.

  {
    try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
      OCC_CATCH_SIGNALS;
#endif
      // PAL16774 (Crash after display of many groups). Salome sometimes crashes just
      // after or at showing this message, so we do an additional check of available memory
//       char* buf = new char[100*1024];
//       delete [] buf;
      SUIT_MessageBox::warning(SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"),
                               QObject::tr("SMESH_VISU_PROBLEM"));
    } catch (...) {
      // no more memory at all: last resort
      MESSAGE_BEGIN ( "SMESHGUI_VTKUtils::OnVisuException(), exception even at showing a message!!!" <<
                      std::endl << "Try to remove all visual data..." );
      if (theVISU_MemoryReserve) {
        delete theVISU_MemoryReserve;
        theVISU_MemoryReserve = 0;
      }
      RemoveAllObjectsWithActors();
      SUIT_MessageBox::warning(SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"),
                               QObject::tr("SMESH_VISU_PROBLEM_CLEAR"));
      MESSAGE_END ( "...done" );
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void SMESH::processHypothesisStatus ( const int  theHypStatus,
SMESH::SMESH_Hypothesis_ptr  theHyp,
const bool  theIsAddition 
)

Definition at line 94 of file SMESHGUI_HypothesesUtils.cxx.

  {
    if (theHypStatus > SMESH::HYP_OK) {
      // get Hyp name
      QString aHypName ("NULL Hypothesis");
      if (!CORBA::is_nil(theHyp)) {
        _PTR(SObject) Shyp = SMESH::FindSObject(theHyp);
        if (Shyp)
          // name in study
          aHypName = Shyp->GetName().c_str();
        else
          // label in xml file
          aHypName = GetHypothesisData(theHyp->GetName())->Label;
      }

      // message
      bool isFatal = (theHypStatus >= SMESH::HYP_UNKNOWN_FATAL);
      QString aMsg;
      if (theIsAddition)
        aMsg = (isFatal ? "SMESH_CANT_ADD_HYP" : "SMESH_ADD_HYP_WRN");
      else
        aMsg = (isFatal ? "SMESH_CANT_RM_HYP"  : "SMESH_RM_HYP_WRN");

      aMsg = QObject::tr(aMsg.toLatin1().data()).arg(aHypName) +
        QObject::tr(QString("SMESH_HYP_%1").arg(theHypStatus).toLatin1().data());

      if ( theHypStatus == SMESH::HYP_HIDDEN_ALGO ) // PAL18501
        aMsg = aMsg.arg( GetHypothesisData(theHyp->GetName())->Dim[0] );

      SUIT_MessageBox::warning(SMESHGUI::desktop(),
                               QObject::tr("SMESH_WRN_WARNING"),
                               aMsg);
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHOBJECT_EXPORT void SMESH::ProcessIn2DViewers ( SMESH_Actor *  theActor,
Viewer2dActionType  aType 
)

Get histogram from the input actor Repaint/Remove the histogram in/from each opened Plot2D Viewer.

Definition at line 182 of file SMESH_ActorUtils.cxx.

                                                                             {
    SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(SUIT_Session::session()->activeApplication());
    
    if(!anApp || !theActor)
      return;
    
    SPlot2d_Histogram* aHistogram = 0;
    
    if(theActor->GetPlot2Histogram())
      if(aType == UpdateIn2dViewer)
        aHistogram = theActor->UpdatePlot2Histogram();
      else
        aHistogram = theActor->GetPlot2Histogram();
    else 
      return;
    
    ViewManagerList aViewManagerList;
    anApp->viewManagers(SPlot2d_Viewer::Type(), aViewManagerList);
    
    aType = aHistogram->getPointList().empty() ? RemoveFrom2dViewer : aType;
    
    SUIT_ViewManager* aViewManager;
    foreach( aViewManager, aViewManagerList ) {
      if (Plot2d_ViewManager* aManager = dynamic_cast<Plot2d_ViewManager*>(aViewManager)) {
        if (SPlot2d_Viewer* aViewer = dynamic_cast<SPlot2d_Viewer*>(aManager->getViewModel())) {
          if (Plot2d_ViewFrame* aViewFrame = aViewer->getActiveViewFrame()) {
            if(aType == UpdateIn2dViewer )
              aViewFrame->displayObject(aHistogram, true);
            else if (aType == RemoveFrom2dViewer)
              aViewFrame->eraseObject(aHistogram, true);
          }
        }
      }
    }
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::RemoveActor ( SUIT_ViewWindow *  theWnd,
SMESH_Actor *  theActor 
)

Definition at line 662 of file SMESHGUI_VTKUtils.cxx.

                                                                   {
    if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(theWnd)){
        MESSAGE("RemoveActor " << theActor);
      vtkWnd->RemoveActor(theActor);
      if(theActor->hasIO()){
        Handle(SALOME_InteractiveObject) anIO = theActor->getIO();
        if(anIO->hasEntry()){
          std::string anEntry = anIO->getEntry();
          SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( vtkWnd->getViewManager()->study() );
          int aStudyId = aStudy->id();
          TVisualObjCont::key_type aKey(aStudyId,anEntry);
          VISUAL_OBJ_CONT.erase(aKey);
        }
      }
      theActor->Delete();
      vtkWnd->Repaint();
    }
  }

Here is the call graph for this function:

Remove all VisualObjs and their actors from all views.

Definition at line 161 of file SMESHGUI_VTKUtils.cxx.

  {
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
      ( SUIT_Session::session()->activeApplication() );
    if (!app) return;
    ViewManagerList viewMgrs = app->viewManagers();
    for ( int iM = 0; iM < viewMgrs.count(); ++iM ) {
      SUIT_ViewManager* aViewManager = viewMgrs.at( iM );
      if ( aViewManager && aViewManager->getType() == SVTK_Viewer::Type()) {
        QVector<SUIT_ViewWindow*> views = aViewManager->getViews();
        for ( int iV = 0; iV < views.count(); ++iV ) {
          if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) {
            vtkRenderer *aRenderer = vtkWnd->getRenderer();
            VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
            vtkActorCollection *actors = aCopy.GetActors();
            for (int i = 0; i < actors->GetNumberOfItems(); ++i ) {
              // size of actors changes inside the loop
              if (SMESH_Actor *actor = dynamic_cast<SMESH_Actor*>(actors->GetItemAsObject(i)))
              {
                vtkWnd->RemoveActor(actor);
                actor->Delete();
              }
            }
          }
        }
      }
    }
    TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.begin();
    for ( ; anIter != VISUAL_OBJ_CONT.end(); ++anIter ) {
      // for unknown reason, object destructor is not called, so clear object manually
      anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0);
      anIter->second->GetUnstructuredGrid()->SetPoints(0);
    }
    VISUAL_OBJ_CONT.clear();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::RemoveFilter ( int  ,
SVTK_Selector *  = GetSelector() 
)

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::RemoveFilters ( SVTK_Selector *  = GetSelector())
SMESHGUI_EXPORT bool SMESH::RemoveHypothesisOrAlgorithmOnMesh ( const Handle(SALOME_InteractiveObject)&  IObject)

Definition at line 580 of file SMESHGUI_HypothesesUtils.cxx.

  {
    int res = SMESH::HYP_UNKNOWN_FATAL;
    SUIT_OverrideCursor wc;

    try {
      _PTR(Study) aStudy = GetActiveStudyDocument();
      _PTR(SObject) aHypObj = aStudy->FindObjectID( IObject->getEntry() );
      if( aHypObj )
        {
          _PTR(SObject) MorSM = SMESH::GetMeshOrSubmesh( aHypObj );
          _PTR(SObject) aRealHypo;
          if( aHypObj->ReferencedObject( aRealHypo ) )
            {
              SMESH_Hypothesis_var hypo = SMESH_Hypothesis::_narrow( SObjectToObject( aRealHypo ) );
              RemoveHypothesisOrAlgorithmOnMesh( MorSM, hypo );
            }
          else
            {
              SMESH_Hypothesis_var hypo = SMESH_Hypothesis::_narrow( SObjectToObject( aHypObj ) );
              SObjectList meshList = GetMeshesUsingAlgoOrHypothesis( hypo );
              for( int i = 0; i < meshList.size(); i++ )
                RemoveHypothesisOrAlgorithmOnMesh( meshList[ i ], hypo );
            }
        }
    }
    catch(const SALOME::SALOME_Exception& S_ex)
      {
        wc.suspend();
        SalomeApp_Tools::QtCatchCorbaException(S_ex);
        res = SMESH::HYP_UNKNOWN_FATAL;
      }
    return res < SMESH::HYP_UNKNOWN_FATAL;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT bool SMESH::RemoveHypothesisOrAlgorithmOnMesh ( _PTR(SObject)  MorSM,
SMESH::SMESH_Hypothesis_ptr  anHyp 
)

Definition at line 615 of file SMESHGUI_HypothesesUtils.cxx.

  {
    SALOMEDS::GenericAttribute_var anAttr;
    SALOMEDS::AttributeIOR_var anIOR;
    int res = SMESH::HYP_UNKNOWN_FATAL;
    SUIT_OverrideCursor wc;

    if (MorSM) {
      try {
        GEOM::GEOM_Object_var aShapeObject = SMESH::GetShapeOnMeshOrSubMesh(MorSM);
        SMESH::SMESH_Mesh_var aMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>(MorSM);
        SMESH::SMESH_subMesh_var aSubMesh = SMESH::SObjectToInterface<SMESH::SMESH_subMesh>(MorSM);
        
        if (!aSubMesh->_is_nil())
          aMesh = aSubMesh->GetFather();
        
        if (!aMesh->_is_nil()) {    
          if (aMesh->HasShapeToMesh() && !aShapeObject->_is_nil()) {
            res = aMesh->RemoveHypothesis(aShapeObject, anHyp);
            if (res < SMESH::HYP_UNKNOWN_FATAL) {
              _PTR(SObject) meshSO = SMESH::FindSObject(aMesh);
              if (meshSO)
                SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0);
            }
            
          }
          else if(!aMesh->HasShapeToMesh()){
            res = aMesh->RemoveHypothesis(aShapeObject, anHyp);
            if (res < SMESH::HYP_UNKNOWN_FATAL) {
              _PTR(SObject) meshSO = SMESH::FindSObject(aMesh);
              if (meshSO)
                SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0);              
            }
          }
          if (res > SMESH::HYP_OK) {
            wc.suspend();
            processHypothesisStatus(res, anHyp, false);
            wc.resume();
          }
        }
      } catch(const SALOME::SALOME_Exception& S_ex) {
        wc.suspend();
        SalomeApp_Tools::QtCatchCorbaException(S_ex);
        res = SMESH::HYP_UNKNOWN_FATAL;
      }
    }
    return res < SMESH::HYP_UNKNOWN_FATAL;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT void SMESH::RemoveVisualObjectWithActors ( const char *  theEntry,
bool  fromAllViews 
)

Remove VisualObj and its actor from all views.

Definition at line 106 of file SMESHGUI_VTKUtils.cxx.

  {
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>(SUIT_Session::session()->activeApplication());
    if(!app)
      return;
    SalomeApp_Study* aStudy  = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
    if(!aStudy)
      return;
    ViewManagerList aList;

    if(fromAllViews) {
      app->viewManagers(SVTK_Viewer::Type() , aList);
    } else {
      SUIT_ViewManager* aVM = app->getViewManager(SVTK_Viewer::Type(), true);
      if(aVM)
        aList.append(aVM);
    }    
    bool actorRemoved = false;
    ViewManagerList::ConstIterator it = aList.begin();
    SUIT_ViewManager* aViewManager = 0;
    for( ; it!=aList.end();it++) {
      aViewManager = *it;
      QVector<SUIT_ViewWindow*> views = aViewManager->getViews();
      for ( int iV = 0; iV < views.count(); ++iV ) {
        if ( SMESH_Actor* actor = FindActorByEntry( views[iV], theEntry)) {
          if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) {
            vtkWnd->RemoveActor(actor);
            actorRemoved = true;
          }
          actor->Delete();
        }
      }
    }
    
    if (aViewManager ) {
      int aStudyId = aViewManager->study()->id();
      TVisualObjCont::key_type aKey(aStudyId,theEntry);
      TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(aKey);
      if(anIter != VISUAL_OBJ_CONT.end()) {
        // for unknown reason, object destructor is not called, so clear object manually
        anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0);
        anIter->second->GetUnstructuredGrid()->SetPoints(0);
      }
      VISUAL_OBJ_CONT.erase(aKey);
    }

    if(actorRemoved)
      aStudy->setVisibilityState(theEntry, Qtx::HiddenState);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::RemoveVisuData ( int  studyID)

Remove all VisualObjs of a study.

Definition at line 203 of file SMESHGUI_VTKUtils.cxx.

  {
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
      ( SUIT_Session::session()->activeApplication() );
    if (!app) return;
    ViewManagerList viewMgrs = app->viewManagers();
    for ( int iM = 0; iM < viewMgrs.count(); ++iM ) {
      SUIT_ViewManager* aViewManager = viewMgrs.at( iM );
      if ( aViewManager && aViewManager->getType() == SVTK_Viewer::Type() &&
           aViewManager->study()->id() == studyID ) {
        QVector<SUIT_ViewWindow*> views = aViewManager->getViews();
        for ( int iV = 0; iV < views.count(); ++iV ) {
          if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) {
            vtkRenderer *aRenderer = vtkWnd->getRenderer();
            VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
            vtkActorCollection *actors = aCopy.GetActors();
            for (int i = 0; i < actors->GetNumberOfItems(); ++i ) {
              // size of actors changes inside the loop
              if(SMESH_Actor *actor = dynamic_cast<SMESH_Actor*>(actors->GetItemAsObject(i)))
              {
                vtkWnd->RemoveActor(actor);
                actor->Delete();
              }
            }
          }
        }
      }
    }
    TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.begin();
    for ( ; anIter != VISUAL_OBJ_CONT.end(); ) {
      int curId = anIter->first.first;
      if ( curId == studyID ) {
        // for unknown reason, object destructor is not called, so clear object manually
        anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0);
        anIter->second->GetUnstructuredGrid()->SetPoints(0);
        VISUAL_OBJ_CONT.erase( anIter++ ); // anIter++ returns a copy of self before incrementing
      }
      else {
        anIter++;
      }
    }
  }

Here is the call graph for this function:

SMESHGUI_EXPORT void SMESH::RenderViewWindow ( SVTK_ViewWindow *  theWindow)

Definition at line 512 of file SMESHGUI_VTKUtils.cxx.

  {
    try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
      OCC_CATCH_SIGNALS;
#endif
      theWindow->getRenderer()->Render();
      theWindow->Repaint();
    }
    catch (...) {
#ifdef _DEBUG_
      MESSAGE ( "Exception in SMESHGUI_VTKUtils::RenderViewWindow(SVTK_ViewWindow*)" );
#endif
      OnVisuException();
    }
  }

Here is the call graph for this function:

Definition at line 475 of file SMESHGUI_VTKUtils.cxx.

  {
    if (SVTK_ViewWindow* wnd = GetCurrentVtkView())
    {
      try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
        OCC_CATCH_SIGNALS;
#endif
        wnd->getRenderer()->Render();
        wnd->Repaint(false);
      }
      catch (...) {
#ifdef _DEBUG_
        MESSAGE ( "Exception in SMESHGUI_VTKUtils::RepaintCurrentView()" );
#endif
        OnVisuException();
      }
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::RepaintViewWindow ( SVTK_ViewWindow *  theWindow)

Definition at line 495 of file SMESHGUI_VTKUtils.cxx.

  {
    try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
      OCC_CATCH_SIGNALS;
#endif
      theWindow->getRenderer()->Render();
      theWindow->Repaint();
    }
    catch (...) {
#ifdef _DEBUG_
      MESSAGE ( "Exception in SMESHGUI_VTKUtils::RepaintViewWindow(SVTK_ViewWindow*)" );
#endif
      OnVisuException();
    }
  }

Here is the call graph for this function:

void SMESH::setFileName ( _PTR(SObject)  theSObject,
const QString &  theValue 
)

Definition at line 161 of file SMESHGUI_Utils.cxx.

  {
    _PTR(Study) aStudy = GetActiveStudyDocument();
    if (aStudy->GetProperties()->IsLocked())
      return;
    _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
    _PTR(GenericAttribute) anAttr =
      aBuilder->FindOrCreateAttribute(theSObject, "AttributeExternalFileDef");
    _PTR(AttributeExternalFileDef) aFileName = anAttr;
    if (aFileName)
      aFileName->SetValue(theValue.toLatin1().data());
  }

Here is the call graph for this function:

void SMESH::setFileType ( _PTR(SObject)  theSObject,
const QString &  theValue 
)

Definition at line 174 of file SMESHGUI_Utils.cxx.

  {
    _PTR(Study) aStudy = GetActiveStudyDocument();
    if (aStudy->GetProperties()->IsLocked())
      return;
    _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
    _PTR(GenericAttribute) anAttr =
      aBuilder->FindOrCreateAttribute(theSObject, "AttributeFileType");
    _PTR(AttributeFileType) aFileType = anAttr;
    if (aFileType)
      aFileType->SetValue(theValue.toLatin1().data());
  }

Here is the call graph for this function:

SMESHGUI_EXPORT void SMESH::SetFilter ( const Handle(VTKViewer_Filter)&  theFilter,
SVTK_Selector *  theSelector 
)

Definition at line 953 of file SMESHGUI_VTKUtils.cxx.

  {
    if (theSelector)
      theSelector->SetFilter(theFilter);
  }

Here is the caller graph for this function:

void SMESH::SetName ( _PTR(SObject)  theSObject,
const QString &  theName 
)

Definition at line 140 of file SMESHGUI_Utils.cxx.

  {
    _PTR(Study) aStudy = GetActiveStudyDocument();
    if (aStudy->GetProperties()->IsLocked())
      return;
    SMESHGUI::GetSMESHGen()->SetName(theSObject->GetIOR().c_str(), theName.toLatin1().data());
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::SetPickable ( SMESH_Actor *  = 0)

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::SetValue ( _PTR(SObject)  theSObject,
const QString &  theValue 
)

Definition at line 148 of file SMESHGUI_Utils.cxx.

  {
    _PTR(Study) aStudy = GetActiveStudyDocument();
    if (aStudy->GetProperties()->IsLocked())
      return;
    _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
    _PTR(GenericAttribute) anAttr =
      aBuilder->FindOrCreateAttribute(theSObject, "AttributeComment");
    _PTR(AttributeComment) aComment = anAttr;
    if (aComment)
      aComment->SetValue(theValue.toLatin1().data());
  }

Here is the call graph for this function:

Here is the caller graph for this function:

QString SMESH::shapeText ( int  subShapeID,
GEOM::GEOM_Object_var  aMainShape 
)

Return text describing a sub-shape.

Definition at line 427 of file SMESHGUI_ComputeDlg.cxx.

  {
    QString text;
    if ( _PTR(SObject) aSO = getSubShapeSO( subShapeID, aMainShape ))
      text = aSO->GetName().c_str();
    else {
      text = QString("#%1").arg( subShapeID );
      QString typeName = shapeTypeName( getSubShape( subShapeID, aMainShape ));
      if ( typeName.length() )
        text += QString(" (%1)").arg(typeName);
    }
    return text;
  }

Here is the call graph for this function:

QString SMESH::shapeTypeName ( GEOM::GEOM_Object_var  aShape,
const char *  dflt = "" 
)

Definition at line 405 of file SMESHGUI_ComputeDlg.cxx.

  {
    QString name = dflt;
    if ( !aShape->_is_nil() ) {
      switch ( aShape->GetShapeType() ) {
      CASE2NAME( VERTEX    );
      CASE2NAME( EDGE      );
      CASE2NAME( WIRE      );
      CASE2NAME( FACE      );
      CASE2NAME( SHELL     );
      CASE2NAME( SOLID     );
      CASE2NAME( COMPSOLID );
      CASE2NAME( COMPOUND  );
      default:;
      }
    }
    return name;
  }

Here is the caller graph for this function:

SMESHGUI_EXPORT void SMESH::ShowHelpFile ( const QString &  theHelpFileName)

Definition at line 347 of file SMESHGUI_Utils.cxx.

  {
    LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
    if (app) {
      SMESHGUI* gui = SMESHGUI::GetSMESHGUI();
      app->onHelpContextModule(gui ? app->moduleName(gui->moduleName()) : QString(""),
                               theHelpFileName);
    }
    else {
      SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
                               QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
                               arg(app->resourceMgr()->stringValue("ExternalBrowser", 
                                                                   "application")).
                               arg(theHelpFileName));
    }
  }
template<class TInterface >
TInterface::_var_type SMESH::SObjectToInterface ( _PTR(SObject)  theSObject)

Definition at line 124 of file SMESHGUI_Utils.h.

    {
      CORBA::Object_var anObj = SObjectToObject(theSObject);
      if(!CORBA::is_nil(anObj))
        return TInterface::_narrow(anObj);
      return TInterface::_nil();
    }

Here is the call graph for this function:

SMESHGUI_EXPORT CORBA::Object_var SMESH::SObjectToObject ( _PTR(SObject)  theSObject,
_PTR(Study)  theStudy 
)

Definition at line 187 of file SMESHGUI_Utils.cxx.

  {
    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
      (SUIT_Session::session()->activeApplication());
    if (theSObject) {
      _PTR(GenericAttribute) anAttr;
      if (theSObject->FindAttribute(anAttr, "AttributeIOR")) {
        _PTR(AttributeIOR) anIOR = anAttr;
        CORBA::String_var aVal = anIOR->Value().c_str();
        // string_to_object() DOC: If the input string is not valid ...
        // a CORBA::SystemException is thrown.
        if ( aVal && strlen( aVal ) > 0 )
          return app->orb()->string_to_object(aVal);
      }
    }
    return CORBA::Object::_nil();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT CORBA::Object_var SMESH::SObjectToObject ( _PTR(SObject)  theSObject)

Definition at line 206 of file SMESHGUI_Utils.cxx.

  {
    _PTR(Study) aStudy = GetActiveStudyDocument();
    return SObjectToObject(theSObject,aStudy);
  }

Here is the call graph for this function:

Converts a string to FunctorType.

This is reverse of FunctorTypeToString()

Definition at line 3876 of file SMESH_Filter_i.cxx.

{
  std::string name( str + 3 ); // skip "FT_"
  const char** functNames = getFunctNames();
  int ft = 0;
  for ( ; ft < SMESH::FT_Undefined; ++ft )
    if ( name == ( functNames[ft] + 3 ))
      break;

  //ASSERT( strcmp( str, FunctorTypeToString( SMESH::FunctorType( ft ))) == 0 );

  return SMESH::FunctorType( ft );
}

Here is the call graph for this function:

SMESHGUI_EXPORT QString SMESH::UniqueMeshName ( const QString &  theBaseName,
const QString &  thePostfix 
)

Definition at line 63 of file SMESHGUI_MeshUtils.cxx.

  {
    QString baseName = thePostfix.isEmpty() ? 
      theBaseName : theBaseName + "_" + thePostfix;
    if ( _PTR(Study) aStudy = GetActiveStudyDocument() ) {
      QString name = baseName;
      while ( !aStudy->FindObjectByName( name.toLatin1().data(), "SMESH" ).empty() ) {
        int nb = 0;
        QStringList names = name.split("_", QString::KeepEmptyParts);
        if ( names.count() > 0 ) {
          bool ok;
          int index = names.last().toInt( &ok );
          if ( ok ) {
            nb = index;
            names.removeLast();
          }
        }
        names.append( QString::number( nb+1 ) );
        name = names.join( "_" );
      }
      return name;
    }
    return baseName;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT QString SMESH::UniqueName ( const QString &  theBaseName,
_PTR(SObject)  theParent,
const QString &  thePostfix 
)

Definition at line 88 of file SMESHGUI_MeshUtils.cxx.

  {
    QString baseName = thePostfix.isEmpty() ? 
      theBaseName : theBaseName + "_" + thePostfix;
    QString name = baseName;
    if ( _PTR(Study) aStudy = GetActiveStudyDocument() ) {
      _PTR(SObject) p = theParent;
      if ( !p ) p = aStudy->FindComponent( "SMESH" );
      if ( p ) {
        _PTR(ChildIterator) iter = aStudy->NewChildIterator( p );
        int idx = 0;
        while( true ) {
          bool found = false;
          for ( ; iter->More(); iter->Next() ) {
            _PTR(SObject) so = iter->Value();
            if ( !so ) continue; // skip bad objects
            _PTR(SObject) ref;
            if ( so->ReferencedObject( ref ) ) continue; // skip references
            QString n = so->GetName().c_str();
            if ( !n.isEmpty() && n == name ) {
              QStringList names = name.split("_", QString::KeepEmptyParts);
              if ( names.count() > 0 ) {
                bool ok;
                names.last().toInt( &ok );
                if ( ok )
                  names.removeLast();
              }
              names.append( QString::number( ++idx ) );
              name = names.join( "_" );
              found = true;
              break;
            }
          }
          if ( !found ) break;
        }
      }
    }
    return name;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT bool SMESH::Update ( const Handle(SALOME_InteractiveObject)&  theIO,
bool  theDisplay 
)

Definition at line 842 of file SMESHGUI_VTKUtils.cxx.

  {
        MESSAGE("Update");
    _PTR(Study) aStudy = GetActiveStudyDocument();
    CORBA::Long anId = aStudy->StudyId();
    if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry())) {
      if ( theDisplay )
        UpdateView(SMESH::eDisplay,theIO->getEntry());
      return true;
    }
    return false;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT bool SMESH::UpdateNulData ( const Handle(SALOME_InteractiveObject)&  theIO,
bool  theDisplay 
)

Definition at line 855 of file SMESHGUI_VTKUtils.cxx.

  {
        MESSAGE("UpdateNulData");
    _PTR(Study) aStudy = GetActiveStudyDocument();
    CORBA::Long anId = aStudy->StudyId();
    if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry(), true)) {
      if ( theDisplay )
        UpdateView(SMESH::eDisplay,theIO->getEntry());
      return true;
    }
    return false;
  }

Here is the call graph for this function:

SMESHGUI_EXPORT void SMESH::UpdateSelectionProp ( SMESHGUI *  theModule)

Definition at line 868 of file SMESHGUI_VTKUtils.cxx.

                                                  {
    if( !theModule )
      return;

    SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( theModule->application() );
    if( !app )
    {
      MESSAGE( "UpdateSelectionProp: Application is null" );
      return;
    }

    SUIT_ViewManager* vm = app->activeViewManager();
    if( !vm )
    {
      MESSAGE( "UpdateSelectionProp: View manager is null" );
      return;
    }

    QVector<SUIT_ViewWindow*> views = vm->getViews();

    SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( theModule );
    if( !mgr )
    {
      MESSAGE( "UpdateSelectionProp: Resource manager is null" );
      return;
    }

    QColor aHiColor = mgr->colorValue( "SMESH", "selection_object_color", Qt::white ),
           aSelColor = mgr->colorValue( "SMESH", "selection_element_color", Qt::yellow ),
           aPreColor = mgr->colorValue( "SMESH", "highlight_color", Qt::cyan );

    int aElem0DSize = mgr->integerValue("SMESH", "elem0d_size", 5);
    int aLineWidth  = mgr->integerValue("SMESH", "element_width", 1);
    int maxSize = aElem0DSize;
    if (aElem0DSize > maxSize) maxSize = aElem0DSize;
    if (aLineWidth > maxSize) maxSize = aLineWidth;

    double SP1 = mgr->doubleValue( "SMESH", "selection_precision_node", 0.025 ),
           SP2 = mgr->doubleValue( "SMESH", "selection_precision_element", 0.001 ),
           SP3 = mgr->doubleValue( "SMESH", "selection_precision_object", 0.025 );

    for ( int i=0, n=views.count(); i<n; i++ ){
      // update VTK viewer properties
      if(SVTK_ViewWindow* aVtkView = GetVtkViewWindow( views[i] )){
        // mesh element selection
        aVtkView->SetSelectionProp(aSelColor.red()/255.,
                                   aSelColor.green()/255.,
                                   aSelColor.blue()/255.);
        // tolerances
        aVtkView->SetSelectionTolerance(SP1, SP2, SP3);

        // pre-selection
        aVtkView->SetPreselectionProp(aPreColor.red()/255.,
                                      aPreColor.green()/255.,
                                      aPreColor.blue()/255.);
        // update actors
        vtkRenderer* aRenderer = aVtkView->getRenderer();
        VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
        vtkActorCollection *aCollection = aCopy.GetActors();
        aCollection->InitTraversal();
        while(vtkActor *anAct = aCollection->GetNextActor()){
          if(SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct)){
            anActor->SetHighlightColor(aHiColor.red()/255.,
                                       aHiColor.green()/255.,
                                       aHiColor.blue()/255.);
            anActor->SetPreHighlightColor(aPreColor.red()/255.,
                                          aPreColor.green()/255.,
                                          aPreColor.blue()/255.);
          }
        }
      }
    }
  }

Here is the call graph for this function:

SMESHGUI_EXPORT bool SMESH::UpdateView ( SUIT_ViewWindow *  theWnd,
EDisplaing  theAction,
const char *  theEntry 
)

Definition at line 701 of file SMESHGUI_VTKUtils.cxx.

  {
        //MESSAGE("UpdateView");
    bool OK = false;
    SVTK_ViewWindow* aViewWnd = GetVtkViewWindow(theWnd);
    if (!aViewWnd)
      return OK;

    SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(theWnd);
    if (!vtkWnd)
      return OK;

    SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( vtkWnd->getViewManager()->study() );
    
    if (!aStudy)
      return OK;

    {
      OK = true;
      vtkRenderer *aRenderer = aViewWnd->getRenderer();
      VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
      vtkActorCollection *aCollection = aCopy.GetActors();
      aCollection->InitTraversal();

      switch (theAction) {
      case eDisplayAll: {
        while (vtkActor *anAct = aCollection->GetNextActor()) {
          if (SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct)) {
                MESSAGE("--- display " << anActor);
            anActor->SetVisibility(true);

            if(anActor->hasIO()){
              Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
              if(anIO->hasEntry()){
                aStudy->setVisibilityState(anIO->getEntry(), Qtx::ShownState);
              }
            }
          }
        }
        break;
      }
      case eDisplayOnly:
      case eEraseAll: {
        //MESSAGE("---case eDisplayOnly");
        while (vtkActor *anAct = aCollection->GetNextActor()) {
          if (SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct)) {
                //MESSAGE("--- erase " << anActor);
            anActor->SetVisibility(false);
          }
        }
        aStudy->setVisibilityStateForAll(Qtx::HiddenState);
      }
      default: {
        if (SMESH_Actor *anActor = FindActorByEntry(theWnd,theEntry)) {
          switch (theAction) {
            case eDisplay:
            case eDisplayOnly:
                //MESSAGE("--- display " << anActor);
              anActor->Update();
              anActor->SetVisibility(true);
              if (theAction == eDisplayOnly) aRenderer->ResetCameraClippingRange();
              aStudy->setVisibilityState(theEntry, Qtx::ShownState);
              break;
            case eErase:
                //MESSAGE("--- erase " << anActor);
              anActor->SetVisibility(false);
              aStudy->setVisibilityState(theEntry, Qtx::HiddenState);
              break;
          }
        } else {
          switch (theAction) {
          case eDisplay:
          case eDisplayOnly:
            {
                //MESSAGE("---");
              SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(theWnd->getViewManager()->study());
              _PTR(Study) aDocument = aStudy->studyDS();
              // Pass non-visual objects (hypotheses, etc.), return true in this case
              CORBA::Long anId = aDocument->StudyId();
              TVisualObjPtr aVisualObj;
              if ( (aVisualObj = GetVisualObj(anId,theEntry)) && aVisualObj->IsValid())
              {
                if ((anActor = CreateActor(aDocument,theEntry,true))) {
                  bool needFitAll = noSmeshActors(theWnd); // fit for the first object only
                  DisplayActor(theWnd,anActor);
                  aStudy->setVisibilityState(theEntry, Qtx::ShownState);
                  // FitAll(); - PAL16770(Display of a group performs an automatic fit all)
                  if (needFitAll) FitAll();
                } else {
                  OK = false;
                }
              }
              break;
            }
          }
        }
      }
      }
    }
    return OK;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

SMESHGUI_EXPORT bool SMESH::UpdateView ( EDisplaing  theAction,
const char *  theEntry 
)

Definition at line 804 of file SMESHGUI_VTKUtils.cxx.

                                                             {
        //MESSAGE("UpdateView");
    SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( GetActiveStudy() );
    SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( aStudy->application() );
    SUIT_ViewWindow *aWnd = app->activeViewManager()->getActiveView();
    return UpdateView(aWnd,theAction,theEntry);
  }

Here is the call graph for this function:

Definition at line 812 of file SMESHGUI_VTKUtils.cxx.

                   {
    if(SVTK_ViewWindow* aWnd = SMESH::GetCurrentVtkView()){
      LightApp_SelectionMgr* mgr = SMESHGUI::selectionMgr();
      SALOME_ListIO selected; mgr->selectedObjects( selected );

      if( selected.Extent() == 0){
        vtkRenderer* aRenderer = aWnd->getRenderer();
        VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
        vtkActorCollection *aCollection = aCopy.GetActors();
        aCollection->InitTraversal();
        while(vtkActor *anAct = aCollection->GetNextActor()){
          if(SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct)){
            if(anActor->hasIO())
              if (!Update(anActor->getIO(),anActor->GetVisibility()))
                break; // avoid multiple warinings if visu failed
          }
        }
      }else{
        SALOME_ListIteratorOfListIO anIter( selected );
        for( ; anIter.More(); anIter.Next()){
          Handle(SALOME_InteractiveObject) anIO = anIter.Value();
          if ( !Update(anIO,true) )
            break; // avoid multiple warinings if visu failed
        }
      }
      RepaintCurrentView();
    }
  }

Here is the call graph for this function:

SMESHOBJECT_EXPORT void SMESH::WriteUnstructuredGrid ( vtkUnstructuredGrid *  theGrid,
const char *  theFileName 
)

Definition at line 88 of file SMESH_ActorUtils.cxx.

  {
    vtkXMLUnstructuredGridWriter* aWriter = vtkXMLUnstructuredGridWriter::New();
    aWriter->SetFileName(theFileName);
    aWriter->SetInput(theGrid);
    aWriter->SetDataModeToAscii();
    if(theGrid->GetNumberOfCells()){
      aWriter->Write();
    }
    aWriter->Delete();
  }

Variable Documentation

const vtkIdType SMESH::DeleteActorEvent = vtkCommand::UserEvent + 100

Definition at line 50 of file SMESH_Actor.h.

Auxilary flags for advanced extrusion.

BOUNDARY: create or not boundary for result of extrusion SEW: try to use existing nodes or create new nodes in any case

Definition at line 239 of file SMESH_Mesh.idl.

const long SMESH::EXTRUSION_FLAG_SEW = 2

Definition at line 240 of file SMESH_Mesh.idl.

Definition at line 86 of file SMESHGUI_HypothesesUtils.cxx.

Definition at line 85 of file SMESHGUI_HypothesesUtils.cxx.

Definition at line 92 of file SMESHGUI_HypothesesUtils.cxx.

return SMESH::subSO

Definition at line 383 of file SMESHGUI_ComputeDlg.cxx.

const long SMESH::Tag_0DElementsGroups = 15

Definition at line 73 of file SMESH_Gen.idl.

const long SMESH::Tag_AlgorithmsRoot = 2

Definition at line 51 of file SMESH_Gen.idl.

const long SMESH::Tag_EdgeGroups = 12

Definition at line 70 of file SMESH_Gen.idl.

const long SMESH::Tag_FaceGroups = 13

Definition at line 71 of file SMESH_Gen.idl.

const long SMESH::Tag_FirstGroup = 11

Definition at line 68 of file SMESH_Gen.idl.

const long SMESH::Tag_FirstMeshRoot = 3

Definition at line 52 of file SMESH_Gen.idl.

const long SMESH::Tag_FirstSubMesh = 4

Definition at line 58 of file SMESH_Gen.idl.

const long SMESH::Tag_HypothesisRoot = 1

Tags definition.

Definition at line 50 of file SMESH_Gen.idl.

const long SMESH::Tag_LastGroup = 15

Definition at line 74 of file SMESH_Gen.idl.

const long SMESH::Tag_LastSubMesh = 10

Definition at line 66 of file SMESH_Gen.idl.

const long SMESH::Tag_NodeGroups = 11

Definition at line 69 of file SMESH_Gen.idl.

Definition at line 56 of file SMESH_Gen.idl.

Definition at line 55 of file SMESH_Gen.idl.

const long SMESH::Tag_RefOnShape = 1

Definition at line 54 of file SMESH_Gen.idl.

Definition at line 65 of file SMESH_Gen.idl.

const long SMESH::Tag_SubMeshOnEdge = 5

Definition at line 60 of file SMESH_Gen.idl.

const long SMESH::Tag_SubMeshOnFace = 7

Definition at line 62 of file SMESH_Gen.idl.

const long SMESH::Tag_SubMeshOnShell = 8

Definition at line 63 of file SMESH_Gen.idl.

const long SMESH::Tag_SubMeshOnSolid = 9

Definition at line 64 of file SMESH_Gen.idl.

Definition at line 59 of file SMESH_Gen.idl.

const long SMESH::Tag_SubMeshOnWire = 6

Definition at line 61 of file SMESH_Gen.idl.

const long SMESH::Tag_VolumeGroups = 14

Definition at line 72 of file SMESH_Gen.idl.

Definition at line 98 of file SMESHGUI_VTKUtils.cxx.

Definition at line 81 of file SMESHGUI_VTKUtils.cxx.