SALOME - SMESH
|
#include <SMESH_subMesh.hxx>
Public Types | |
enum | compute_state { NOT_READY, READY_TO_COMPUTE, COMPUTE_OK, FAILED_TO_COMPUTE } |
enum | algo_state { NO_ALGO, MISSING_HYP, HYP_OK } |
enum | algo_event { ADD_HYP, ADD_ALGO, REMOVE_HYP, REMOVE_ALGO, ADD_FATHER_HYP, ADD_FATHER_ALGO, REMOVE_FATHER_HYP, REMOVE_FATHER_ALGO, MODIF_HYP } |
enum | compute_event { MODIF_ALGO_STATE, COMPUTE, CLEAN, SUBMESH_COMPUTED, SUBMESH_RESTORED, MESH_ENTITY_REMOVED, CHECK_COMPUTE_STATE } |
enum | event_type { ALGO_EVENT, COMPUTE_EVENT } |
Public Member Functions | |
SMESH_subMesh (int Id, SMESH_Mesh *father, SMESHDS_Mesh *meshDS, const TopoDS_Shape &aSubShape) | |
virtual | ~SMESH_subMesh () |
int | GetId () const |
SMESH_Mesh * | GetFather () |
SMESHDS_SubMesh * | GetSubMeshDS () |
SMESHDS_SubMesh * | CreateSubMeshDS () |
SMESH_subMesh * | GetFirstToCompute () |
const std::map< int, SMESH_subMesh * > & | DependsOn () |
SMESH_subMeshIteratorPtr | getDependsOnIterator (const bool includeSelf, const bool complexShapeFirst) |
Return iterator on the submeshes this one depends on. More... | |
const TopoDS_Shape & | GetSubShape () const |
void | SetEventListener (EventListener *listener, EventListenerData *data, SMESH_subMesh *where) |
Sets an event listener and its data to a submesh. More... | |
EventListenerData * | GetEventListenerData (EventListener *listener) const |
Return an event listener data. More... | |
void | DeleteEventListener (EventListener *listener) |
Unregister the listener and delete it and it's data. More... | |
SMESH_Hypothesis::Hypothesis_Status | AlgoStateEngine (int event, SMESH_Hypothesis *anHyp) |
SMESH_Hypothesis::Hypothesis_Status | SubMeshesAlgoStateEngine (int event, SMESH_Hypothesis *anHyp) |
int | GetAlgoState () const |
int | GetComputeState () const |
SMESH_ComputeErrorPtr & | GetComputeError () |
void | DumpAlgoState (bool isMain) |
bool | ComputeStateEngine (int event) |
bool | Evaluate (MapShapeNbElems &aResMap) |
bool | IsConform (const SMESH_Algo *theAlgo) |
bool | CanAddHypothesis (const SMESH_Hypothesis *theHypothesis) const |
bool | IsApplicableHypotesis (const SMESH_Hypothesis *theHypothesis) const |
SMESH_Hypothesis::Hypothesis_Status | CheckConcurentHypothesis (const int theHypType) |
bool | IsEmpty () const |
Return true if no mesh entities is bound to the submesh. More... | |
bool | IsMeshComputed () const |
void | SetIsAlwaysComputed (bool isAlCo) |
Allow algo->Compute() if a subshape of lower dim is meshed but none mesh entity is bound to it. More... | |
bool | IsAlwaysComputed () |
Static Public Member Functions | |
static bool | IsApplicableHypotesis (const SMESH_Hypothesis *theHypothesis, const TopAbs_ShapeEnum theShapeType) |
Protected Member Functions | |
void | SetEventListener (EventListener *listener, EventListenerData *data) |
Sets an event listener and its data to a submesh. More... | |
void | NotifyListenersOnEvent (const int event, const event_type eventType, SMESH_Hypothesis *hyp=0) |
Notify stored event listeners on the occured event. More... | |
void | DeleteOwnListeners () |
Delete event listeners depending on algo of this submesh. More... | |
void | InsertDependence (const TopoDS_Shape aSubShape) |
bool | SubMeshesComputed () |
bool | SubMeshesReady () |
void | RemoveSubMeshElementsAndNodes () |
void | UpdateDependantsState (const compute_event theEvent) |
void | UpdateSubMeshState (const compute_state theState) |
void | ComputeSubMeshStateEngine (int event) |
void | CleanDependants () |
void | CleanDependsOn () |
void | SetAlgoState (int state) |
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 _subShape. More... | |
bool | ApplyToCollection (SMESH_Algo *theAlgo, const TopoDS_Shape &theCollection) |
Apply theAlgo to all subshapes in theCollection. More... | |
bool | CheckComputeError (SMESH_Algo *theAlgo, const TopoDS_Shape &theShape=TopoDS_Shape()) |
Update compute_state by _computeError. More... | |
const SMESH_Hypothesis * | GetSimilarAttached (const TopoDS_Shape &theShape, const SMESH_Hypothesis *theHyp, const int theHypType=0) |
Return a hypothesis attached to theShape. More... | |
Protected Attributes | |
std::map< EventListener *, EventListenerData * > | myEventListeners |
< event listeners to notify More... | |
std::list< std::pair < SMESH_subMesh *, EventListener * > > | myOwnListeners |
TopoDS_Shape | _subShape |
SMESHDS_SubMesh * | _subMeshDS |
SMESH_Mesh * | _father |
int | _Id |
std::map< int, SMESH_subMesh * > | _mapDepend |
bool | _dependenceAnalysed |
int | _algoState |
int | _computeState |
SMESH_ComputeErrorPtr | _computeError |
bool | _alwaysComputed |
Definition at line 59 of file SMESH_subMesh.hxx.
Enumerator | |
---|---|
NOT_READY | |
READY_TO_COMPUTE | |
COMPUTE_OK | |
FAILED_TO_COMPUTE |
Definition at line 87 of file SMESH_subMesh.hxx.
Enumerator | |
---|---|
NO_ALGO | |
MISSING_HYP | |
HYP_OK |
Definition at line 92 of file SMESH_subMesh.hxx.
Enumerator | |
---|---|
ADD_HYP | |
ADD_ALGO | |
REMOVE_HYP | |
REMOVE_ALGO | |
ADD_FATHER_HYP | |
ADD_FATHER_ALGO | |
REMOVE_FATHER_HYP | |
REMOVE_FATHER_ALGO | |
MODIF_HYP |
Definition at line 96 of file SMESH_subMesh.hxx.
Enumerator | |
---|---|
MODIF_ALGO_STATE | |
COMPUTE | |
CLEAN | |
SUBMESH_COMPUTED | |
SUBMESH_RESTORED | |
MESH_ENTITY_REMOVED | |
CHECK_COMPUTE_STATE |
Definition at line 104 of file SMESH_subMesh.hxx.
Enumerator | |
---|---|
ALGO_EVENT | |
COMPUTE_EVENT |
Definition at line 110 of file SMESH_subMesh.hxx.
SMESH_subMesh::SMESH_subMesh | ( | int | Id, |
SMESH_Mesh * | father, | ||
SMESHDS_Mesh * | meshDS, | ||
const TopoDS_Shape & | aSubShape | ||
) |
|
virtual |
int SMESH_subMesh::GetId | ( | ) | const |
SMESH_Mesh* SMESH_subMesh::GetFather | ( | ) |
Definition at line 68 of file SMESH_subMesh.hxx.
SMESHDS_SubMesh* SMESH_subMesh::GetSubMeshDS | ( | ) |
SMESHDS_SubMesh* SMESH_subMesh::CreateSubMeshDS | ( | ) |
SMESH_subMesh* SMESH_subMesh::GetFirstToCompute | ( | ) |
const std::map< int, SMESH_subMesh * >& SMESH_subMesh::DependsOn | ( | ) |
SMESH_subMeshIteratorPtr SMESH_subMesh::getDependsOnIterator | ( | const bool | includeSelf, |
const bool | complexShapeFirst | ||
) |
Return iterator on the submeshes this one depends on.
const TopoDS_Shape& SMESH_subMesh::GetSubShape | ( | ) | const |
void SMESH_subMesh::SetEventListener | ( | EventListener * | listener, |
EventListenerData * | data, | ||
SMESH_subMesh * | where | ||
) |
Sets an event listener and its data to a submesh.
listener | - the listener to store |
data | - the listener data to store |
where | - the submesh to store the listener and it's data |
The method remembers the submesh it puts the listener in order to delete them when HYP_OK algo_state is lost After being set, event listener is notified on each event of submesh.
EventListenerData* SMESH_subMesh::GetEventListenerData | ( | EventListener * | listener) | const |
Return an event listener data.
listener | - the listener whose data is |
EventListenerData* | - found data, maybe NULL |
void SMESH_subMesh::DeleteEventListener | ( | EventListener * | listener) |
Unregister the listener and delete it and it's data.
listener | - the event listener to delete |
|
protected |
Sets an event listener and its data to a submesh.
listener | - the listener to store |
data | - the listener data to store |
After being set, event listener is notified on each event of a submesh.
|
protected |
Notify stored event listeners on the occured event.
event | - algo_event or compute_event itself |
eventType | - algo_event or compute_event |
hyp | - hypothesis, if eventType is algo_event |
|
protected |
Delete event listeners depending on algo of this submesh.
SMESH_Hypothesis::Hypothesis_Status SMESH_subMesh::AlgoStateEngine | ( | int | event, |
SMESH_Hypothesis * | anHyp | ||
) |
SMESH_Hypothesis::Hypothesis_Status SMESH_subMesh::SubMeshesAlgoStateEngine | ( | int | event, |
SMESH_Hypothesis * | anHyp | ||
) |
int SMESH_subMesh::GetAlgoState | ( | ) | const |
Definition at line 187 of file SMESH_subMesh.hxx.
int SMESH_subMesh::GetComputeState | ( | ) | const |
Definition at line 188 of file SMESH_subMesh.hxx.
SMESH_ComputeErrorPtr& SMESH_subMesh::GetComputeError | ( | ) |
Definition at line 189 of file SMESH_subMesh.hxx.
void SMESH_subMesh::DumpAlgoState | ( | bool | isMain) |
bool SMESH_subMesh::ComputeStateEngine | ( | int | event) |
bool SMESH_subMesh::Evaluate | ( | MapShapeNbElems & | aResMap) |
bool SMESH_subMesh::IsConform | ( | const SMESH_Algo * | theAlgo) |
bool SMESH_subMesh::CanAddHypothesis | ( | const SMESH_Hypothesis * | theHypothesis) | const |
|
static |
bool SMESH_subMesh::IsApplicableHypotesis | ( | const SMESH_Hypothesis * | theHypothesis) | const |
Definition at line 207 of file SMESH_subMesh.hxx.
SMESH_Hypothesis::Hypothesis_Status SMESH_subMesh::CheckConcurentHypothesis | ( | const int | theHypType) |
bool SMESH_subMesh::IsEmpty | ( | ) | const |
Return true if no mesh entities is bound to the submesh.
bool SMESH_subMesh::IsMeshComputed | ( | ) | const |
void SMESH_subMesh::SetIsAlwaysComputed | ( | bool | isAlCo) |
Allow algo->Compute() if a subshape of lower dim is meshed but none mesh entity is bound to it.
bool SMESH_subMesh::IsAlwaysComputed | ( | ) |
Definition at line 228 of file SMESH_subMesh.hxx.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Return a shape containing all sub-shapes of the MainShape that can be meshed at once along with _subShape.
|
protected |
Apply theAlgo to all subshapes in theCollection.
|
protected |
Update compute_state by _computeError.
bool | - false if there are errors |
|
protected |
Return a hypothesis attached to theShape.
If theHyp is provided, similar but not same hypotheses is returned; else an applicable ones having theHypType is returned
|
protected |
< event listeners to notify
event listeners to delete when HYP_OK algo_state is lost
Definition at line 149 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 151 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 281 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 282 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 283 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 284 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 286 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 287 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 289 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 290 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 291 of file SMESH_subMesh.hxx.
|
protected |
Definition at line 296 of file SMESH_subMesh.hxx.