27#ifndef _SMESH_SUBMESH_HXX_
28#define _SMESH_SUBMESH_HXX_
36#include "Utils_SALOME_Exception.hxx"
38#include <TopoDS_Shape.hxx>
39#include <TopTools_IndexedMapOfShape.hxx>
66 const TopoDS_Shape & aSubShape);
84 const std::map < int, SMESH_subMesh * >& DependsOn();
86 bool DependsOn(
const int shapeID )
const;
92 const bool complexShapeFirst=
false)
const;
94 const std::vector< SMESH_subMesh * > & GetAncestors()
const;
95 void ClearAncestors();
117 MODIF_ALGO_STATE,
COMPUTE, COMPUTE_SUBMESH, COMPUTE_NOGEOM, COMPUTE_CANCELED,
118 CLEAN, SUBMESH_COMPUTED, SUBMESH_RESTORED, SUBMESH_LOADED,
160 const bool myOwn=
false)
const;
170 const bool myOwn=
false)
const;
208 void notifyListenersOnEvent(
const int event,
215 void deleteOwnListeners();
220 void loadDependentMeshes();
237 void DumpAlgoState(
bool isMain);
239 bool ComputeStateEngine(compute_event event);
240 void ComputeSubMeshStateEngine(compute_event event,
const bool includeSelf=
false);
252 const TopAbs_ShapeEnum theShapeType);
264 bool IsEmpty()
const;
266 bool IsMeshComputed()
const;
269 bool IsComputedPartially()
const;
276 { _allowedSubShapes = subShapes; }
282 void SetIsAlwaysComputed(
bool isAlCo);
285 bool SubMeshesComputed(
bool * isFailedToCompute=0)
const;
287 int GetComputeCost()
const;
297 std::set<const SMESH_subMesh*>& theSetOfCommon )
const;
301 void insertDependence(
const TopoDS_Shape aShape,
302 TopAbs_ShapeEnum aSubType,
303 TopAbs_ShapeEnum avoidType=TopAbs_SHAPE);
305 void removeSubMeshElementsAndNodes();
306 void updateDependantsState(
const compute_event theEvent);
307 void updateSubMeshState(
const compute_state theState);
308 void cleanDependants();
309 void cleanDependsOn(
SMESH_Algo* algoRequiringCleaning=0 );
310 void setAlgoState(algo_state state);
316 TopoDS_Shape getCollection(
SMESH_Gen * theGen,
318 bool & theSubComputed,
320 std::vector<SMESH_subMesh*>& theSubs);
326 const bool theComputeOK,
327 const TopoDS_Shape& theShape=TopoDS_Shape());
338 const int theHypType = 0);
340 int computeCost()
const;
std::map< SMESH_subMesh *, std::vector< smIdType > > MapShapeNbElems
Definition: SMESH_Algo.hxx:63
boost::shared_ptr< SMESH_ComputeError > SMESH_ComputeErrorPtr
Definition: SMESH_ComputeError.hxx:38
#define SMESH_EXPORT
Definition: SMESH_SMESH.hxx:37
boost::shared_ptr< SMDS_Iterator< SMESH_subMesh * > > SMESH_subMeshIteratorPtr
Definition: SMESH_subMesh.hxx:57
SMESH_subMeshEventListenerData EventListenerData
Definition: SMESH_subMesh.hxx:55
SMESH_subMeshEventListener EventListener
Definition: SMESH_subMesh.hxx:54
Definition: SMESHDS_Mesh.hxx:98
Definition: SMESHDS_SubMesh.hxx:48
Root of all algorithms.
Definition: SMESH_Algo.hxx:79
Definition: SMESH_Gen.hxx:68
Definition: SMESH_Hypothesis.hxx:48
Hypothesis_Status
Definition: SMESH_Hypothesis.hxx:51
Definition: SMESH_Mesh.hxx:80
A base for objects reacting on submesh events.
Definition: SMESH_subMeshEventListener.hxx:46
Definition: SMESH_subMesh.hxx:61
std::list< OwnListenerData > _ownListeners
Definition: SMESH_subMesh.hxx:191
algo_state
Definition: SMESH_subMesh.hxx:104
@ MISSING_HYP
Definition: SMESH_subMesh.hxx:105
SMESH_Algo * _algo
Definition: SMESH_subMesh.hxx:353
compute_event
Definition: SMESH_subMesh.hxx:116
@ MESH_ENTITY_REMOVED
Definition: SMESH_subMesh.hxx:119
@ COMPUTE
Definition: SMESH_subMesh.hxx:117
@ CLEAN
Definition: SMESH_subMesh.hxx:118
int _realComputeCost
Definition: SMESH_subMesh.hxx:359
SMESH_Mesh * _father
Definition: SMESH_subMesh.hxx:346
algo_state GetAlgoState() const
Definition: SMESH_subMesh.hxx:233
void SetAllowedSubShapes(const TopTools_IndexedMapOfShape *subShapes)
Set sub-shapes that are allowed to compute at once by a multidimensional algo.
Definition: SMESH_subMesh.hxx:275
algo_state _algoState
Definition: SMESH_subMesh.hxx:355
std::vector< SMESH_subMesh * > _ancestors
Definition: SMESH_subMesh.hxx:351
std::map< int, SMESH_subMesh * > _mapDepend
Definition: SMESH_subMesh.hxx:349
SMESH_ComputeErrorPtr _computeError
Definition: SMESH_subMesh.hxx:357
algo_event
Definition: SMESH_subMesh.hxx:108
@ ADD_ALGO
Definition: SMESH_subMesh.hxx:109
@ REMOVE_ALGO
Definition: SMESH_subMesh.hxx:110
@ REMOVE_FATHER_ALGO
Definition: SMESH_subMesh.hxx:112
@ ADD_FATHER_ALGO
Definition: SMESH_subMesh.hxx:111
bool _alwaysComputed
Definition: SMESH_subMesh.hxx:364
bool IsAlwaysComputed() const
Definition: SMESH_subMesh.hxx:283
event_type
Definition: SMESH_subMesh.hxx:122
@ ALGO_EVENT
Definition: SMESH_subMesh.hxx:123
compute_state GetComputeState() const
Definition: SMESH_subMesh.hxx:234
int _computeCost
Definition: SMESH_subMesh.hxx:358
TopoDS_Shape _subShape
Definition: SMESH_subMesh.hxx:344
SMESH_Mesh * GetFather()
Definition: SMESH_subMesh.hxx:71
SMESHDS_SubMesh * _subMeshDS
Definition: SMESH_subMesh.hxx:345
TopoDS_Shape _algoShape
Definition: SMESH_subMesh.hxx:354
const TopTools_IndexedMapOfShape * _allowedSubShapes
Definition: SMESH_subMesh.hxx:366
bool _dependenceAnalysed
Definition: SMESH_subMesh.hxx:350
SMESH_ComputeErrorPtr & GetComputeError()
Definition: SMESH_subMesh.hxx:235
int _Id
Definition: SMESH_subMesh.hxx:347
compute_state _computeState
Definition: SMESH_subMesh.hxx:356
SMESH_Algo * CopyAlgo() const
compute_state
Definition: SMESH_subMesh.hxx:100
@ COMPUTE_OK
Definition: SMESH_subMesh.hxx:101
std::map< EventListener *, EventListenerData * > _eventListeners
< event listeners to notify
Definition: SMESH_subMesh.hxx:181
@ HYP_OK
Definition: SMESH_Mesh.idl:209
GEOM::GEOM_Object_ptr GetSubShape(GEOM::GEOM_Object_ptr theMainShape, long theID)
Definition: SMESHGUI_GEOMGenUtils.cxx:156
void SetEventListener(SMESH_subMesh *subMesh, TopoDS_Shape srcShape, SMESH_Mesh *srcMesh)
Set event listeners to submesh with projection algo.
Definition: StdMeshers_ProjectionUtils.cxx:2546
Data specific for EventListener and to be stored in a submesh.
Definition: SMESH_subMeshEventListener.hxx:87
Definition: SMESH_subMesh.hxx:184
int mySubMeshID
Definition: SMESH_subMesh.hxx:187
EventListener * myListener
Definition: SMESH_subMesh.hxx:188
SMESH_subMesh * mySubMesh
Definition: SMESH_subMesh.hxx:185
int myMeshID
Definition: SMESH_subMesh.hxx:186