Go to the documentation of this file.
27 #ifndef _SMESH_SUBMESH_HXX_
28 #define _SMESH_SUBMESH_HXX_
40 #include <TopoDS_Shape.hxx>
63 const TopoDS_Shape & aSubShape);
77 const std::map < int, SMESH_subMesh * >&
DependsOn();
83 const bool complexShapeFirst);
205 const TopAbs_ShapeEnum theShapeType);
208 {
return IsApplicableHypotesis( theHypothesis, _subShape.ShapeType() ); }
253 bool & theSubComputed);
259 const TopoDS_Shape& theCollection);
276 const int theHypType = 0);
SMESH_subMesh(int Id, SMESH_Mesh *father, SMESHDS_Mesh *meshDS, const TopoDS_Shape &aSubShape)
SMESH_ComputeErrorPtr _computeError
boost::shared_ptr< SMDS_Iterator< SMESH_subMesh * > > SMESH_subMeshIteratorPtr
SMESHDS_SubMesh * _subMeshDS
void InsertDependence(const TopoDS_Shape aSubShape)
SMESHDS_SubMesh * CreateSubMeshDS()
EventListenerData * GetEventListenerData(EventListener *listener) const
Return an event listener data.
bool IsMeshComputed() const
SMESHDS_SubMesh * GetSubMeshDS()
bool Evaluate(MapShapeNbElems &aResMap)
void SetAlgoState(int state)
bool CanAddHypothesis(const SMESH_Hypothesis *theHypothesis) const
void RemoveSubMeshElementsAndNodes()
static bool IsApplicableHypotesis(const SMESH_Hypothesis *theHypothesis, const TopAbs_ShapeEnum theShapeType)
bool IsEmpty() const
Return true if no mesh entities is bound to the submesh.
void SetEventListener(EventListener *listener, EventListenerData *data)
Sets an event listener and its data to a submesh.
TopoDS_Shape GetCollection(SMESH_Gen *theGen, SMESH_Algo *theAlgo, bool &theSubComputed)
Return a shape containing all sub-shapes of the MainShape that can be meshed at once along with _subS...
bool ApplyToCollection(SMESH_Algo *theAlgo, const TopoDS_Shape &theCollection)
Apply theAlgo to all subshapes in theCollection.
A base for objects reacting on submesh events.
void UpdateSubMeshState(const compute_state theState)
Data specific for EventListener and to be stored in a submesh.
SMESH_ComputeErrorPtr & GetComputeError()
SMESH_subMeshEventListenerData EventListenerData
void UpdateDependantsState(const compute_event theEvent)
SMESH_subMeshEventListener EventListener
void SetEventListener(EventListener *listener, EventListenerData *data, SMESH_subMesh *where)
Sets an event listener and its data to a submesh.
int GetComputeState() const
boost::shared_ptr< SMESH_ComputeError > SMESH_ComputeErrorPtr
virtual ~ SMESH_subMesh()
const std::map< int, SMESH_subMesh * > & DependsOn()
SMESH_Hypothesis::Hypothesis_Status SubMeshesAlgoStateEngine(int event, SMESH_Hypothesis *anHyp)
std::map< int, SMESH_subMesh * > _mapDepend
bool ComputeStateEngine(int event)
std::map< SMESH_subMesh *, std::vector< int > > MapShapeNbElems
const TopoDS_Shape & GetSubShape() const
void DeleteEventListener(EventListener *listener)
Unregister the listener and delete it and it's data.
SMESH_subMeshIteratorPtr getDependsOnIterator(const bool includeSelf, const bool complexShapeFirst)
Return iterator on the submeshes this one depends on.
void NotifyListenersOnEvent(const int event, const event_type eventType, SMESH_Hypothesis *hyp=0)
Notify stored event listeners on the occured event.
void DumpAlgoState(bool isMain)
SMESH_subMesh * GetFirstToCompute()
void SetIsAlwaysComputed(bool isAlCo)
Allow algo->Compute() if a subshape of lower dim is meshed but none mesh entity is bound to it.
void DeleteOwnListeners()
Delete event listeners depending on algo of this submesh.
const SMESH_Hypothesis * GetSimilarAttached(const TopoDS_Shape &theShape, const SMESH_Hypothesis *theHyp, const int theHypType=0)
Return a hypothesis attached to theShape.
bool CheckComputeError(SMESH_Algo *theAlgo, const TopoDS_Shape &theShape=TopoDS_Shape())
Update compute_state by _computeError.
void ComputeSubMeshStateEngine(int event)
bool IsApplicableHypotesis(const SMESH_Hypothesis *theHypothesis) const
SMESH_Hypothesis::Hypothesis_Status AlgoStateEngine(int event, SMESH_Hypothesis *anHyp)
std::map< EventListener *, EventListenerData * > myEventListeners
< event listeners to notify
std::list< std::pair< SMESH_subMesh *, EventListener * > > myOwnListeners
SMESH_Hypothesis::Hypothesis_Status CheckConcurentHypothesis(const int theHypType)
bool IsConform(const SMESH_Algo *theAlgo)