mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-06 12:04:16 +05:00
[bos #43370] Swich Composite Side to Wire Discretization. Fixed calling base class clear() for childs of SMDS_ElementHolder. Added debug output, removed redundant output, added GroupOnGeom cleaning placeholder.
This commit is contained in:
parent
e60bcaf4a9
commit
f33241e70b
@ -28,6 +28,7 @@
|
||||
#include "SMESH_SMDS.hxx"
|
||||
|
||||
#include "SMDS_ElemIterator.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <smIdType.hxx>
|
||||
#include <vtkType.h>
|
||||
@ -70,7 +71,10 @@ class SMDS_EXPORT SMDS_ElementHolder
|
||||
virtual void compact() = 0;
|
||||
|
||||
//!< allow the descendant treat its elements before mesh clearing
|
||||
virtual void clear() {}
|
||||
virtual void clear()
|
||||
{
|
||||
MESSAGE("SMDS_ElementHolder::clear() is not implemented");
|
||||
}
|
||||
|
||||
SMDS_Mesh* myMesh;
|
||||
|
||||
|
@ -1562,6 +1562,10 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
|
||||
try {
|
||||
OCC_CATCH_SIGNALS;
|
||||
|
||||
TopExp_Explorer subS(shape, _subShape.ShapeType());
|
||||
const int subMeshId = _father->GetSubMesh(subS.Current())->GetId();
|
||||
MESSAGE("Compute submesh " << subMeshId << " with algo " << algo->GetName());
|
||||
|
||||
algo->InitComputeError();
|
||||
|
||||
MemoryReserve aMemoryReserve;
|
||||
|
@ -162,3 +162,13 @@ int SMESHDS_GroupOnGeom::GetTic() const
|
||||
return GetMesh()->GetMTime();
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Clear the group content
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
void SMESHDS_GroupOnGeom::Clear()
|
||||
{
|
||||
resetIterator();
|
||||
}
|
||||
|
@ -55,6 +55,8 @@ class SMESHDS_EXPORT SMESHDS_GroupOnGeom: public SMESHDS_GroupBase
|
||||
|
||||
virtual int GetTic() const;
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
private:
|
||||
|
||||
TopoDS_Shape myShape;
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "SMESHDS_GroupOnGeom.hxx"
|
||||
#include "SMESHDS_Script.hxx"
|
||||
#include "SMESHDS_TSubMeshHolder.hxx"
|
||||
#include "SMESHDS_GroupOnFilter.hxx"
|
||||
|
||||
// #include <BRep_Tool.hxx>
|
||||
#include <TopExp.hxx>
|
||||
@ -1050,8 +1051,23 @@ void SMESHDS_Mesh::ClearMesh()
|
||||
g->Clear();
|
||||
g->SetType( groupType );
|
||||
}
|
||||
else if (SMESHDS_GroupOnFilter* g = dynamic_cast<SMESHDS_GroupOnFilter*>(*group))
|
||||
{
|
||||
MESSAGE("Clearing SMESHDS_GroupOnFilter");
|
||||
|
||||
// TODO: clear filter
|
||||
(*group)->Extent(); // to free cached elements in GroupOnFilter's
|
||||
}
|
||||
else if (SMESHDS_GroupOnGeom* g = dynamic_cast<SMESHDS_GroupOnGeom*>(*group))
|
||||
{
|
||||
SMDSAbs_ElementType groupType = g->GetType();
|
||||
MESSAGE("Clearing SMESHDS_GroupOnGeom, type: " << groupType);
|
||||
|
||||
g->Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
MESSAGE("Clearing of unknown group type. Does nothing.");
|
||||
(*group)->Extent(); // to free cached elements in GroupOnFilter's
|
||||
}
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ class SMESHDS_EXPORT SMESHDS_SubMesh : public SMDS_ElementHolder
|
||||
virtual void tmpClear();
|
||||
virtual void add( const SMDS_MeshElement* element );
|
||||
virtual void compact() {}
|
||||
virtual void clear() override { Clear(); }
|
||||
|
||||
private:
|
||||
|
||||
|
@ -3483,7 +3483,6 @@ void SMESH_Mesh_i::onHypothesisModified(int theHypID, bool theUpdateIcons)
|
||||
|
||||
void SMESH_Mesh_i::SetImpl(::SMESH_Mesh * impl)
|
||||
{
|
||||
MESSAGE("SMESH_Mesh_i::SetImpl");
|
||||
_impl = impl;
|
||||
if ( _impl )
|
||||
_impl->SetCallUp( new TCallUp_i(this));
|
||||
@ -3497,7 +3496,6 @@ void SMESH_Mesh_i::SetImpl(::SMESH_Mesh * impl)
|
||||
|
||||
::SMESH_Mesh & SMESH_Mesh_i::GetImpl()
|
||||
{
|
||||
MESSAGE("SMESH_Mesh_i::GetImpl()");
|
||||
return *_impl;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user