23315: [CEA 1929] Too much memory used to display a mesh in shading and wireframe

Deactivate ID mapping in all DeviceActor's except the pickable one.
   The ID mapping needed to show IDs in the Viewer is computed when needed
   via VTKViewer_ExtractUnstructuredGrid::BuildOut2InMap()

+ IPAL53796: Clipping related bugs
This commit is contained in:
eap 2016-11-11 15:14:46 +03:00
parent 773b227239
commit 1c1bbf6798
9 changed files with 117 additions and 119 deletions

View File

@ -2,16 +2,19 @@
# create mesh
from SMESH_mechanic import *
# get number of linear and quadratic edges
filter_linear = smesh.GetFilter(SMESH.EDGE, SMESH.FT_LinearOrQuadratic)
# get linear and quadratic edges
filter_linear = smesh.GetFilter(SMESH.EDGE, SMESH.FT_LinearOrQuadratic)
filter_quadratic = smesh.GetFilter(SMESH.EDGE, SMESH.FT_LinearOrQuadratic, SMESH.FT_LogicalNOT)
ids_linear = mesh.GetIdsFromFilter(filter_linear)
ids_linear = mesh.GetIdsFromFilter(filter_linear)
ids_quadratic = mesh.GetIdsFromFilter(filter_quadratic)
print "Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic)
# convert mesh to quadratic
print "Convert to quadratic..."
mesh.ConvertToQuadratic(True)
# get number of linear and quadratic edges
ids_linear = mesh.GetIdsFromFilter(filter_linear)
mesh.ConvertToQuadratic()
# get linear and quadratic edges
ids_linear = mesh.GetIdsFromFilter(filter_linear)
ids_quadratic = mesh.GetIdsFromFilter(filter_quadratic)
print "Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic)

View File

@ -182,10 +182,10 @@ void aptrte( Z nutysu, R aretmx,
// majoration empirique du nombre de sommets de la triangulation
i = 4*nbarfr/10;
mxsomm = Max( 20000, 64*nbpti+i*i );
MESSAGE( "APTRTE: Debut de la triangulation plane avec " );
MESSAGE( "nutysu=" << nutysu << " aretmx=" << aretmx
<< " mxsomm=" << mxsomm );
MESSAGE( nbarfr << " sommets sur la frontiere et " << nbpti << " points internes");
// MESSAGE( "APTRTE: Debut de la triangulation plane avec " );
// MESSAGE( "nutysu=" << nutysu << " aretmx=" << aretmx
// << " mxsomm=" << mxsomm );
// MESSAGE( nbarfr << " sommets sur la frontiere et " << nbpti << " points internes");
NEWDEPART:
//mnpxyd( 3, mxsomm ) les coordonnees UV des sommets et la taille d'arete aux sommets
@ -366,9 +366,9 @@ void aptrte( Z nutysu, R aretmx,
//fin ajout 9/11/2006 .................................................
MESSAGE("Sur le bord: arete min=" << aremin << " arete max=" << aremax );
MESSAGE("Triangulation: arete mx=" << aretmx
<< " triangle aire mx=" << airemx );
// MESSAGE("Sur le bord: arete min=" << aremin << " arete max=" << aremax );
// MESSAGE("Triangulation: arete mx=" << aretmx
// << " triangle aire mx=" << airemx );
//chainage des aretes frontalieres : la derniere arete frontaliere
mnsoar[ mosoar * noar - mosoar + 5 ] = 0;
@ -408,7 +408,7 @@ void aptrte( Z nutysu, R aretmx,
mxtree = 2 * mxsomm;
NEWTREE: //en cas de saturation de l'un des tableaux, on boucle
MESSAGE( "Debut triangulation avec mxsomm=" << mxsomm );
//MESSAGE( "Debut triangulation avec mxsomm=" << mxsomm );
if( mntree != NULL ) delete [] mntree;
nbsomm = nbarpi;
mntree = new Z[motree*(1+mxtree)];
@ -426,13 +426,13 @@ void aptrte( Z nutysu, R aretmx,
//saturation de letree => sa taille est augmentee et relance
mxtree = mxtree * 2;
ierr = 0;
MESSAGE( "Nouvelle valeur de mxtree=" << mxtree );
//MESSAGE( "Nouvelle valeur de mxtree=" << mxtree );
goto NEWTREE;
}
deltacpu_( d );
tcpu += d;
MESSAGE( "Temps de l'ajout arbre-4 des Triangles Equilateraux=" << d << " secondes" );
//MESSAGE( "Temps de l'ajout arbre-4 des Triangles Equilateraux=" << d << " secondes" );
if( ierr != 0 ) goto ERREUR;
//ici le tableau mnpxyd contient les sommets des te et les points frontaliers et internes
@ -452,8 +452,8 @@ void aptrte( Z nutysu, R aretmx,
deltacpu_( d );
tcpu += d;
MESSAGE("Temps de l'adaptation et l'homogeneisation de l'arbre-4 des TE="
<< d << " secondes");
//MESSAGE("Temps de l'adaptation et l'homogeneisation de l'arbre-4 des TE="
// << d << " secondes");
if( ierr != 0 )
{
//destruction du tableau auxiliaire et de l'arbre
@ -461,7 +461,7 @@ void aptrte( Z nutysu, R aretmx,
{
//letree sature
mxtree = mxtree * 2;
MESSAGE( "Redemarrage avec la valeur de mxtree=" << mxtree );
//MESSAGE( "Redemarrage avec la valeur de mxtree=" << mxtree );
ierr = 0;
goto NEWTREE;
}
@ -484,7 +484,7 @@ void aptrte( Z nutysu, R aretmx,
//Temps calcul
deltacpu_( d );
tcpu += d;
MESSAGE( "Temps de la triangulation des TE=" << d << " secondes" );
//MESSAGE( "Temps de la triangulation des TE=" << d << " secondes" );
// ierr =0 si pas d'erreur
// =1 si le tableau mnsoar est sature
@ -506,11 +506,11 @@ void aptrte( Z nutysu, R aretmx,
mosoar, mxsoar, n1soar, mnsoar, na,
moartr, mxartr, n1artr, mnartr, n );
MESSAGE( "Nombre d'echanges des diagonales de 2 triangles=" << n );
//MESSAGE( "Nombre d'echanges des diagonales de 2 triangles=" << n );
deltacpu_( d );
tcpu += d;
MESSAGE("Temps de la triangulation Delaunay par echange des diagonales="
<< d << " secondes");
// MESSAGE("Temps de la triangulation Delaunay par echange des diagonales="
// << d << " secondes");
//qualites de la triangulation actuelle
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
@ -539,11 +539,11 @@ void aptrte( Z nutysu, R aretmx,
mxarcf, mn1arcf, mnarcf, mnarcf1, mnarcf2,
n, ierr );
MESSAGE( "Restauration de " << n << " aretes perdues de la frontiere ierr=" << ierr );
//MESSAGE( "Restauration de " << n << " aretes perdues de la frontiere ierr=" << ierr );
deltacpu_( d );
tcpu += d;
MESSAGE("Temps de la recuperation des aretes perdues de la frontiere="
<< d << " secondes");
//MESSAGE("Temps de la recuperation des aretes perdues de la frontiere="
// << d << " secondes");
if( ierr != 0 ) goto ERREUR;
@ -585,7 +585,7 @@ void aptrte( Z nutysu, R aretmx,
deltacpu_( d );
tcpu += d;
MESSAGE( "Temps de la suppression des triangles externes=" << d << "ierr=" << ierr );
//MESSAGE( "Temps de la suppression des triangles externes=" << d << "ierr=" << ierr );
if( ierr != 0 ) goto ERREUR;
//qualites de la triangulation actuelle
@ -619,7 +619,7 @@ void aptrte( Z nutysu, R aretmx,
deltacpu_( d );
tcpu += d;
MESSAGE( "Temps de l'amelioration de la qualite de la triangulation=" << d );
//MESSAGE( "Temps de l'amelioration de la qualite de la triangulation=" << d );
if( ierr == -13 ) ierr=0; //6/10/2006 arret de l'amelioration apres boucle infinie dans caetoi
if( ierr != 0 ) goto ERREUR;
@ -713,11 +713,11 @@ void aptrte( Z nutysu, R aretmx,
}
}
nbt /= nbsttria; //le nombre final de triangles de la surface
MESSAGE( "APTRTE: Fin de la triangulation plane avec "<<nbst<<" sommets et "
<< nbt << " triangles" );
// MESSAGE( "APTRTE: Fin de la triangulation plane avec "<<nbst<<" sommets et "
// << nbt << " triangles" );
deltacpu_( d );
tcpu += d;
MESSAGE( "APTRTE: Temps total de la triangulation plane=" << tcpu << " secondes" );
// MESSAGE( "APTRTE: Temps total de la triangulation plane=" << tcpu << " secondes" );
// destruction des tableaux auxiliaires
// ------------------------------------
@ -847,20 +847,20 @@ void
//les affichages
quamoy /= nbtria;
MESSAGE("Qualite moyenne=" << quamoy
<< " Qualite minimale=" << quamin
<< " des " << nbtria << " triangles de surface plane totale="
<< aire);
// MESSAGE("Qualite moyenne=" << quamoy
// << " Qualite minimale=" << quamin
// << " des " << nbtria << " triangles de surface plane totale="
// << aire);
if( quamin<0.3 )
{
//le numero des 3 sommets du triangle ntqmin de qualite minimale
nusotr(ntqmin, mosoar, mnsoar, moartr, mnartr, nosotr );
MESSAGE("Triangle de qualite minimale "<<quamin<<" de sommets:"
<<nosotr[0]<<" "<<nosotr[1]<<" "<<nosotr[2]<<" ");
for (int i=0;i<3;i++)
MESSAGE("Sommet "<<nosotr[i]<<": x="<< mnpxyd[nosotr[i]-1].x
<<" y="<< mnpxyd[nosotr[i]-1].y);
// MESSAGE("Triangle de qualite minimale "<<quamin<<" de sommets:"
// <<nosotr[0]<<" "<<nosotr[1]<<" "<<nosotr[2]<<" ");
// for (int i=0;i<3;i++)
// MESSAGE("Sommet "<<nosotr[i]<<": x="<< mnpxyd[nosotr[i]-1].x
// <<" y="<< mnpxyd[nosotr[i]-1].y);
}
if( nbtrianeg>0 )

View File

@ -215,7 +215,7 @@ SMESH_ActorDef::SMESH_ActorDef()
myReversedVProp->SetColor( bfc.red() / 255. , bfc.green() / 255. , bfc.blue() / 255. );
my2DActor = SMESH_CellLabelActor::New();
my2DActor->SetStoreGemetryMapping(true);
my2DActor->SetStoreClippingMapping(true);
my2DActor->SetUserMatrix(aMatrix);
my2DActor->PickableOff();
my2DActor->SetFontProperties( aFamilyEl, aSizeEl, aBoldEl, anItalicEl, aShadowEl, anRGBEl[0], anRGBEl[1], anRGBEl[2] );
@ -258,7 +258,7 @@ SMESH_ActorDef::SMESH_ActorDef()
aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_TRIANGLE);
my3DActor = SMESH_CellLabelActor::New();
my3DActor->SetStoreGemetryMapping(true);
my3DActor->SetStoreClippingMapping(true);
my3DActor->SetUserMatrix(aMatrix);
my3DActor->PickableOff();
my3DActor->SetFontProperties( aFamilyEl, aSizeEl, aBoldEl, anItalicEl, aShadowEl, anRGBEl[0], anRGBEl[1], anRGBEl[2] );
@ -324,7 +324,7 @@ SMESH_ActorDef::SMESH_ActorDef()
myEdgeProp->SetLineWidth(aLineWidth);
my1DActor = SMESH_CellLabelActor::New();
my1DActor->SetStoreGemetryMapping(true);
my1DActor->SetStoreClippingMapping(true);
my1DActor->SetUserMatrix(aMatrix);
my1DActor->PickableOff();
my1DActor->SetHighlited(true);
@ -372,7 +372,7 @@ SMESH_ActorDef::SMESH_ActorDef()
my0DActor = SMESH_CellLabelActor::New();
my0DActor->SetUserMatrix(aMatrix);
my0DActor->SetStoreGemetryMapping(true);
my0DActor->SetStoreClippingMapping(true);
my0DActor->PickableOff();
my0DActor->SetFontProperties( aFamilyEl, aSizeEl, aBoldEl, anItalicEl, aShadowEl, anRGBEl[0], anRGBEl[1], anRGBEl[2] );
my0DActor->SetVisibility(false);
@ -391,7 +391,7 @@ SMESH_ActorDef::SMESH_ActorDef()
myBallActor = SMESH_CellLabelActor::New();
myBallActor->SetUserMatrix(aMatrix);
myBallActor->SetStoreGemetryMapping(true);
myBallActor->SetStoreClippingMapping(true);
myBallActor->PickableOff();
myBallActor->SetFontProperties( aFamilyEl, aSizeEl, aBoldEl, anItalicEl, aShadowEl, anRGBEl[0], anRGBEl[1], anRGBEl[2] );
myBallActor->SetVisibility(false);
@ -464,6 +464,8 @@ SMESH_ActorDef::SMESH_ActorDef()
//----------------------------------------------
myBaseActor->SetUserMatrix(aMatrix);
myBaseActor->SetStoreIDMapping(true);
myBaseActor->SetStoreClippingMapping(true);
myBaseActor->SetStoreGemetryMapping(true);
myBaseActor->GetProperty()->SetOpacity(0.0);
myPickableActor = myBaseActor;
@ -1141,8 +1143,6 @@ void SMESH_ActorDef::AddToRender(vtkRenderer* theRenderer)
{
myBaseActor->SetUnstructuredGrid( NULL );
myHighlitableActor->SetUnstructuredGrid( NULL );
// theRenderer->AddActor(this);
// cout << "SMESH_ActorDef " << this << endl;
}
theRenderer->AddActor(myBaseActor);
theRenderer->AddActor(myNodeExtActor);
@ -1972,6 +1972,8 @@ void SMESH_ActorDef::Update()
{
if(MYDEBUG) MESSAGE("SMESH_ActorDef::Update");
myVisualObj->Update();
if(GetControlMode() != eNone) {
unsigned long aTime = myTimeStamp->GetMTime();
unsigned long anObjTime = myVisualObj->GetUnstructuredGrid()->GetMTime();

View File

@ -25,6 +25,8 @@
//
#include "SMESH_CellLabelActor.h"
#include "SMESH_ExtractGeometry.h"
#include <VTKViewer_TransformFilter.h>
#include <VTKViewer_CellCenters.h>
#include <VTKViewer_ExtractUnstructuredGrid.h>
@ -47,8 +49,9 @@ vtkStandardNewMacro(SMESH_CellLabelActor);
/*!
Constructor.
*/
SMESH_CellLabelActor::SMESH_CellLabelActor() {
//Definition of cells numbering pipeline
SMESH_CellLabelActor::SMESH_CellLabelActor()
{
//Definition of cells numbering pipeline
//---------------------------------------
myCellsNumDataSet = vtkUnstructuredGrid::New();
@ -58,18 +61,18 @@ SMESH_CellLabelActor::SMESH_CellLabelActor() {
myClsMaskPoints = vtkMaskPoints::New();
myClsMaskPoints->SetInputConnection(myCellCenters->GetOutputPort());
myClsMaskPoints->SetOnRatio(1);
myClsSelectVisiblePoints = vtkSelectVisiblePoints::New();
myClsSelectVisiblePoints->SetInputConnection(myClsMaskPoints->GetOutputPort());
myClsSelectVisiblePoints->SelectInvisibleOff();
myClsSelectVisiblePoints->SetTolerance(0.1);
myClsLabeledDataMapper = vtkLabeledDataMapper::New();
myClsLabeledDataMapper->SetInputConnection(myClsSelectVisiblePoints->GetOutputPort());
myClsLabeledDataMapper->SetLabelFormat("%d");
myClsLabeledDataMapper->SetLabelModeToLabelScalars();
myClsTextProp = vtkTextProperty::New();
myClsTextProp->SetFontFamilyToTimes();
myClsTextProp->SetFontSize(12);
@ -98,7 +101,8 @@ SMESH_CellLabelActor::SMESH_CellLabelActor() {
/*!
Destructor.
*/
SMESH_CellLabelActor::~SMESH_CellLabelActor() {
SMESH_CellLabelActor::~SMESH_CellLabelActor()
{
//Deleting of cells numbering pipeline
//---------------------------------------
myCellsNumDataSet->Delete();
@ -139,22 +143,29 @@ void SMESH_CellLabelActor::SetFontProperties( SMESH::LabelFont family, int size,
myClsTextProp->SetColor( r, g, b );
}
void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled) {
void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled)
{
myTransformFilter->Update();
vtkUnstructuredGrid* aGrid = vtkUnstructuredGrid::SafeDownCast(myTransformFilter->GetOutput());
if(!aGrid)
if ( !aGrid )
return;
myIsCellsLabeled = theIsCellsLabeled && aGrid->GetNumberOfPoints();
if(myIsCellsLabeled){
if ( myIsCellsLabeled )
{
myCellsNumDataSet->ShallowCopy(aGrid);
vtkUnstructuredGrid *aDataSet = myCellsNumDataSet;
int aNbElem = aDataSet->GetNumberOfCells();
vtkIntArray *anArray = vtkIntArray::New();
anArray->SetNumberOfValues(aNbElem);
for(int anId = 0; anId < aNbElem; anId++){
vtkIdType id = myExtractUnstructuredGrid->GetInputId(anId);
id = (id >=0) ? id : anId;
myExtractUnstructuredGrid->BuildOut2InMap();
for(int anId = 0; anId < aNbElem; anId++)
{
vtkIdType id = anId;
if(IsImplicitFunctionUsed())
id = myExtractGeometry->GetElemObjId(id);
id = myExtractUnstructuredGrid->GetInputId(id);
id = (id >=0) ? id : anId;
int aSMDSId = myVisualObj->GetElemObjId(id);
anArray->SetValue(anId,aSMDSId);
}

View File

@ -142,7 +142,7 @@ SMESH_DeviceActor
if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
myMapper->Delete();
myPlaneCollection->Delete();
// myPlaneCollection->Delete(); -- it is vtkSmartPointer
myProperty->Delete();
myExtractGeometry->Delete();
@ -172,7 +172,8 @@ SMESH_DeviceActor
::SetStoreGemetryMapping(bool theStoreMapping)
{
myGeomFilter->SetStoreMapping(theStoreMapping);
SetStoreClippingMapping(theStoreMapping);
// for optimization, switch the mapping explicitly in each filter/algorithm
//SetStoreClippingMapping(theStoreMapping);
}
@ -182,7 +183,10 @@ SMESH_DeviceActor
{
myStoreClippingMapping = theStoreMapping;
myExtractGeometry->SetStoreMapping(theStoreMapping && myIsImplicitFunctionUsed);
SetStoreIDMapping(theStoreMapping);
// EAP, 23315
// Mapping in myExtractUnstructuredGrid and myGeomFilter is ON in the pickable DeviceActor only.
// To show labels, the mapping is computed explicitly via myExtractUnstructuredGrid->BuildOut2InMap();
//SetStoreIDMapping(theStoreMapping);
}
@ -301,8 +305,8 @@ SMESH_DeviceActor
if(anIsInitialized){
vtkUnstructuredGrid* aDataSet = vtkUnstructuredGrid::New();
SetStoreIDMapping(true);
myExtractUnstructuredGrid->Update();
// SetStoreIDMapping(true);
// myExtractUnstructuredGrid->Update();
vtkUnstructuredGrid* aGrid = myExtractUnstructuredGrid->GetOutput();
aDataSet->ShallowCopy(aGrid);
@ -318,7 +322,9 @@ SMESH_DeviceActor
using namespace SMESH::Controls;
if(NumericalFunctor* aNumericalFunctor = dynamic_cast<NumericalFunctor*>(theFunctor.get()))
{
for(vtkIdType i = 0; i < aNbCells; i++){
myExtractUnstructuredGrid->BuildOut2InMap();
for(vtkIdType i = 0; i < aNbCells; i++)
{
vtkIdType anId = myExtractUnstructuredGrid->GetInputId(i);
vtkIdType anObjId = myVisualObj->GetElemObjId(anId);
double aValue = aNumericalFunctor->GetValue(anObjId);
@ -334,7 +340,9 @@ SMESH_DeviceActor
}
else if(Predicate* aPredicate = dynamic_cast<Predicate*>(theFunctor.get()))
{
for(vtkIdType i = 0; i < aNbCells; i++){
myExtractUnstructuredGrid->BuildOut2InMap();
for(vtkIdType i = 0; i < aNbCells; i++)
{
vtkIdType anId = myExtractUnstructuredGrid->GetInputId(i);
vtkIdType anObjId = myVisualObj->GetElemObjId(anId);
bool aValue = aPredicate->IsSatisfy(anObjId);

View File

@ -2671,52 +2671,26 @@ SMDS_Mesh::~SMDS_Mesh()
void SMDS_Mesh::Clear()
{
if (myParent!=NULL)
{
{
SMDS_ElemIteratorPtr eIt = elementsIterator();
while ( eIt->more() )
{
const SMDS_MeshElement *elem = eIt->next();
myElementIDFactory->ReleaseID(elem->GetID(), elem->getVtkId());
}
{
const SMDS_MeshElement *elem = eIt->next();
myElementIDFactory->ReleaseID(elem->GetID(), elem->getVtkId());
}
SMDS_NodeIteratorPtr itn = nodesIterator();
while (itn->more())
{
const SMDS_MeshNode *node = itn->next();
myNodeIDFactory->ReleaseID(node->GetID(), node->getVtkId());
}
}
else
{
const SMDS_MeshNode *node = itn->next();
myNodeIDFactory->ReleaseID(node->GetID(), node->getVtkId());
}
}
else
{
myNodeIDFactory->Clear();
myElementIDFactory->Clear();
}
}
// SMDS_ElemIteratorPtr itv = elementsIterator();
// while (itv->more())
// {
// SMDS_MeshElement* elem = (SMDS_MeshElement*)(itv->next());
// SMDSAbs_ElementType aType = elem->GetType();
// switch (aType)
// {
// case SMDSAbs_0DElement:
// delete elem;
// break;
// case SMDSAbs_Edge:
// myEdgePool->destroy(static_cast<SMDS_VtkEdge*>(elem));
// break;
// case SMDSAbs_Face:
// myFacePool->destroy(static_cast<SMDS_VtkFace*>(elem));
// break;
// case SMDSAbs_Volume:
// myVolumePool->destroy(static_cast<SMDS_VtkVolume*>(elem));
// break;
// case SMDSAbs_Ball:
// myBallPool->destroy(static_cast<SMDS_BallElement*>(elem));
// break;
// default:
// break;
// }
// }
myVolumePool->clear();
myFacePool->clear();
myEdgePool->clear();
@ -2727,11 +2701,11 @@ void SMDS_Mesh::Clear()
SMDS_NodeIteratorPtr itn = nodesIterator();
while (itn->more())
{
SMDS_MeshNode *node = (SMDS_MeshNode*)(itn->next());
node->SetPosition(SMDS_SpacePosition::originSpacePosition());
//myNodePool->destroy(node);
}
{
SMDS_MeshNode *node = (SMDS_MeshNode*)(itn->next());
node->SetPosition(SMDS_SpacePosition::originSpacePosition());
//myNodePool->destroy(node);
}
myNodePool->clear();
clearVector( myNodes );
@ -2753,7 +2727,7 @@ void SMDS_Mesh::Clear()
// rnv: to fix bug "21125: EDF 1233 SMESH: Degrardation of precision in a test case for quadratic conversion"
// using double type for storing coordinates of nodes instead float.
points->SetDataType(VTK_DOUBLE);
points->SetNumberOfPoints(0 /*SMDS_Mesh::chunkSize*/);
points->SetNumberOfPoints( 0 );
myGrid->SetPoints( points );
points->Delete();
myGrid->DeleteLinks();
@ -2766,7 +2740,7 @@ void SMDS_Mesh::Clear()
///////////////////////////////////////////////////////////////////////////////
bool SMDS_Mesh::hasConstructionEdges()
{
return myHasConstructionEdges;
return myHasConstructionEdges;
}
///////////////////////////////////////////////////////////////////////////////
@ -2778,7 +2752,7 @@ bool SMDS_Mesh::hasConstructionEdges()
///////////////////////////////////////////////////////////////////////////////
bool SMDS_Mesh::hasConstructionFaces()
{
return myHasConstructionFaces;
return myHasConstructionFaces;
}
///////////////////////////////////////////////////////////////////////////////
@ -2787,7 +2761,7 @@ bool SMDS_Mesh::hasConstructionFaces()
///////////////////////////////////////////////////////////////////////////////
bool SMDS_Mesh::hasInverseElements()
{
return myHasInverseElements;
return myHasInverseElements;
}
///////////////////////////////////////////////////////////////////////////////
@ -2796,7 +2770,7 @@ bool SMDS_Mesh::hasInverseElements()
///////////////////////////////////////////////////////////////////////////////
void SMDS_Mesh::setConstructionEdges(bool b)
{
myHasConstructionEdges=b;
myHasConstructionEdges=b;
}
///////////////////////////////////////////////////////////////////////////////
@ -2805,7 +2779,7 @@ void SMDS_Mesh::setConstructionEdges(bool b)
///////////////////////////////////////////////////////////////////////////////
void SMDS_Mesh::setConstructionFaces(bool b)
{
myHasConstructionFaces=b;
myHasConstructionFaces=b;
}
///////////////////////////////////////////////////////////////////////////////

View File

@ -438,6 +438,7 @@ void SMESH_Mesh::Clear()
sm->ComputeSubMeshStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
}
}
GetMeshDS()->Modified();
_isModified = false;
}

View File

@ -299,7 +299,6 @@ void SMESH_Mesh_i::Clear() throw (SALOME::SALOME_Exception)
catch(SALOME_Exception & S_ex) {
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
}
_impl->GetMeshDS()->Modified();
TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".Clear()";
}

View File

@ -2518,7 +2518,7 @@ class Mesh:
return self.mesh.GetElementShape(id)
## Returns the list of submesh elements IDs
# @param Shape a geom object(sub-shape) IOR
# @param Shape a geom object(sub-shape)
# Shape must be the sub-shape of a ShapeToMesh()
# @return the list of integer values
# @ingroup l1_meshinfo
@ -2530,7 +2530,7 @@ class Mesh:
return self.mesh.GetSubMeshElementsId(ShapeID)
## Returns the list of submesh nodes IDs
# @param Shape a geom object(sub-shape) IOR
# @param Shape a geom object(sub-shape)
# Shape must be the sub-shape of a ShapeToMesh()
# @param all If true, gives all nodes of submesh elements, otherwise gives only submesh nodes
# @return the list of integer values
@ -2543,7 +2543,7 @@ class Mesh:
return self.mesh.GetSubMeshNodesId(ShapeID, all)
## Returns type of elements on given shape
# @param Shape a geom object(sub-shape) IOR
# @param Shape a geom object(sub-shape)
# Shape must be a sub-shape of a ShapeToMesh()
# @return element type
# @ingroup l1_meshinfo