mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
53225: Viscous Layers hyp: problem with selection of input/output faces
(StdMeshersGUI_SubShapeSelectorWdg.cxx) + Remove useless MESSAGEs
This commit is contained in:
parent
56aba9305e
commit
f3e2b7fea2
@ -82,9 +82,7 @@
|
||||
#include "utilities.h"
|
||||
|
||||
#ifdef _DEBUG_
|
||||
static int MYDEBUG = 1;
|
||||
#else
|
||||
static int MYDEBUG = 1;
|
||||
static int MYDEBUG = 0;
|
||||
#endif
|
||||
|
||||
static int aLineWidthInc = 2;
|
||||
@ -799,8 +797,7 @@ SetControlMode(eControl theMode)
|
||||
|
||||
void
|
||||
SMESH_ActorDef::
|
||||
SetControlMode(eControl theMode,
|
||||
bool theCheckEntityMode)
|
||||
SetControlMode( eControl theMode, bool theCheckEntityMode )
|
||||
{
|
||||
vtkLookupTable* lookupTable = static_cast<vtkLookupTable*>(myScalarBarActor->GetLookupTable());
|
||||
bool isLogarithmic = lookupTable->GetScale() == VTK_SCALE_LOG10;
|
||||
|
@ -67,7 +67,7 @@ using namespace std;
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG_
|
||||
static int MYDEBUG = 1;
|
||||
static int MYDEBUG = 0;
|
||||
static int MYDEBUGWITHFILES = 0;//1;
|
||||
#else
|
||||
static int MYDEBUG = 0;
|
||||
@ -133,7 +133,7 @@ static int MYDEBUGWITHFILES = 0;
|
||||
//=================================================================================
|
||||
SMESH_VisualObjDef::SMESH_VisualObjDef()
|
||||
{
|
||||
MESSAGE("---------------------------------------------SMESH_VisualObjDef::SMESH_VisualObjDef");
|
||||
if ( MYDEBUG ) MESSAGE("-------------------------------SMESH_VisualObjDef::SMESH_VisualObjDef");
|
||||
myGrid = vtkUnstructuredGrid::New();
|
||||
myLocalGrid = false;
|
||||
ClearEntitiesFlags();
|
||||
@ -141,9 +141,8 @@ SMESH_VisualObjDef::SMESH_VisualObjDef()
|
||||
}
|
||||
SMESH_VisualObjDef::~SMESH_VisualObjDef()
|
||||
{
|
||||
MESSAGE("---------------------------------------------SMESH_VisualObjDef::~SMESH_VisualObjDef");
|
||||
//if ( MYDEBUG )
|
||||
MESSAGE( "~SMESH_MeshObj - myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() );
|
||||
if ( MYDEBUG ) MESSAGE("--------------------------------SMESH_VisualObjDef::~SMESH_VisualObjDef");
|
||||
if ( MYDEBUG ) MESSAGE( "myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() );
|
||||
myGrid->Delete();
|
||||
}
|
||||
|
||||
@ -248,7 +247,7 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints )
|
||||
//=================================================================================
|
||||
void SMESH_VisualObjDef::buildPrs(bool buildGrid)
|
||||
{
|
||||
MESSAGE("----------------------------------------------------------SMESH_VisualObjDef::buildPrs " << buildGrid);
|
||||
if ( MYDEBUG ) MESSAGE("---------------------------SMESH_VisualObjDef::buildPrs " << buildGrid);
|
||||
if (buildGrid)
|
||||
{
|
||||
myLocalGrid = true;
|
||||
@ -281,7 +280,7 @@ void SMESH_VisualObjDef::buildPrs(bool buildGrid)
|
||||
myLocalGrid = false;
|
||||
if (!GetMesh()->isCompacted())
|
||||
{
|
||||
MESSAGE("*** buildPrs ==> compactMesh!");
|
||||
if ( MYDEBUG ) MESSAGE("*** buildPrs ==> compactMesh!");
|
||||
GetMesh()->compactMesh();
|
||||
}
|
||||
vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
|
||||
@ -697,9 +696,9 @@ SMESH_MeshObj::~SMESH_MeshObj()
|
||||
bool SMESH_MeshObj::Update( int theIsClear )
|
||||
{
|
||||
// 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) {
|
||||
MESSAGE("buildPrs");
|
||||
if ( MYDEBUG ) MESSAGE("buildPrs");
|
||||
buildPrs(); // Fill unstructured grid
|
||||
return true;
|
||||
}
|
||||
@ -708,7 +707,7 @@ bool SMESH_MeshObj::Update( int theIsClear )
|
||||
|
||||
bool SMESH_MeshObj::NulData()
|
||||
{
|
||||
MESSAGE ("SMESH_MeshObj::NulData() ==================================================================================");
|
||||
if ( MYDEBUG ) MESSAGE ("SMESH_MeshObj::NulData() =============================================");
|
||||
if (!myEmptyGrid)
|
||||
{
|
||||
myEmptyGrid = SMDS_UnstructuredGrid::New();
|
||||
@ -901,7 +900,7 @@ void SMESH_SubMeshObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunc
|
||||
//=================================================================================
|
||||
bool SMESH_SubMeshObj::Update( int theIsClear )
|
||||
{
|
||||
MESSAGE("SMESH_SubMeshObj::Update " << this)
|
||||
if ( MYDEBUG ) MESSAGE("SMESH_SubMeshObj::Update " << this)
|
||||
bool changed = myMeshObj->Update( theIsClear );
|
||||
buildPrs(true);
|
||||
return changed;
|
||||
|
@ -525,7 +525,6 @@ SMDS_MeshFace* SMDS_Mesh::AddFaceWithID(const SMDS_MeshEdge * e1,
|
||||
if ( !e1 || !e2 || !e3 ) return 0;
|
||||
|
||||
if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
MESSAGE("AddFaceWithID" << ID);
|
||||
|
||||
SMDS_MeshFace * face = new SMDS_FaceOfEdges(e1,e2,e3);
|
||||
adjustmyCellsCapacity(ID);
|
||||
@ -552,7 +551,6 @@ SMDS_MeshFace* SMDS_Mesh::AddFace(const SMDS_MeshEdge * e1,
|
||||
{
|
||||
if (!hasConstructionEdges())
|
||||
return NULL;
|
||||
//MESSAGE("AddFaceWithID" );
|
||||
return AddFaceWithID(e1,e2,e3,e4, myElementIDFactory->GetFreeID());
|
||||
}
|
||||
|
||||
@ -568,7 +566,6 @@ SMDS_MeshFace* SMDS_Mesh::AddFaceWithID(const SMDS_MeshEdge * e1,
|
||||
{
|
||||
if (!hasConstructionEdges())
|
||||
return NULL;
|
||||
MESSAGE("AddFaceWithID" << ID);
|
||||
if ( !e1 || !e2 || !e3 || !e4 ) return 0;
|
||||
if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
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)
|
||||
{
|
||||
int ID = myElementIDFactory->GetFreeID();
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, ID);
|
||||
if(v==NULL) myElementIDFactory->ReleaseID(ID);
|
||||
return v;
|
||||
@ -615,7 +611,6 @@ SMDS_MeshVolume * SMDS_Mesh::AddVolumeWithID(int idnode1,
|
||||
int idnode4,
|
||||
int ID)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID" << ID);
|
||||
SMDS_MeshNode *node1, *node2, *node3, *node4;
|
||||
node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1);
|
||||
node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2);
|
||||
@ -637,7 +632,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n4,
|
||||
int ID)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshVolume* volume = 0;
|
||||
if ( !n1 || !n2 || !n3 || !n4) return volume;
|
||||
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
@ -652,7 +646,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
myInfo.myNbTetras++;
|
||||
}
|
||||
else if(hasConstructionEdges()) {
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
@ -697,7 +690,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n5)
|
||||
{
|
||||
int ID = myElementIDFactory->GetFreeID();
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, ID);
|
||||
if(v==NULL) myElementIDFactory->ReleaseID(ID);
|
||||
return v;
|
||||
@ -718,7 +710,6 @@ SMDS_MeshVolume * SMDS_Mesh::AddVolumeWithID(int idnode1,
|
||||
int idnode5,
|
||||
int ID)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshNode *node1, *node2, *node3, *node4, *node5;
|
||||
node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1);
|
||||
node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2);
|
||||
@ -743,7 +734,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n5,
|
||||
int ID)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshVolume* volume = 0;
|
||||
if ( !n1 || !n2 || !n3 || !n4 || !n5) return volume;
|
||||
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
@ -758,7 +748,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
myInfo.myNbPyramids++;
|
||||
}
|
||||
else if(hasConstructionEdges()) {
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
@ -805,7 +794,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n6)
|
||||
{
|
||||
int ID = myElementIDFactory->GetFreeID();
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, n6, ID);
|
||||
if(v==NULL) myElementIDFactory->ReleaseID(ID);
|
||||
return v;
|
||||
@ -827,7 +815,6 @@ SMDS_MeshVolume * SMDS_Mesh::AddVolumeWithID(int idnode1,
|
||||
int idnode6,
|
||||
int ID)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshNode *node1, *node2, *node3, *node4, *node5, *node6;
|
||||
node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1);
|
||||
node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2);
|
||||
@ -854,7 +841,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n6,
|
||||
int ID)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshVolume* volume = 0;
|
||||
if ( !n1 || !n2 || !n3 || !n4 || !n5 || !n6) return volume;
|
||||
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
@ -870,7 +856,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
myInfo.myNbPrisms++;
|
||||
}
|
||||
else if(hasConstructionEdges()) {
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
@ -994,11 +979,9 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
return volume;
|
||||
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
if(hasConstructionFaces()) {
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else if(hasConstructionEdges()) {
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
@ -1074,7 +1057,6 @@ SMDS_MeshVolume * SMDS_Mesh::AddVolumeWithID(int idnode1,
|
||||
int idnode8,
|
||||
int ID)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshNode *node1, *node2, *node3, *node4, *node5, *node6, *node7, *node8;
|
||||
node1 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode1);
|
||||
node2 = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(idnode2);
|
||||
@ -1108,7 +1090,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n8,
|
||||
int ID)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID " << ID);
|
||||
SMDS_MeshVolume* volume = 0;
|
||||
if ( !n1 || !n2 || !n3 || !n4 || !n5 || !n6 || !n7 || !n8) return volume;
|
||||
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
@ -1125,7 +1106,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
myInfo.myNbHexas++;
|
||||
}
|
||||
else if(hasConstructionEdges()) {
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
@ -1171,7 +1151,6 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshFace * f1,
|
||||
const SMDS_MeshFace * f3,
|
||||
const SMDS_MeshFace * f4)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID");
|
||||
if (!hasConstructionFaces())
|
||||
return NULL;
|
||||
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,
|
||||
int ID)
|
||||
{
|
||||
MESSAGE("AddVolumeWithID" << ID);
|
||||
if (!hasConstructionFaces())
|
||||
return NULL;
|
||||
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 * f5)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID");
|
||||
if (!hasConstructionFaces())
|
||||
return NULL;
|
||||
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,
|
||||
int ID)
|
||||
{
|
||||
MESSAGE("AddVolumeWithID" << ID);
|
||||
if (!hasConstructionFaces())
|
||||
return NULL;
|
||||
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 * f6)
|
||||
{
|
||||
//MESSAGE("AddVolumeWithID" );
|
||||
if (!hasConstructionFaces())
|
||||
return NULL;
|
||||
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,
|
||||
int ID)
|
||||
{
|
||||
MESSAGE("AddVolumeWithID" << ID);
|
||||
if (!hasConstructionFaces())
|
||||
return NULL;
|
||||
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 (hasConstructionEdges())
|
||||
{
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
@ -1399,7 +1372,6 @@ SMDS_Mesh::AddQuadPolygonalFaceWithID (const vector<const SMDS_MeshNode*> & node
|
||||
if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
if (hasConstructionEdges())
|
||||
{
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
@ -1472,18 +1444,15 @@ SMDS_Mesh::AddPolyhedralVolumeWithID (const vector<const SMDS_MeshNode*>& nodes,
|
||||
if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
if (hasConstructionFaces())
|
||||
{
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else if (hasConstructionEdges())
|
||||
{
|
||||
MESSAGE("Error : Not implemented");
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
//#ifdef VTK_HAVE_POLYHEDRON
|
||||
//MESSAGE("AddPolyhedralVolumeWithID vtk " << ID);
|
||||
myNodeIds.resize( nodes.size() );
|
||||
for ( size_t i = 0; i < nodes.size(); ++i )
|
||||
myNodeIds[i] = nodes[i]->getVtkId();
|
||||
@ -1498,7 +1467,6 @@ SMDS_Mesh::AddPolyhedralVolumeWithID (const vector<const SMDS_MeshNode*>& nodes,
|
||||
}
|
||||
volume = volvtk;
|
||||
//#else
|
||||
// MESSAGE("AddPolyhedralVolumeWithID smds " << ID);
|
||||
// for ( int i = 0; i < nodes.size(); ++i )
|
||||
// if ( !nodes[ i ] ) return 0;
|
||||
// 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)
|
||||
{
|
||||
//MESSAGE("registerElement " << ID);
|
||||
if ((ID >=0) && (ID < (int)myCells.size()) && myCells[ID]) // --- already bound
|
||||
{
|
||||
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
|
||||
{
|
||||
// MESSAGE(" --------------------- resize myCellIdVtkToSmds " << vtkId << " --> " << vtkId + SMDS_Mesh::chunkSize);
|
||||
myCellIdVtkToSmds.resize(vtkId + SMDS_Mesh::chunkSize, -1);
|
||||
}
|
||||
myCellIdVtkToSmds[vtkId] = ID;
|
||||
@ -1693,9 +1659,6 @@ const SMDS_MeshNode * SMDS_Mesh::FindNode(int ID) const
|
||||
{
|
||||
if (ID < 1 || ID >= (int)myNodes.size())
|
||||
{
|
||||
// MESSAGE("------------------------------------------------------------------------- ");
|
||||
// MESSAGE("----------------------------------- bad ID " << ID << " " << myNodes.size());
|
||||
// MESSAGE("------------------------------------------------------------------------- ");
|
||||
return 0;
|
||||
}
|
||||
return (const SMDS_MeshNode *)myNodes[ID];
|
||||
@ -1762,7 +1725,6 @@ SMDS_MeshFace * SMDS_Mesh::createTriangle(const SMDS_MeshNode * node1,
|
||||
face = facevtk;
|
||||
adjustmyCellsCapacity(ID);
|
||||
myCells[ID] = face;
|
||||
//MESSAGE("createTriangle " << ID << " " << face);
|
||||
myInfo.myNbTriangles++;
|
||||
return face;
|
||||
}
|
||||
@ -1782,7 +1744,6 @@ SMDS_MeshFace * SMDS_Mesh::createQuadrangle(const SMDS_MeshNode * node1,
|
||||
if ( NbFaces() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
|
||||
if(hasConstructionEdges())
|
||||
{
|
||||
//MESSAGE("createQuadrangle hasConstructionEdges "<< ID);
|
||||
SMDS_MeshEdge *edge1, *edge2, *edge3, *edge4;
|
||||
edge1=FindEdgeOrCreate(node1,node2);
|
||||
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)
|
||||
{
|
||||
MESSAGE("RemoveNode");
|
||||
RemoveElement(node, true);
|
||||
}
|
||||
|
||||
@ -1837,7 +1797,6 @@ void SMDS_Mesh::RemoveNode(const SMDS_MeshNode * node)
|
||||
|
||||
void SMDS_Mesh::Remove0DElement(const SMDS_Mesh0DElement * elem0d)
|
||||
{
|
||||
MESSAGE("Remove0DElement");
|
||||
RemoveElement(elem0d,true);
|
||||
}
|
||||
|
||||
@ -1847,7 +1806,6 @@ void SMDS_Mesh::Remove0DElement(const SMDS_Mesh0DElement * elem0d)
|
||||
|
||||
void SMDS_Mesh::RemoveEdge(const SMDS_MeshEdge * edge)
|
||||
{
|
||||
MESSAGE("RemoveEdge");
|
||||
RemoveElement(edge,true);
|
||||
}
|
||||
|
||||
@ -1857,7 +1815,6 @@ void SMDS_Mesh::RemoveEdge(const SMDS_MeshEdge * edge)
|
||||
|
||||
void SMDS_Mesh::RemoveFace(const SMDS_MeshFace * face)
|
||||
{
|
||||
MESSAGE("RemoveFace");
|
||||
RemoveElement(face, true);
|
||||
}
|
||||
|
||||
@ -1867,7 +1824,6 @@ void SMDS_Mesh::RemoveFace(const SMDS_MeshFace * face)
|
||||
|
||||
void SMDS_Mesh::RemoveVolume(const SMDS_MeshVolume * volume)
|
||||
{
|
||||
MESSAGE("RemoveVolume");
|
||||
RemoveElement(volume, true);
|
||||
}
|
||||
|
||||
@ -1914,7 +1870,6 @@ bool SMDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * element,
|
||||
const SMDS_MeshNode * nodes[],
|
||||
const int nbnodes)
|
||||
{
|
||||
MESSAGE("SMDS_Mesh::ChangeElementNodes");
|
||||
// keep current nodes of elem
|
||||
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() )
|
||||
{
|
||||
MESSAGE("--------------------------------------------------------------------------------- ");
|
||||
MESSAGE("----------------------------------- bad IDelem " << IDelem << " " << myCells.size());
|
||||
MESSAGE("--------------------------------------------------------------------------------- ");
|
||||
// TODO raise an exception
|
||||
//assert(0);
|
||||
return 0;
|
||||
}
|
||||
return myCells[IDelem];
|
||||
@ -2505,7 +2455,6 @@ const SMDS_MeshElement* SMDS_Mesh::FindElement (const vector<const SMDS_MeshNode
|
||||
|
||||
void SMDS_Mesh::DumpNodes() const
|
||||
{
|
||||
MESSAGE("dump nodes of mesh : ");
|
||||
SMDS_NodeIteratorPtr itnode=nodesIterator();
|
||||
while(itnode->more()) ; //MESSAGE(itnode->next());
|
||||
}
|
||||
@ -2516,7 +2465,6 @@ void SMDS_Mesh::DumpNodes() const
|
||||
//=======================================================================
|
||||
void SMDS_Mesh::Dump0DElements() const
|
||||
{
|
||||
MESSAGE("dump 0D elements of mesh : ");
|
||||
SMDS_ElemIteratorPtr it0d = elementsIterator(SMDSAbs_0DElement);
|
||||
while(it0d->more()) ; //MESSAGE(it0d->next());
|
||||
}
|
||||
@ -2528,7 +2476,6 @@ void SMDS_Mesh::Dump0DElements() const
|
||||
|
||||
void SMDS_Mesh::DumpEdges() const
|
||||
{
|
||||
MESSAGE("dump edges of mesh : ");
|
||||
SMDS_EdgeIteratorPtr itedge=edgesIterator();
|
||||
while(itedge->more()) ; //MESSAGE(itedge->next());
|
||||
}
|
||||
@ -2540,7 +2487,6 @@ void SMDS_Mesh::DumpEdges() const
|
||||
|
||||
void SMDS_Mesh::DumpFaces() const
|
||||
{
|
||||
MESSAGE("dump faces of mesh : ");
|
||||
SMDS_FaceIteratorPtr itface=facesIterator();
|
||||
while(itface->more()) ; //MESSAGE(itface->next());
|
||||
}
|
||||
@ -2552,7 +2498,6 @@ void SMDS_Mesh::DumpFaces() const
|
||||
|
||||
void SMDS_Mesh::DumpVolumes() const
|
||||
{
|
||||
MESSAGE("dump volumes of mesh : ");
|
||||
SMDS_VolumeIteratorPtr itvol=volumesIterator();
|
||||
while(itvol->more()) ; //MESSAGE(itvol->next());
|
||||
}
|
||||
@ -2612,9 +2557,6 @@ void SMDS_Mesh::DebugStats() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int SMDS_Mesh::NbNodes() const
|
||||
{
|
||||
//MESSAGE(myGrid->GetNumberOfPoints());
|
||||
//MESSAGE(myInfo.NbNodes());
|
||||
//MESSAGE(myNodeMax);
|
||||
return myInfo.NbNodes();
|
||||
}
|
||||
|
||||
@ -2718,7 +2660,6 @@ SMDS_Mesh::~SMDS_Mesh()
|
||||
|
||||
void SMDS_Mesh::Clear()
|
||||
{
|
||||
MESSAGE("SMDS_Mesh::Clear");
|
||||
if (myParent!=NULL)
|
||||
{
|
||||
SMDS_ElemIteratorPtr eIt = elementsIterator();
|
||||
@ -3082,27 +3023,24 @@ static set<const SMDS_MeshElement*> * getFinitElements(const SMDS_MeshElement *
|
||||
|
||||
SMDS_ElemIteratorPtr itNodes=element->nodesIterator();
|
||||
|
||||
int i=0;
|
||||
while(itNodes->more())
|
||||
int i = 0;
|
||||
while ( itNodes->more() )
|
||||
{
|
||||
const SMDS_MeshElement* node = itNodes->next();
|
||||
MYASSERT(node);
|
||||
const SMDS_MeshNode * n=static_cast<const SMDS_MeshNode*>(node);
|
||||
SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator();
|
||||
|
||||
//initSet[i]=set<const SMDS_MeshElement*>();
|
||||
while(itFe->more())
|
||||
while ( itFe->more() )
|
||||
{
|
||||
const SMDS_MeshElement* elem = itFe->next();
|
||||
MYASSERT(elem);
|
||||
initSet[i].insert(elem);
|
||||
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
set<const SMDS_MeshElement*> *retSet=intersectionOfSets(initSet, numberOfSets);
|
||||
// MESSAGE("nb elems " << i << " intersection " << retSet->size());
|
||||
set<const SMDS_MeshElement*> *retSet = intersectionOfSets( initSet, numberOfSets );
|
||||
delete [] initSet;
|
||||
return retSet;
|
||||
}
|
||||
@ -3401,11 +3339,9 @@ void SMDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elem)
|
||||
{
|
||||
int elemId = elem->GetID();
|
||||
int vtkId = elem->getVtkId();
|
||||
//MESSAGE("RemoveFreeElement " << elemId);
|
||||
SMDSAbs_ElementType aType = elem->GetType();
|
||||
SMDS_MeshElement* todest = (SMDS_MeshElement*)(elem);
|
||||
if (aType == SMDSAbs_Node) {
|
||||
//MESSAGE("Remove free node " << elemId);
|
||||
// only free node can be removed by this method
|
||||
const SMDS_MeshNode* n = static_cast<SMDS_MeshNode*>(todest);
|
||||
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
|
||||
return;
|
||||
|
||||
//MESSAGE("Remove free element " << elemId);
|
||||
// Remove element from <InverseElements> of its nodes
|
||||
SMDS_ElemIteratorPtr itn = elem->nodesIterator();
|
||||
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)
|
||||
{
|
||||
MESSAGE("Renumber");
|
||||
if ( deltaID == 0 )
|
||||
return;
|
||||
|
||||
@ -4709,17 +4643,14 @@ void SMDS_Mesh::incrementNodesCapacity(int nbNodes)
|
||||
// MESSAGE(" ------------------- resize myCellIdSmdsToVtk " << val << " --> " << val + nbNodes);
|
||||
// myCellIdSmdsToVtk.resize(val + nbNodes, -1); // fill new elements with -1
|
||||
int val = myNodes.size();
|
||||
MESSAGE(" ------------------- resize myNodes " << val << " --> " << val + nbNodes);
|
||||
myNodes.resize(val +nbNodes, 0);
|
||||
}
|
||||
|
||||
void SMDS_Mesh::incrementCellsCapacity(int nbCells)
|
||||
{
|
||||
int val = myCellIdVtkToSmds.size();
|
||||
MESSAGE(" ------------------- resize myCellIdVtkToSmds " << val << " --> " << val + nbCells);
|
||||
myCellIdVtkToSmds.resize(val + nbCells, -1); // fill new elements with -1
|
||||
val = myCells.size();
|
||||
MESSAGE(" ------------------- resize myCells " << val << " --> " << val + nbCells);
|
||||
myNodes.resize(val +nbCells, 0);
|
||||
}
|
||||
|
||||
@ -4730,15 +4661,14 @@ void SMDS_Mesh::adjustStructure()
|
||||
|
||||
void SMDS_Mesh::dumpGrid(string ficdump)
|
||||
{
|
||||
MESSAGE("SMDS_Mesh::dumpGrid " << ficdump);
|
||||
// vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
|
||||
// aWriter->SetFileName(ficdump.c_str());
|
||||
// aWriter->SetInput(myGrid);
|
||||
// if(myGrid->GetNumberOfCells())
|
||||
// {
|
||||
// aWriter->Write();
|
||||
// }
|
||||
// aWriter->Delete();
|
||||
// vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
|
||||
// aWriter->SetFileName(ficdump.c_str());
|
||||
// aWriter->SetInput(myGrid);
|
||||
// if(myGrid->GetNumberOfCells())
|
||||
// {
|
||||
// aWriter->Write();
|
||||
// }
|
||||
// aWriter->Delete();
|
||||
ficdump = ficdump + "_connectivity";
|
||||
ofstream ficcon(ficdump.c_str(), ios::out);
|
||||
int nbPoints = myGrid->GetNumberOfPoints();
|
||||
@ -4751,8 +4681,6 @@ void SMDS_Mesh::dumpGrid(string ficdump)
|
||||
ficcon << "-------------------------------- cells " << nbCells << endl;
|
||||
for (int i=0; i<nbCells; i++)
|
||||
{
|
||||
// MESSAGE(i << " " << myGrid->GetCell(i));
|
||||
// MESSAGE(" " << myGrid->GetCell(i)->GetCellType());
|
||||
ficcon << i << " - " << myGrid->GetCell(i)->GetCellType() << " -";
|
||||
int nbptcell = myGrid->GetCell(i)->GetNumberOfPoints();
|
||||
vtkIdList *listid = myGrid->GetCell(i)->GetPointIds();
|
||||
@ -4820,7 +4748,6 @@ double SMDS_Mesh::getMaxDim()
|
||||
if ((xmax - xmin) > dmax) dmax = xmax -xmin;
|
||||
if ((ymax - ymin) > dmax) dmax = ymax -ymin;
|
||||
if ((zmax - zmin) > dmax) dmax = zmax -zmin;
|
||||
MESSAGE("getMaxDim " << dmax);
|
||||
return dmax;
|
||||
}
|
||||
|
||||
@ -4830,7 +4757,6 @@ void SMDS_Mesh::Modified()
|
||||
if (this->myModified)
|
||||
{
|
||||
this->myModifTime++;
|
||||
MESSAGE("modified");
|
||||
myModified = false;
|
||||
}
|
||||
}
|
||||
@ -4845,7 +4771,6 @@ bool SMDS_Mesh::isCompacted()
|
||||
{
|
||||
if (this->myModifTime > this->myCompactTime)
|
||||
{
|
||||
MESSAGE(" *** isCompacted " << myCompactTime << " < " << myModifTime);
|
||||
this->myCompactTime = this->myModifTime;
|
||||
return false;
|
||||
}
|
||||
|
@ -46,14 +46,12 @@ int SMDS_MeshIDFactory::GetFreeID()
|
||||
if (myPoolOfID.empty())
|
||||
{
|
||||
newid = ++myMaxID;
|
||||
//MESSAGE("GetFreeID new " << newid);
|
||||
}
|
||||
else
|
||||
{
|
||||
set<int>::iterator i = myPoolOfID.begin();
|
||||
newid = *i;//myPoolOfID.top();
|
||||
myPoolOfID.erase( i );//myPoolOfID.pop();
|
||||
//MESSAGE("GetFreeID pool " << newid);
|
||||
}
|
||||
return newid;
|
||||
}
|
||||
@ -107,7 +105,6 @@ SMDS_Mesh* SMDS_MeshIDFactory::GetMesh()
|
||||
|
||||
void SMDS_MeshIDFactory::emptyPool(int maxId)
|
||||
{
|
||||
MESSAGE("SMDS_MeshIDFactory::emptyPool " << myMaxID << " --> " << maxId);
|
||||
myMaxID = maxId;
|
||||
myPoolOfID.clear();
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ using namespace std;
|
||||
|
||||
SMDS_CellLinks* SMDS_CellLinks::New()
|
||||
{
|
||||
MESSAGE("SMDS_CellLinks::New");
|
||||
return new SMDS_CellLinks();
|
||||
}
|
||||
|
||||
@ -65,7 +64,6 @@ SMDS_CellLinks::~SMDS_CellLinks()
|
||||
|
||||
SMDS_UnstructuredGrid* SMDS_UnstructuredGrid::New()
|
||||
{
|
||||
MESSAGE("SMDS_UnstructuredGrid::New");
|
||||
return new SMDS_UnstructuredGrid();
|
||||
}
|
||||
|
||||
@ -85,27 +83,23 @@ SMDS_UnstructuredGrid::~SMDS_UnstructuredGrid()
|
||||
unsigned long SMDS_UnstructuredGrid::GetMTime()
|
||||
{
|
||||
unsigned long mtime = vtkUnstructuredGrid::GetMTime();
|
||||
MESSAGE("vtkUnstructuredGrid::GetMTime: " << mtime);
|
||||
return mtime;
|
||||
}
|
||||
// OUV_PORTING_VTK6: seems to be useless
|
||||
/*
|
||||
void SMDS_UnstructuredGrid::Update()
|
||||
{
|
||||
MESSAGE("SMDS_UnstructuredGrid::Update");
|
||||
return vtkUnstructuredGrid::Update();
|
||||
}
|
||||
|
||||
void SMDS_UnstructuredGrid::UpdateInformation()
|
||||
{
|
||||
MESSAGE("SMDS_UnstructuredGrid::UpdateInformation");
|
||||
return vtkUnstructuredGrid::UpdateInformation();
|
||||
}
|
||||
*/
|
||||
vtkPoints* SMDS_UnstructuredGrid::GetPoints()
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -116,7 +110,6 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
|
||||
return vtkUnstructuredGrid::InsertNextLinkedCell(type, npts, pts);
|
||||
|
||||
// --- type = VTK_POLYHEDRON
|
||||
//MESSAGE("InsertNextLinkedCell VTK_POLYHEDRON");
|
||||
int cellid = this->InsertNextCell(type, npts, pts);
|
||||
|
||||
set<vtkIdType> setOfNodes;
|
||||
@ -129,7 +122,6 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
|
||||
i++;
|
||||
for (int k = 0; k < nbnodes; k++)
|
||||
{
|
||||
//MESSAGE(" cell " << cellid << " face " << nf << " node " << pts[i]);
|
||||
setOfNodes.insert(pts[i]);
|
||||
i++;
|
||||
}
|
||||
@ -138,7 +130,6 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
|
||||
set<vtkIdType>::iterator it = setOfNodes.begin();
|
||||
for (; it != setOfNodes.end(); ++it)
|
||||
{
|
||||
//MESSAGE("reverse link for node " << *it << " cell " << cellid);
|
||||
this->Links->ResizeCellList(*it, 1);
|
||||
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,
|
||||
std::vector<int>& idCellsOldToNew, int newCellSize)
|
||||
{
|
||||
MESSAGE("------------------------- SMDS_UnstructuredGrid::compactGrid " << newNodeSize << " " << newCellSize);//CHRONO(1);
|
||||
//MESSAGE("------------------------- compactGrid " << newNodeSize << " " << newCellSize);//CHRONO(1);
|
||||
int alreadyCopied = 0;
|
||||
|
||||
// --- if newNodeSize, create a new compacted vtkPoints
|
||||
@ -165,7 +156,6 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
|
||||
newPoints->SetNumberOfPoints(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"
|
||||
// using double type for storing coordinates of nodes instead float.
|
||||
int oldNodeSize = idNodesOldToNew.size();
|
||||
@ -194,7 +184,6 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
|
||||
newConnectivity->Initialize();
|
||||
int oldCellDataSize = this->Connectivity->GetData()->GetSize();
|
||||
newConnectivity->Allocate(oldCellDataSize);
|
||||
MESSAGE("oldCellSize="<< oldCellSize << " oldCellDataSize=" << oldCellDataSize);
|
||||
|
||||
vtkUnsignedCharArray *newTypes = vtkUnsignedCharArray::New();
|
||||
newTypes->Initialize();
|
||||
@ -231,9 +220,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
|
||||
|
||||
if (1/*newNodeSize*/)
|
||||
{
|
||||
MESSAGE("------- newNodeSize, setPoints");
|
||||
this->SetPoints(newPoints);
|
||||
MESSAGE("NumberOfPoints: " << this->GetNumberOfPoints());
|
||||
}
|
||||
|
||||
if (vtkDoubleArray* diameters =
|
||||
@ -302,10 +289,12 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
|
||||
this->BuildLinks();
|
||||
}
|
||||
|
||||
void SMDS_UnstructuredGrid::copyNodes(vtkPoints *newPoints, std::vector<int>& idNodesOldToNew, int& alreadyCopied,
|
||||
int start, int end)
|
||||
void SMDS_UnstructuredGrid::copyNodes(vtkPoints * newPoints,
|
||||
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 *source = this->Points->GetVoidPointer(3 * start);
|
||||
int nbPoints = end - start;
|
||||
@ -327,7 +316,6 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes,
|
||||
int start,
|
||||
int end)
|
||||
{
|
||||
//MESSAGE("copyBloc " << alreadyCopied << " " << start << " " << end << " size: " << end - start << " total: " << alreadyCopied + end - start);
|
||||
for (int j = start; j < end; j++)
|
||||
{
|
||||
newTypes->SetValue(alreadyCopied, this->Types->GetValue(j));
|
||||
@ -337,16 +325,13 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes,
|
||||
vtkIdType *oldPtsCell = 0;
|
||||
this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell);
|
||||
assert(nbpts < NBMAXNODESINCELL);
|
||||
//MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts );
|
||||
for (int l = 0; l < nbpts; l++)
|
||||
{
|
||||
int oldval = oldPtsCell[l];
|
||||
pointsCell[l] = idNodesOldToNew[oldval];
|
||||
//MESSAGE(" " << oldval << " " << pointsCell[l]);
|
||||
}
|
||||
/*int newcnt = */newConnectivity->InsertNextCell(nbpts, pointsCell);
|
||||
int newLoc = newConnectivity->GetInsertLocation(nbpts);
|
||||
//MESSAGE(newcnt << " " << newLoc);
|
||||
newLocations->SetValue(alreadyCopied, newLoc);
|
||||
alreadyCopied++;
|
||||
}
|
||||
@ -356,8 +341,6 @@ int SMDS_UnstructuredGrid::CellIdToDownId(int vtkCellId)
|
||||
{
|
||||
if ((vtkCellId < 0) || (vtkCellId >= (int)_cellIdToDownId.size()))
|
||||
{
|
||||
//MESSAGE("SMDS_UnstructuredGrid::CellIdToDownId structure not up to date: vtkCellId="
|
||||
// << vtkCellId << " max="<< _cellIdToDownId.size());
|
||||
return -1;
|
||||
}
|
||||
return _cellIdToDownId[vtkCellId];
|
||||
@ -1016,7 +999,8 @@ void SMDS_UnstructuredGrid::BuildLinks()
|
||||
* @param nodeDomains: map(original id --> map(domain --> duplicated node id))
|
||||
* @return ok if success.
|
||||
*/
|
||||
SMDS_MeshCell* SMDS_UnstructuredGrid::extrudeVolumeFromFace(int vtkVolId,
|
||||
SMDS_MeshCell*
|
||||
SMDS_UnstructuredGrid::extrudeVolumeFromFace(int vtkVolId,
|
||||
int domain1,
|
||||
int domain2,
|
||||
std::set<int>& originalNodes,
|
||||
|
@ -64,12 +64,10 @@ using namespace std;
|
||||
|
||||
SMESH_Gen::SMESH_Gen()
|
||||
{
|
||||
MESSAGE("SMESH_Gen::SMESH_Gen");
|
||||
_localId = 0;
|
||||
_hypId = 0;
|
||||
_segmentation = _nbSegments = 10;
|
||||
SMDS_Mesh::_meshList.clear();
|
||||
MESSAGE(SMDS_Mesh::_meshList.size());
|
||||
_compute_canceled = false;
|
||||
//vtkDebugLeaks::SetExitError(0);
|
||||
}
|
||||
@ -82,7 +80,6 @@ SMESH_Gen::SMESH_Gen()
|
||||
|
||||
SMESH_Gen::~SMESH_Gen()
|
||||
{
|
||||
MESSAGE("SMESH_Gen::~SMESH_Gen");
|
||||
std::map < int, StudyContextStruct * >::iterator i_sc = _mapStudyContext.begin();
|
||||
for ( ; i_sc != _mapStudyContext.end(); ++i_sc )
|
||||
{
|
||||
@ -102,7 +99,6 @@ SMESH_Mesh* SMESH_Gen::CreateMesh(int theStudyId, bool theIsEmbeddedMode)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
MESSAGE("SMESH_Gen::CreateMesh");
|
||||
|
||||
// Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
|
||||
StudyContextStruct *aStudyContext = GetStudyContext(theStudyId);
|
||||
@ -131,7 +127,6 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
||||
const ::MeshDimension aDim /*=::MeshDim_3D*/,
|
||||
TSetOfInt* aShapesId /*=0*/)
|
||||
{
|
||||
MESSAGE("SMESH_Gen::Compute");
|
||||
MEMOSTAT;
|
||||
|
||||
bool ret = true;
|
||||
@ -369,11 +364,10 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
||||
ret = Compute( aMesh, aShape, aShapeOnly, /*anUpward=*/true, aDim, aShapesId );
|
||||
}
|
||||
|
||||
MESSAGE( "VSR - SMESH_Gen::Compute() finished, OK = " << ret);
|
||||
MEMOSTAT;
|
||||
|
||||
SMESHDS_Mesh *myMesh = aMesh.GetMeshDS();
|
||||
MESSAGE("*** compactMesh after compute");
|
||||
//MESSAGE("*** compactMesh after compute");
|
||||
myMesh->compactMesh();
|
||||
|
||||
// fix quadratic mesh by bending iternal links near concave boundary
|
||||
@ -463,8 +457,6 @@ bool SMESH_Gen::Evaluate(SMESH_Mesh & aMesh,
|
||||
const bool anUpward,
|
||||
TSetOfInt* aShapesId)
|
||||
{
|
||||
MESSAGE("SMESH_Gen::Evaluate");
|
||||
|
||||
bool ret = true;
|
||||
|
||||
SMESH_subMesh *sm = aMesh.GetSubMesh(aShape);
|
||||
@ -707,8 +699,6 @@ static bool checkMissing(SMESH_Gen* aGen,
|
||||
if ( aCheckedMap.count( aSubMesh ))
|
||||
return true;
|
||||
|
||||
//MESSAGE("=====checkMissing");
|
||||
|
||||
int ret = true;
|
||||
SMESH_Algo* algo = 0;
|
||||
|
||||
@ -829,8 +819,6 @@ bool SMESH_Gen::GetAlgoState(SMESH_Mesh& theMesh,
|
||||
const TopoDS_Shape& theShape,
|
||||
list< TAlgoStateError > & theErrors)
|
||||
{
|
||||
//MESSAGE("SMESH_Gen::CheckAlgoState");
|
||||
|
||||
bool ret = true;
|
||||
bool hasAlgo = false;
|
||||
|
||||
@ -908,8 +896,6 @@ bool SMESH_Gen::GetAlgoState(SMESH_Mesh& theMesh,
|
||||
// well defined
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
//MESSAGE( "---info on missing hypothesis and find out if all needed algos are");
|
||||
|
||||
// find max dim of global algo
|
||||
int aTopAlgoDim = 0;
|
||||
for (dim = 3; dim > 0; dim--)
|
||||
|
@ -59,7 +59,6 @@ SMESH_Hypothesis::SMESH_Hypothesis(int hypId,
|
||||
|
||||
SMESH_Hypothesis::~SMESH_Hypothesis()
|
||||
{
|
||||
MESSAGE("SMESH_Hypothesis::~SMESH_Hypothesis");
|
||||
StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
|
||||
myStudyContext->mapHypothesis[_hypId] = 0;
|
||||
}
|
||||
@ -115,8 +114,6 @@ int SMESH_Hypothesis::GetStudyId() const
|
||||
|
||||
void SMESH_Hypothesis::NotifySubMeshesHypothesisModification()
|
||||
{
|
||||
MESSAGE("SMESH_Hypothesis::NotifySubMeshesHypothesisModification");
|
||||
|
||||
// for all meshes in study
|
||||
|
||||
StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
|
||||
|
@ -683,7 +683,6 @@ static bool getNodesFromTwoTria(const SMDS_MeshElement * theTria1,
|
||||
bool SMESH_MeshEditor::InverseDiag (const SMDS_MeshElement * theTria1,
|
||||
const SMDS_MeshElement * theTria2 )
|
||||
{
|
||||
MESSAGE("InverseDiag");
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
@ -888,8 +887,6 @@ bool SMESH_MeshEditor::InverseDiag (const SMDS_MeshNode * theNode1,
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
MESSAGE( "::InverseDiag()" );
|
||||
|
||||
const SMDS_MeshElement *tr1, *tr2;
|
||||
if ( !findTriangles( theNode1, theNode2, tr1, tr2 ))
|
||||
return false;
|
||||
@ -1011,8 +1008,6 @@ bool SMESH_MeshEditor::DeleteDiag (const SMDS_MeshNode * theNode1,
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
MESSAGE( "::DeleteDiag()" );
|
||||
|
||||
const SMDS_MeshElement *tr1, *tr2;
|
||||
if ( !findTriangles( theNode1, theNode2, tr1, tr2 ))
|
||||
return false;
|
||||
@ -1105,7 +1100,6 @@ bool SMESH_MeshEditor::DeleteDiag (const SMDS_MeshNode * theNode1,
|
||||
|
||||
bool SMESH_MeshEditor::Reorient (const SMDS_MeshElement * theElem)
|
||||
{
|
||||
MESSAGE("Reorient");
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
@ -2931,8 +2925,6 @@ bool SMESH_MeshEditor::QuadToTri (TIDSortedElemSet & theElems,
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
MESSAGE( "::QuadToTri()" );
|
||||
|
||||
SMESHDS_Mesh * aMesh = GetMeshDS();
|
||||
|
||||
Handle(Geom_Surface) surface;
|
||||
@ -3153,8 +3145,6 @@ bool SMESH_MeshEditor::TriToQuad (TIDSortedElemSet & theElems,
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
MESSAGE( "::TriToQuad()" );
|
||||
|
||||
if ( !theCrit.get() )
|
||||
return false;
|
||||
|
||||
@ -3938,8 +3928,6 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet & theElems,
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
MESSAGE((theSmoothMethod==LAPLACIAN ? "LAPLACIAN" : "CENTROIDAL") << "--::Smooth()");
|
||||
|
||||
if ( theTgtAspectRatio < 1.0 )
|
||||
theTgtAspectRatio = 1.0;
|
||||
|
||||
@ -4476,7 +4464,6 @@ void SMESH_MeshEditor::sweepElement(const SMDS_MeshElement* elem,
|
||||
const size_t nbSteps,
|
||||
SMESH_SequenceOfElemPtr& srcElements)
|
||||
{
|
||||
//MESSAGE("sweepElement " << nbSteps);
|
||||
SMESHDS_Mesh* aMesh = GetMeshDS();
|
||||
|
||||
const int nbNodes = elem->NbNodes();
|
||||
@ -5368,7 +5355,6 @@ SMESH_MeshEditor::RotationSweep(TIDSortedElemSet theElemSets[2],
|
||||
// source elements for each generated one
|
||||
SMESH_SequenceOfElemPtr srcElems, srcNodes;
|
||||
|
||||
MESSAGE( "RotationSweep()");
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetRotation( theAxis, theAngle );
|
||||
gp_Trsf aTrsf2;
|
||||
@ -5939,7 +5925,6 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet theElements[2],
|
||||
const gp_Pnt& theRefPoint,
|
||||
const bool theMakeGroups)
|
||||
{
|
||||
MESSAGE("ExtrusionAlongTrack");
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
@ -6732,37 +6717,29 @@ SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems,
|
||||
string groupPostfix;
|
||||
switch ( theTrsf.Form() ) {
|
||||
case gp_PntMirror:
|
||||
MESSAGE("gp_PntMirror");
|
||||
needReverse = true;
|
||||
groupPostfix = "mirrored";
|
||||
break;
|
||||
case gp_Ax1Mirror:
|
||||
MESSAGE("gp_Ax1Mirror");
|
||||
groupPostfix = "mirrored";
|
||||
break;
|
||||
case gp_Ax2Mirror:
|
||||
MESSAGE("gp_Ax2Mirror");
|
||||
needReverse = true;
|
||||
groupPostfix = "mirrored";
|
||||
break;
|
||||
case gp_Rotation:
|
||||
MESSAGE("gp_Rotation");
|
||||
groupPostfix = "rotated";
|
||||
break;
|
||||
case gp_Translation:
|
||||
MESSAGE("gp_Translation");
|
||||
groupPostfix = "translated";
|
||||
break;
|
||||
case gp_Scale:
|
||||
MESSAGE("gp_Scale");
|
||||
groupPostfix = "scaled";
|
||||
break;
|
||||
case gp_CompoundTrsf: // different scale by axis
|
||||
MESSAGE("gp_CompoundTrsf");
|
||||
groupPostfix = "scaled";
|
||||
break;
|
||||
default:
|
||||
MESSAGE("default");
|
||||
needReverse = false;
|
||||
groupPostfix = "transformed";
|
||||
}
|
||||
@ -7271,7 +7248,6 @@ int SMESH_MeshEditor::SimplifyFace (const vector<const SMDS_MeshNode *>& faceNod
|
||||
|
||||
void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes)
|
||||
{
|
||||
MESSAGE("MergeNodes");
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
@ -8120,7 +8096,6 @@ SMESH_MeshEditor::SewFreeBorder (const SMDS_MeshNode* theBordFirstNode,
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
MESSAGE("::SewFreeBorder()");
|
||||
Sew_Error aResult = SEW_OK;
|
||||
|
||||
// ====================================
|
||||
@ -9757,7 +9732,6 @@ SMESH_MeshEditor::SewSideElements (TIDSortedElemSet& theSide1,
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
MESSAGE ("::::SewSideElements()");
|
||||
if ( theSide1.size() != theSide2.size() )
|
||||
return SEW_DIFF_NB_OF_ELEMENTS;
|
||||
|
||||
@ -10538,7 +10512,6 @@ bool SMESH_MeshEditor::doubleNodes(SMESHDS_Mesh* theMeshDS,
|
||||
TNodeNodeMap& theNodeNodeMap,
|
||||
const bool theIsDoubleElem )
|
||||
{
|
||||
MESSAGE("doubleNodes");
|
||||
// iterate through element and duplicate them (by nodes duplication)
|
||||
bool res = false;
|
||||
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,
|
||||
const std::list< int >& theListOfModifiedElems )
|
||||
{
|
||||
MESSAGE("DoubleNodes");
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
@ -10678,7 +10650,6 @@ bool SMESH_MeshEditor::DoubleNodes( const std::list< int >& theListOfNodes,
|
||||
vector<const SMDS_MeshNode*> aNodeArr = anElemToNodesIter->second;
|
||||
if ( anElem )
|
||||
{
|
||||
MESSAGE("ChangeElementNodes");
|
||||
aMeshDS->ChangeElementNodes( anElem, &aNodeArr[ 0 ], anElem->NbNodes() );
|
||||
}
|
||||
}
|
||||
@ -10788,7 +10759,6 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
|
||||
continue;
|
||||
gp_XYZ normal;
|
||||
SMESH_MeshAlgos::FaceNormal( anElem, normal, /*normalized=*/true );
|
||||
MESSAGE("element " << ielem++ << " normal " << normal.X() << " " << normal.Y() << " " << normal.Z());
|
||||
std::set<const SMDS_MeshNode*> nodesElem;
|
||||
nodesElem.clear();
|
||||
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();
|
||||
for (; nodit != nodesElem.end(); nodit++)
|
||||
{
|
||||
MESSAGE(" noeud ");
|
||||
const SMDS_MeshNode* aNode = *nodit;
|
||||
if ( !aNode || theNodesNot.find(aNode) != theNodesNot.end() )
|
||||
continue;
|
||||
@ -10810,7 +10779,6 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
|
||||
SMDS_ElemIteratorPtr backElemItr = aNode->GetInverseElementIterator();
|
||||
while ( backElemItr->more() )
|
||||
{
|
||||
MESSAGE(" backelem ");
|
||||
const SMDS_MeshElement* curElem = backElemItr->next();
|
||||
if (alreadyCheckedElems.find(curElem) != alreadyCheckedElems.end())
|
||||
continue;
|
||||
@ -10832,10 +10800,8 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
|
||||
p.SetCoord( x/nb -aNode->X(),
|
||||
y/nb -aNode->Y(),
|
||||
z/nb -aNode->Z() );
|
||||
MESSAGE(" check " << p.X() << " " << p.Y() << " " << p.Z());
|
||||
if (normal*p > 0)
|
||||
{
|
||||
MESSAGE(" --- inserted")
|
||||
theAffectedElems.insert( curElem );
|
||||
}
|
||||
else if (curElem->GetType() == SMDSAbs_Edge)
|
||||
@ -10861,7 +10827,6 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
|
||||
}
|
||||
if (onside)
|
||||
{
|
||||
MESSAGE(" --- edge onside inserted")
|
||||
theAffectedElems.insert(anEdge);
|
||||
}
|
||||
}
|
||||
@ -10886,21 +10851,18 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
|
||||
int ielem;
|
||||
for ( ielem = 1; elemItr != theElems.end(); ++elemItr )
|
||||
{
|
||||
MESSAGE("element " << ielem++);
|
||||
SMDS_MeshElement* anElem = (SMDS_MeshElement*)*elemItr;
|
||||
if (!anElem)
|
||||
continue;
|
||||
SMDS_ElemIteratorPtr nodeItr = anElem->nodesIterator();
|
||||
while ( nodeItr->more() )
|
||||
{
|
||||
MESSAGE(" noeud ");
|
||||
const SMDS_MeshNode* aNode = cast2Node(nodeItr->next());
|
||||
if ( !aNode || theNodesNot.find(aNode) != theNodesNot.end() )
|
||||
continue;
|
||||
SMDS_ElemIteratorPtr backElemItr = aNode->GetInverseElementIterator();
|
||||
while ( backElemItr->more() )
|
||||
{
|
||||
MESSAGE(" backelem ");
|
||||
const SMDS_MeshElement* curElem = backElemItr->next();
|
||||
if ( curElem && theElems.find(curElem) == theElems.end() &&
|
||||
( 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)
|
||||
{
|
||||
// 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 v1(p0, g1);
|
||||
gp_Vec v2(p0, g2);
|
||||
|
@ -39,7 +39,7 @@ void memostat(const char* f, int l)
|
||||
}
|
||||
|
||||
#if defined(_DEBUG_) || defined(_DEBUG)
|
||||
#define MEMOSTAT memostat( __FILE__, __LINE__ )
|
||||
#define MEMOSTAT //memostat( __FILE__, __LINE__ )
|
||||
#else
|
||||
#define MEMOSTAT
|
||||
#endif
|
||||
|
@ -54,7 +54,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG_
|
||||
static int MYDEBUG = 1;
|
||||
static int MYDEBUG = 0;
|
||||
#else
|
||||
static int MYDEBUG = 0;
|
||||
#endif
|
||||
@ -886,20 +886,22 @@ bool
|
||||
SMESH_Client::Update(bool theIsClear)
|
||||
{
|
||||
bool anIsModified = true;
|
||||
if(mySMESHDSMesh){
|
||||
MESSAGE("Update mySMESHDSMesh");
|
||||
if(mySMESHDSMesh)
|
||||
{
|
||||
if ( MYDEBUG ) MESSAGE("Update mySMESHDSMesh");
|
||||
SMESHDS_Script* aScript = mySMESHDSMesh->GetScript();
|
||||
anIsModified = aScript->IsModified();
|
||||
aScript->SetModified(false);
|
||||
}else{
|
||||
MESSAGE("Update CORBA");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( MYDEBUG ) MESSAGE("Update CORBA");
|
||||
SMESH::log_array_var aSeq = myMeshServer->GetLog( theIsClear );
|
||||
CORBA::Long aLength = aSeq->length();
|
||||
anIsModified = aLength > 0;
|
||||
if( MYDEBUG )
|
||||
MESSAGE( "Update: length of the script is "<<aLength );
|
||||
if ( MYDEBUG ) MESSAGE( "Update: length of the script is "<<aLength );
|
||||
|
||||
if(!anIsModified)
|
||||
if ( !anIsModified )
|
||||
return false;
|
||||
|
||||
// update client mesh structure by logged changes commands
|
||||
|
@ -220,7 +220,6 @@ bool SMESHDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * elem,
|
||||
const SMDS_MeshNode * nodes[],
|
||||
const int nbnodes)
|
||||
{
|
||||
//MESSAGE("SMESHDS_Mesh::ChangeElementNodes");
|
||||
if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, nbnodes ))
|
||||
return false;
|
||||
|
||||
@ -978,7 +977,6 @@ void SMESHDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elt,
|
||||
SMESHDS_SubMesh * subMesh,
|
||||
bool fromGroups)
|
||||
{
|
||||
//MESSAGE(" --------------------------------> SMESHDS_Mesh::RemoveFreeElement " << subMesh << " " << fromGroups);
|
||||
if (elt->GetType() == SMDSAbs_Node) {
|
||||
RemoveFreeNode( static_cast<const SMDS_MeshNode*>(elt), subMesh, fromGroups);
|
||||
return;
|
||||
@ -1345,7 +1343,6 @@ int SMESHDS_Mesh::AddCompoundSubmesh(const TopoDS_Shape& S,
|
||||
bool all = ( type == TopAbs_SHAPE );
|
||||
if ( all ) // corresponding simple submesh may exist
|
||||
aMainIndex = -aMainIndex;
|
||||
//MESSAGE("AddCompoundSubmesh index = " << aMainIndex );
|
||||
SMESHDS_SubMesh * aNewSub = NewSubMesh( aMainIndex );
|
||||
if ( !aNewSub->IsComplexSubmesh() ) // is empty
|
||||
{
|
||||
@ -2155,7 +2152,7 @@ void SMESHDS_Mesh::compactMesh()
|
||||
int newNodeSize = 0;
|
||||
int nbNodes = myNodes.size();
|
||||
int nbVtkNodes = myGrid->GetNumberOfPoints();
|
||||
MESSAGE("nbNodes=" << nbNodes << " nbVtkNodes=" << nbVtkNodes);
|
||||
//MESSAGE("nbNodes=" << nbNodes << " nbVtkNodes=" << nbVtkNodes);
|
||||
int nbNodeTemp = nbVtkNodes;
|
||||
if (nbNodes > nbVtkNodes)
|
||||
nbNodeTemp = nbNodes;
|
||||
@ -2173,13 +2170,13 @@ void SMESHDS_Mesh::compactMesh()
|
||||
}
|
||||
}
|
||||
bool areNodesModified = (newNodeSize < nbVtkNodes);
|
||||
MESSAGE("------------------------- compactMesh Nodes Modified: " << areNodesModified);
|
||||
//MESSAGE("------------------------- compactMesh Nodes Modified: " << areNodesModified);
|
||||
areNodesModified = true;
|
||||
|
||||
int newCellSize = 0;
|
||||
int nbCells = myCells.size();
|
||||
int nbVtkCells = myGrid->GetNumberOfCells();
|
||||
MESSAGE("nbCells=" << nbCells << " nbVtkCells=" << nbVtkCells);
|
||||
//MESSAGE("nbCells=" << nbCells << " nbVtkCells=" << nbVtkCells);
|
||||
int nbCellTemp = nbVtkCells;
|
||||
if (nbCells > nbVtkCells)
|
||||
nbCellTemp = nbCells;
|
||||
@ -2191,9 +2188,9 @@ void SMESHDS_Mesh::compactMesh()
|
||||
{
|
||||
if (myCells[i])
|
||||
{
|
||||
// //idCellsOldToNew[i] = myCellIdVtkToSmds[i]; // valid vtk indexes are > = 0
|
||||
// int vtkid = myCells[i]->getVtkId();
|
||||
// idCellsOldToNew[vtkid] = i; // old vtkId --> old smdsId (not used in input)
|
||||
// //idCellsOldToNew[i] = myCellIdVtkToSmds[i]; // valid vtk indexes are > = 0
|
||||
// int vtkid = myCells[i]->getVtkId();
|
||||
// idCellsOldToNew[vtkid] = i; // old vtkId --> old smdsId (not used in input)
|
||||
newCellSize++;
|
||||
}
|
||||
}
|
||||
@ -2219,7 +2216,7 @@ void SMESHDS_Mesh::compactMesh()
|
||||
|
||||
if (areNodesModified)
|
||||
{
|
||||
MESSAGE("-------------- modify myNodes");
|
||||
//MESSAGE("-------------- modify myNodes");
|
||||
SetOfNodes newNodes;
|
||||
newNodes.resize(newNodeSize+1,0); // 0 not used, SMDS numbers 1..n
|
||||
int newSmdsId = 0;
|
||||
@ -2239,7 +2236,7 @@ void SMESHDS_Mesh::compactMesh()
|
||||
}
|
||||
myNodes.swap(newNodes);
|
||||
this->myNodeIDFactory->emptyPool(newSmdsId); // newSmdsId = number of nodes
|
||||
MESSAGE("myNodes.size " << myNodes.size());
|
||||
//MESSAGE("myNodes.size " << myNodes.size());
|
||||
}
|
||||
|
||||
// --- SMDS_MeshCell, myCellIdVtkToSmds, myCellIdSmdsToVtk, myCells
|
||||
@ -2258,9 +2255,9 @@ void SMESHDS_Mesh::compactMesh()
|
||||
myCells[oldSmdsId]->setVtkId(newVtkId);
|
||||
}
|
||||
}
|
||||
// MESSAGE("myCells.size()=" << myCells.size()
|
||||
// << " myCellIdSmdsToVtk.size()=" << myCellIdSmdsToVtk.size()
|
||||
// << " myCellIdVtkToSmds.size()=" << myCellIdVtkToSmds.size() );
|
||||
// MESSAGE("myCells.size()=" << myCells.size()
|
||||
// << " myCellIdSmdsToVtk.size()=" << myCellIdSmdsToVtk.size()
|
||||
// << " myCellIdVtkToSmds.size()=" << myCellIdVtkToSmds.size() );
|
||||
|
||||
SetOfCells newCells;
|
||||
//vector<int> newSmdsToVtk;
|
||||
@ -2292,8 +2289,7 @@ void SMESHDS_Mesh::compactMesh()
|
||||
myCells.swap(newCells);
|
||||
//myCellIdSmdsToVtk.swap(newSmdsToVtk);
|
||||
myCellIdVtkToSmds.swap(newVtkToSmds);
|
||||
MESSAGE("myCells.size()=" << myCells.size()
|
||||
<< " myCellIdVtkToSmds.size()=" << myCellIdVtkToSmds.size() );
|
||||
//MESSAGE("myCells.size()="<< myCells.size()<<" myCellIdVtkToSmds.size()="<<myCellIdVtkToSmds.size() );
|
||||
this->myElementIDFactory->emptyPool(newSmdsId);
|
||||
|
||||
this->myScript->SetModified(true); // notify GUI client for buildPrs when update
|
||||
|
@ -1650,18 +1650,16 @@ namespace
|
||||
_PTR(SObject) SO = aStudy->FindObjectID( It.Value()->getEntry() );
|
||||
if ( SO ) {
|
||||
CORBA::Object_var aObject = SMESH::SObjectToObject( SO );
|
||||
SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( aObject );
|
||||
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( aObject );
|
||||
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aObject );
|
||||
if ( !aMesh->_is_nil() || !aSubMesh->_is_nil() || !aGroup->_is_nil() ) {
|
||||
if ( SMESH_Actor *anActor = SMESH::FindActorByEntry(anIO->getEntry()) ) {
|
||||
anActor->SetControlMode(aControl);
|
||||
anActor->GetScalarBarActor()->SetTitle( functorToString( anActor->GetFunctor() ).toLatin1().constData() );
|
||||
SMESH::SMESH_IDSource_var anIDSrc = SMESH::SMESH_IDSource::_narrow( aObject );
|
||||
if ( !anIDSrc->_is_nil() ) {
|
||||
if ( SMESH_Actor *anActor = SMESH::FindActorByEntry( anIO->getEntry()) ) {
|
||||
QString functorName = functorToString( anActor->GetFunctor() );
|
||||
anActor->SetControlMode( aControl );
|
||||
anActor->GetScalarBarActor()->SetTitle( functorName.toLatin1().constData() );
|
||||
SMESH::RepaintCurrentView();
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
if ( anActor->GetPlot2Histogram() ) {
|
||||
SPlot2d_Histogram* aHistogram = anActor->UpdatePlot2Histogram();
|
||||
QString functorName = functorToString( anActor->GetFunctor() );
|
||||
QString aHistogramName("%1 : %2");
|
||||
aHistogramName = aHistogramName.arg( anIO->getName() ).arg( functorName );
|
||||
aHistogram->setName( aHistogramName );
|
||||
@ -1956,7 +1954,7 @@ SalomeApp_Module( "SMESH" )
|
||||
{
|
||||
CORBA::Boolean anIsEmbeddedMode;
|
||||
myComponentSMESH = SMESH_Client::GetSMESHGen(getApp()->orb(),anIsEmbeddedMode);
|
||||
MESSAGE("-------------------------------> anIsEmbeddedMode=" << anIsEmbeddedMode);
|
||||
//MESSAGE("-------------------------------> anIsEmbeddedMode=" << anIsEmbeddedMode);
|
||||
|
||||
// 0019923: EDF 765 SMESH : default values of hypothesis
|
||||
SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this);
|
||||
@ -2596,6 +2594,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
case SMESHOp::OpShow:
|
||||
case SMESHOp::OpShowOnly:
|
||||
{
|
||||
SUIT_OverrideCursor wc;
|
||||
SMESH::EDisplaing anAction;
|
||||
switch (theCommandID) {
|
||||
case SMESHOp::OpHide: anAction = SMESH::eErase; break;
|
||||
@ -2610,7 +2609,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
|
||||
if ( theCommandID==SMESHOp::OpShowOnly )
|
||||
{
|
||||
MESSAGE("anAction = SMESH::eDisplayOnly");
|
||||
//MESSAGE("anAction = SMESH::eDisplayOnly");
|
||||
startOperation( myEraseAll );
|
||||
}
|
||||
|
||||
@ -2639,7 +2638,6 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
|
||||
// PAL13338 + PAL15161 -->
|
||||
if ( ( theCommandID==SMESHOp::OpShow || theCommandID==SMESHOp::OpShowOnly ) && !checkLock(aStudy)) {
|
||||
MESSAGE("anAction = SMESH::eDisplayOnly");
|
||||
SMESH::UpdateView();
|
||||
SMESHGUI::GetSMESHGUI()->EmitSignalVisibilityChanged();
|
||||
}
|
||||
@ -2650,7 +2648,6 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
}
|
||||
|
||||
if (anAction == SMESH::eErase) {
|
||||
MESSAGE("anAction == SMESH::eErase");
|
||||
SALOME_ListIO l1;
|
||||
aSel->setSelectedObjects( l1 );
|
||||
}
|
||||
@ -2670,9 +2667,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
( new SMESHGUI_NodesDlg( this ) )->show();
|
||||
}
|
||||
else {
|
||||
SUIT_MessageBox::warning(desktop(),
|
||||
tr("SMESH_WRN_WARNING"),
|
||||
tr("SMESH_WRN_VIEWER_VTK"));
|
||||
SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"),tr("SMESH_WRN_VIEWER_VTK"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2706,8 +2701,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
{
|
||||
if ( !vtkwnd )
|
||||
{
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "NOT_A_VTK_VIEWER" ) );
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), tr( "NOT_A_VTK_VIEWER" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2737,8 +2731,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
{
|
||||
if ( !vtkwnd )
|
||||
{
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "NOT_A_VTK_VIEWER" ) );
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), tr( "NOT_A_VTK_VIEWER" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2767,8 +2760,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
( new SMESHGUI_SmoothingDlg( this ) )->show();
|
||||
}
|
||||
else {
|
||||
SUIT_MessageBox::warning(desktop(),
|
||||
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
SUIT_MessageBox::warning(desktop(), tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2779,8 +2771,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
EmitSignalDeactivateDialog();
|
||||
( new SMESHGUI_ExtrusionDlg ( this ) )->show();
|
||||
} else {
|
||||
SUIT_MessageBox::warning(desktop(),
|
||||
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2791,8 +2782,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
EmitSignalDeactivateDialog();
|
||||
( new SMESHGUI_ExtrusionAlongPathDlg( this ) )->show();
|
||||
} else {
|
||||
SUIT_MessageBox::warning(desktop(),
|
||||
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2804,8 +2794,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
( new SMESHGUI_RevolutionDlg( this ) )->show();
|
||||
}
|
||||
else {
|
||||
SUIT_MessageBox::warning(desktop(),
|
||||
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2819,8 +2808,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
( new SMESHGUI_MeshPatternDlg( this ) )->show();
|
||||
}
|
||||
else {
|
||||
SUIT_MessageBox::warning(desktop(),
|
||||
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2837,8 +2825,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
{
|
||||
if ( !vtkwnd )
|
||||
{
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "NOT_A_VTK_VIEWER" ) );
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2865,8 +2852,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
{
|
||||
if ( !vtkwnd )
|
||||
{
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "NOT_A_VTK_VIEWER" ) );
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2943,8 +2929,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
{
|
||||
if ( !vtkwnd )
|
||||
{
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "NOT_A_VTK_VIEWER" ) );
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3000,8 +2985,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
{
|
||||
if ( !vtkwnd )
|
||||
{
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "NOT_A_VTK_VIEWER" ) );
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3041,8 +3025,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
{
|
||||
if ( !vtkwnd )
|
||||
{
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "NOT_A_VTK_VIEWER" ) );
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3080,8 +3063,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
{
|
||||
if ( !vtkwnd )
|
||||
{
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "NOT_A_VTK_VIEWER" ) );
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),tr( "NOT_A_VTK_VIEWER" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3223,8 +3205,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
( new SMESHGUI_AddMeshElementDlg( this, type ) )->show();
|
||||
}
|
||||
else {
|
||||
SUIT_MessageBox::warning(desktop(),
|
||||
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -3236,8 +3217,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
( new SMESHGUI_CreatePolyhedralVolumeDlg( this ) )->show();
|
||||
}
|
||||
else {
|
||||
SUIT_MessageBox::warning(SMESHGUI::desktop(),
|
||||
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
SUIT_MessageBox::warning(desktop(),tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ namespace SMESH
|
||||
return false;
|
||||
if ( algoData->BasicHypos.contains( hypType ))
|
||||
return true;
|
||||
if ( algoData->OptionalHypos.contains( hypType)) {
|
||||
if ( algoData->OptionalHypos.contains( hypType )) {
|
||||
isAuxiliary = true;
|
||||
return true;
|
||||
}
|
||||
|
@ -854,7 +854,7 @@ namespace SMESH
|
||||
|
||||
bool Update(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay)
|
||||
{
|
||||
MESSAGE("Update");
|
||||
//MESSAGE("Update");
|
||||
_PTR(Study) aStudy = GetActiveStudyDocument();
|
||||
CORBA::Long anId = aStudy->StudyId();
|
||||
if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry())) {
|
||||
@ -867,7 +867,7 @@ namespace SMESH
|
||||
|
||||
bool UpdateNulData(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay)
|
||||
{
|
||||
MESSAGE("UpdateNulData");
|
||||
//MESSAGE("UpdateNulData");
|
||||
_PTR(Study) aStudy = GetActiveStudyDocument();
|
||||
CORBA::Long anId = aStudy->StudyId();
|
||||
if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry(), true)) {
|
||||
@ -878,7 +878,8 @@ namespace SMESH
|
||||
return false;
|
||||
}
|
||||
|
||||
void UpdateSelectionProp( SMESHGUI* theModule ) {
|
||||
void UpdateSelectionProp( SMESHGUI* theModule )
|
||||
{
|
||||
if( !theModule )
|
||||
return;
|
||||
|
||||
@ -905,7 +906,8 @@ namespace SMESH
|
||||
return;
|
||||
}
|
||||
|
||||
QColor aHiColor = mgr->colorValue( "SMESH", "selection_object_color", Qt::white ),
|
||||
QColor
|
||||
aHiColor = mgr->colorValue( "SMESH", "selection_object_color", Qt::white ),
|
||||
aSelColor = mgr->colorValue( "SMESH", "selection_element_color", Qt::yellow ),
|
||||
aPreColor = mgr->colorValue( "SMESH", "highlight_color", Qt::cyan );
|
||||
|
||||
@ -917,13 +919,16 @@ namespace SMESH
|
||||
if (aLineWidth > maxSize) maxSize = aLineWidth;
|
||||
// if (aBallSize > maxSize) maxSize = aBallSize;
|
||||
|
||||
double SP1 = mgr->doubleValue( "SMESH", "selection_precision_node", 0.025 ),
|
||||
double
|
||||
SP1 = mgr->doubleValue( "SMESH", "selection_precision_node", 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
|
||||
if(SVTK_ViewWindow* aVtkView = GetVtkViewWindow( views[i] )){
|
||||
if ( SVTK_ViewWindow* aVtkView = GetVtkViewWindow( views[i] ))
|
||||
{
|
||||
// mesh element selection
|
||||
aVtkView->SetSelectionProp(aSelColor.red()/255.,
|
||||
aSelColor.green()/255.,
|
||||
@ -940,8 +945,8 @@ namespace SMESH
|
||||
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
|
||||
vtkActorCollection *aCollection = aCopy.GetActors();
|
||||
aCollection->InitTraversal();
|
||||
while(vtkActor *anAct = aCollection->GetNextActor()){
|
||||
if(SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct)){
|
||||
while ( vtkActor *anAct = aCollection->GetNextActor() ) {
|
||||
if ( SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct) ) {
|
||||
anActor->SetHighlightColor(aHiColor.red()/255.,
|
||||
aHiColor.green()/255.,
|
||||
aHiColor.blue()/255.);
|
||||
@ -1076,8 +1081,9 @@ namespace SMESH
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void SetPointRepresentation(bool theIsVisible){
|
||||
if(SVTK_ViewWindow* aViewWindow = GetCurrentVtkView()){
|
||||
void SetPointRepresentation(bool theIsVisible)
|
||||
{
|
||||
if ( SVTK_ViewWindow* aViewWindow = GetCurrentVtkView() ) {
|
||||
vtkRenderer *aRenderer = aViewWindow->getRenderer();
|
||||
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
|
||||
vtkActorCollection *aCollection = aCopy.GetActors();
|
||||
@ -1094,8 +1100,9 @@ namespace SMESH
|
||||
}
|
||||
|
||||
|
||||
void SetPickable(SMESH_Actor* theActor){
|
||||
if(SVTK_ViewWindow* aWnd = GetCurrentVtkView()){
|
||||
void SetPickable(SMESH_Actor* theActor)
|
||||
{
|
||||
if ( SVTK_ViewWindow* aWnd = GetCurrentVtkView() ) {
|
||||
int anIsAllPickable = (theActor == NULL);
|
||||
vtkRenderer *aRenderer = aWnd->getRenderer();
|
||||
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
|
||||
@ -1204,7 +1211,8 @@ namespace SMESH
|
||||
return -1;
|
||||
}
|
||||
|
||||
int GetNameOfSelectedNodes(LightApp_SelectionMgr *theMgr, QString& theName){
|
||||
int GetNameOfSelectedNodes(LightApp_SelectionMgr *theMgr, QString& theName)
|
||||
{
|
||||
theName = "";
|
||||
SALOME_ListIO selected; theMgr->selectedObjects( selected );
|
||||
if(selected.Extent() == 1){
|
||||
@ -1215,7 +1223,7 @@ namespace SMESH
|
||||
}
|
||||
|
||||
|
||||
int GetNameOfSelectedElements(LightApp_SelectionMgr *theMgr,
|
||||
int GetNameOfSelectedElements(LightApp_SelectionMgr * theMgr,
|
||||
const Handle(SALOME_InteractiveObject)& theIO,
|
||||
QString& theName)
|
||||
{
|
||||
@ -1445,8 +1453,9 @@ namespace SMESH
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
void ClearPlot2Viewers( SUIT_ViewWindow* theWindow ) {
|
||||
if(SVTK_ViewWindow* aViewWindow = GetVtkViewWindow(theWindow)){
|
||||
void ClearPlot2Viewers( SUIT_ViewWindow* theWindow )
|
||||
{
|
||||
if ( SVTK_ViewWindow* aViewWindow = GetVtkViewWindow(theWindow) ) {
|
||||
vtkRenderer *aRenderer = aViewWindow->getRenderer();
|
||||
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
|
||||
vtkActorCollection *aCollection = aCopy.GetActors();
|
||||
|
@ -104,7 +104,7 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
||||
QString aResName = atts.value("resources");
|
||||
if (aResName != "")
|
||||
{
|
||||
MESSAGE("Loading Resources " << aResName.toLatin1().data());
|
||||
//MESSAGE("Loading Resources " << aResName.toLatin1().data());
|
||||
SUIT_ResourceMgr* resMgr = SMESHGUI::resourceMgr();
|
||||
QString lang = resMgr->stringValue( resMgr->langSection(), "language", "en" );
|
||||
resMgr->loadTranslator( "resources", QString( "%1_msg_%2.qm" ).arg( aResName, lang ) );
|
||||
|
@ -45,7 +45,6 @@ SMESH_2D_Algo_i::SMESH_2D_Algo_i( PortableServer::POA_ptr thePOA )
|
||||
SMESH_Hypothesis_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()
|
||||
{
|
||||
MESSAGE( "SMESH_2D_Algo_i::~SMESH_2D_Algo_i" );
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
|
@ -45,7 +45,6 @@ SMESH_3D_Algo_i::SMESH_3D_Algo_i( PortableServer::POA_ptr thePOA )
|
||||
SMESH_Hypothesis_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()
|
||||
{
|
||||
MESSAGE( "SMESH_3D_Algo_i::~SMESH_3D_Algo_i" );
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
|
@ -48,7 +48,6 @@ SMESH_Algo_i::SMESH_Algo_i( PortableServer::POA_ptr thePOA )
|
||||
: SALOME::GenericObj_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()
|
||||
{
|
||||
MESSAGE( "SMESH_Algo_i::~SMESH_Algo_i" );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -74,7 +72,6 @@ SMESH_Algo_i::~SMESH_Algo_i()
|
||||
|
||||
SMESH::ListOfHypothesisName* SMESH_Algo_i::GetCompatibleHypothesis()
|
||||
{
|
||||
MESSAGE( "SMESH_Algo_i::GetCompatibleHypothesis" );
|
||||
SMESH::ListOfHypothesisName_var listOfHypothesis = new SMESH::ListOfHypothesisName;
|
||||
const vector<string>& hypList = ( ( ::SMESH_Algo* )myBaseImpl )->GetCompatibleHypothesis();
|
||||
int nbHyp = hypList.size();
|
||||
|
@ -285,7 +285,6 @@ SMESH_Gen_i::SMESH_Gen_i( CORBA::ORB_ptr orb,
|
||||
const char* interfaceName )
|
||||
: Engines_Component_i( orb, poa, contId, instanceName, interfaceName )
|
||||
{
|
||||
MESSAGE( "SMESH_Gen_i::SMESH_Gen_i : standard constructor" );
|
||||
|
||||
myOrb = CORBA::ORB::_duplicate(orb);
|
||||
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()
|
||||
{
|
||||
MESSAGE( "SMESH_Gen_i::~SMESH_Gen_i" );
|
||||
|
||||
// delete hypothesis creators
|
||||
map<string, GenericHypothesisCreator_i*>::iterator itHyp, itHyp2;
|
||||
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
|
||||
SMESH_Mesh_i* meshServant = new SMESH_Mesh_i( GetPOA(), this, GetCurrentStudyID() );
|
||||
// create a new mesh object
|
||||
MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode);
|
||||
if(MYDEBUG) MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode);
|
||||
meshServant->SetImpl( myGen.CreateMesh( GetCurrentStudyID(), myIsEmbeddedMode ));
|
||||
|
||||
// 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 )
|
||||
{
|
||||
myIsEmbeddedMode = theMode;
|
||||
MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode);
|
||||
|
||||
if ( !myIsEmbeddedMode ) {
|
||||
//PAL10867: disable signals catching with "noexcepthandler" option
|
||||
|
@ -72,7 +72,6 @@ SMESH_Group_i::SMESH_Group_i( PortableServer::POA_ptr thePOA,
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_GroupBase_i( thePOA, theMeshServant, theLocalID )
|
||||
{
|
||||
//MESSAGE("SMESH_Group_i; this = "<<this );
|
||||
}
|
||||
|
||||
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 ),
|
||||
SMESH_GroupBase_i( thePOA, theMeshServant, theLocalID )
|
||||
{
|
||||
//MESSAGE("SMESH_GroupOnGeom_i; this = "<<this );
|
||||
}
|
||||
|
||||
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 ),
|
||||
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();
|
||||
if (aGroup)
|
||||
return CORBA::string_dup (aGroup->GetName());
|
||||
MESSAGE("get name of a vague group");
|
||||
return CORBA::string_dup( "NO_NAME" );
|
||||
}
|
||||
|
||||
@ -203,7 +199,6 @@ SMESH::ElementType SMESH_GroupBase_i::GetType()
|
||||
}
|
||||
return aType;
|
||||
}
|
||||
MESSAGE("get type of a vague group");
|
||||
return SMESH::ALL;
|
||||
}
|
||||
|
||||
@ -222,7 +217,6 @@ CORBA::Long SMESH_GroupBase_i::Size()
|
||||
SMESHDS_GroupBase* aGroupDS = GetGroupDS();
|
||||
if (aGroupDS)
|
||||
return aGroupDS->Extent();
|
||||
MESSAGE("get size of a vague group");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -240,7 +234,6 @@ CORBA::Boolean SMESH_GroupBase_i::IsEmpty()
|
||||
SMESHDS_GroupBase* aGroupDS = GetGroupDS();
|
||||
if (aGroupDS)
|
||||
return aGroupDS->IsEmpty();
|
||||
MESSAGE("checking IsEmpty of a vague group");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -280,8 +273,6 @@ void SMESH_Group_i::Clear()
|
||||
return;
|
||||
}
|
||||
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();
|
||||
if (aGroupDS)
|
||||
return aGroupDS->Contains(theID);
|
||||
MESSAGE("attempt to check contents of a vague group");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -631,7 +621,6 @@ SALOMEDS::Color SMESH_GroupBase_i::GetColor()
|
||||
|
||||
return aColor;
|
||||
}
|
||||
MESSAGE("get color of a group");
|
||||
return SALOMEDS::Color();
|
||||
}
|
||||
|
||||
@ -889,7 +878,6 @@ SMESH::long_array* SMESH_GroupOnFilter_i::GetListOfID()
|
||||
if ( 0 < aRes->length() && aRes->length() < 100 ) // for comfortable testing ;)
|
||||
std::sort( &aRes[0], &aRes[0] + aRes->length() );
|
||||
}
|
||||
MESSAGE("get list of IDs of a vague group");
|
||||
return aRes._retn();
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,6 @@ SMESH_Mesh_i::SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
|
||||
CORBA::Long studyId )
|
||||
: SALOME::GenericObj_i( thePOA )
|
||||
{
|
||||
MESSAGE("SMESH_Mesh_i");
|
||||
_impl = NULL;
|
||||
_gen_i = gen_i;
|
||||
_id = _idGenerator++;
|
||||
@ -127,8 +126,6 @@ SMESH_Mesh_i::SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
|
||||
|
||||
SMESH_Mesh_i::~SMESH_Mesh_i()
|
||||
{
|
||||
MESSAGE("~SMESH_Mesh_i");
|
||||
|
||||
// destroy groups
|
||||
map<int, SMESH::SMESH_GroupBase_ptr>::iterator itGr;
|
||||
for (itGr = _mapGroups.begin(); itGr != _mapGroups.end(); itGr++)
|
||||
@ -4265,8 +4262,7 @@ CORBA::LongLong SMESH_Mesh_i::GetMeshPtr()
|
||||
_preMeshInfo->FullLoadFromFile();
|
||||
|
||||
CORBA::LongLong pointeur = CORBA::LongLong(_impl);
|
||||
if ( MYDEBUG )
|
||||
MESSAGE("CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() "<<pointeur);
|
||||
if ( MYDEBUG ) MESSAGE("CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() "<<pointeur);
|
||||
return pointeur;
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1159,6 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
|
||||
{
|
||||
_src2tgtNodes.clear();
|
||||
|
||||
MESSAGE("Projection_2D Compute");
|
||||
if ( !_sourceHypo )
|
||||
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
|
||||
projDone = projectBy2DSimilarity( tgtFace, srcFace, tgtWires, srcWires,
|
||||
shape2ShapeMap, _src2tgtNodes, is1DComputed);
|
||||
shape2ShapeMap, _src2tgtNodes, is1DComputed );
|
||||
}
|
||||
if ( !projDone )
|
||||
{
|
||||
|
@ -76,11 +76,11 @@ 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_1D_Algo(hypId, studyId, gen)
|
||||
:SMESH_1D_Algo( hypId, studyId, gen )
|
||||
{
|
||||
MESSAGE("StdMeshers_Regular_1D::StdMeshers_Regular_1D");
|
||||
_name = "Regular_1D";
|
||||
_shapeType = (1 << TopAbs_EDGE);
|
||||
_fpHyp = 0;
|
||||
@ -155,7 +155,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
|
||||
string hypName = theHyp->GetName();
|
||||
|
||||
if (hypName == "LocalLength")
|
||||
if ( hypName == "LocalLength" )
|
||||
{
|
||||
const StdMeshers_LocalLength * hyp =
|
||||
dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
|
||||
@ -167,7 +167,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
|
||||
else if (hypName == "MaxLength")
|
||||
else if ( hypName == "MaxLength" )
|
||||
{
|
||||
const StdMeshers_MaxLength * hyp =
|
||||
dynamic_cast <const StdMeshers_MaxLength * >(theHyp);
|
||||
@ -182,9 +182,8 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
|
||||
else if (hypName == "NumberOfSegments")
|
||||
else if ( hypName == "NumberOfSegments" )
|
||||
{
|
||||
MESSAGE("CheckHypothesis: NumberOfSegments");
|
||||
const StdMeshers_NumberOfSegments * hyp =
|
||||
dynamic_cast <const StdMeshers_NumberOfSegments * >(theHyp);
|
||||
ASSERT(hyp);
|
||||
@ -218,7 +217,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
|
||||
else if (hypName == "Arithmetic1D")
|
||||
else if ( hypName == "Arithmetic1D" )
|
||||
{
|
||||
const StdMeshers_Arithmetic1D * hyp =
|
||||
dynamic_cast <const StdMeshers_Arithmetic1D * >(theHyp);
|
||||
@ -233,7 +232,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
|
||||
else if (hypName == "GeometricProgression")
|
||||
else if ( hypName == "GeometricProgression" )
|
||||
{
|
||||
const StdMeshers_Geometric1D * hyp =
|
||||
dynamic_cast <const StdMeshers_Geometric1D * >(theHyp);
|
||||
@ -248,7 +247,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
|
||||
else if (hypName == "FixedPoints1D") {
|
||||
else if ( hypName == "FixedPoints1D" ) {
|
||||
_fpHyp = dynamic_cast <const StdMeshers_FixedPoints1D*>(theHyp);
|
||||
ASSERT(_fpHyp);
|
||||
_hypType = FIXED_POINTS_1D;
|
||||
@ -258,7 +257,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
|
||||
else if (hypName == "StartEndLength")
|
||||
else if ( hypName == "StartEndLength" )
|
||||
{
|
||||
const StdMeshers_StartEndLength * hyp =
|
||||
dynamic_cast <const StdMeshers_StartEndLength * >(theHyp);
|
||||
@ -273,7 +272,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
|
||||
else if (hypName == "Deflection1D")
|
||||
else if ( hypName == "Deflection1D" )
|
||||
{
|
||||
const StdMeshers_Deflection1D * hyp =
|
||||
dynamic_cast <const StdMeshers_Deflection1D * >(theHyp);
|
||||
@ -284,7 +283,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
|
||||
else if (hypName == "AutomaticLength")
|
||||
else if ( hypName == "AutomaticLength" )
|
||||
{
|
||||
StdMeshers_AutomaticLength * hyp = const_cast<StdMeshers_AutomaticLength *>
|
||||
(dynamic_cast <const StdMeshers_AutomaticLength * >(theHyp));
|
||||
@ -294,7 +293,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
||||
_hypType = MAX_LENGTH;
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
else if (hypName == "Adaptive1D")
|
||||
else if ( hypName == "Adaptive1D" )
|
||||
{
|
||||
_adaptiveHyp = dynamic_cast < const StdMeshers_Adaptive1D* >(theHyp);
|
||||
ASSERT(_adaptiveHyp);
|
||||
@ -352,13 +351,11 @@ static bool computeParamByFunc(Adaptor3d_Curve& C3d,
|
||||
// never do this way
|
||||
//OSD::SetSignal( true );
|
||||
|
||||
if (nbSeg <= 0)
|
||||
if ( nbSeg <= 0 )
|
||||
return false;
|
||||
|
||||
MESSAGE( "computeParamByFunc" );
|
||||
|
||||
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 ))
|
||||
return false;
|
||||
@ -592,7 +589,6 @@ void StdMeshers_Regular_1D::redistributeNearVertices (SMESH_Mesh & theM
|
||||
}
|
||||
if ( _hypType == NB_SEGMENTS )
|
||||
{
|
||||
MESSAGE("redistributeNearVertices NB_SEGMENTS");
|
||||
compensateError(0, vertexLength, f, l, theLength, theC3d, theParameters, true );
|
||||
}
|
||||
else if ( nPar <= 3 )
|
||||
@ -667,7 +663,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
const bool theReverse,
|
||||
bool theConsiderPropagation)
|
||||
{
|
||||
MESSAGE("computeInternalParameters");
|
||||
theParams.clear();
|
||||
|
||||
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,
|
||||
mainEdgeParamsOfNodes, SMDSAbs_Edge ))
|
||||
return error("Bad node parameters on the source edge of Propagation Of Distribution");
|
||||
MESSAGE("mainEdgeParamsOfNodes.size(): " << mainEdgeParamsOfNodes.size());
|
||||
vector< double > segLen( mainEdgeParamsOfNodes.size() - 1 );
|
||||
double totalLen = 0;
|
||||
BRepAdaptor_Curve mainEdgeCurve( mainEdge );
|
||||
@ -731,8 +725,8 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
{
|
||||
case LOCAL_LENGTH:
|
||||
case MAX_LENGTH:
|
||||
case NB_SEGMENTS: {
|
||||
MESSAGE("computeInternalParameters: LOCAL_LENGTH MAX_LENGTH NB_SEGMENTS");
|
||||
case NB_SEGMENTS:
|
||||
{
|
||||
double eltSize = 1;
|
||||
int nbSegments;
|
||||
if ( _hypType == MAX_LENGTH )
|
||||
@ -765,7 +759,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
if (computed) {
|
||||
SMESHDS_SubMesh* smds = sm->GetSubMeshDS();
|
||||
int nb_segments = smds->NbElements();
|
||||
MESSAGE("nb_segments: "<<nb_segments);
|
||||
if (nbseg - 1 <= nb_segments && nb_segments <= nbseg + 1) {
|
||||
isFound = true;
|
||||
nbseg = nb_segments;
|
||||
@ -846,7 +839,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
break;
|
||||
case StdMeshers_NumberOfSegments::DT_Regular:
|
||||
eltSize = theLength / nbSegments;
|
||||
MESSAGE("eltSize = theLength / nbSegments " << eltSize << " = " << theLength << " / " << nbSegments );
|
||||
break;
|
||||
default:
|
||||
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
|
||||
{
|
||||
double param = Discret.Parameter(i);
|
||||
MESSAGE("computeInternalParameters: theParams " << i << " " << param);
|
||||
theParams.push_back( param );
|
||||
}
|
||||
compensateError( eltSize, eltSize, f, l, theLength, theC3d, theParams, true ); // for PAL9899
|
||||
@ -899,13 +890,13 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
return true;
|
||||
}
|
||||
|
||||
case ARITHMETIC_1D: {
|
||||
|
||||
case ARITHMETIC_1D:
|
||||
{
|
||||
// arithmetic progression: SUM(n) = ( an - a1 + q ) * ( a1 + an ) / ( 2 * q ) = theLength
|
||||
|
||||
double a1 = _value[ BEG_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<<") "<<
|
||||
"for an edge of length "<<theLength);
|
||||
|
||||
@ -933,13 +924,13 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
eltSize += q;
|
||||
}
|
||||
compensateError( a1, an, U1, Un, theLength, theC3d, theParams );
|
||||
if (theReverse) theParams.reverse(); // NPAL18025
|
||||
if ( theReverse ) theParams.reverse(); // NPAL18025
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
case GEOMETRIC_1D: {
|
||||
|
||||
case GEOMETRIC_1D:
|
||||
{
|
||||
double a1 = _value[ BEG_LENGTH_IND ], an;
|
||||
double q = _value[ END_LENGTH_IND ];
|
||||
|
||||
@ -983,7 +974,8 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
return true;
|
||||
}
|
||||
|
||||
case FIXED_POINTS_1D: {
|
||||
case FIXED_POINTS_1D:
|
||||
{
|
||||
const std::vector<double>& aPnts = _fpHyp->GetPoints();
|
||||
const std::vector<int>& nbsegs = _fpHyp->GetNbSegments();
|
||||
TColStd_SequenceOfReal Params;
|
||||
@ -992,20 +984,20 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
if( aPnts[i]<0.0001 || aPnts[i]>0.9999 ) continue;
|
||||
int j=1;
|
||||
bool IsExist = false;
|
||||
for(; j<=Params.Length(); j++) {
|
||||
if( fabs(aPnts[i]-Params.Value(j)) < 1e-4 ) {
|
||||
for ( ; j <= Params.Length(); j++ ) {
|
||||
if ( Abs( aPnts[i] - Params.Value(j) ) < 1e-4 ) {
|
||||
IsExist = true;
|
||||
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;
|
||||
par1 = f;
|
||||
lp = l;
|
||||
double sign = 1.0;
|
||||
if(theReverse) {
|
||||
if ( theReverse ) {
|
||||
par1 = l;
|
||||
lp = f;
|
||||
sign = -1.0;
|
||||
@ -1015,37 +1007,34 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
for ( int i = 0; i < Params.Length(); 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;
|
||||
GCPnts_AbscissaPoint APnt(theC3d, sign*segmentSize, par1);
|
||||
if( !APnt.IsDone() )
|
||||
GCPnts_AbscissaPoint APnt( theC3d, sign*segmentSize, par1 );
|
||||
if ( !APnt.IsDone() )
|
||||
return error( "GCPnts_AbscissaPoint failed");
|
||||
par2 = APnt.Parameter();
|
||||
eltSize = segmentSize/nbseg;
|
||||
GCPnts_UniformAbscissa Discret(theC3d, eltSize, par1, par2);
|
||||
if(theReverse)
|
||||
Discret.Initialize(theC3d, eltSize, par2, par1);
|
||||
GCPnts_UniformAbscissa Discret( theC3d, eltSize, par1, par2 );
|
||||
if ( theReverse )
|
||||
Discret.Initialize( theC3d, eltSize, par2, par1 );
|
||||
else
|
||||
Discret.Initialize(theC3d, eltSize, par1, par2);
|
||||
Discret.Initialize( theC3d, eltSize, par1, par2 );
|
||||
if ( !Discret.IsDone() )
|
||||
return error( "GCPnts_UniformAbscissa failed");
|
||||
int NbPoints = Discret.NbPoints();
|
||||
list<double> tmpParams;
|
||||
for(int i=2; i<NbPoints; i++) {
|
||||
for ( int i = 2; i < NbPoints; i++ ) {
|
||||
double param = Discret.Parameter(i);
|
||||
tmpParams.push_back( param );
|
||||
}
|
||||
if (theReverse) {
|
||||
if ( theReverse ) {
|
||||
compensateError( eltSize, eltSize, par2, par1, segmentSize, theC3d, tmpParams );
|
||||
tmpParams.reverse();
|
||||
}
|
||||
else {
|
||||
compensateError( eltSize, eltSize, par1, par2, segmentSize, theC3d, tmpParams );
|
||||
}
|
||||
list<double>::iterator itP = tmpParams.begin();
|
||||
for(; itP != tmpParams.end(); itP++) {
|
||||
theParams.push_back( *(itP) );
|
||||
}
|
||||
theParams.splice( theParams.end(), tmpParams );
|
||||
theParams.push_back( par2 );
|
||||
|
||||
par1 = par2;
|
||||
@ -1055,39 +1044,36 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
segmentSize = theLength - currAbscissa;
|
||||
eltSize = segmentSize/nbseg;
|
||||
GCPnts_UniformAbscissa Discret;
|
||||
if(theReverse)
|
||||
Discret.Initialize(theC3d, eltSize, par1, lp);
|
||||
if ( theReverse )
|
||||
Discret.Initialize( theC3d, eltSize, par1, lp );
|
||||
else
|
||||
Discret.Initialize(theC3d, eltSize, lp, par1);
|
||||
Discret.Initialize( theC3d, eltSize, lp, par1 );
|
||||
if ( !Discret.IsDone() )
|
||||
return error( "GCPnts_UniformAbscissa failed");
|
||||
int NbPoints = Discret.NbPoints();
|
||||
list<double> tmpParams;
|
||||
for(int i=2; i<NbPoints; i++) {
|
||||
for ( int i = 2; i < NbPoints; i++ ) {
|
||||
double param = Discret.Parameter(i);
|
||||
tmpParams.push_back( param );
|
||||
}
|
||||
if (theReverse) {
|
||||
if ( theReverse ) {
|
||||
compensateError( eltSize, eltSize, lp, par1, segmentSize, theC3d, tmpParams );
|
||||
tmpParams.reverse();
|
||||
}
|
||||
else {
|
||||
compensateError( eltSize, eltSize, par1, lp, segmentSize, theC3d, tmpParams );
|
||||
}
|
||||
list<double>::iterator itP = tmpParams.begin();
|
||||
for(; itP != tmpParams.end(); itP++) {
|
||||
theParams.push_back( *(itP) );
|
||||
}
|
||||
theParams.splice( theParams.end(), tmpParams );
|
||||
|
||||
if (theReverse) {
|
||||
if ( theReverse )
|
||||
theParams.reverse(); // NPAL18025
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
case DEFLECTION: {
|
||||
|
||||
GCPnts_UniformDeflection Discret(theC3d, _value[ DEFLECTION_IND ], f, l, true);
|
||||
case DEFLECTION:
|
||||
{
|
||||
GCPnts_UniformDeflection Discret( theC3d, _value[ DEFLECTION_IND ], f, l, true );
|
||||
if ( !Discret.IsDone() )
|
||||
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)
|
||||
{
|
||||
MESSAGE("Compute");
|
||||
if ( _hypType == NONE )
|
||||
return false;
|
||||
|
||||
@ -1214,7 +1199,6 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
|
||||
|
||||
//Add the Node in the DataStructure
|
||||
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);
|
||||
|
||||
if(_quadraticMesh) {
|
||||
@ -1249,8 +1233,6 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
|
||||
}
|
||||
else
|
||||
{
|
||||
//MESSAGE("************* Degenerated edge! *****************");
|
||||
|
||||
// Edge is a degenerated Edge : We put n = 5 points on the edge.
|
||||
const int NbPoints = 5;
|
||||
BRep_Tool::Range( E, f, l ); // PAL15185
|
||||
@ -1353,9 +1335,8 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
|
||||
|
||||
}
|
||||
else {
|
||||
//MESSAGE("************* Degenerated edge! *****************");
|
||||
// Edge is a degenerated Edge : We put n = 5 points on the edge.
|
||||
if(_quadraticMesh) {
|
||||
if ( _quadraticMesh ) {
|
||||
aVec[SMDSEntity_Node] = 11;
|
||||
aVec[SMDSEntity_Quad_Edge] = 6;
|
||||
}
|
||||
|
@ -418,12 +418,15 @@ void StdMeshersGUI_SubShapeSelectorWdg::onListSelectionChanged()
|
||||
return;
|
||||
|
||||
//mySelectionMgr->clearSelected();
|
||||
TColStd_MapOfInteger aIndexes;
|
||||
myPreviewActor->HighlightAll( false );
|
||||
QList<QListWidgetItem*> selItems = myListWidget->selectedItems();
|
||||
QListWidgetItem* anItem;
|
||||
foreach(anItem, selItems)
|
||||
myPreviewActor->HighlightID( anItem->text().toInt() );
|
||||
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||
aViewWindow->Repaint();
|
||||
|
||||
// update remove button
|
||||
myRemoveButton->setEnabled( selItems.size() > 0 );
|
||||
|
||||
|
@ -134,8 +134,6 @@ extern "C"
|
||||
STDMESHERS_I_EXPORT
|
||||
GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName)
|
||||
{
|
||||
MESSAGE("Get HypothesisCreator for " << aHypName);
|
||||
|
||||
GenericHypothesisCreator_i* aCreator = 0;
|
||||
|
||||
// Hypotheses
|
||||
|
Loading…
Reference in New Issue
Block a user