53225: Viscous Layers hyp: problem with selection of input/output faces

(StdMeshersGUI_SubShapeSelectorWdg.cxx)

+ Remove useless MESSAGEs
This commit is contained in:
eap 2016-05-11 15:13:17 +03:00
parent 56aba9305e
commit f3e2b7fea2
25 changed files with 369 additions and 585 deletions

View File

@ -82,9 +82,7 @@
#include "utilities.h" #include "utilities.h"
#ifdef _DEBUG_ #ifdef _DEBUG_
static int MYDEBUG = 1; static int MYDEBUG = 0;
#else
static int MYDEBUG = 1;
#endif #endif
static int aLineWidthInc = 2; static int aLineWidthInc = 2;
@ -799,8 +797,7 @@ SetControlMode(eControl theMode)
void void
SMESH_ActorDef:: SMESH_ActorDef::
SetControlMode(eControl theMode, SetControlMode( eControl theMode, bool theCheckEntityMode )
bool theCheckEntityMode)
{ {
vtkLookupTable* lookupTable = static_cast<vtkLookupTable*>(myScalarBarActor->GetLookupTable()); vtkLookupTable* lookupTable = static_cast<vtkLookupTable*>(myScalarBarActor->GetLookupTable());
bool isLogarithmic = lookupTable->GetScale() == VTK_SCALE_LOG10; bool isLogarithmic = lookupTable->GetScale() == VTK_SCALE_LOG10;

View File

@ -67,7 +67,7 @@ using namespace std;
#endif #endif
#ifdef _DEBUG_ #ifdef _DEBUG_
static int MYDEBUG = 1; static int MYDEBUG = 0;
static int MYDEBUGWITHFILES = 0;//1; static int MYDEBUGWITHFILES = 0;//1;
#else #else
static int MYDEBUG = 0; static int MYDEBUG = 0;
@ -133,7 +133,7 @@ static int MYDEBUGWITHFILES = 0;
//================================================================================= //=================================================================================
SMESH_VisualObjDef::SMESH_VisualObjDef() SMESH_VisualObjDef::SMESH_VisualObjDef()
{ {
MESSAGE("---------------------------------------------SMESH_VisualObjDef::SMESH_VisualObjDef"); if ( MYDEBUG ) MESSAGE("-------------------------------SMESH_VisualObjDef::SMESH_VisualObjDef");
myGrid = vtkUnstructuredGrid::New(); myGrid = vtkUnstructuredGrid::New();
myLocalGrid = false; myLocalGrid = false;
ClearEntitiesFlags(); ClearEntitiesFlags();
@ -141,9 +141,8 @@ SMESH_VisualObjDef::SMESH_VisualObjDef()
} }
SMESH_VisualObjDef::~SMESH_VisualObjDef() SMESH_VisualObjDef::~SMESH_VisualObjDef()
{ {
MESSAGE("---------------------------------------------SMESH_VisualObjDef::~SMESH_VisualObjDef"); if ( MYDEBUG ) MESSAGE("--------------------------------SMESH_VisualObjDef::~SMESH_VisualObjDef");
//if ( MYDEBUG ) if ( MYDEBUG ) MESSAGE( "myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() );
MESSAGE( "~SMESH_MeshObj - myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() );
myGrid->Delete(); myGrid->Delete();
} }
@ -248,7 +247,7 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints )
//================================================================================= //=================================================================================
void SMESH_VisualObjDef::buildPrs(bool buildGrid) void SMESH_VisualObjDef::buildPrs(bool buildGrid)
{ {
MESSAGE("----------------------------------------------------------SMESH_VisualObjDef::buildPrs " << buildGrid); if ( MYDEBUG ) MESSAGE("---------------------------SMESH_VisualObjDef::buildPrs " << buildGrid);
if (buildGrid) if (buildGrid)
{ {
myLocalGrid = true; myLocalGrid = true;
@ -281,7 +280,7 @@ void SMESH_VisualObjDef::buildPrs(bool buildGrid)
myLocalGrid = false; myLocalGrid = false;
if (!GetMesh()->isCompacted()) if (!GetMesh()->isCompacted())
{ {
MESSAGE("*** buildPrs ==> compactMesh!"); if ( MYDEBUG ) MESSAGE("*** buildPrs ==> compactMesh!");
GetMesh()->compactMesh(); GetMesh()->compactMesh();
} }
vtkUnstructuredGrid *theGrid = GetMesh()->getGrid(); vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
@ -697,9 +696,9 @@ SMESH_MeshObj::~SMESH_MeshObj()
bool SMESH_MeshObj::Update( int theIsClear ) bool SMESH_MeshObj::Update( int theIsClear )
{ {
// Update SMDS_Mesh on client part // Update SMDS_Mesh on client part
MESSAGE("SMESH_MeshObj::Update " << this); if ( MYDEBUG ) MESSAGE("SMESH_MeshObj::Update " << this);
if ( myClient.Update(theIsClear) || GetUnstructuredGrid()->GetNumberOfPoints()==0) { if ( myClient.Update(theIsClear) || GetUnstructuredGrid()->GetNumberOfPoints()==0) {
MESSAGE("buildPrs"); if ( MYDEBUG ) MESSAGE("buildPrs");
buildPrs(); // Fill unstructured grid buildPrs(); // Fill unstructured grid
return true; return true;
} }
@ -708,7 +707,7 @@ bool SMESH_MeshObj::Update( int theIsClear )
bool SMESH_MeshObj::NulData() bool SMESH_MeshObj::NulData()
{ {
MESSAGE ("SMESH_MeshObj::NulData() =================================================================================="); if ( MYDEBUG ) MESSAGE ("SMESH_MeshObj::NulData() =============================================");
if (!myEmptyGrid) if (!myEmptyGrid)
{ {
myEmptyGrid = SMDS_UnstructuredGrid::New(); myEmptyGrid = SMDS_UnstructuredGrid::New();
@ -901,7 +900,7 @@ void SMESH_SubMeshObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunc
//================================================================================= //=================================================================================
bool SMESH_SubMeshObj::Update( int theIsClear ) bool SMESH_SubMeshObj::Update( int theIsClear )
{ {
MESSAGE("SMESH_SubMeshObj::Update " << this) if ( MYDEBUG ) MESSAGE("SMESH_SubMeshObj::Update " << this)
bool changed = myMeshObj->Update( theIsClear ); bool changed = myMeshObj->Update( theIsClear );
buildPrs(true); buildPrs(true);
return changed; return changed;

View File

@ -525,7 +525,6 @@ SMDS_MeshFace* SMDS_Mesh::AddFaceWithID(const SMDS_MeshEdge * e1,
if ( !e1 || !e2 || !e3 ) return 0; if ( !e1 || !e2 || !e3 ) return 0;
if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
MESSAGE("AddFaceWithID" << ID);
SMDS_MeshFace * face = new SMDS_FaceOfEdges(e1,e2,e3); SMDS_MeshFace * face = new SMDS_FaceOfEdges(e1,e2,e3);
adjustmyCellsCapacity(ID); adjustmyCellsCapacity(ID);
@ -552,7 +551,6 @@ SMDS_MeshFace* SMDS_Mesh::AddFace(const SMDS_MeshEdge * e1,
{ {
if (!hasConstructionEdges()) if (!hasConstructionEdges())
return NULL; return NULL;
//MESSAGE("AddFaceWithID" );
return AddFaceWithID(e1,e2,e3,e4, myElementIDFactory->GetFreeID()); return AddFaceWithID(e1,e2,e3,e4, myElementIDFactory->GetFreeID());
} }
@ -568,7 +566,6 @@ SMDS_MeshFace* SMDS_Mesh::AddFaceWithID(const SMDS_MeshEdge * e1,
{ {
if (!hasConstructionEdges()) if (!hasConstructionEdges())
return NULL; return NULL;
MESSAGE("AddFaceWithID" << ID);
if ( !e1 || !e2 || !e3 || !e4 ) return 0; if ( !e1 || !e2 || !e3 || !e4 ) return 0;
if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
SMDS_MeshFace * face = new SMDS_FaceOfEdges(e1,e2,e3,e4); SMDS_MeshFace * face = new SMDS_FaceOfEdges(e1,e2,e3,e4);
@ -596,7 +593,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n4) const SMDS_MeshNode * n4)
{ {
int ID = myElementIDFactory->GetFreeID(); int ID = myElementIDFactory->GetFreeID();
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, ID); SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, ID);
if(v==NULL) myElementIDFactory->ReleaseID(ID); if(v==NULL) myElementIDFactory->ReleaseID(ID);
return v; return v;
@ -615,7 +611,6 @@ SMDS_MeshVolume * SMDS_Mesh::AddVolumeWithID(int idnode1,
int idnode4, int idnode4,
int ID) int ID)
{ {
//MESSAGE("AddVolumeWithID" << ID);
SMDS_MeshNode *node1, *node2, *node3, *node4; SMDS_MeshNode *node1, *node2, *node3, *node4;
node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1); node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1);
node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2); node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2);
@ -637,7 +632,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n4, const SMDS_MeshNode * n4,
int ID) int ID)
{ {
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshVolume* volume = 0; SMDS_MeshVolume* volume = 0;
if ( !n1 || !n2 || !n3 || !n4) return volume; if ( !n1 || !n2 || !n3 || !n4) return volume;
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
@ -652,7 +646,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
myInfo.myNbTetras++; myInfo.myNbTetras++;
} }
else if(hasConstructionEdges()) { else if(hasConstructionEdges()) {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else { else {
@ -697,7 +690,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n5) const SMDS_MeshNode * n5)
{ {
int ID = myElementIDFactory->GetFreeID(); int ID = myElementIDFactory->GetFreeID();
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, ID); SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, ID);
if(v==NULL) myElementIDFactory->ReleaseID(ID); if(v==NULL) myElementIDFactory->ReleaseID(ID);
return v; return v;
@ -718,7 +710,6 @@ SMDS_MeshVolume * SMDS_Mesh::AddVolumeWithID(int idnode1,
int idnode5, int idnode5,
int ID) int ID)
{ {
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshNode *node1, *node2, *node3, *node4, *node5; SMDS_MeshNode *node1, *node2, *node3, *node4, *node5;
node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1); node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1);
node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2); node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2);
@ -743,7 +734,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n5, const SMDS_MeshNode * n5,
int ID) int ID)
{ {
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshVolume* volume = 0; SMDS_MeshVolume* volume = 0;
if ( !n1 || !n2 || !n3 || !n4 || !n5) return volume; if ( !n1 || !n2 || !n3 || !n4 || !n5) return volume;
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
@ -758,7 +748,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
myInfo.myNbPyramids++; myInfo.myNbPyramids++;
} }
else if(hasConstructionEdges()) { else if(hasConstructionEdges()) {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else { else {
@ -805,7 +794,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n6) const SMDS_MeshNode * n6)
{ {
int ID = myElementIDFactory->GetFreeID(); int ID = myElementIDFactory->GetFreeID();
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, n6, ID); SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, n6, ID);
if(v==NULL) myElementIDFactory->ReleaseID(ID); if(v==NULL) myElementIDFactory->ReleaseID(ID);
return v; return v;
@ -827,7 +815,6 @@ SMDS_MeshVolume * SMDS_Mesh::AddVolumeWithID(int idnode1,
int idnode6, int idnode6,
int ID) int ID)
{ {
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshNode *node1, *node2, *node3, *node4, *node5, *node6; SMDS_MeshNode *node1, *node2, *node3, *node4, *node5, *node6;
node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1); node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1);
node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2); node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2);
@ -854,7 +841,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n6, const SMDS_MeshNode * n6,
int ID) int ID)
{ {
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshVolume* volume = 0; SMDS_MeshVolume* volume = 0;
if ( !n1 || !n2 || !n3 || !n4 || !n5 || !n6) return volume; if ( !n1 || !n2 || !n3 || !n4 || !n5 || !n6) return volume;
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
@ -870,7 +856,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
myInfo.myNbPrisms++; myInfo.myNbPrisms++;
} }
else if(hasConstructionEdges()) { else if(hasConstructionEdges()) {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else { else {
@ -994,11 +979,9 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
return volume; return volume;
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
if(hasConstructionFaces()) { if(hasConstructionFaces()) {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else if(hasConstructionEdges()) { else if(hasConstructionEdges()) {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else { else {
@ -1074,7 +1057,6 @@ SMDS_MeshVolume * SMDS_Mesh::AddVolumeWithID(int idnode1,
int idnode8, int idnode8,
int ID) int ID)
{ {
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshNode *node1, *node2, *node3, *node4, *node5, *node6, *node7, *node8; SMDS_MeshNode *node1, *node2, *node3, *node4, *node5, *node6, *node7, *node8;
node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1); node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1);
node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2); node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2);
@ -1108,7 +1090,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n8, const SMDS_MeshNode * n8,
int ID) int ID)
{ {
//MESSAGE("AddVolumeWithID " << ID);
SMDS_MeshVolume* volume = 0; SMDS_MeshVolume* volume = 0;
if ( !n1 || !n2 || !n3 || !n4 || !n5 || !n6 || !n7 || !n8) return volume; if ( !n1 || !n2 || !n3 || !n4 || !n5 || !n6 || !n7 || !n8) return volume;
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
@ -1125,7 +1106,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
myInfo.myNbHexas++; myInfo.myNbHexas++;
} }
else if(hasConstructionEdges()) { else if(hasConstructionEdges()) {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else { else {
@ -1171,7 +1151,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshFace * f1,
const SMDS_MeshFace * f3, const SMDS_MeshFace * f3,
const SMDS_MeshFace * f4) const SMDS_MeshFace * f4)
{ {
//MESSAGE("AddVolumeWithID");
if (!hasConstructionFaces()) if (!hasConstructionFaces())
return NULL; return NULL;
return AddVolumeWithID(f1,f2,f3,f4, myElementIDFactory->GetFreeID()); return AddVolumeWithID(f1,f2,f3,f4, myElementIDFactory->GetFreeID());
@ -1189,7 +1168,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshFace * f1,
const SMDS_MeshFace * f4, const SMDS_MeshFace * f4,
int ID) int ID)
{ {
MESSAGE("AddVolumeWithID" << ID);
if (!hasConstructionFaces()) if (!hasConstructionFaces())
return NULL; return NULL;
if ( !f1 || !f2 || !f3 || !f4) return 0; if ( !f1 || !f2 || !f3 || !f4) return 0;
@ -1218,7 +1196,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshFace * f1,
const SMDS_MeshFace * f4, const SMDS_MeshFace * f4,
const SMDS_MeshFace * f5) const SMDS_MeshFace * f5)
{ {
//MESSAGE("AddVolumeWithID");
if (!hasConstructionFaces()) if (!hasConstructionFaces())
return NULL; return NULL;
return AddVolumeWithID(f1,f2,f3,f4,f5, myElementIDFactory->GetFreeID()); return AddVolumeWithID(f1,f2,f3,f4,f5, myElementIDFactory->GetFreeID());
@ -1237,7 +1214,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshFace * f1,
const SMDS_MeshFace * f5, const SMDS_MeshFace * f5,
int ID) int ID)
{ {
MESSAGE("AddVolumeWithID" << ID);
if (!hasConstructionFaces()) if (!hasConstructionFaces())
return NULL; return NULL;
if ( !f1 || !f2 || !f3 || !f4 || !f5) return 0; if ( !f1 || !f2 || !f3 || !f4 || !f5) return 0;
@ -1267,7 +1243,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshFace * f1,
const SMDS_MeshFace * f5, const SMDS_MeshFace * f5,
const SMDS_MeshFace * f6) const SMDS_MeshFace * f6)
{ {
//MESSAGE("AddVolumeWithID" );
if (!hasConstructionFaces()) if (!hasConstructionFaces())
return NULL; return NULL;
return AddVolumeWithID(f1,f2,f3,f4,f5,f6, myElementIDFactory->GetFreeID()); return AddVolumeWithID(f1,f2,f3,f4,f5,f6, myElementIDFactory->GetFreeID());
@ -1287,7 +1262,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshFace * f1,
const SMDS_MeshFace * f6, const SMDS_MeshFace * f6,
int ID) int ID)
{ {
MESSAGE("AddVolumeWithID" << ID);
if (!hasConstructionFaces()) if (!hasConstructionFaces())
return NULL; return NULL;
if ( !f1 || !f2 || !f3 || !f4 || !f5 || !f6) return 0; if ( !f1 || !f2 || !f3 || !f4 || !f5 || !f6) return 0;
@ -1334,7 +1308,6 @@ SMDS_Mesh::AddPolygonalFaceWithID (const vector<const SMDS_MeshNode*> & nodes,
if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
if (hasConstructionEdges()) if (hasConstructionEdges())
{ {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else else
@ -1399,7 +1372,6 @@ SMDS_Mesh::AddQuadPolygonalFaceWithID (const vector<const SMDS_MeshNode*> & node
if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
if (hasConstructionEdges()) if (hasConstructionEdges())
{ {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else else
@ -1472,18 +1444,15 @@ SMDS_Mesh::AddPolyhedralVolumeWithID (const vector<const SMDS_MeshNode*>& nodes,
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
if (hasConstructionFaces()) if (hasConstructionFaces())
{ {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else if (hasConstructionEdges()) else if (hasConstructionEdges())
{ {
MESSAGE("Error : Not implemented");
return NULL; return NULL;
} }
else else
{ {
//#ifdef VTK_HAVE_POLYHEDRON //#ifdef VTK_HAVE_POLYHEDRON
//MESSAGE("AddPolyhedralVolumeWithID vtk " << ID);
myNodeIds.resize( nodes.size() ); myNodeIds.resize( nodes.size() );
for ( size_t i = 0; i < nodes.size(); ++i ) for ( size_t i = 0; i < nodes.size(); ++i )
myNodeIds[i] = nodes[i]->getVtkId(); myNodeIds[i] = nodes[i]->getVtkId();
@ -1498,7 +1467,6 @@ SMDS_Mesh::AddPolyhedralVolumeWithID (const vector<const SMDS_MeshNode*>& nodes,
} }
volume = volvtk; volume = volvtk;
//#else //#else
// MESSAGE("AddPolyhedralVolumeWithID smds " << ID);
// for ( int i = 0; i < nodes.size(); ++i ) // for ( int i = 0; i < nodes.size(); ++i )
// if ( !nodes[ i ] ) return 0; // if ( !nodes[ i ] ) return 0;
// volume = new SMDS_PolyhedralVolumeOfNodes(nodes, quantities); // volume = new SMDS_PolyhedralVolumeOfNodes(nodes, quantities);
@ -1648,7 +1616,6 @@ SMDS_MeshFace* SMDS_Mesh::AddFaceFromVtkIdsWithID(const std::vector<vtkIdType>&
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
bool SMDS_Mesh::registerElement(int ID, SMDS_MeshElement* element) bool SMDS_Mesh::registerElement(int ID, SMDS_MeshElement* element)
{ {
//MESSAGE("registerElement " << ID);
if ((ID >=0) && (ID < (int)myCells.size()) && myCells[ID]) // --- already bound if ((ID >=0) && (ID < (int)myCells.size()) && myCells[ID]) // --- already bound
{ {
MESSAGE(" ------------------ already bound "<< ID << " " << myCells[ID]->getVtkId()); MESSAGE(" ------------------ already bound "<< ID << " " << myCells[ID]->getVtkId());
@ -1666,7 +1633,6 @@ bool SMDS_Mesh::registerElement(int ID, SMDS_MeshElement* element)
if (vtkId >= (int)myCellIdVtkToSmds.size()) // --- resize local vector if (vtkId >= (int)myCellIdVtkToSmds.size()) // --- resize local vector
{ {
// MESSAGE(" --------------------- resize myCellIdVtkToSmds " << vtkId << " --> " << vtkId + SMDS_Mesh::chunkSize);
myCellIdVtkToSmds.resize(vtkId + SMDS_Mesh::chunkSize, -1); myCellIdVtkToSmds.resize(vtkId + SMDS_Mesh::chunkSize, -1);
} }
myCellIdVtkToSmds[vtkId] = ID; myCellIdVtkToSmds[vtkId] = ID;
@ -1693,9 +1659,6 @@ const SMDS_MeshNode * SMDS_Mesh::FindNode(int ID) const
{ {
if (ID < 1 || ID >= (int)myNodes.size()) if (ID < 1 || ID >= (int)myNodes.size())
{ {
// MESSAGE("------------------------------------------------------------------------- ");
// MESSAGE("----------------------------------- bad ID " << ID << " " << myNodes.size());
// MESSAGE("------------------------------------------------------------------------- ");
return 0; return 0;
} }
return (const SMDS_MeshNode *)myNodes[ID]; return (const SMDS_MeshNode *)myNodes[ID];
@ -1762,7 +1725,6 @@ SMDS_MeshFace * SMDS_Mesh::createTriangle(const SMDS_MeshNode * node1,
face = facevtk; face = facevtk;
adjustmyCellsCapacity(ID); adjustmyCellsCapacity(ID);
myCells[ID] = face; myCells[ID] = face;
//MESSAGE("createTriangle " << ID << " " << face);
myInfo.myNbTriangles++; myInfo.myNbTriangles++;
return face; return face;
} }
@ -1782,7 +1744,6 @@ SMDS_MeshFace * SMDS_Mesh::createQuadrangle(const SMDS_MeshNode * node1,
if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory(); if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
if(hasConstructionEdges()) if(hasConstructionEdges())
{ {
//MESSAGE("createQuadrangle hasConstructionEdges "<< ID);
SMDS_MeshEdge *edge1, *edge2, *edge3, *edge4; SMDS_MeshEdge *edge1, *edge2, *edge3, *edge4;
edge1=FindEdgeOrCreate(node1,node2); edge1=FindEdgeOrCreate(node1,node2);
edge2=FindEdgeOrCreate(node2,node3); edge2=FindEdgeOrCreate(node2,node3);
@ -1827,7 +1788,6 @@ SMDS_MeshFace * SMDS_Mesh::createQuadrangle(const SMDS_MeshNode * node1,
void SMDS_Mesh::RemoveNode(const SMDS_MeshNode * node) void SMDS_Mesh::RemoveNode(const SMDS_MeshNode * node)
{ {
MESSAGE("RemoveNode");
RemoveElement(node, true); RemoveElement(node, true);
} }
@ -1837,7 +1797,6 @@ void SMDS_Mesh::RemoveNode(const SMDS_MeshNode * node)
void SMDS_Mesh::Remove0DElement(const SMDS_Mesh0DElement * elem0d) void SMDS_Mesh::Remove0DElement(const SMDS_Mesh0DElement * elem0d)
{ {
MESSAGE("Remove0DElement");
RemoveElement(elem0d,true); RemoveElement(elem0d,true);
} }
@ -1847,7 +1806,6 @@ void SMDS_Mesh::Remove0DElement(const SMDS_Mesh0DElement * elem0d)
void SMDS_Mesh::RemoveEdge(const SMDS_MeshEdge * edge) void SMDS_Mesh::RemoveEdge(const SMDS_MeshEdge * edge)
{ {
MESSAGE("RemoveEdge");
RemoveElement(edge,true); RemoveElement(edge,true);
} }
@ -1857,7 +1815,6 @@ void SMDS_Mesh::RemoveEdge(const SMDS_MeshEdge * edge)
void SMDS_Mesh::RemoveFace(const SMDS_MeshFace * face) void SMDS_Mesh::RemoveFace(const SMDS_MeshFace * face)
{ {
MESSAGE("RemoveFace");
RemoveElement(face, true); RemoveElement(face, true);
} }
@ -1867,7 +1824,6 @@ void SMDS_Mesh::RemoveFace(const SMDS_MeshFace * face)
void SMDS_Mesh::RemoveVolume(const SMDS_MeshVolume * volume) void SMDS_Mesh::RemoveVolume(const SMDS_MeshVolume * volume)
{ {
MESSAGE("RemoveVolume");
RemoveElement(volume, true); RemoveElement(volume, true);
} }
@ -1914,7 +1870,6 @@ bool SMDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * element,
const SMDS_MeshNode * nodes[], const SMDS_MeshNode * nodes[],
const int nbnodes) const int nbnodes)
{ {
MESSAGE("SMDS_Mesh::ChangeElementNodes");
// keep current nodes of elem // keep current nodes of elem
set<const SMDS_MeshNode*> oldNodes( element->begin_nodes(), element->end_nodes() ); set<const SMDS_MeshNode*> oldNodes( element->begin_nodes(), element->end_nodes() );
@ -2428,11 +2383,6 @@ const SMDS_MeshElement* SMDS_Mesh::FindElement(int IDelem) const
{ {
if ( IDelem <= 0 || IDelem >= (int)myCells.size() ) if ( IDelem <= 0 || IDelem >= (int)myCells.size() )
{ {
MESSAGE("--------------------------------------------------------------------------------- ");
MESSAGE("----------------------------------- bad IDelem " << IDelem << " " << myCells.size());
MESSAGE("--------------------------------------------------------------------------------- ");
// TODO raise an exception
//assert(0);
return 0; return 0;
} }
return myCells[IDelem]; return myCells[IDelem];
@ -2505,9 +2455,8 @@ const SMDS_MeshElement* SMDS_Mesh::FindElement (const vector<const SMDS_MeshNode
void SMDS_Mesh::DumpNodes() const void SMDS_Mesh::DumpNodes() const
{ {
MESSAGE("dump nodes of mesh : "); SMDS_NodeIteratorPtr itnode=nodesIterator();
SMDS_NodeIteratorPtr itnode=nodesIterator(); while(itnode->more()) ; //MESSAGE(itnode->next());
while(itnode->more()) ; //MESSAGE(itnode->next());
} }
//======================================================================= //=======================================================================
@ -2516,7 +2465,6 @@ void SMDS_Mesh::DumpNodes() const
//======================================================================= //=======================================================================
void SMDS_Mesh::Dump0DElements() const void SMDS_Mesh::Dump0DElements() const
{ {
MESSAGE("dump 0D elements of mesh : ");
SMDS_ElemIteratorPtr it0d = elementsIterator(SMDSAbs_0DElement); SMDS_ElemIteratorPtr it0d = elementsIterator(SMDSAbs_0DElement);
while(it0d->more()) ; //MESSAGE(it0d->next()); while(it0d->more()) ; //MESSAGE(it0d->next());
} }
@ -2528,9 +2476,8 @@ void SMDS_Mesh::Dump0DElements() const
void SMDS_Mesh::DumpEdges() const void SMDS_Mesh::DumpEdges() const
{ {
MESSAGE("dump edges of mesh : "); SMDS_EdgeIteratorPtr itedge=edgesIterator();
SMDS_EdgeIteratorPtr itedge=edgesIterator(); while(itedge->more()) ; //MESSAGE(itedge->next());
while(itedge->more()) ; //MESSAGE(itedge->next());
} }
//======================================================================= //=======================================================================
@ -2540,9 +2487,8 @@ void SMDS_Mesh::DumpEdges() const
void SMDS_Mesh::DumpFaces() const void SMDS_Mesh::DumpFaces() const
{ {
MESSAGE("dump faces of mesh : "); SMDS_FaceIteratorPtr itface=facesIterator();
SMDS_FaceIteratorPtr itface=facesIterator(); while(itface->more()) ; //MESSAGE(itface->next());
while(itface->more()) ; //MESSAGE(itface->next());
} }
//======================================================================= //=======================================================================
@ -2552,9 +2498,8 @@ void SMDS_Mesh::DumpFaces() const
void SMDS_Mesh::DumpVolumes() const void SMDS_Mesh::DumpVolumes() const
{ {
MESSAGE("dump volumes of mesh : "); SMDS_VolumeIteratorPtr itvol=volumesIterator();
SMDS_VolumeIteratorPtr itvol=volumesIterator(); while(itvol->more()) ; //MESSAGE(itvol->next());
while(itvol->more()) ; //MESSAGE(itvol->next());
} }
//======================================================================= //=======================================================================
@ -2612,10 +2557,7 @@ void SMDS_Mesh::DebugStats() const
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_Mesh::NbNodes() const int SMDS_Mesh::NbNodes() const
{ {
//MESSAGE(myGrid->GetNumberOfPoints()); return myInfo.NbNodes();
//MESSAGE(myInfo.NbNodes());
//MESSAGE(myNodeMax);
return myInfo.NbNodes();
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -2718,7 +2660,6 @@ SMDS_Mesh::~SMDS_Mesh()
void SMDS_Mesh::Clear() void SMDS_Mesh::Clear()
{ {
MESSAGE("SMDS_Mesh::Clear");
if (myParent!=NULL) if (myParent!=NULL)
{ {
SMDS_ElemIteratorPtr eIt = elementsIterator(); SMDS_ElemIteratorPtr eIt = elementsIterator();
@ -3077,34 +3018,31 @@ static set<const SMDS_MeshElement*> * intersectionOfSets(
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
static set<const SMDS_MeshElement*> * getFinitElements(const SMDS_MeshElement * element) static set<const SMDS_MeshElement*> * getFinitElements(const SMDS_MeshElement * element)
{ {
int numberOfSets=element->NbNodes(); int numberOfSets=element->NbNodes();
set<const SMDS_MeshElement*> *initSet = new set<const SMDS_MeshElement*>[numberOfSets]; set<const SMDS_MeshElement*> *initSet = new set<const SMDS_MeshElement*>[numberOfSets];
SMDS_ElemIteratorPtr itNodes=element->nodesIterator(); SMDS_ElemIteratorPtr itNodes=element->nodesIterator();
int i=0; int i = 0;
while(itNodes->more()) while ( itNodes->more() )
{ {
const SMDS_MeshElement* node = itNodes->next(); const SMDS_MeshElement* node = itNodes->next();
MYASSERT(node); MYASSERT(node);
const SMDS_MeshNode * n=static_cast<const SMDS_MeshNode*>(node); const SMDS_MeshNode * n=static_cast<const SMDS_MeshNode*>(node);
SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator(); SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator();
//initSet[i]=set<const SMDS_MeshElement*>(); while ( itFe->more() )
while(itFe->more()) {
{ const SMDS_MeshElement* elem = itFe->next();
const SMDS_MeshElement* elem = itFe->next(); MYASSERT(elem);
MYASSERT(elem); initSet[i].insert(elem);
initSet[i].insert(elem); }
} i++;
}
i++; set<const SMDS_MeshElement*> *retSet = intersectionOfSets( initSet, numberOfSets );
} delete [] initSet;
set<const SMDS_MeshElement*> *retSet=intersectionOfSets(initSet, numberOfSets); return retSet;
// MESSAGE("nb elems " << i << " intersection " << retSet->size());
delete [] initSet;
return retSet;
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -3401,11 +3339,9 @@ void SMDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elem)
{ {
int elemId = elem->GetID(); int elemId = elem->GetID();
int vtkId = elem->getVtkId(); int vtkId = elem->getVtkId();
//MESSAGE("RemoveFreeElement " << elemId);
SMDSAbs_ElementType aType = elem->GetType(); SMDSAbs_ElementType aType = elem->GetType();
SMDS_MeshElement* todest = (SMDS_MeshElement*)(elem); SMDS_MeshElement* todest = (SMDS_MeshElement*)(elem);
if (aType == SMDSAbs_Node) { if (aType == SMDSAbs_Node) {
//MESSAGE("Remove free node " << elemId);
// only free node can be removed by this method // only free node can be removed by this method
const SMDS_MeshNode* n = static_cast<SMDS_MeshNode*>(todest); const SMDS_MeshNode* n = static_cast<SMDS_MeshNode*>(todest);
SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator(); SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator();
@ -3422,7 +3358,6 @@ void SMDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elem)
// this methods is only for meshes without descendants // this methods is only for meshes without descendants
return; return;
//MESSAGE("Remove free element " << elemId);
// Remove element from <InverseElements> of its nodes // Remove element from <InverseElements> of its nodes
SMDS_ElemIteratorPtr itn = elem->nodesIterator(); SMDS_ElemIteratorPtr itn = elem->nodesIterator();
while (itn->more()) { while (itn->more()) {
@ -3538,7 +3473,6 @@ int SMDS_Mesh::MinElementID() const
void SMDS_Mesh::Renumber (const bool isNodes, const int startID, const int deltaID) void SMDS_Mesh::Renumber (const bool isNodes, const int startID, const int deltaID)
{ {
MESSAGE("Renumber");
if ( deltaID == 0 ) if ( deltaID == 0 )
return; return;
@ -4709,17 +4643,14 @@ void SMDS_Mesh::incrementNodesCapacity(int nbNodes)
// MESSAGE(" ------------------- resize myCellIdSmdsToVtk " << val << " --> " << val + nbNodes); // MESSAGE(" ------------------- resize myCellIdSmdsToVtk " << val << " --> " << val + nbNodes);
// myCellIdSmdsToVtk.resize(val + nbNodes, -1); // fill new elements with -1 // myCellIdSmdsToVtk.resize(val + nbNodes, -1); // fill new elements with -1
int val = myNodes.size(); int val = myNodes.size();
MESSAGE(" ------------------- resize myNodes " << val << " --> " << val + nbNodes);
myNodes.resize(val +nbNodes, 0); myNodes.resize(val +nbNodes, 0);
} }
void SMDS_Mesh::incrementCellsCapacity(int nbCells) void SMDS_Mesh::incrementCellsCapacity(int nbCells)
{ {
int val = myCellIdVtkToSmds.size(); int val = myCellIdVtkToSmds.size();
MESSAGE(" ------------------- resize myCellIdVtkToSmds " << val << " --> " << val + nbCells);
myCellIdVtkToSmds.resize(val + nbCells, -1); // fill new elements with -1 myCellIdVtkToSmds.resize(val + nbCells, -1); // fill new elements with -1
val = myCells.size(); val = myCells.size();
MESSAGE(" ------------------- resize myCells " << val << " --> " << val + nbCells);
myNodes.resize(val +nbCells, 0); myNodes.resize(val +nbCells, 0);
} }
@ -4730,48 +4661,45 @@ void SMDS_Mesh::adjustStructure()
void SMDS_Mesh::dumpGrid(string ficdump) void SMDS_Mesh::dumpGrid(string ficdump)
{ {
MESSAGE("SMDS_Mesh::dumpGrid " << ficdump); // vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
// vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New(); // aWriter->SetFileName(ficdump.c_str());
// aWriter->SetFileName(ficdump.c_str()); // aWriter->SetInput(myGrid);
// aWriter->SetInput(myGrid); // if(myGrid->GetNumberOfCells())
// if(myGrid->GetNumberOfCells()) // {
// { // aWriter->Write();
// aWriter->Write(); // }
// } // aWriter->Delete();
// aWriter->Delete();
ficdump = ficdump + "_connectivity"; ficdump = ficdump + "_connectivity";
ofstream ficcon(ficdump.c_str(), ios::out); ofstream ficcon(ficdump.c_str(), ios::out);
int nbPoints = myGrid->GetNumberOfPoints(); int nbPoints = myGrid->GetNumberOfPoints();
ficcon << "-------------------------------- points " << nbPoints << endl; ficcon << "-------------------------------- points " << nbPoints << endl;
for (int i=0; i<nbPoints; i++) for (int i=0; i<nbPoints; i++)
{ {
ficcon << i << " " << *(myGrid->GetPoint(i)) << " " << *(myGrid->GetPoint(i)+1) << " " << " " << *(myGrid->GetPoint(i)+2) << endl; ficcon << i << " " << *(myGrid->GetPoint(i)) << " " << *(myGrid->GetPoint(i)+1) << " " << " " << *(myGrid->GetPoint(i)+2) << endl;
} }
int nbCells = myGrid->GetNumberOfCells(); int nbCells = myGrid->GetNumberOfCells();
ficcon << "-------------------------------- cells " << nbCells << endl; ficcon << "-------------------------------- cells " << nbCells << endl;
for (int i=0; i<nbCells; i++) for (int i=0; i<nbCells; i++)
{ {
// MESSAGE(i << " " << myGrid->GetCell(i)); ficcon << i << " - " << myGrid->GetCell(i)->GetCellType() << " -";
// MESSAGE(" " << myGrid->GetCell(i)->GetCellType()); int nbptcell = myGrid->GetCell(i)->GetNumberOfPoints();
ficcon << i << " - " << myGrid->GetCell(i)->GetCellType() << " -"; vtkIdList *listid = myGrid->GetCell(i)->GetPointIds();
int nbptcell = myGrid->GetCell(i)->GetNumberOfPoints(); for (int j=0; j<nbptcell; j++)
vtkIdList *listid = myGrid->GetCell(i)->GetPointIds(); {
for (int j=0; j<nbptcell; j++) ficcon << " " << listid->GetId(j);
{ }
ficcon << " " << listid->GetId(j); ficcon << endl;
}
ficcon << endl;
} }
ficcon << "-------------------------------- connectivity " << nbPoints << endl; ficcon << "-------------------------------- connectivity " << nbPoints << endl;
vtkCellLinks *links = myGrid->GetCellLinks(); vtkCellLinks *links = myGrid->GetCellLinks();
for (int i=0; i<nbPoints; i++) for (int i=0; i<nbPoints; i++)
{ {
int ncells = links->GetNcells(i); int ncells = links->GetNcells(i);
vtkIdType *cells = links->GetCells(i); vtkIdType *cells = links->GetCells(i);
ficcon << i << " - " << ncells << " -"; ficcon << i << " - " << ncells << " -";
for (int j=0; j<ncells; j++) for (int j=0; j<ncells; j++)
{ {
ficcon << " " << cells[j]; ficcon << " " << cells[j];
} }
ficcon << endl; ficcon << endl;
} }
@ -4820,7 +4748,6 @@ double SMDS_Mesh::getMaxDim()
if ((xmax - xmin) > dmax) dmax = xmax -xmin; if ((xmax - xmin) > dmax) dmax = xmax -xmin;
if ((ymax - ymin) > dmax) dmax = ymax -ymin; if ((ymax - ymin) > dmax) dmax = ymax -ymin;
if ((zmax - zmin) > dmax) dmax = zmax -zmin; if ((zmax - zmin) > dmax) dmax = zmax -zmin;
MESSAGE("getMaxDim " << dmax);
return dmax; return dmax;
} }
@ -4828,11 +4755,10 @@ double SMDS_Mesh::getMaxDim()
void SMDS_Mesh::Modified() void SMDS_Mesh::Modified()
{ {
if (this->myModified) if (this->myModified)
{ {
this->myModifTime++; this->myModifTime++;
MESSAGE("modified"); myModified = false;
myModified = false; }
}
} }
//! get last modification timeStamp //! get last modification timeStamp
@ -4844,10 +4770,9 @@ unsigned long SMDS_Mesh::GetMTime() const
bool SMDS_Mesh::isCompacted() bool SMDS_Mesh::isCompacted()
{ {
if (this->myModifTime > this->myCompactTime) if (this->myModifTime > this->myCompactTime)
{ {
MESSAGE(" *** isCompacted " << myCompactTime << " < " << myModifTime); this->myCompactTime = this->myModifTime;
this->myCompactTime = this->myModifTime; return false;
return false; }
}
return true; return true;
} }

View File

@ -42,25 +42,23 @@ SMDS_MeshIDFactory::SMDS_MeshIDFactory():myMaxID(0), myMesh(0)
int SMDS_MeshIDFactory::GetFreeID() int SMDS_MeshIDFactory::GetFreeID()
{ {
int newid; int newid;
if (myPoolOfID.empty()) if (myPoolOfID.empty())
{ {
newid = ++myMaxID; newid = ++myMaxID;
//MESSAGE("GetFreeID new " << newid); }
} else
else {
{ set<int>::iterator i = myPoolOfID.begin();
set<int>::iterator i = myPoolOfID.begin(); newid = *i;//myPoolOfID.top();
newid = *i;//myPoolOfID.top(); myPoolOfID.erase( i );//myPoolOfID.pop();
myPoolOfID.erase( i );//myPoolOfID.pop(); }
//MESSAGE("GetFreeID pool " << newid); return newid;
}
return newid;
} }
//======================================================================= //=======================================================================
//function : ReleaseID //function : ReleaseID
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMDS_MeshIDFactory::ReleaseID(int ID, int vtkId) void SMDS_MeshIDFactory::ReleaseID(int ID, int vtkId)
{ {
@ -91,24 +89,23 @@ void SMDS_MeshIDFactory::ReleaseID(int ID, int vtkId)
void SMDS_MeshIDFactory::Clear() void SMDS_MeshIDFactory::Clear()
{ {
myMaxID = 0; myMaxID = 0;
myPoolOfID.clear(); myPoolOfID.clear();
} }
void SMDS_MeshIDFactory::SetMesh(SMDS_Mesh *mesh) void SMDS_MeshIDFactory::SetMesh(SMDS_Mesh *mesh)
{ {
myMesh = mesh; myMesh = mesh;
} }
SMDS_Mesh* SMDS_MeshIDFactory::GetMesh() SMDS_Mesh* SMDS_MeshIDFactory::GetMesh()
{ {
return myMesh; return myMesh;
} }
void SMDS_MeshIDFactory::emptyPool(int maxId) void SMDS_MeshIDFactory::emptyPool(int maxId)
{ {
MESSAGE("SMDS_MeshIDFactory::emptyPool " << myMaxID << " --> " << maxId); myMaxID = maxId;
myMaxID = maxId; myPoolOfID.clear();
myPoolOfID.clear();
} }

View File

@ -40,7 +40,6 @@ using namespace std;
SMDS_CellLinks* SMDS_CellLinks::New() SMDS_CellLinks* SMDS_CellLinks::New()
{ {
MESSAGE("SMDS_CellLinks::New");
return new SMDS_CellLinks(); return new SMDS_CellLinks();
} }
@ -65,7 +64,6 @@ SMDS_CellLinks::~SMDS_CellLinks()
SMDS_UnstructuredGrid* SMDS_UnstructuredGrid::New() SMDS_UnstructuredGrid* SMDS_UnstructuredGrid::New()
{ {
MESSAGE("SMDS_UnstructuredGrid::New");
return new SMDS_UnstructuredGrid(); return new SMDS_UnstructuredGrid();
} }
@ -85,27 +83,23 @@ SMDS_UnstructuredGrid::~SMDS_UnstructuredGrid()
unsigned long SMDS_UnstructuredGrid::GetMTime() unsigned long SMDS_UnstructuredGrid::GetMTime()
{ {
unsigned long mtime = vtkUnstructuredGrid::GetMTime(); unsigned long mtime = vtkUnstructuredGrid::GetMTime();
MESSAGE("vtkUnstructuredGrid::GetMTime: " << mtime);
return mtime; return mtime;
} }
// OUV_PORTING_VTK6: seems to be useless // OUV_PORTING_VTK6: seems to be useless
/* /*
void SMDS_UnstructuredGrid::Update() void SMDS_UnstructuredGrid::Update()
{ {
MESSAGE("SMDS_UnstructuredGrid::Update");
return vtkUnstructuredGrid::Update(); return vtkUnstructuredGrid::Update();
} }
void SMDS_UnstructuredGrid::UpdateInformation() void SMDS_UnstructuredGrid::UpdateInformation()
{ {
MESSAGE("SMDS_UnstructuredGrid::UpdateInformation");
return vtkUnstructuredGrid::UpdateInformation(); return vtkUnstructuredGrid::UpdateInformation();
} }
*/ */
vtkPoints* SMDS_UnstructuredGrid::GetPoints() vtkPoints* SMDS_UnstructuredGrid::GetPoints()
{ {
// TODO erreur incomprehensible de la macro vtk GetPoints apparue avec la version paraview de fin aout 2010 // TODO erreur incomprehensible de la macro vtk GetPoints apparue avec la version paraview de fin aout 2010
//MESSAGE("*********************** SMDS_UnstructuredGrid::GetPoints " << this->Points << " " << vtkUnstructuredGrid::GetPoints());
return this->Points; return this->Points;
} }
@ -116,7 +110,6 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
return vtkUnstructuredGrid::InsertNextLinkedCell(type, npts, pts); return vtkUnstructuredGrid::InsertNextLinkedCell(type, npts, pts);
// --- type = VTK_POLYHEDRON // --- type = VTK_POLYHEDRON
//MESSAGE("InsertNextLinkedCell VTK_POLYHEDRON");
int cellid = this->InsertNextCell(type, npts, pts); int cellid = this->InsertNextCell(type, npts, pts);
set<vtkIdType> setOfNodes; set<vtkIdType> setOfNodes;
@ -129,7 +122,6 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
i++; i++;
for (int k = 0; k < nbnodes; k++) for (int k = 0; k < nbnodes; k++)
{ {
//MESSAGE(" cell " << cellid << " face " << nf << " node " << pts[i]);
setOfNodes.insert(pts[i]); setOfNodes.insert(pts[i]);
i++; i++;
} }
@ -138,7 +130,6 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
set<vtkIdType>::iterator it = setOfNodes.begin(); set<vtkIdType>::iterator it = setOfNodes.begin();
for (; it != setOfNodes.end(); ++it) for (; it != setOfNodes.end(); ++it)
{ {
//MESSAGE("reverse link for node " << *it << " cell " << cellid);
this->Links->ResizeCellList(*it, 1); this->Links->ResizeCellList(*it, 1);
this->Links->AddCellReference(cellid, *it); this->Links->AddCellReference(cellid, *it);
} }
@ -155,7 +146,7 @@ void SMDS_UnstructuredGrid::setSMDS_mesh(SMDS_Mesh *mesh)
void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int newNodeSize, void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int newNodeSize,
std::vector<int>& idCellsOldToNew, int newCellSize) std::vector<int>& idCellsOldToNew, int newCellSize)
{ {
MESSAGE("------------------------- SMDS_UnstructuredGrid::compactGrid " << newNodeSize << " " << newCellSize);//CHRONO(1); //MESSAGE("------------------------- compactGrid " << newNodeSize << " " << newCellSize);//CHRONO(1);
int alreadyCopied = 0; int alreadyCopied = 0;
// --- if newNodeSize, create a new compacted vtkPoints // --- if newNodeSize, create a new compacted vtkPoints
@ -165,7 +156,6 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
newPoints->SetNumberOfPoints(newNodeSize); newPoints->SetNumberOfPoints(newNodeSize);
if (newNodeSize) if (newNodeSize)
{ {
MESSAGE("-------------- compactGrid, newNodeSize " << newNodeSize);
// rnv: to fix bug "21125: EDF 1233 SMESH: Degradation of precision in a test case for quadratic conversion" // rnv: to fix bug "21125: EDF 1233 SMESH: Degradation of precision in a test case for quadratic conversion"
// using double type for storing coordinates of nodes instead float. // using double type for storing coordinates of nodes instead float.
int oldNodeSize = idNodesOldToNew.size(); int oldNodeSize = idNodesOldToNew.size();
@ -194,7 +184,6 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
newConnectivity->Initialize(); newConnectivity->Initialize();
int oldCellDataSize = this->Connectivity->GetData()->GetSize(); int oldCellDataSize = this->Connectivity->GetData()->GetSize();
newConnectivity->Allocate(oldCellDataSize); newConnectivity->Allocate(oldCellDataSize);
MESSAGE("oldCellSize="<< oldCellSize << " oldCellDataSize=" << oldCellDataSize);
vtkUnsignedCharArray *newTypes = vtkUnsignedCharArray::New(); vtkUnsignedCharArray *newTypes = vtkUnsignedCharArray::New();
newTypes->Initialize(); newTypes->Initialize();
@ -230,11 +219,9 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
newConnectivity->Squeeze(); newConnectivity->Squeeze();
if (1/*newNodeSize*/) if (1/*newNodeSize*/)
{ {
MESSAGE("------- newNodeSize, setPoints"); this->SetPoints(newPoints);
this->SetPoints(newPoints); }
MESSAGE("NumberOfPoints: " << this->GetNumberOfPoints());
}
if (vtkDoubleArray* diameters = if (vtkDoubleArray* diameters =
vtkDoubleArray::SafeDownCast( vtkDataSet::CellData->GetScalars() )) // Balls vtkDoubleArray::SafeDownCast( vtkDataSet::CellData->GetScalars() )) // Balls
@ -250,46 +237,46 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
} }
if (this->FaceLocations) if (this->FaceLocations)
{
vtkIdTypeArray *newFaceLocations = vtkIdTypeArray::New();
newFaceLocations->Initialize();
newFaceLocations->Allocate(newTypes->GetSize());
vtkIdTypeArray *newFaces = vtkIdTypeArray::New();
newFaces->Initialize();
newFaces->Allocate(this->Faces->GetSize());
for (int i = 0; i < oldCellSize; i++)
{ {
vtkIdTypeArray *newFaceLocations = vtkIdTypeArray::New(); if (this->Types->GetValue(i) == VTK_EMPTY_CELL)
newFaceLocations->Initialize(); continue;
newFaceLocations->Allocate(newTypes->GetSize()); int newCellId = idCellsOldToNew[i];
vtkIdTypeArray *newFaces = vtkIdTypeArray::New(); if (newTypes->GetValue(newCellId) == VTK_POLYHEDRON)
newFaces->Initialize(); {
newFaces->Allocate(this->Faces->GetSize()); newFaceLocations->InsertNextValue(newFaces->GetMaxId()+1);
for (int i = 0; i < oldCellSize; i++) int oldFaceLoc = this->FaceLocations->GetValue(i);
int nCellFaces = this->Faces->GetValue(oldFaceLoc++);
newFaces->InsertNextValue(nCellFaces);
for (int n=0; n<nCellFaces; n++)
{ {
if (this->Types->GetValue(i) == VTK_EMPTY_CELL) int nptsInFace = this->Faces->GetValue(oldFaceLoc++);
continue; newFaces->InsertNextValue(nptsInFace);
int newCellId = idCellsOldToNew[i]; for (int k=0; k<nptsInFace; k++)
if (newTypes->GetValue(newCellId) == VTK_POLYHEDRON) {
{ int oldpt = this->Faces->GetValue(oldFaceLoc++);
newFaceLocations->InsertNextValue(newFaces->GetMaxId()+1); newFaces->InsertNextValue(idNodesOldToNew[oldpt]);
int oldFaceLoc = this->FaceLocations->GetValue(i); }
int nCellFaces = this->Faces->GetValue(oldFaceLoc++);
newFaces->InsertNextValue(nCellFaces);
for (int n=0; n<nCellFaces; n++)
{
int nptsInFace = this->Faces->GetValue(oldFaceLoc++);
newFaces->InsertNextValue(nptsInFace);
for (int k=0; k<nptsInFace; k++)
{
int oldpt = this->Faces->GetValue(oldFaceLoc++);
newFaces->InsertNextValue(idNodesOldToNew[oldpt]);
}
}
}
else
{
newFaceLocations->InsertNextValue(-1);
}
} }
newFaceLocations->Squeeze(); }
newFaces->Squeeze(); else
this->SetCells(newTypes, newLocations, newConnectivity, newFaceLocations, newFaces); {
newFaceLocations->Delete(); newFaceLocations->InsertNextValue(-1);
newFaces->Delete(); }
} }
newFaceLocations->Squeeze();
newFaces->Squeeze();
this->SetCells(newTypes, newLocations, newConnectivity, newFaceLocations, newFaces);
newFaceLocations->Delete();
newFaces->Delete();
}
else else
{ {
this->SetCells(newTypes, newLocations, newConnectivity, FaceLocations, Faces); this->SetCells(newTypes, newLocations, newConnectivity, FaceLocations, Faces);
@ -302,10 +289,12 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
this->BuildLinks(); this->BuildLinks();
} }
void SMDS_UnstructuredGrid::copyNodes(vtkPoints *newPoints, std::vector<int>& idNodesOldToNew, int& alreadyCopied, void SMDS_UnstructuredGrid::copyNodes(vtkPoints * newPoints,
int start, int end) std::vector<int>& idNodesOldToNew,
int& alreadyCopied,
int start,
int end)
{ {
MESSAGE("copyNodes " << alreadyCopied << " " << start << " " << end << " size: " << end - start << " total: " << alreadyCopied + end - start);
void *target = newPoints->GetVoidPointer(3 * alreadyCopied); void *target = newPoints->GetVoidPointer(3 * alreadyCopied);
void *source = this->Points->GetVoidPointer(3 * start); void *source = this->Points->GetVoidPointer(3 * start);
int nbPoints = end - start; int nbPoints = end - start;
@ -327,7 +316,6 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes,
int start, int start,
int end) int end)
{ {
//MESSAGE("copyBloc " << alreadyCopied << " " << start << " " << end << " size: " << end - start << " total: " << alreadyCopied + end - start);
for (int j = start; j < end; j++) for (int j = start; j < end; j++)
{ {
newTypes->SetValue(alreadyCopied, this->Types->GetValue(j)); newTypes->SetValue(alreadyCopied, this->Types->GetValue(j));
@ -337,16 +325,13 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes,
vtkIdType *oldPtsCell = 0; vtkIdType *oldPtsCell = 0;
this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell); this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell);
assert(nbpts < NBMAXNODESINCELL); assert(nbpts < NBMAXNODESINCELL);
//MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts );
for (int l = 0; l < nbpts; l++) for (int l = 0; l < nbpts; l++)
{ {
int oldval = oldPtsCell[l]; int oldval = oldPtsCell[l];
pointsCell[l] = idNodesOldToNew[oldval]; pointsCell[l] = idNodesOldToNew[oldval];
//MESSAGE(" " << oldval << " " << pointsCell[l]);
} }
/*int newcnt = */newConnectivity->InsertNextCell(nbpts, pointsCell); /*int newcnt = */newConnectivity->InsertNextCell(nbpts, pointsCell);
int newLoc = newConnectivity->GetInsertLocation(nbpts); int newLoc = newConnectivity->GetInsertLocation(nbpts);
//MESSAGE(newcnt << " " << newLoc);
newLocations->SetValue(alreadyCopied, newLoc); newLocations->SetValue(alreadyCopied, newLoc);
alreadyCopied++; alreadyCopied++;
} }
@ -356,8 +341,6 @@ int SMDS_UnstructuredGrid::CellIdToDownId(int vtkCellId)
{ {
if ((vtkCellId < 0) || (vtkCellId >= (int)_cellIdToDownId.size())) if ((vtkCellId < 0) || (vtkCellId >= (int)_cellIdToDownId.size()))
{ {
//MESSAGE("SMDS_UnstructuredGrid::CellIdToDownId structure not up to date: vtkCellId="
// << vtkCellId << " max="<< _cellIdToDownId.size());
return -1; return -1;
} }
return _cellIdToDownId[vtkCellId]; return _cellIdToDownId[vtkCellId];
@ -1016,12 +999,13 @@ void SMDS_UnstructuredGrid::BuildLinks()
* @param nodeDomains: map(original id --> map(domain --> duplicated node id)) * @param nodeDomains: map(original id --> map(domain --> duplicated node id))
* @return ok if success. * @return ok if success.
*/ */
SMDS_MeshCell* SMDS_UnstructuredGrid::extrudeVolumeFromFace(int vtkVolId, SMDS_MeshCell*
int domain1, SMDS_UnstructuredGrid::extrudeVolumeFromFace(int vtkVolId,
int domain2, int domain1,
std::set<int>& originalNodes, int domain2,
std::map<int, std::map<int, int> >& nodeDomains, std::set<int>& originalNodes,
std::map<int, std::map<long, int> >& nodeQuadDomains) std::map<int, std::map<int, int> >& nodeDomains,
std::map<int, std::map<long, int> >& nodeQuadDomains)
{ {
//MESSAGE("extrudeVolumeFromFace " << vtkVolId); //MESSAGE("extrudeVolumeFromFace " << vtkVolId);
vector<vtkIdType> orderedOriginals; vector<vtkIdType> orderedOriginals;
@ -1037,16 +1021,16 @@ SMDS_MeshCell* SMDS_UnstructuredGrid::extrudeVolumeFromFace(int vtkVolId,
bool isQuadratic = false; bool isQuadratic = false;
switch (orderedOriginals.size()) switch (orderedOriginals.size())
{ {
case 3: case 3:
if (dim == 2) if (dim == 2)
isQuadratic = true;
break;
case 6:
case 8:
isQuadratic = true; isQuadratic = true;
break; break;
default: case 6:
isQuadratic = false; case 8:
isQuadratic = true;
break;
default:
isQuadratic = false;
break; break;
} }

View File

@ -64,12 +64,10 @@ using namespace std;
SMESH_Gen::SMESH_Gen() SMESH_Gen::SMESH_Gen()
{ {
MESSAGE("SMESH_Gen::SMESH_Gen");
_localId = 0; _localId = 0;
_hypId = 0; _hypId = 0;
_segmentation = _nbSegments = 10; _segmentation = _nbSegments = 10;
SMDS_Mesh::_meshList.clear(); SMDS_Mesh::_meshList.clear();
MESSAGE(SMDS_Mesh::_meshList.size());
_compute_canceled = false; _compute_canceled = false;
//vtkDebugLeaks::SetExitError(0); //vtkDebugLeaks::SetExitError(0);
} }
@ -82,7 +80,6 @@ SMESH_Gen::SMESH_Gen()
SMESH_Gen::~SMESH_Gen() SMESH_Gen::~SMESH_Gen()
{ {
MESSAGE("SMESH_Gen::~SMESH_Gen");
std::map < int, StudyContextStruct * >::iterator i_sc = _mapStudyContext.begin(); std::map < int, StudyContextStruct * >::iterator i_sc = _mapStudyContext.begin();
for ( ; i_sc != _mapStudyContext.end(); ++i_sc ) for ( ; i_sc != _mapStudyContext.end(); ++i_sc )
{ {
@ -102,7 +99,6 @@ SMESH_Mesh* SMESH_Gen::CreateMesh(int theStudyId, bool theIsEmbeddedMode)
throw(SALOME_Exception) throw(SALOME_Exception)
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
MESSAGE("SMESH_Gen::CreateMesh");
// Get studyContext, create it if it does'nt exist, with a SMESHDS_Document // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
StudyContextStruct *aStudyContext = GetStudyContext(theStudyId); StudyContextStruct *aStudyContext = GetStudyContext(theStudyId);
@ -131,7 +127,6 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
const ::MeshDimension aDim /*=::MeshDim_3D*/, const ::MeshDimension aDim /*=::MeshDim_3D*/,
TSetOfInt* aShapesId /*=0*/) TSetOfInt* aShapesId /*=0*/)
{ {
MESSAGE("SMESH_Gen::Compute");
MEMOSTAT; MEMOSTAT;
bool ret = true; bool ret = true;
@ -369,11 +364,10 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
ret = Compute( aMesh, aShape, aShapeOnly, /*anUpward=*/true, aDim, aShapesId ); ret = Compute( aMesh, aShape, aShapeOnly, /*anUpward=*/true, aDim, aShapesId );
} }
MESSAGE( "VSR - SMESH_Gen::Compute() finished, OK = " << ret);
MEMOSTAT; MEMOSTAT;
SMESHDS_Mesh *myMesh = aMesh.GetMeshDS(); SMESHDS_Mesh *myMesh = aMesh.GetMeshDS();
MESSAGE("*** compactMesh after compute"); //MESSAGE("*** compactMesh after compute");
myMesh->compactMesh(); myMesh->compactMesh();
// fix quadratic mesh by bending iternal links near concave boundary // fix quadratic mesh by bending iternal links near concave boundary
@ -463,8 +457,6 @@ bool SMESH_Gen::Evaluate(SMESH_Mesh & aMesh,
const bool anUpward, const bool anUpward,
TSetOfInt* aShapesId) TSetOfInt* aShapesId)
{ {
MESSAGE("SMESH_Gen::Evaluate");
bool ret = true; bool ret = true;
SMESH_subMesh *sm = aMesh.GetSubMesh(aShape); SMESH_subMesh *sm = aMesh.GetSubMesh(aShape);
@ -707,8 +699,6 @@ static bool checkMissing(SMESH_Gen* aGen,
if ( aCheckedMap.count( aSubMesh )) if ( aCheckedMap.count( aSubMesh ))
return true; return true;
//MESSAGE("=====checkMissing");
int ret = true; int ret = true;
SMESH_Algo* algo = 0; SMESH_Algo* algo = 0;
@ -829,8 +819,6 @@ bool SMESH_Gen::GetAlgoState(SMESH_Mesh& theMesh,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
list< TAlgoStateError > & theErrors) list< TAlgoStateError > & theErrors)
{ {
//MESSAGE("SMESH_Gen::CheckAlgoState");
bool ret = true; bool ret = true;
bool hasAlgo = false; bool hasAlgo = false;
@ -908,8 +896,6 @@ bool SMESH_Gen::GetAlgoState(SMESH_Mesh& theMesh,
// well defined // well defined
// ---------------------------------------------------------------- // ----------------------------------------------------------------
//MESSAGE( "---info on missing hypothesis and find out if all needed algos are");
// find max dim of global algo // find max dim of global algo
int aTopAlgoDim = 0; int aTopAlgoDim = 0;
for (dim = 3; dim > 0; dim--) for (dim = 3; dim > 0; dim--)

View File

@ -59,7 +59,6 @@ SMESH_Hypothesis::SMESH_Hypothesis(int hypId,
SMESH_Hypothesis::~SMESH_Hypothesis() SMESH_Hypothesis::~SMESH_Hypothesis()
{ {
MESSAGE("SMESH_Hypothesis::~SMESH_Hypothesis");
StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
myStudyContext->mapHypothesis[_hypId] = 0; myStudyContext->mapHypothesis[_hypId] = 0;
} }
@ -115,8 +114,6 @@ int SMESH_Hypothesis::GetStudyId() const
void SMESH_Hypothesis::NotifySubMeshesHypothesisModification() void SMESH_Hypothesis::NotifySubMeshesHypothesisModification()
{ {
MESSAGE("SMESH_Hypothesis::NotifySubMeshesHypothesisModification");
// for all meshes in study // for all meshes in study
StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);

View File

@ -683,7 +683,6 @@ static bool getNodesFromTwoTria(const SMDS_MeshElement * theTria1,
bool SMESH_MeshEditor::InverseDiag (const SMDS_MeshElement * theTria1, bool SMESH_MeshEditor::InverseDiag (const SMDS_MeshElement * theTria1,
const SMDS_MeshElement * theTria2 ) const SMDS_MeshElement * theTria2 )
{ {
MESSAGE("InverseDiag");
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
@ -888,8 +887,6 @@ bool SMESH_MeshEditor::InverseDiag (const SMDS_MeshNode * theNode1,
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
MESSAGE( "::InverseDiag()" );
const SMDS_MeshElement *tr1, *tr2; const SMDS_MeshElement *tr1, *tr2;
if ( !findTriangles( theNode1, theNode2, tr1, tr2 )) if ( !findTriangles( theNode1, theNode2, tr1, tr2 ))
return false; return false;
@ -1011,8 +1008,6 @@ bool SMESH_MeshEditor::DeleteDiag (const SMDS_MeshNode * theNode1,
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
MESSAGE( "::DeleteDiag()" );
const SMDS_MeshElement *tr1, *tr2; const SMDS_MeshElement *tr1, *tr2;
if ( !findTriangles( theNode1, theNode2, tr1, tr2 )) if ( !findTriangles( theNode1, theNode2, tr1, tr2 ))
return false; return false;
@ -1105,7 +1100,6 @@ bool SMESH_MeshEditor::DeleteDiag (const SMDS_MeshNode * theNode1,
bool SMESH_MeshEditor::Reorient (const SMDS_MeshElement * theElem) bool SMESH_MeshEditor::Reorient (const SMDS_MeshElement * theElem)
{ {
MESSAGE("Reorient");
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
@ -2931,8 +2925,6 @@ bool SMESH_MeshEditor::QuadToTri (TIDSortedElemSet & theElems,
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
MESSAGE( "::QuadToTri()" );
SMESHDS_Mesh * aMesh = GetMeshDS(); SMESHDS_Mesh * aMesh = GetMeshDS();
Handle(Geom_Surface) surface; Handle(Geom_Surface) surface;
@ -3153,8 +3145,6 @@ bool SMESH_MeshEditor::TriToQuad (TIDSortedElemSet & theElems,
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
MESSAGE( "::TriToQuad()" );
if ( !theCrit.get() ) if ( !theCrit.get() )
return false; return false;
@ -3938,8 +3928,6 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet & theElems,
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
MESSAGE((theSmoothMethod==LAPLACIAN ? "LAPLACIAN" : "CENTROIDAL") << "--::Smooth()");
if ( theTgtAspectRatio < 1.0 ) if ( theTgtAspectRatio < 1.0 )
theTgtAspectRatio = 1.0; theTgtAspectRatio = 1.0;
@ -4476,7 +4464,6 @@ void SMESH_MeshEditor::sweepElement(const SMDS_MeshElement* elem,
const size_t nbSteps, const size_t nbSteps,
SMESH_SequenceOfElemPtr& srcElements) SMESH_SequenceOfElemPtr& srcElements)
{ {
//MESSAGE("sweepElement " << nbSteps);
SMESHDS_Mesh* aMesh = GetMeshDS(); SMESHDS_Mesh* aMesh = GetMeshDS();
const int nbNodes = elem->NbNodes(); const int nbNodes = elem->NbNodes();
@ -5368,7 +5355,6 @@ SMESH_MeshEditor::RotationSweep(TIDSortedElemSet theElemSets[2],
// source elements for each generated one // source elements for each generated one
SMESH_SequenceOfElemPtr srcElems, srcNodes; SMESH_SequenceOfElemPtr srcElems, srcNodes;
MESSAGE( "RotationSweep()");
gp_Trsf aTrsf; gp_Trsf aTrsf;
aTrsf.SetRotation( theAxis, theAngle ); aTrsf.SetRotation( theAxis, theAngle );
gp_Trsf aTrsf2; gp_Trsf aTrsf2;
@ -5939,7 +5925,6 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet theElements[2],
const gp_Pnt& theRefPoint, const gp_Pnt& theRefPoint,
const bool theMakeGroups) const bool theMakeGroups)
{ {
MESSAGE("ExtrusionAlongTrack");
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
@ -6732,37 +6717,29 @@ SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems,
string groupPostfix; string groupPostfix;
switch ( theTrsf.Form() ) { switch ( theTrsf.Form() ) {
case gp_PntMirror: case gp_PntMirror:
MESSAGE("gp_PntMirror");
needReverse = true; needReverse = true;
groupPostfix = "mirrored"; groupPostfix = "mirrored";
break; break;
case gp_Ax1Mirror: case gp_Ax1Mirror:
MESSAGE("gp_Ax1Mirror");
groupPostfix = "mirrored"; groupPostfix = "mirrored";
break; break;
case gp_Ax2Mirror: case gp_Ax2Mirror:
MESSAGE("gp_Ax2Mirror");
needReverse = true; needReverse = true;
groupPostfix = "mirrored"; groupPostfix = "mirrored";
break; break;
case gp_Rotation: case gp_Rotation:
MESSAGE("gp_Rotation");
groupPostfix = "rotated"; groupPostfix = "rotated";
break; break;
case gp_Translation: case gp_Translation:
MESSAGE("gp_Translation");
groupPostfix = "translated"; groupPostfix = "translated";
break; break;
case gp_Scale: case gp_Scale:
MESSAGE("gp_Scale");
groupPostfix = "scaled"; groupPostfix = "scaled";
break; break;
case gp_CompoundTrsf: // different scale by axis case gp_CompoundTrsf: // different scale by axis
MESSAGE("gp_CompoundTrsf");
groupPostfix = "scaled"; groupPostfix = "scaled";
break; break;
default: default:
MESSAGE("default");
needReverse = false; needReverse = false;
groupPostfix = "transformed"; groupPostfix = "transformed";
} }
@ -7271,7 +7248,6 @@ int SMESH_MeshEditor::SimplifyFace (const vector<const SMDS_MeshNode *>& faceNod
void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes)
{ {
MESSAGE("MergeNodes");
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
@ -8120,7 +8096,6 @@ SMESH_MeshEditor::SewFreeBorder (const SMDS_MeshNode* theBordFirstNode,
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
MESSAGE("::SewFreeBorder()");
Sew_Error aResult = SEW_OK; Sew_Error aResult = SEW_OK;
// ==================================== // ====================================
@ -9757,7 +9732,6 @@ SMESH_MeshEditor::SewSideElements (TIDSortedElemSet& theSide1,
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
MESSAGE ("::::SewSideElements()");
if ( theSide1.size() != theSide2.size() ) if ( theSide1.size() != theSide2.size() )
return SEW_DIFF_NB_OF_ELEMENTS; return SEW_DIFF_NB_OF_ELEMENTS;
@ -10538,7 +10512,6 @@ bool SMESH_MeshEditor::doubleNodes(SMESHDS_Mesh* theMeshDS,
TNodeNodeMap& theNodeNodeMap, TNodeNodeMap& theNodeNodeMap,
const bool theIsDoubleElem ) const bool theIsDoubleElem )
{ {
MESSAGE("doubleNodes");
// iterate through element and duplicate them (by nodes duplication) // iterate through element and duplicate them (by nodes duplication)
bool res = false; bool res = false;
std::vector<const SMDS_MeshNode*> newNodes; std::vector<const SMDS_MeshNode*> newNodes;
@ -10603,7 +10576,6 @@ bool SMESH_MeshEditor::doubleNodes(SMESHDS_Mesh* theMeshDS,
bool SMESH_MeshEditor::DoubleNodes( const std::list< int >& theListOfNodes, bool SMESH_MeshEditor::DoubleNodes( const std::list< int >& theListOfNodes,
const std::list< int >& theListOfModifiedElems ) const std::list< int >& theListOfModifiedElems )
{ {
MESSAGE("DoubleNodes");
myLastCreatedElems.Clear(); myLastCreatedElems.Clear();
myLastCreatedNodes.Clear(); myLastCreatedNodes.Clear();
@ -10677,10 +10649,9 @@ bool SMESH_MeshEditor::DoubleNodes( const std::list< int >& theListOfNodes,
const SMDS_MeshElement* anElem = anElemToNodesIter->first; const SMDS_MeshElement* anElem = anElemToNodesIter->first;
vector<const SMDS_MeshNode*> aNodeArr = anElemToNodesIter->second; vector<const SMDS_MeshNode*> aNodeArr = anElemToNodesIter->second;
if ( anElem ) if ( anElem )
{ {
MESSAGE("ChangeElementNodes");
aMeshDS->ChangeElementNodes( anElem, &aNodeArr[ 0 ], anElem->NbNodes() ); aMeshDS->ChangeElementNodes( anElem, &aNodeArr[ 0 ], anElem->NbNodes() );
} }
} }
return true; return true;
@ -10788,7 +10759,6 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
continue; continue;
gp_XYZ normal; gp_XYZ normal;
SMESH_MeshAlgos::FaceNormal( anElem, normal, /*normalized=*/true ); SMESH_MeshAlgos::FaceNormal( anElem, normal, /*normalized=*/true );
MESSAGE("element " << ielem++ << " normal " << normal.X() << " " << normal.Y() << " " << normal.Z());
std::set<const SMDS_MeshNode*> nodesElem; std::set<const SMDS_MeshNode*> nodesElem;
nodesElem.clear(); nodesElem.clear();
SMDS_ElemIteratorPtr nodeItr = anElem->nodesIterator(); SMDS_ElemIteratorPtr nodeItr = anElem->nodesIterator();
@ -10800,7 +10770,6 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
std::set<const SMDS_MeshNode*>::iterator nodit = nodesElem.begin(); std::set<const SMDS_MeshNode*>::iterator nodit = nodesElem.begin();
for (; nodit != nodesElem.end(); nodit++) for (; nodit != nodesElem.end(); nodit++)
{ {
MESSAGE(" noeud ");
const SMDS_MeshNode* aNode = *nodit; const SMDS_MeshNode* aNode = *nodit;
if ( !aNode || theNodesNot.find(aNode) != theNodesNot.end() ) if ( !aNode || theNodesNot.find(aNode) != theNodesNot.end() )
continue; continue;
@ -10810,7 +10779,6 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
SMDS_ElemIteratorPtr backElemItr = aNode->GetInverseElementIterator(); SMDS_ElemIteratorPtr backElemItr = aNode->GetInverseElementIterator();
while ( backElemItr->more() ) while ( backElemItr->more() )
{ {
MESSAGE(" backelem ");
const SMDS_MeshElement* curElem = backElemItr->next(); const SMDS_MeshElement* curElem = backElemItr->next();
if (alreadyCheckedElems.find(curElem) != alreadyCheckedElems.end()) if (alreadyCheckedElems.find(curElem) != alreadyCheckedElems.end())
continue; continue;
@ -10832,10 +10800,8 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
p.SetCoord( x/nb -aNode->X(), p.SetCoord( x/nb -aNode->X(),
y/nb -aNode->Y(), y/nb -aNode->Y(),
z/nb -aNode->Z() ); z/nb -aNode->Z() );
MESSAGE(" check " << p.X() << " " << p.Y() << " " << p.Z());
if (normal*p > 0) if (normal*p > 0)
{ {
MESSAGE(" --- inserted")
theAffectedElems.insert( curElem ); theAffectedElems.insert( curElem );
} }
else if (curElem->GetType() == SMDSAbs_Edge) else if (curElem->GetType() == SMDSAbs_Edge)
@ -10861,7 +10827,6 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
} }
if (onside) if (onside)
{ {
MESSAGE(" --- edge onside inserted")
theAffectedElems.insert(anEdge); theAffectedElems.insert(anEdge);
} }
} }
@ -10886,21 +10851,18 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
int ielem; int ielem;
for ( ielem = 1; elemItr != theElems.end(); ++elemItr ) for ( ielem = 1; elemItr != theElems.end(); ++elemItr )
{ {
MESSAGE("element " << ielem++);
SMDS_MeshElement* anElem = (SMDS_MeshElement*)*elemItr; SMDS_MeshElement* anElem = (SMDS_MeshElement*)*elemItr;
if (!anElem) if (!anElem)
continue; continue;
SMDS_ElemIteratorPtr nodeItr = anElem->nodesIterator(); SMDS_ElemIteratorPtr nodeItr = anElem->nodesIterator();
while ( nodeItr->more() ) while ( nodeItr->more() )
{ {
MESSAGE(" noeud ");
const SMDS_MeshNode* aNode = cast2Node(nodeItr->next()); const SMDS_MeshNode* aNode = cast2Node(nodeItr->next());
if ( !aNode || theNodesNot.find(aNode) != theNodesNot.end() ) if ( !aNode || theNodesNot.find(aNode) != theNodesNot.end() )
continue; continue;
SMDS_ElemIteratorPtr backElemItr = aNode->GetInverseElementIterator(); SMDS_ElemIteratorPtr backElemItr = aNode->GetInverseElementIterator();
while ( backElemItr->more() ) while ( backElemItr->more() )
{ {
MESSAGE(" backelem ");
const SMDS_MeshElement* curElem = backElemItr->next(); const SMDS_MeshElement* curElem = backElemItr->next();
if ( curElem && theElems.find(curElem) == theElems.end() && if ( curElem && theElems.find(curElem) == theElems.end() &&
( bsc3d.get() ? ( bsc3d.get() ?
@ -10986,10 +10948,6 @@ bool SMESH_MeshEditor::DoubleNodesInRegion( const TIDSortedElemSet& theElems,
*/ */
double SMESH_MeshEditor::OrientedAngle(const gp_Pnt& p0, const gp_Pnt& p1, const gp_Pnt& g1, const gp_Pnt& g2) double SMESH_MeshEditor::OrientedAngle(const gp_Pnt& p0, const gp_Pnt& p1, const gp_Pnt& g1, const gp_Pnt& g2)
{ {
// MESSAGE(" p0: " << p0.X() << " " << p0.Y() << " " << p0.Z());
// MESSAGE(" p1: " << p1.X() << " " << p1.Y() << " " << p1.Z());
// MESSAGE(" g1: " << g1.X() << " " << g1.Y() << " " << g1.Z());
// MESSAGE(" g2: " << g2.X() << " " << g2.Y() << " " << g2.Z());
gp_Vec vref(p0, p1); gp_Vec vref(p0, p1);
gp_Vec v1(p0, g1); gp_Vec v1(p0, g1);
gp_Vec v2(p0, g2); gp_Vec v2(p0, g2);

View File

@ -39,7 +39,7 @@ void memostat(const char* f, int l)
} }
#if defined(_DEBUG_) || defined(_DEBUG) #if defined(_DEBUG_) || defined(_DEBUG)
#define MEMOSTAT memostat( __FILE__, __LINE__ ) #define MEMOSTAT //memostat( __FILE__, __LINE__ )
#else #else
#define MEMOSTAT #define MEMOSTAT
#endif #endif

View File

@ -54,7 +54,7 @@
#endif #endif
#ifdef _DEBUG_ #ifdef _DEBUG_
static int MYDEBUG = 1; static int MYDEBUG = 0;
#else #else
static int MYDEBUG = 0; static int MYDEBUG = 0;
#endif #endif
@ -886,20 +886,22 @@ bool
SMESH_Client::Update(bool theIsClear) SMESH_Client::Update(bool theIsClear)
{ {
bool anIsModified = true; bool anIsModified = true;
if(mySMESHDSMesh){ if(mySMESHDSMesh)
MESSAGE("Update mySMESHDSMesh"); {
if ( MYDEBUG ) MESSAGE("Update mySMESHDSMesh");
SMESHDS_Script* aScript = mySMESHDSMesh->GetScript(); SMESHDS_Script* aScript = mySMESHDSMesh->GetScript();
anIsModified = aScript->IsModified(); anIsModified = aScript->IsModified();
aScript->SetModified(false); aScript->SetModified(false);
}else{ }
MESSAGE("Update CORBA"); else
{
if ( MYDEBUG ) MESSAGE("Update CORBA");
SMESH::log_array_var aSeq = myMeshServer->GetLog( theIsClear ); SMESH::log_array_var aSeq = myMeshServer->GetLog( theIsClear );
CORBA::Long aLength = aSeq->length(); CORBA::Long aLength = aSeq->length();
anIsModified = aLength > 0; anIsModified = aLength > 0;
if( MYDEBUG ) if ( MYDEBUG ) MESSAGE( "Update: length of the script is "<<aLength );
MESSAGE( "Update: length of the script is "<<aLength );
if(!anIsModified) if ( !anIsModified )
return false; return false;
// update client mesh structure by logged changes commands // update client mesh structure by logged changes commands

View File

@ -220,7 +220,6 @@ bool SMESHDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * elem,
const SMDS_MeshNode * nodes[], const SMDS_MeshNode * nodes[],
const int nbnodes) const int nbnodes)
{ {
//MESSAGE("SMESHDS_Mesh::ChangeElementNodes");
if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, nbnodes )) if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, nbnodes ))
return false; return false;
@ -978,7 +977,6 @@ void SMESHDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elt,
SMESHDS_SubMesh * subMesh, SMESHDS_SubMesh * subMesh,
bool fromGroups) bool fromGroups)
{ {
//MESSAGE(" --------------------------------> SMESHDS_Mesh::RemoveFreeElement " << subMesh << " " << fromGroups);
if (elt->GetType() == SMDSAbs_Node) { if (elt->GetType() == SMDSAbs_Node) {
RemoveFreeNode( static_cast<const SMDS_MeshNode*>(elt), subMesh, fromGroups); RemoveFreeNode( static_cast<const SMDS_MeshNode*>(elt), subMesh, fromGroups);
return; return;
@ -1345,7 +1343,6 @@ int SMESHDS_Mesh::AddCompoundSubmesh(const TopoDS_Shape& S,
bool all = ( type == TopAbs_SHAPE ); bool all = ( type == TopAbs_SHAPE );
if ( all ) // corresponding simple submesh may exist if ( all ) // corresponding simple submesh may exist
aMainIndex = -aMainIndex; aMainIndex = -aMainIndex;
//MESSAGE("AddCompoundSubmesh index = " << aMainIndex );
SMESHDS_SubMesh * aNewSub = NewSubMesh( aMainIndex ); SMESHDS_SubMesh * aNewSub = NewSubMesh( aMainIndex );
if ( !aNewSub->IsComplexSubmesh() ) // is empty if ( !aNewSub->IsComplexSubmesh() ) // is empty
{ {
@ -2116,18 +2113,18 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2, const SMDS_MeshNode * n2,
const SMDS_MeshNode * n3, const SMDS_MeshNode * n3,
const SMDS_MeshNode * n4, const SMDS_MeshNode * n4,
const SMDS_MeshNode * n5, const SMDS_MeshNode * n5,
const SMDS_MeshNode * n6, const SMDS_MeshNode * n6,
const SMDS_MeshNode * n7, const SMDS_MeshNode * n7,
const SMDS_MeshNode * n8, const SMDS_MeshNode * n8,
const SMDS_MeshNode * n12, const SMDS_MeshNode * n12,
const SMDS_MeshNode * n23, const SMDS_MeshNode * n23,
const SMDS_MeshNode * n34, const SMDS_MeshNode * n34,
const SMDS_MeshNode * n41, const SMDS_MeshNode * n41,
const SMDS_MeshNode * n56, const SMDS_MeshNode * n56,
const SMDS_MeshNode * n67, const SMDS_MeshNode * n67,
const SMDS_MeshNode * n78, const SMDS_MeshNode * n78,
const SMDS_MeshNode * n85, const SMDS_MeshNode * n85,
const SMDS_MeshNode * n15, const SMDS_MeshNode * n15,
const SMDS_MeshNode * n26, const SMDS_MeshNode * n26,
const SMDS_MeshNode * n37, const SMDS_MeshNode * n37,
@ -2155,7 +2152,7 @@ void SMESHDS_Mesh::compactMesh()
int newNodeSize = 0; int newNodeSize = 0;
int nbNodes = myNodes.size(); int nbNodes = myNodes.size();
int nbVtkNodes = myGrid->GetNumberOfPoints(); int nbVtkNodes = myGrid->GetNumberOfPoints();
MESSAGE("nbNodes=" << nbNodes << " nbVtkNodes=" << nbVtkNodes); //MESSAGE("nbNodes=" << nbNodes << " nbVtkNodes=" << nbVtkNodes);
int nbNodeTemp = nbVtkNodes; int nbNodeTemp = nbVtkNodes;
if (nbNodes > nbVtkNodes) if (nbNodes > nbVtkNodes)
nbNodeTemp = nbNodes; nbNodeTemp = nbNodes;
@ -2164,22 +2161,22 @@ void SMESHDS_Mesh::compactMesh()
idNodesOldToNew.resize(nbNodeTemp, -1); // all unused id will be -1 idNodesOldToNew.resize(nbNodeTemp, -1); // all unused id will be -1
for (int i = 0; i < nbNodes; i++) for (int i = 0; i < nbNodes; i++)
{
if (myNodes[i])
{ {
if (myNodes[i]) int vtkid = myNodes[i]->getVtkId();
{ idNodesOldToNew[vtkid] = i; // old vtkId --> old smdsId (valid smdsId are >= 0)
int vtkid = myNodes[i]->getVtkId(); newNodeSize++;
idNodesOldToNew[vtkid] = i; // old vtkId --> old smdsId (valid smdsId are >= 0)
newNodeSize++;
}
} }
}
bool areNodesModified = (newNodeSize < nbVtkNodes); bool areNodesModified = (newNodeSize < nbVtkNodes);
MESSAGE("------------------------- compactMesh Nodes Modified: " << areNodesModified); //MESSAGE("------------------------- compactMesh Nodes Modified: " << areNodesModified);
areNodesModified = true; areNodesModified = true;
int newCellSize = 0; int newCellSize = 0;
int nbCells = myCells.size(); int nbCells = myCells.size();
int nbVtkCells = myGrid->GetNumberOfCells(); int nbVtkCells = myGrid->GetNumberOfCells();
MESSAGE("nbCells=" << nbCells << " nbVtkCells=" << nbVtkCells); //MESSAGE("nbCells=" << nbCells << " nbVtkCells=" << nbVtkCells);
int nbCellTemp = nbVtkCells; int nbCellTemp = nbVtkCells;
if (nbCells > nbVtkCells) if (nbCells > nbVtkCells)
nbCellTemp = nbCells; nbCellTemp = nbCells;
@ -2188,15 +2185,15 @@ void SMESHDS_Mesh::compactMesh()
idCellsOldToNew.resize(nbCellTemp, -1); // all unused id will be -1 idCellsOldToNew.resize(nbCellTemp, -1); // all unused id will be -1
for (int i = 0; i < nbCells; i++) for (int i = 0; i < nbCells; i++)
{
if (myCells[i])
{ {
if (myCells[i]) // //idCellsOldToNew[i] = myCellIdVtkToSmds[i]; // valid vtk indexes are > = 0
{ // int vtkid = myCells[i]->getVtkId();
// //idCellsOldToNew[i] = myCellIdVtkToSmds[i]; // valid vtk indexes are > = 0 // idCellsOldToNew[vtkid] = i; // old vtkId --> old smdsId (not used in input)
// int vtkid = myCells[i]->getVtkId(); newCellSize++;
// idCellsOldToNew[vtkid] = i; // old vtkId --> old smdsId (not used in input)
newCellSize++;
}
} }
}
if (areNodesModified) if (areNodesModified)
myGrid->compactGrid(idNodesOldToNew, newNodeSize, idCellsOldToNew, newCellSize); myGrid->compactGrid(idNodesOldToNew, newNodeSize, idCellsOldToNew, newCellSize);
else else
@ -2205,62 +2202,62 @@ void SMESHDS_Mesh::compactMesh()
int nbVtkPts = myGrid->GetNumberOfPoints(); int nbVtkPts = myGrid->GetNumberOfPoints();
nbVtkCells = myGrid->GetNumberOfCells(); nbVtkCells = myGrid->GetNumberOfCells();
if (nbVtkPts != newNodeSize) if (nbVtkPts != newNodeSize)
{ {
MESSAGE("===> nbVtkPts != newNodeSize " << nbVtkPts << " " << newNodeSize); MESSAGE("===> nbVtkPts != newNodeSize " << nbVtkPts << " " << newNodeSize);
if (nbVtkPts > newNodeSize) newNodeSize = nbVtkPts; // several points with same SMDS Id if (nbVtkPts > newNodeSize) newNodeSize = nbVtkPts; // several points with same SMDS Id
} }
if (nbVtkCells != newCellSize) if (nbVtkCells != newCellSize)
{ {
MESSAGE("===> nbVtkCells != newCellSize " << nbVtkCells << " " << newCellSize); MESSAGE("===> nbVtkCells != newCellSize " << nbVtkCells << " " << newCellSize);
if (nbVtkCells > newCellSize) newCellSize = nbVtkCells; // several cells with same SMDS Id if (nbVtkCells > newCellSize) newCellSize = nbVtkCells; // several cells with same SMDS Id
} }
// --- SMDS_MeshNode and myNodes (id in SMDS and in VTK are the same), myNodeIdFactory // --- SMDS_MeshNode and myNodes (id in SMDS and in VTK are the same), myNodeIdFactory
if (areNodesModified) if (areNodesModified)
{
//MESSAGE("-------------- modify myNodes");
SetOfNodes newNodes;
newNodes.resize(newNodeSize+1,0); // 0 not used, SMDS numbers 1..n
int newSmdsId = 0;
for (int i = 0; i < nbNodes; i++)
{ {
MESSAGE("-------------- modify myNodes"); if (myNodes[i])
SetOfNodes newNodes; {
newNodes.resize(newNodeSize+1,0); // 0 not used, SMDS numbers 1..n newSmdsId++; // SMDS id start to 1
int newSmdsId = 0; int oldVtkId = myNodes[i]->getVtkId();
for (int i = 0; i < nbNodes; i++) int newVtkId = idNodesOldToNew[oldVtkId];
{ //MESSAGE("myNodes["<< i << "] vtkId " << oldVtkId << " --> " << newVtkId);
if (myNodes[i]) myNodes[i]->setVtkId(newVtkId);
{ myNodes[i]->setId(newSmdsId);
newSmdsId++; // SMDS id start to 1 newNodes[newSmdsId] = myNodes[i];
int oldVtkId = myNodes[i]->getVtkId(); //MESSAGE("myNodes["<< i << "] --> newNodes[" << newSmdsId << "]");
int newVtkId = idNodesOldToNew[oldVtkId]; }
//MESSAGE("myNodes["<< i << "] vtkId " << oldVtkId << " --> " << newVtkId);
myNodes[i]->setVtkId(newVtkId);
myNodes[i]->setId(newSmdsId);
newNodes[newSmdsId] = myNodes[i];
//MESSAGE("myNodes["<< i << "] --> newNodes[" << newSmdsId << "]");
}
}
myNodes.swap(newNodes);
this->myNodeIDFactory->emptyPool(newSmdsId); // newSmdsId = number of nodes
MESSAGE("myNodes.size " << myNodes.size());
} }
myNodes.swap(newNodes);
this->myNodeIDFactory->emptyPool(newSmdsId); // newSmdsId = number of nodes
//MESSAGE("myNodes.size " << myNodes.size());
}
// --- SMDS_MeshCell, myCellIdVtkToSmds, myCellIdSmdsToVtk, myCells // --- SMDS_MeshCell, myCellIdVtkToSmds, myCellIdSmdsToVtk, myCells
int vtkIndexSize = myCellIdVtkToSmds.size(); int vtkIndexSize = myCellIdVtkToSmds.size();
int maxVtkId = -1; int maxVtkId = -1;
for (int oldVtkId = 0; oldVtkId < vtkIndexSize; oldVtkId++) for (int oldVtkId = 0; oldVtkId < vtkIndexSize; oldVtkId++)
{
int oldSmdsId = this->myCellIdVtkToSmds[oldVtkId];
if (oldSmdsId > 0)
{ {
int oldSmdsId = this->myCellIdVtkToSmds[oldVtkId]; int newVtkId = idCellsOldToNew[oldVtkId];
if (oldSmdsId > 0) if (newVtkId > maxVtkId)
{ maxVtkId = newVtkId;
int newVtkId = idCellsOldToNew[oldVtkId]; //MESSAGE("myCells["<< oldSmdsId << "] vtkId " << oldVtkId << " --> " << newVtkId);
if (newVtkId > maxVtkId) myCells[oldSmdsId]->setVtkId(newVtkId);
maxVtkId = newVtkId;
//MESSAGE("myCells["<< oldSmdsId << "] vtkId " << oldVtkId << " --> " << newVtkId);
myCells[oldSmdsId]->setVtkId(newVtkId);
}
} }
// MESSAGE("myCells.size()=" << myCells.size() }
// << " myCellIdSmdsToVtk.size()=" << myCellIdSmdsToVtk.size() // MESSAGE("myCells.size()=" << myCells.size()
// << " myCellIdVtkToSmds.size()=" << myCellIdVtkToSmds.size() ); // << " myCellIdSmdsToVtk.size()=" << myCellIdSmdsToVtk.size()
// << " myCellIdVtkToSmds.size()=" << myCellIdVtkToSmds.size() );
SetOfCells newCells; SetOfCells newCells;
//vector<int> newSmdsToVtk; //vector<int> newSmdsToVtk;
@ -2292,8 +2289,7 @@ void SMESHDS_Mesh::compactMesh()
myCells.swap(newCells); myCells.swap(newCells);
//myCellIdSmdsToVtk.swap(newSmdsToVtk); //myCellIdSmdsToVtk.swap(newSmdsToVtk);
myCellIdVtkToSmds.swap(newVtkToSmds); myCellIdVtkToSmds.swap(newVtkToSmds);
MESSAGE("myCells.size()=" << myCells.size() //MESSAGE("myCells.size()="<< myCells.size()<<" myCellIdVtkToSmds.size()="<<myCellIdVtkToSmds.size() );
<< " myCellIdVtkToSmds.size()=" << myCellIdVtkToSmds.size() );
this->myElementIDFactory->emptyPool(newSmdsId); this->myElementIDFactory->emptyPool(newSmdsId);
this->myScript->SetModified(true); // notify GUI client for buildPrs when update this->myScript->SetModified(true); // notify GUI client for buildPrs when update

View File

@ -1649,19 +1649,17 @@ namespace
if(!anIO.IsNull()){ if(!anIO.IsNull()){
_PTR(SObject) SO = aStudy->FindObjectID( It.Value()->getEntry() ); _PTR(SObject) SO = aStudy->FindObjectID( It.Value()->getEntry() );
if ( SO ) { if ( SO ) {
CORBA::Object_var aObject = SMESH::SObjectToObject( SO ); CORBA::Object_var aObject = SMESH::SObjectToObject( SO );
SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( aObject ); SMESH::SMESH_IDSource_var anIDSrc = SMESH::SMESH_IDSource::_narrow( aObject );
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( aObject ); if ( !anIDSrc->_is_nil() ) {
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aObject ); if ( SMESH_Actor *anActor = SMESH::FindActorByEntry( anIO->getEntry()) ) {
if ( !aMesh->_is_nil() || !aSubMesh->_is_nil() || !aGroup->_is_nil() ) { QString functorName = functorToString( anActor->GetFunctor() );
if ( SMESH_Actor *anActor = SMESH::FindActorByEntry(anIO->getEntry()) ) { anActor->SetControlMode( aControl );
anActor->SetControlMode(aControl); anActor->GetScalarBarActor()->SetTitle( functorName.toLatin1().constData() );
anActor->GetScalarBarActor()->SetTitle( functorToString( anActor->GetFunctor() ).toLatin1().constData() );
SMESH::RepaintCurrentView(); SMESH::RepaintCurrentView();
#ifndef DISABLE_PLOT2DVIEWER #ifndef DISABLE_PLOT2DVIEWER
if ( anActor->GetPlot2Histogram() ) { if ( anActor->GetPlot2Histogram() ) {
SPlot2d_Histogram* aHistogram = anActor->UpdatePlot2Histogram(); SPlot2d_Histogram* aHistogram = anActor->UpdatePlot2Histogram();
QString functorName = functorToString( anActor->GetFunctor() );
QString aHistogramName("%1 : %2"); QString aHistogramName("%1 : %2");
aHistogramName = aHistogramName.arg( anIO->getName() ).arg( functorName ); aHistogramName = aHistogramName.arg( anIO->getName() ).arg( functorName );
aHistogram->setName( aHistogramName ); aHistogram->setName( aHistogramName );
@ -1956,7 +1954,7 @@ SalomeApp_Module( "SMESH" )
{ {
CORBA::Boolean anIsEmbeddedMode; CORBA::Boolean anIsEmbeddedMode;
myComponentSMESH = SMESH_Client::GetSMESHGen(getApp()->orb(),anIsEmbeddedMode); myComponentSMESH = SMESH_Client::GetSMESHGen(getApp()->orb(),anIsEmbeddedMode);
MESSAGE("-------------------------------> anIsEmbeddedMode=" << anIsEmbeddedMode); //MESSAGE("-------------------------------> anIsEmbeddedMode=" << anIsEmbeddedMode);
// 0019923: EDF 765 SMESH : default values of hypothesis // 0019923: EDF 765 SMESH : default values of hypothesis
SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this); SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this);
@ -2596,6 +2594,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
case SMESHOp::OpShow: case SMESHOp::OpShow:
case SMESHOp::OpShowOnly: case SMESHOp::OpShowOnly:
{ {
SUIT_OverrideCursor wc;
SMESH::EDisplaing anAction; SMESH::EDisplaing anAction;
switch (theCommandID) { switch (theCommandID) {
case SMESHOp::OpHide: anAction = SMESH::eErase; break; case SMESHOp::OpHide: anAction = SMESH::eErase; break;
@ -2610,7 +2609,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
if ( theCommandID==SMESHOp::OpShowOnly ) if ( theCommandID==SMESHOp::OpShowOnly )
{ {
MESSAGE("anAction = SMESH::eDisplayOnly"); //MESSAGE("anAction = SMESH::eDisplayOnly");
startOperation( myEraseAll ); startOperation( myEraseAll );
} }
@ -2639,7 +2638,6 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
// PAL13338 + PAL15161 --> // PAL13338 + PAL15161 -->
if ( ( theCommandID==SMESHOp::OpShow || theCommandID==SMESHOp::OpShowOnly ) && !checkLock(aStudy)) { if ( ( theCommandID==SMESHOp::OpShow || theCommandID==SMESHOp::OpShowOnly ) && !checkLock(aStudy)) {
MESSAGE("anAction = SMESH::eDisplayOnly");
SMESH::UpdateView(); SMESH::UpdateView();
SMESHGUI::GetSMESHGUI()->EmitSignalVisibilityChanged(); SMESHGUI::GetSMESHGUI()->EmitSignalVisibilityChanged();
} }
@ -2650,7 +2648,6 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
} }
if (anAction == SMESH::eErase) { if (anAction == SMESH::eErase) {
MESSAGE("anAction == SMESH::eErase");
SALOME_ListIO l1; SALOME_ListIO l1;
aSel->setSelectedObjects( l1 ); aSel->setSelectedObjects( l1 );
} }
@ -2670,9 +2667,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
( new SMESHGUI_NodesDlg( this ) )->show(); ( new SMESHGUI_NodesDlg( this ) )->show();
} }
else { else {
SUIT_MessageBox::warning(desktop(), SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"),tr("SMESH_WRN_VIEWER_VTK"));
tr("SMESH_WRN_WARNING"),
tr("SMESH_WRN_VIEWER_VTK"));
} }
break; break;
} }
@ -2706,8 +2701,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
{ {
if ( !vtkwnd ) if ( !vtkwnd )
{ {
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), tr( "NOT_A_VTK_VIEWER" ) );
tr( "NOT_A_VTK_VIEWER" ) );
break; break;
} }
@ -2737,8 +2731,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
{ {
if ( !vtkwnd ) if ( !vtkwnd )
{ {
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), tr( "NOT_A_VTK_VIEWER" ) );
tr( "NOT_A_VTK_VIEWER" ) );
break; break;
} }
@ -2767,8 +2760,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
( new SMESHGUI_SmoothingDlg( this ) )->show(); ( new SMESHGUI_SmoothingDlg( this ) )->show();
} }
else { else {
SUIT_MessageBox::warning(desktop(), SUIT_MessageBox::warning(desktop(), tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
} }
break; break;
} }
@ -2779,8 +2771,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
EmitSignalDeactivateDialog(); EmitSignalDeactivateDialog();
( new SMESHGUI_ExtrusionDlg ( this ) )->show(); ( new SMESHGUI_ExtrusionDlg ( this ) )->show();
} else { } else {
SUIT_MessageBox::warning(desktop(), SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
} }
break; break;
} }
@ -2791,8 +2782,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
EmitSignalDeactivateDialog(); EmitSignalDeactivateDialog();
( new SMESHGUI_ExtrusionAlongPathDlg( this ) )->show(); ( new SMESHGUI_ExtrusionAlongPathDlg( this ) )->show();
} else { } else {
SUIT_MessageBox::warning(desktop(), SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
} }
break; break;
} }
@ -2804,8 +2794,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
( new SMESHGUI_RevolutionDlg( this ) )->show(); ( new SMESHGUI_RevolutionDlg( this ) )->show();
} }
else { else {
SUIT_MessageBox::warning(desktop(), SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
} }
break; break;
} }
@ -2819,8 +2808,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
( new SMESHGUI_MeshPatternDlg( this ) )->show(); ( new SMESHGUI_MeshPatternDlg( this ) )->show();
} }
else { else {
SUIT_MessageBox::warning(desktop(), SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
} }
break; break;
} }
@ -2837,8 +2825,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
{ {
if ( !vtkwnd ) if ( !vtkwnd )
{ {
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
tr( "NOT_A_VTK_VIEWER" ) );
break; break;
} }
@ -2865,8 +2852,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
{ {
if ( !vtkwnd ) if ( !vtkwnd )
{ {
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
tr( "NOT_A_VTK_VIEWER" ) );
break; break;
} }
@ -2943,8 +2929,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
{ {
if ( !vtkwnd ) if ( !vtkwnd )
{ {
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
tr( "NOT_A_VTK_VIEWER" ) );
break; break;
} }
@ -3000,8 +2985,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
{ {
if ( !vtkwnd ) if ( !vtkwnd )
{ {
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
tr( "NOT_A_VTK_VIEWER" ) );
break; break;
} }
@ -3041,8 +3025,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
{ {
if ( !vtkwnd ) if ( !vtkwnd )
{ {
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
tr( "NOT_A_VTK_VIEWER" ) );
break; break;
} }
@ -3080,8 +3063,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
{ {
if ( !vtkwnd ) if ( !vtkwnd )
{ {
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
tr( "NOT_A_VTK_VIEWER" ) );
break; break;
} }
@ -3223,8 +3205,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
( new SMESHGUI_AddMeshElementDlg( this, type ) )->show(); ( new SMESHGUI_AddMeshElementDlg( this, type ) )->show();
} }
else { else {
SUIT_MessageBox::warning(desktop(), SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
} }
break; break;
} }
@ -3236,8 +3217,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
( new SMESHGUI_CreatePolyhedralVolumeDlg( this ) )->show(); ( new SMESHGUI_CreatePolyhedralVolumeDlg( this ) )->show();
} }
else { else {
SUIT_MessageBox::warning(SMESHGUI::desktop(), SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
} }
break; break;
} }

View File

@ -378,7 +378,7 @@ namespace SMESH
return false; return false;
if ( algoData->BasicHypos.contains( hypType )) if ( algoData->BasicHypos.contains( hypType ))
return true; return true;
if ( algoData->OptionalHypos.contains( hypType)) { if ( algoData->OptionalHypos.contains( hypType )) {
isAuxiliary = true; isAuxiliary = true;
return true; return true;
} }

View File

@ -854,7 +854,7 @@ namespace SMESH
bool Update(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay) bool Update(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay)
{ {
MESSAGE("Update"); //MESSAGE("Update");
_PTR(Study) aStudy = GetActiveStudyDocument(); _PTR(Study) aStudy = GetActiveStudyDocument();
CORBA::Long anId = aStudy->StudyId(); CORBA::Long anId = aStudy->StudyId();
if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry())) { if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry())) {
@ -867,7 +867,7 @@ namespace SMESH
bool UpdateNulData(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay) bool UpdateNulData(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay)
{ {
MESSAGE("UpdateNulData"); //MESSAGE("UpdateNulData");
_PTR(Study) aStudy = GetActiveStudyDocument(); _PTR(Study) aStudy = GetActiveStudyDocument();
CORBA::Long anId = aStudy->StudyId(); CORBA::Long anId = aStudy->StudyId();
if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry(), true)) { if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry(), true)) {
@ -878,7 +878,8 @@ namespace SMESH
return false; return false;
} }
void UpdateSelectionProp( SMESHGUI* theModule ) { void UpdateSelectionProp( SMESHGUI* theModule )
{
if( !theModule ) if( !theModule )
return; return;
@ -905,25 +906,29 @@ namespace SMESH
return; return;
} }
QColor aHiColor = mgr->colorValue( "SMESH", "selection_object_color", Qt::white ), QColor
aSelColor = mgr->colorValue( "SMESH", "selection_element_color", Qt::yellow ), aHiColor = mgr->colorValue( "SMESH", "selection_object_color", Qt::white ),
aPreColor = mgr->colorValue( "SMESH", "highlight_color", Qt::cyan ); aSelColor = mgr->colorValue( "SMESH", "selection_element_color", Qt::yellow ),
aPreColor = mgr->colorValue( "SMESH", "highlight_color", Qt::cyan );
int aElem0DSize = mgr->integerValue("SMESH", "elem0d_size", 5); int aElem0DSize = mgr->integerValue("SMESH", "elem0d_size", 5);
// int aBallSize = mgr->integerValue("SMESH", "ball_elem_size", 5); // int aBallSize = mgr->integerValue("SMESH", "ball_elem_size", 5);
int aLineWidth = mgr->integerValue("SMESH", "element_width", 1); int aLineWidth = mgr->integerValue("SMESH", "element_width", 1);
int maxSize = aElem0DSize; int maxSize = aElem0DSize;
if (aElem0DSize > maxSize) maxSize = aElem0DSize; if (aElem0DSize > maxSize) maxSize = aElem0DSize;
if (aLineWidth > maxSize) maxSize = aLineWidth; if (aLineWidth > maxSize) maxSize = aLineWidth;
// if (aBallSize > maxSize) maxSize = aBallSize; // if (aBallSize > maxSize) maxSize = aBallSize;
double SP1 = mgr->doubleValue( "SMESH", "selection_precision_node", 0.025 ), double
SP2 = mgr->doubleValue( "SMESH", "selection_precision_element", 0.001 ), SP1 = mgr->doubleValue( "SMESH", "selection_precision_node", 0.025 ),
SP3 = mgr->doubleValue( "SMESH", "selection_precision_object", 0.025 ); SP2 = mgr->doubleValue( "SMESH", "selection_precision_element", 0.001 ),
SP3 = mgr->doubleValue( "SMESH", "selection_precision_object", 0.025 );
for ( int i=0, n=views.count(); i<n; i++ ){ for ( int i=0, n=views.count(); i<n; i++ )
{
// update VTK viewer properties // update VTK viewer properties
if(SVTK_ViewWindow* aVtkView = GetVtkViewWindow( views[i] )){ if ( SVTK_ViewWindow* aVtkView = GetVtkViewWindow( views[i] ))
{
// mesh element selection // mesh element selection
aVtkView->SetSelectionProp(aSelColor.red()/255., aVtkView->SetSelectionProp(aSelColor.red()/255.,
aSelColor.green()/255., aSelColor.green()/255.,
@ -940,8 +945,8 @@ namespace SMESH
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors()); VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
vtkActorCollection *aCollection = aCopy.GetActors(); vtkActorCollection *aCollection = aCopy.GetActors();
aCollection->InitTraversal(); aCollection->InitTraversal();
while(vtkActor *anAct = aCollection->GetNextActor()){ while ( vtkActor *anAct = aCollection->GetNextActor() ) {
if(SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct)){ if ( SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct) ) {
anActor->SetHighlightColor(aHiColor.red()/255., anActor->SetHighlightColor(aHiColor.red()/255.,
aHiColor.green()/255., aHiColor.green()/255.,
aHiColor.blue()/255.); aHiColor.blue()/255.);
@ -1076,8 +1081,9 @@ namespace SMESH
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void SetPointRepresentation(bool theIsVisible){ void SetPointRepresentation(bool theIsVisible)
if(SVTK_ViewWindow* aViewWindow = GetCurrentVtkView()){ {
if ( SVTK_ViewWindow* aViewWindow = GetCurrentVtkView() ) {
vtkRenderer *aRenderer = aViewWindow->getRenderer(); vtkRenderer *aRenderer = aViewWindow->getRenderer();
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors()); VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
vtkActorCollection *aCollection = aCopy.GetActors(); vtkActorCollection *aCollection = aCopy.GetActors();
@ -1094,8 +1100,9 @@ namespace SMESH
} }
void SetPickable(SMESH_Actor* theActor){ void SetPickable(SMESH_Actor* theActor)
if(SVTK_ViewWindow* aWnd = GetCurrentVtkView()){ {
if ( SVTK_ViewWindow* aWnd = GetCurrentVtkView() ) {
int anIsAllPickable = (theActor == NULL); int anIsAllPickable = (theActor == NULL);
vtkRenderer *aRenderer = aWnd->getRenderer(); vtkRenderer *aRenderer = aWnd->getRenderer();
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors()); VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
@ -1116,9 +1123,9 @@ namespace SMESH
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int GetNameOfSelectedNodes(SVTK_Selector* theSelector, int GetNameOfSelectedNodes(SVTK_Selector* theSelector,
const Handle(SALOME_InteractiveObject)& theIO, const Handle(SALOME_InteractiveObject)& theIO,
QString& theName) QString& theName)
{ {
theName = ""; theName = "";
TColStd_IndexedMapOfInteger aMapIndex; TColStd_IndexedMapOfInteger aMapIndex;
@ -1204,7 +1211,8 @@ namespace SMESH
return -1; return -1;
} }
int GetNameOfSelectedNodes(LightApp_SelectionMgr *theMgr, QString& theName){ int GetNameOfSelectedNodes(LightApp_SelectionMgr *theMgr, QString& theName)
{
theName = ""; theName = "";
SALOME_ListIO selected; theMgr->selectedObjects( selected ); SALOME_ListIO selected; theMgr->selectedObjects( selected );
if(selected.Extent() == 1){ if(selected.Extent() == 1){
@ -1215,9 +1223,9 @@ namespace SMESH
} }
int GetNameOfSelectedElements(LightApp_SelectionMgr *theMgr, int GetNameOfSelectedElements(LightApp_SelectionMgr * theMgr,
const Handle(SALOME_InteractiveObject)& theIO, const Handle(SALOME_InteractiveObject)& theIO,
QString& theName) QString& theName)
{ {
theName = ""; theName = "";
if(theIO->hasEntry()){ if(theIO->hasEntry()){
@ -1342,13 +1350,13 @@ namespace SMESH
} }
double aBoundPoints[8][3] = { {theBounds[0],theBounds[2],theBounds[4]}, double aBoundPoints[8][3] = { {theBounds[0],theBounds[2],theBounds[4]},
{theBounds[1],theBounds[2],theBounds[4]}, {theBounds[1],theBounds[2],theBounds[4]},
{theBounds[0],theBounds[3],theBounds[4]}, {theBounds[0],theBounds[3],theBounds[4]},
{theBounds[1],theBounds[3],theBounds[4]}, {theBounds[1],theBounds[3],theBounds[4]},
{theBounds[0],theBounds[2],theBounds[5]}, {theBounds[0],theBounds[2],theBounds[5]},
{theBounds[1],theBounds[2],theBounds[5]}, {theBounds[1],theBounds[2],theBounds[5]},
{theBounds[0],theBounds[3],theBounds[5]}, {theBounds[0],theBounds[3],theBounds[5]},
{theBounds[1],theBounds[3],theBounds[5]}}; {theBounds[1],theBounds[3],theBounds[5]}};
int aMaxId = 0; int aMaxId = 0;
theMaxBoundPrj = vtkMath::Dot(theDirection,aBoundPoints[aMaxId]); theMaxBoundPrj = vtkMath::Dot(theDirection,aBoundPoints[aMaxId]);
@ -1445,8 +1453,9 @@ namespace SMESH
*/ */
//================================================================================ //================================================================================
void ClearPlot2Viewers( SUIT_ViewWindow* theWindow ) { void ClearPlot2Viewers( SUIT_ViewWindow* theWindow )
if(SVTK_ViewWindow* aViewWindow = GetVtkViewWindow(theWindow)){ {
if ( SVTK_ViewWindow* aViewWindow = GetVtkViewWindow(theWindow) ) {
vtkRenderer *aRenderer = aViewWindow->getRenderer(); vtkRenderer *aRenderer = aViewWindow->getRenderer();
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors()); VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
vtkActorCollection *aCollection = aCopy.GetActors(); vtkActorCollection *aCollection = aCopy.GetActors();
@ -1460,7 +1469,7 @@ namespace SMESH
} }
} }
} }
#endif #endif
} // end of namespace SMESH } // end of namespace SMESH

View File

@ -104,7 +104,7 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
QString aResName = atts.value("resources"); QString aResName = atts.value("resources");
if (aResName != "") if (aResName != "")
{ {
MESSAGE("Loading Resources " << aResName.toLatin1().data()); //MESSAGE("Loading Resources " << aResName.toLatin1().data());
SUIT_ResourceMgr* resMgr = SMESHGUI::resourceMgr(); SUIT_ResourceMgr* resMgr = SMESHGUI::resourceMgr();
QString lang = resMgr->stringValue( resMgr->langSection(), "language", "en" ); QString lang = resMgr->stringValue( resMgr->langSection(), "language", "en" );
resMgr->loadTranslator( "resources", QString( "%1_msg_%2.qm" ).arg( aResName, lang ) ); resMgr->loadTranslator( "resources", QString( "%1_msg_%2.qm" ).arg( aResName, lang ) );

View File

@ -45,7 +45,6 @@ SMESH_2D_Algo_i::SMESH_2D_Algo_i( PortableServer::POA_ptr thePOA )
SMESH_Hypothesis_i( thePOA ), SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA ) SMESH_Algo_i( thePOA )
{ {
MESSAGE( "SMESH_2D_Algo_i::SMESH_2D_Algo_i" );
} }
//============================================================================= //=============================================================================
@ -58,7 +57,6 @@ SMESH_2D_Algo_i::SMESH_2D_Algo_i( PortableServer::POA_ptr thePOA )
SMESH_2D_Algo_i::~SMESH_2D_Algo_i() SMESH_2D_Algo_i::~SMESH_2D_Algo_i()
{ {
MESSAGE( "SMESH_2D_Algo_i::~SMESH_2D_Algo_i" );
} }
//================================================================================ //================================================================================

View File

@ -45,7 +45,6 @@ SMESH_3D_Algo_i::SMESH_3D_Algo_i( PortableServer::POA_ptr thePOA )
SMESH_Hypothesis_i( thePOA ), SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA ) SMESH_Algo_i( thePOA )
{ {
MESSAGE( "SMESH_3D_Algo_i::SMESH_3D_Algo_i" );
} }
//============================================================================= //=============================================================================
@ -58,7 +57,6 @@ SMESH_3D_Algo_i::SMESH_3D_Algo_i( PortableServer::POA_ptr thePOA )
SMESH_3D_Algo_i::~SMESH_3D_Algo_i() SMESH_3D_Algo_i::~SMESH_3D_Algo_i()
{ {
MESSAGE( "SMESH_3D_Algo_i::~SMESH_3D_Algo_i" );
} }
//================================================================================ //================================================================================

View File

@ -48,7 +48,6 @@ SMESH_Algo_i::SMESH_Algo_i( PortableServer::POA_ptr thePOA )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) SMESH_Hypothesis_i( thePOA )
{ {
MESSAGE( "SMESH_Algo_i::SMESH_Algo_i" );
} }
//============================================================================= //=============================================================================
@ -61,7 +60,6 @@ SMESH_Algo_i::SMESH_Algo_i( PortableServer::POA_ptr thePOA )
SMESH_Algo_i::~SMESH_Algo_i() SMESH_Algo_i::~SMESH_Algo_i()
{ {
MESSAGE( "SMESH_Algo_i::~SMESH_Algo_i" );
} }
//============================================================================= //=============================================================================
@ -74,7 +72,6 @@ SMESH_Algo_i::~SMESH_Algo_i()
SMESH::ListOfHypothesisName* SMESH_Algo_i::GetCompatibleHypothesis() SMESH::ListOfHypothesisName* SMESH_Algo_i::GetCompatibleHypothesis()
{ {
MESSAGE( "SMESH_Algo_i::GetCompatibleHypothesis" );
SMESH::ListOfHypothesisName_var listOfHypothesis = new SMESH::ListOfHypothesisName; SMESH::ListOfHypothesisName_var listOfHypothesis = new SMESH::ListOfHypothesisName;
const vector<string>& hypList = ( ( ::SMESH_Algo* )myBaseImpl )->GetCompatibleHypothesis(); const vector<string>& hypList = ( ( ::SMESH_Algo* )myBaseImpl )->GetCompatibleHypothesis();
int nbHyp = hypList.size(); int nbHyp = hypList.size();

View File

@ -285,7 +285,6 @@ SMESH_Gen_i::SMESH_Gen_i( CORBA::ORB_ptr orb,
const char* interfaceName ) const char* interfaceName )
: Engines_Component_i( orb, poa, contId, instanceName, interfaceName ) : Engines_Component_i( orb, poa, contId, instanceName, interfaceName )
{ {
MESSAGE( "SMESH_Gen_i::SMESH_Gen_i : standard constructor" );
myOrb = CORBA::ORB::_duplicate(orb); myOrb = CORBA::ORB::_duplicate(orb);
myPoa = PortableServer::POA::_duplicate(poa); myPoa = PortableServer::POA::_duplicate(poa);
@ -335,8 +334,6 @@ SMESH_Gen_i::SMESH_Gen_i( CORBA::ORB_ptr orb,
SMESH_Gen_i::~SMESH_Gen_i() SMESH_Gen_i::~SMESH_Gen_i()
{ {
MESSAGE( "SMESH_Gen_i::~SMESH_Gen_i" );
// delete hypothesis creators // delete hypothesis creators
map<string, GenericHypothesisCreator_i*>::iterator itHyp, itHyp2; map<string, GenericHypothesisCreator_i*>::iterator itHyp, itHyp2;
for (itHyp = myHypCreatorMap.begin(); itHyp != myHypCreatorMap.end(); itHyp++) for (itHyp = myHypCreatorMap.begin(); itHyp != myHypCreatorMap.end(); itHyp++)
@ -512,7 +509,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh()
// create a new mesh object servant, store it in a map in study context // create a new mesh object servant, store it in a map in study context
SMESH_Mesh_i* meshServant = new SMESH_Mesh_i( GetPOA(), this, GetCurrentStudyID() ); SMESH_Mesh_i* meshServant = new SMESH_Mesh_i( GetPOA(), this, GetCurrentStudyID() );
// create a new mesh object // create a new mesh object
MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode); if(MYDEBUG) MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode);
meshServant->SetImpl( myGen.CreateMesh( GetCurrentStudyID(), myIsEmbeddedMode )); meshServant->SetImpl( myGen.CreateMesh( GetCurrentStudyID(), myIsEmbeddedMode ));
// activate the CORBA servant of Mesh // activate the CORBA servant of Mesh
@ -571,7 +568,6 @@ void SMESH_Gen_i::SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo )
void SMESH_Gen_i::SetEmbeddedMode( CORBA::Boolean theMode ) void SMESH_Gen_i::SetEmbeddedMode( CORBA::Boolean theMode )
{ {
myIsEmbeddedMode = theMode; myIsEmbeddedMode = theMode;
MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode);
if ( !myIsEmbeddedMode ) { if ( !myIsEmbeddedMode ) {
//PAL10867: disable signals catching with "noexcepthandler" option //PAL10867: disable signals catching with "noexcepthandler" option

View File

@ -72,7 +72,6 @@ SMESH_Group_i::SMESH_Group_i( PortableServer::POA_ptr thePOA,
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_GroupBase_i( thePOA, theMeshServant, theLocalID ) SMESH_GroupBase_i( thePOA, theMeshServant, theLocalID )
{ {
//MESSAGE("SMESH_Group_i; this = "<<this );
} }
SMESH_GroupOnGeom_i::SMESH_GroupOnGeom_i( PortableServer::POA_ptr thePOA, SMESH_GroupOnGeom_i::SMESH_GroupOnGeom_i( PortableServer::POA_ptr thePOA,
@ -81,7 +80,6 @@ SMESH_GroupOnGeom_i::SMESH_GroupOnGeom_i( PortableServer::POA_ptr thePOA,
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_GroupBase_i( thePOA, theMeshServant, theLocalID ) SMESH_GroupBase_i( thePOA, theMeshServant, theLocalID )
{ {
//MESSAGE("SMESH_GroupOnGeom_i; this = "<<this );
} }
SMESH_GroupOnFilter_i::SMESH_GroupOnFilter_i( PortableServer::POA_ptr thePOA, SMESH_GroupOnFilter_i::SMESH_GroupOnFilter_i( PortableServer::POA_ptr thePOA,
@ -90,7 +88,6 @@ SMESH_GroupOnFilter_i::SMESH_GroupOnFilter_i( PortableServer::POA_ptr thePOA,
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_GroupBase_i( thePOA, theMeshServant, theLocalID ) SMESH_GroupBase_i( thePOA, theMeshServant, theLocalID )
{ {
//MESSAGE("SMESH_GroupOnGeom_i; this = "<<this );
} }
//============================================================================= //=============================================================================
@ -176,7 +173,6 @@ char* SMESH_GroupBase_i::GetName()
::SMESH_Group* aGroup = GetSmeshGroup(); ::SMESH_Group* aGroup = GetSmeshGroup();
if (aGroup) if (aGroup)
return CORBA::string_dup (aGroup->GetName()); return CORBA::string_dup (aGroup->GetName());
MESSAGE("get name of a vague group");
return CORBA::string_dup( "NO_NAME" ); return CORBA::string_dup( "NO_NAME" );
} }
@ -203,7 +199,6 @@ SMESH::ElementType SMESH_GroupBase_i::GetType()
} }
return aType; return aType;
} }
MESSAGE("get type of a vague group");
return SMESH::ALL; return SMESH::ALL;
} }
@ -222,7 +217,6 @@ CORBA::Long SMESH_GroupBase_i::Size()
SMESHDS_GroupBase* aGroupDS = GetGroupDS(); SMESHDS_GroupBase* aGroupDS = GetGroupDS();
if (aGroupDS) if (aGroupDS)
return aGroupDS->Extent(); return aGroupDS->Extent();
MESSAGE("get size of a vague group");
return 0; return 0;
} }
@ -240,7 +234,6 @@ CORBA::Boolean SMESH_GroupBase_i::IsEmpty()
SMESHDS_GroupBase* aGroupDS = GetGroupDS(); SMESHDS_GroupBase* aGroupDS = GetGroupDS();
if (aGroupDS) if (aGroupDS)
return aGroupDS->IsEmpty(); return aGroupDS->IsEmpty();
MESSAGE("checking IsEmpty of a vague group");
return true; return true;
} }
@ -280,8 +273,6 @@ void SMESH_Group_i::Clear()
return; return;
} }
Modified(); // notify dependent Filter with FT_BelongToMeshGroup criterion Modified(); // notify dependent Filter with FT_BelongToMeshGroup criterion
MESSAGE("attempt to clear a vague group");
} }
//============================================================================= //=============================================================================
@ -298,7 +289,6 @@ CORBA::Boolean SMESH_GroupBase_i::Contains( CORBA::Long theID )
SMESHDS_GroupBase* aGroupDS = GetGroupDS(); SMESHDS_GroupBase* aGroupDS = GetGroupDS();
if (aGroupDS) if (aGroupDS)
return aGroupDS->Contains(theID); return aGroupDS->Contains(theID);
MESSAGE("attempt to check contents of a vague group");
return false; return false;
} }
@ -631,7 +621,6 @@ SALOMEDS::Color SMESH_GroupBase_i::GetColor()
return aColor; return aColor;
} }
MESSAGE("get color of a group");
return SALOMEDS::Color(); return SALOMEDS::Color();
} }
@ -889,7 +878,6 @@ SMESH::long_array* SMESH_GroupOnFilter_i::GetListOfID()
if ( 0 < aRes->length() && aRes->length() < 100 ) // for comfortable testing ;) if ( 0 < aRes->length() && aRes->length() < 100 ) // for comfortable testing ;)
std::sort( &aRes[0], &aRes[0] + aRes->length() ); std::sort( &aRes[0], &aRes[0] + aRes->length() );
} }
MESSAGE("get list of IDs of a vague group");
return aRes._retn(); return aRes._retn();
} }

View File

@ -108,7 +108,6 @@ SMESH_Mesh_i::SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
CORBA::Long studyId ) CORBA::Long studyId )
: SALOME::GenericObj_i( thePOA ) : SALOME::GenericObj_i( thePOA )
{ {
MESSAGE("SMESH_Mesh_i");
_impl = NULL; _impl = NULL;
_gen_i = gen_i; _gen_i = gen_i;
_id = _idGenerator++; _id = _idGenerator++;
@ -127,8 +126,6 @@ SMESH_Mesh_i::SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
SMESH_Mesh_i::~SMESH_Mesh_i() SMESH_Mesh_i::~SMESH_Mesh_i()
{ {
MESSAGE("~SMESH_Mesh_i");
// destroy groups // destroy groups
map<int, SMESH::SMESH_GroupBase_ptr>::iterator itGr; map<int, SMESH::SMESH_GroupBase_ptr>::iterator itGr;
for (itGr = _mapGroups.begin(); itGr != _mapGroups.end(); itGr++) for (itGr = _mapGroups.begin(); itGr != _mapGroups.end(); itGr++)
@ -4265,8 +4262,7 @@ CORBA::LongLong SMESH_Mesh_i::GetMeshPtr()
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
CORBA::LongLong pointeur = CORBA::LongLong(_impl); CORBA::LongLong pointeur = CORBA::LongLong(_impl);
if ( MYDEBUG ) if ( MYDEBUG ) MESSAGE("CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() "<<pointeur);
MESSAGE("CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() "<<pointeur);
return pointeur; return pointeur;
} }

View File

@ -1159,7 +1159,6 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
{ {
_src2tgtNodes.clear(); _src2tgtNodes.clear();
MESSAGE("Projection_2D Compute");
if ( !_sourceHypo ) if ( !_sourceHypo )
return false; return false;
@ -1257,7 +1256,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
{ {
// projection in case if the faces are similar in 2D space // projection in case if the faces are similar in 2D space
projDone = projectBy2DSimilarity( tgtFace, srcFace, tgtWires, srcWires, projDone = projectBy2DSimilarity( tgtFace, srcFace, tgtWires, srcWires,
shape2ShapeMap, _src2tgtNodes, is1DComputed); shape2ShapeMap, _src2tgtNodes, is1DComputed );
} }
if ( !projDone ) if ( !projDone )
{ {

View File

@ -72,15 +72,15 @@ using namespace StdMeshers;
//============================================================================= //=============================================================================
/*! /*!
* *
*/ */
//============================================================================= //=============================================================================
StdMeshers_Regular_1D::StdMeshers_Regular_1D(int hypId, int studyId, StdMeshers_Regular_1D::StdMeshers_Regular_1D(int hypId,
int studyId,
SMESH_Gen * gen) SMESH_Gen * gen)
:SMESH_1D_Algo(hypId, studyId, gen) :SMESH_1D_Algo( hypId, studyId, gen )
{ {
MESSAGE("StdMeshers_Regular_1D::StdMeshers_Regular_1D");
_name = "Regular_1D"; _name = "Regular_1D";
_shapeType = (1 << TopAbs_EDGE); _shapeType = (1 << TopAbs_EDGE);
_fpHyp = 0; _fpHyp = 0;
@ -155,7 +155,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
string hypName = theHyp->GetName(); string hypName = theHyp->GetName();
if (hypName == "LocalLength") if ( hypName == "LocalLength" )
{ {
const StdMeshers_LocalLength * hyp = const StdMeshers_LocalLength * hyp =
dynamic_cast <const StdMeshers_LocalLength * >(theHyp); dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
@ -167,7 +167,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
} }
else if (hypName == "MaxLength") else if ( hypName == "MaxLength" )
{ {
const StdMeshers_MaxLength * hyp = const StdMeshers_MaxLength * hyp =
dynamic_cast <const StdMeshers_MaxLength * >(theHyp); dynamic_cast <const StdMeshers_MaxLength * >(theHyp);
@ -182,9 +182,8 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
} }
else if (hypName == "NumberOfSegments") else if ( hypName == "NumberOfSegments" )
{ {
MESSAGE("CheckHypothesis: NumberOfSegments");
const StdMeshers_NumberOfSegments * hyp = const StdMeshers_NumberOfSegments * hyp =
dynamic_cast <const StdMeshers_NumberOfSegments * >(theHyp); dynamic_cast <const StdMeshers_NumberOfSegments * >(theHyp);
ASSERT(hyp); ASSERT(hyp);
@ -218,7 +217,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
} }
else if (hypName == "Arithmetic1D") else if ( hypName == "Arithmetic1D" )
{ {
const StdMeshers_Arithmetic1D * hyp = const StdMeshers_Arithmetic1D * hyp =
dynamic_cast <const StdMeshers_Arithmetic1D * >(theHyp); dynamic_cast <const StdMeshers_Arithmetic1D * >(theHyp);
@ -233,7 +232,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
} }
else if (hypName == "GeometricProgression") else if ( hypName == "GeometricProgression" )
{ {
const StdMeshers_Geometric1D * hyp = const StdMeshers_Geometric1D * hyp =
dynamic_cast <const StdMeshers_Geometric1D * >(theHyp); dynamic_cast <const StdMeshers_Geometric1D * >(theHyp);
@ -248,7 +247,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
} }
else if (hypName == "FixedPoints1D") { else if ( hypName == "FixedPoints1D" ) {
_fpHyp = dynamic_cast <const StdMeshers_FixedPoints1D*>(theHyp); _fpHyp = dynamic_cast <const StdMeshers_FixedPoints1D*>(theHyp);
ASSERT(_fpHyp); ASSERT(_fpHyp);
_hypType = FIXED_POINTS_1D; _hypType = FIXED_POINTS_1D;
@ -258,7 +257,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
} }
else if (hypName == "StartEndLength") else if ( hypName == "StartEndLength" )
{ {
const StdMeshers_StartEndLength * hyp = const StdMeshers_StartEndLength * hyp =
dynamic_cast <const StdMeshers_StartEndLength * >(theHyp); dynamic_cast <const StdMeshers_StartEndLength * >(theHyp);
@ -273,7 +272,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
} }
else if (hypName == "Deflection1D") else if ( hypName == "Deflection1D" )
{ {
const StdMeshers_Deflection1D * hyp = const StdMeshers_Deflection1D * hyp =
dynamic_cast <const StdMeshers_Deflection1D * >(theHyp); dynamic_cast <const StdMeshers_Deflection1D * >(theHyp);
@ -284,7 +283,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
} }
else if (hypName == "AutomaticLength") else if ( hypName == "AutomaticLength" )
{ {
StdMeshers_AutomaticLength * hyp = const_cast<StdMeshers_AutomaticLength *> StdMeshers_AutomaticLength * hyp = const_cast<StdMeshers_AutomaticLength *>
(dynamic_cast <const StdMeshers_AutomaticLength * >(theHyp)); (dynamic_cast <const StdMeshers_AutomaticLength * >(theHyp));
@ -294,7 +293,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
_hypType = MAX_LENGTH; _hypType = MAX_LENGTH;
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
} }
else if (hypName == "Adaptive1D") else if ( hypName == "Adaptive1D" )
{ {
_adaptiveHyp = dynamic_cast < const StdMeshers_Adaptive1D* >(theHyp); _adaptiveHyp = dynamic_cast < const StdMeshers_Adaptive1D* >(theHyp);
ASSERT(_adaptiveHyp); ASSERT(_adaptiveHyp);
@ -352,13 +351,11 @@ static bool computeParamByFunc(Adaptor3d_Curve& C3d,
// never do this way // never do this way
//OSD::SetSignal( true ); //OSD::SetSignal( true );
if (nbSeg <= 0) if ( nbSeg <= 0 )
return false; return false;
MESSAGE( "computeParamByFunc" );
int nbPnt = 1 + nbSeg; int nbPnt = 1 + nbSeg;
vector<double> x(nbPnt, 0.); vector<double> x( nbPnt, 0. );
if ( !buildDistribution( func, 0.0, 1.0, nbSeg, x, 1E-4 )) if ( !buildDistribution( func, 0.0, 1.0, nbSeg, x, 1E-4 ))
return false; return false;
@ -375,7 +372,7 @@ static bool computeParamByFunc(Adaptor3d_Curve& C3d,
for ( int i = 1; i < nbSeg; i++ ) for ( int i = 1; i < nbSeg; i++ )
{ {
double curvLength = length * (x[i] - x[i-1]) * sign; double curvLength = length * (x[i] - x[i-1]) * sign;
double tol = Min( Precision::Confusion(), curvLength / 100. ); double tol = Min( Precision::Confusion(), curvLength / 100. );
GCPnts_AbscissaPoint Discret( tol, C3d, curvLength, prevU ); GCPnts_AbscissaPoint Discret( tol, C3d, curvLength, prevU );
if ( !Discret.IsDone() ) if ( !Discret.IsDone() )
return false; return false;
@ -592,7 +589,6 @@ void StdMeshers_Regular_1D::redistributeNearVertices (SMESH_Mesh & theM
} }
if ( _hypType == NB_SEGMENTS ) if ( _hypType == NB_SEGMENTS )
{ {
MESSAGE("redistributeNearVertices NB_SEGMENTS");
compensateError(0, vertexLength, f, l, theLength, theC3d, theParameters, true ); compensateError(0, vertexLength, f, l, theLength, theC3d, theParameters, true );
} }
else if ( nPar <= 3 ) else if ( nPar <= 3 )
@ -667,7 +663,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
const bool theReverse, const bool theReverse,
bool theConsiderPropagation) bool theConsiderPropagation)
{ {
MESSAGE("computeInternalParameters");
theParams.clear(); theParams.clear();
double f = theFirstU, l = theLastU; double f = theFirstU, l = theLastU;
@ -689,7 +684,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
if ( ! SMESH_Algo::GetSortedNodesOnEdge( theMesh.GetMeshDS(), mainEdge, _quadraticMesh, if ( ! SMESH_Algo::GetSortedNodesOnEdge( theMesh.GetMeshDS(), mainEdge, _quadraticMesh,
mainEdgeParamsOfNodes, SMDSAbs_Edge )) mainEdgeParamsOfNodes, SMDSAbs_Edge ))
return error("Bad node parameters on the source edge of Propagation Of Distribution"); return error("Bad node parameters on the source edge of Propagation Of Distribution");
MESSAGE("mainEdgeParamsOfNodes.size(): " << mainEdgeParamsOfNodes.size());
vector< double > segLen( mainEdgeParamsOfNodes.size() - 1 ); vector< double > segLen( mainEdgeParamsOfNodes.size() - 1 );
double totalLen = 0; double totalLen = 0;
BRepAdaptor_Curve mainEdgeCurve( mainEdge ); BRepAdaptor_Curve mainEdgeCurve( mainEdge );
@ -731,8 +725,8 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
{ {
case LOCAL_LENGTH: case LOCAL_LENGTH:
case MAX_LENGTH: case MAX_LENGTH:
case NB_SEGMENTS: { case NB_SEGMENTS:
MESSAGE("computeInternalParameters: LOCAL_LENGTH MAX_LENGTH NB_SEGMENTS"); {
double eltSize = 1; double eltSize = 1;
int nbSegments; int nbSegments;
if ( _hypType == MAX_LENGTH ) if ( _hypType == MAX_LENGTH )
@ -764,8 +758,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
} }
if (computed) { if (computed) {
SMESHDS_SubMesh* smds = sm->GetSubMeshDS(); SMESHDS_SubMesh* smds = sm->GetSubMeshDS();
int nb_segments = smds->NbElements(); int nb_segments = smds->NbElements();
MESSAGE("nb_segments: "<<nb_segments);
if (nbseg - 1 <= nb_segments && nb_segments <= nbseg + 1) { if (nbseg - 1 <= nb_segments && nb_segments <= nbseg + 1) {
isFound = true; isFound = true;
nbseg = nb_segments; nbseg = nb_segments;
@ -846,7 +839,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
break; break;
case StdMeshers_NumberOfSegments::DT_Regular: case StdMeshers_NumberOfSegments::DT_Regular:
eltSize = theLength / nbSegments; eltSize = theLength / nbSegments;
MESSAGE("eltSize = theLength / nbSegments " << eltSize << " = " << theLength << " / " << nbSegments );
break; break;
default: default:
return false; return false;
@ -860,7 +852,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
for ( int i = 2; i < NbPoints; i++ ) // skip 1st and last points for ( int i = 2; i < NbPoints; i++ ) // skip 1st and last points
{ {
double param = Discret.Parameter(i); double param = Discret.Parameter(i);
MESSAGE("computeInternalParameters: theParams " << i << " " << param);
theParams.push_back( param ); theParams.push_back( param );
} }
compensateError( eltSize, eltSize, f, l, theLength, theC3d, theParams, true ); // for PAL9899 compensateError( eltSize, eltSize, f, l, theLength, theC3d, theParams, true ); // for PAL9899
@ -899,18 +890,18 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
return true; return true;
} }
case ARITHMETIC_1D: { case ARITHMETIC_1D:
{
// arithmetic progression: SUM(n) = ( an - a1 + q ) * ( a1 + an ) / ( 2 * q ) = theLength // arithmetic progression: SUM(n) = ( an - a1 + q ) * ( a1 + an ) / ( 2 * q ) = theLength
double a1 = _value[ BEG_LENGTH_IND ]; double a1 = _value[ BEG_LENGTH_IND ];
double an = _value[ END_LENGTH_IND ]; double an = _value[ END_LENGTH_IND ];
if ( 1.01*theLength < a1 + an) if ( 1.01*theLength < a1 + an )
return error ( SMESH_Comment("Invalid segment lengths (")<<a1<<" and "<<an<<") "<< return error ( SMESH_Comment("Invalid segment lengths (")<<a1<<" and "<<an<<") "<<
"for an edge of length "<<theLength); "for an edge of length "<<theLength);
double q = ( an - a1 ) / ( 2 *theLength/( a1 + an ) - 1 ); double q = ( an - a1 ) / ( 2 *theLength/( a1 + an ) - 1 );
int n = int(fabs(q) > numeric_limits<double>::min() ? ( 1+( an-a1 )/q ) : ( 1+theLength/a1 )); int n = int(fabs(q) > numeric_limits<double>::min() ? ( 1+( an-a1 )/q ) : ( 1+theLength/a1 ));
double U1 = theReverse ? l : f; double U1 = theReverse ? l : f;
double Un = theReverse ? f : l; double Un = theReverse ? f : l;
@ -933,13 +924,13 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
eltSize += q; eltSize += q;
} }
compensateError( a1, an, U1, Un, theLength, theC3d, theParams ); compensateError( a1, an, U1, Un, theLength, theC3d, theParams );
if (theReverse) theParams.reverse(); // NPAL18025 if ( theReverse ) theParams.reverse(); // NPAL18025
return true; return true;
} }
case GEOMETRIC_1D: { case GEOMETRIC_1D:
{
double a1 = _value[ BEG_LENGTH_IND ], an; double a1 = _value[ BEG_LENGTH_IND ], an;
double q = _value[ END_LENGTH_IND ]; double q = _value[ END_LENGTH_IND ];
@ -983,7 +974,8 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
return true; return true;
} }
case FIXED_POINTS_1D: { case FIXED_POINTS_1D:
{
const std::vector<double>& aPnts = _fpHyp->GetPoints(); const std::vector<double>& aPnts = _fpHyp->GetPoints();
const std::vector<int>& nbsegs = _fpHyp->GetNbSegments(); const std::vector<int>& nbsegs = _fpHyp->GetNbSegments();
TColStd_SequenceOfReal Params; TColStd_SequenceOfReal Params;
@ -992,22 +984,22 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
if( aPnts[i]<0.0001 || aPnts[i]>0.9999 ) continue; if( aPnts[i]<0.0001 || aPnts[i]>0.9999 ) continue;
int j=1; int j=1;
bool IsExist = false; bool IsExist = false;
for(; j<=Params.Length(); j++) { for ( ; j <= Params.Length(); j++ ) {
if( fabs(aPnts[i]-Params.Value(j)) < 1e-4 ) { if ( Abs( aPnts[i] - Params.Value(j) ) < 1e-4 ) {
IsExist = true; IsExist = true;
break; break;
} }
if( aPnts[i]<Params.Value(j) ) break; if ( aPnts[i]<Params.Value(j) ) break;
} }
if(!IsExist) Params.InsertBefore(j,aPnts[i]); if ( !IsExist ) Params.InsertBefore( j, aPnts[i] );
} }
double par2, par1, lp; double par2, par1, lp;
par1 = f; par1 = f;
lp = l; lp = l;
double sign = 1.0; double sign = 1.0;
if(theReverse) { if ( theReverse ) {
par1 = l; par1 = l;
lp = f; lp = f;
sign = -1.0; sign = -1.0;
} }
double eltSize, segmentSize = 0.; double eltSize, segmentSize = 0.;
@ -1015,37 +1007,34 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
for ( int i = 0; i < Params.Length(); i++ ) for ( int i = 0; i < Params.Length(); i++ )
{ {
int nbseg = ( i > (int)nbsegs.size()-1 ) ? nbsegs[0] : nbsegs[i]; int nbseg = ( i > (int)nbsegs.size()-1 ) ? nbsegs[0] : nbsegs[i];
segmentSize = Params.Value(i+1)*theLength - currAbscissa; segmentSize = Params.Value( i+1 ) * theLength - currAbscissa;
currAbscissa += segmentSize; currAbscissa += segmentSize;
GCPnts_AbscissaPoint APnt(theC3d, sign*segmentSize, par1); GCPnts_AbscissaPoint APnt( theC3d, sign*segmentSize, par1 );
if( !APnt.IsDone() ) if ( !APnt.IsDone() )
return error( "GCPnts_AbscissaPoint failed"); return error( "GCPnts_AbscissaPoint failed");
par2 = APnt.Parameter(); par2 = APnt.Parameter();
eltSize = segmentSize/nbseg; eltSize = segmentSize/nbseg;
GCPnts_UniformAbscissa Discret(theC3d, eltSize, par1, par2); GCPnts_UniformAbscissa Discret( theC3d, eltSize, par1, par2 );
if(theReverse) if ( theReverse )
Discret.Initialize(theC3d, eltSize, par2, par1); Discret.Initialize( theC3d, eltSize, par2, par1 );
else else
Discret.Initialize(theC3d, eltSize, par1, par2); Discret.Initialize( theC3d, eltSize, par1, par2 );
if ( !Discret.IsDone() ) if ( !Discret.IsDone() )
return error( "GCPnts_UniformAbscissa failed"); return error( "GCPnts_UniformAbscissa failed");
int NbPoints = Discret.NbPoints(); int NbPoints = Discret.NbPoints();
list<double> tmpParams; list<double> tmpParams;
for(int i=2; i<NbPoints; i++) { for ( int i = 2; i < NbPoints; i++ ) {
double param = Discret.Parameter(i); double param = Discret.Parameter(i);
tmpParams.push_back( param ); tmpParams.push_back( param );
} }
if (theReverse) { if ( theReverse ) {
compensateError( eltSize, eltSize, par2, par1, segmentSize, theC3d, tmpParams ); compensateError( eltSize, eltSize, par2, par1, segmentSize, theC3d, tmpParams );
tmpParams.reverse(); tmpParams.reverse();
} }
else { else {
compensateError( eltSize, eltSize, par1, par2, segmentSize, theC3d, tmpParams ); compensateError( eltSize, eltSize, par1, par2, segmentSize, theC3d, tmpParams );
} }
list<double>::iterator itP = tmpParams.begin(); theParams.splice( theParams.end(), tmpParams );
for(; itP != tmpParams.end(); itP++) {
theParams.push_back( *(itP) );
}
theParams.push_back( par2 ); theParams.push_back( par2 );
par1 = par2; par1 = par2;
@ -1055,39 +1044,36 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
segmentSize = theLength - currAbscissa; segmentSize = theLength - currAbscissa;
eltSize = segmentSize/nbseg; eltSize = segmentSize/nbseg;
GCPnts_UniformAbscissa Discret; GCPnts_UniformAbscissa Discret;
if(theReverse) if ( theReverse )
Discret.Initialize(theC3d, eltSize, par1, lp); Discret.Initialize( theC3d, eltSize, par1, lp );
else else
Discret.Initialize(theC3d, eltSize, lp, par1); Discret.Initialize( theC3d, eltSize, lp, par1 );
if ( !Discret.IsDone() ) if ( !Discret.IsDone() )
return error( "GCPnts_UniformAbscissa failed"); return error( "GCPnts_UniformAbscissa failed");
int NbPoints = Discret.NbPoints(); int NbPoints = Discret.NbPoints();
list<double> tmpParams; list<double> tmpParams;
for(int i=2; i<NbPoints; i++) { for ( int i = 2; i < NbPoints; i++ ) {
double param = Discret.Parameter(i); double param = Discret.Parameter(i);
tmpParams.push_back( param ); tmpParams.push_back( param );
} }
if (theReverse) { if ( theReverse ) {
compensateError( eltSize, eltSize, lp, par1, segmentSize, theC3d, tmpParams ); compensateError( eltSize, eltSize, lp, par1, segmentSize, theC3d, tmpParams );
tmpParams.reverse(); tmpParams.reverse();
} }
else { else {
compensateError( eltSize, eltSize, par1, lp, segmentSize, theC3d, tmpParams ); compensateError( eltSize, eltSize, par1, lp, segmentSize, theC3d, tmpParams );
} }
list<double>::iterator itP = tmpParams.begin(); theParams.splice( theParams.end(), tmpParams );
for(; itP != tmpParams.end(); itP++) {
theParams.push_back( *(itP) );
}
if (theReverse) { if ( theReverse )
theParams.reverse(); // NPAL18025 theParams.reverse(); // NPAL18025
}
return true; return true;
} }
case DEFLECTION: { case DEFLECTION:
{
GCPnts_UniformDeflection Discret(theC3d, _value[ DEFLECTION_IND ], f, l, true); GCPnts_UniformDeflection Discret( theC3d, _value[ DEFLECTION_IND ], f, l, true );
if ( !Discret.IsDone() ) if ( !Discret.IsDone() )
return false; return false;
@ -1114,7 +1100,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & theShape) bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & theShape)
{ {
MESSAGE("Compute");
if ( _hypType == NONE ) if ( _hypType == NONE )
return false; return false;
@ -1214,7 +1199,6 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
//Add the Node in the DataStructure //Add the Node in the DataStructure
SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z()); SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
MESSAGE("meshDS->AddNode parameter " << param << " coords=" << "("<< P.X() <<", " << P.Y() << ", " << P.Z() << ")");
meshDS->SetNodeOnEdge(node, shapeID, param); meshDS->SetNodeOnEdge(node, shapeID, param);
if(_quadraticMesh) { if(_quadraticMesh) {
@ -1249,8 +1233,6 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
} }
else else
{ {
//MESSAGE("************* Degenerated edge! *****************");
// Edge is a degenerated Edge : We put n = 5 points on the edge. // Edge is a degenerated Edge : We put n = 5 points on the edge.
const int NbPoints = 5; const int NbPoints = 5;
BRep_Tool::Range( E, f, l ); // PAL15185 BRep_Tool::Range( E, f, l ); // PAL15185
@ -1353,9 +1335,8 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
} }
else { else {
//MESSAGE("************* Degenerated edge! *****************");
// Edge is a degenerated Edge : We put n = 5 points on the edge. // Edge is a degenerated Edge : We put n = 5 points on the edge.
if(_quadraticMesh) { if ( _quadraticMesh ) {
aVec[SMDSEntity_Node] = 11; aVec[SMDSEntity_Node] = 11;
aVec[SMDSEntity_Quad_Edge] = 6; aVec[SMDSEntity_Quad_Edge] = 6;
} }

View File

@ -418,12 +418,15 @@ void StdMeshersGUI_SubShapeSelectorWdg::onListSelectionChanged()
return; return;
//mySelectionMgr->clearSelected(); //mySelectionMgr->clearSelected();
TColStd_MapOfInteger aIndexes; myPreviewActor->HighlightAll( false );
QList<QListWidgetItem*> selItems = myListWidget->selectedItems(); QList<QListWidgetItem*> selItems = myListWidget->selectedItems();
QListWidgetItem* anItem; QListWidgetItem* anItem;
foreach(anItem, selItems) foreach(anItem, selItems)
myPreviewActor->HighlightID( anItem->text().toInt() ); myPreviewActor->HighlightID( anItem->text().toInt() );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->Repaint();
// update remove button // update remove button
myRemoveButton->setEnabled( selItems.size() > 0 ); myRemoveButton->setEnabled( selItems.size() > 0 );

View File

@ -134,8 +134,6 @@ extern "C"
STDMESHERS_I_EXPORT STDMESHERS_I_EXPORT
GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName) GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName)
{ {
MESSAGE("Get HypothesisCreator for " << aHypName);
GenericHypothesisCreator_i* aCreator = 0; GenericHypothesisCreator_i* aCreator = 0;
// Hypotheses // Hypotheses