mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 08:20:34 +05:00
untabify
This commit is contained in:
parent
f2c45dcff7
commit
5e7f07d3da
@ -19,7 +19,7 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// SMESH Driver : implementaion of driver for reading and writing
|
||||
// SMESH Driver : implementaion of driver for reading and writing
|
||||
// File : Mesh_Reader.cxx
|
||||
// Module : SMESH
|
||||
//
|
||||
|
@ -102,58 +102,58 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
||||
ValDegre = 3;
|
||||
nbNoeuds = 2;
|
||||
ok = myMesh->AddEdgeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||
intNumMaille);
|
||||
intNumMaille);
|
||||
break;
|
||||
case 204:
|
||||
case 208:
|
||||
ValDegre = 9;
|
||||
nbNoeuds = 4;
|
||||
ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||
NoeudsMaille[2], NoeudsMaille[3],
|
||||
intNumMaille);
|
||||
NoeudsMaille[2], NoeudsMaille[3],
|
||||
intNumMaille);
|
||||
break;
|
||||
case 203:
|
||||
case 206:
|
||||
ValDegre = 5;
|
||||
nbNoeuds = 3;
|
||||
ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||
NoeudsMaille[2], intNumMaille);
|
||||
NoeudsMaille[2], intNumMaille);
|
||||
break;
|
||||
case 308:
|
||||
case 320:
|
||||
ValDegre = 12;
|
||||
nbNoeuds = 8;
|
||||
if (ValElement == 320){
|
||||
//A voir, correspondance VTK
|
||||
NoeudsMaille[4] = NoeudsMaille[8];
|
||||
NoeudsMaille[5] = NoeudsMaille[9];
|
||||
NoeudsMaille[6] = NoeudsMaille[10];
|
||||
NoeudsMaille[7] = NoeudsMaille[11];
|
||||
//A voir, correspondance VTK
|
||||
NoeudsMaille[4] = NoeudsMaille[8];
|
||||
NoeudsMaille[5] = NoeudsMaille[9];
|
||||
NoeudsMaille[6] = NoeudsMaille[10];
|
||||
NoeudsMaille[7] = NoeudsMaille[11];
|
||||
}
|
||||
ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||
NoeudsMaille[2], NoeudsMaille[3],
|
||||
NoeudsMaille[4], NoeudsMaille[5],
|
||||
NoeudsMaille[6], NoeudsMaille[7],
|
||||
intNumMaille);
|
||||
NoeudsMaille[2], NoeudsMaille[3],
|
||||
NoeudsMaille[4], NoeudsMaille[5],
|
||||
NoeudsMaille[6], NoeudsMaille[7],
|
||||
intNumMaille);
|
||||
break;
|
||||
case 304:
|
||||
case 310:
|
||||
ValDegre = 10;
|
||||
nbNoeuds = 4;
|
||||
if (ValElement == 310)
|
||||
NoeudsMaille[3] = NoeudsMaille[6];
|
||||
NoeudsMaille[3] = NoeudsMaille[6];
|
||||
ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||
NoeudsMaille[2], NoeudsMaille[3],
|
||||
intNumMaille);
|
||||
NoeudsMaille[2], NoeudsMaille[3],
|
||||
intNumMaille);
|
||||
break;
|
||||
case 306:
|
||||
case 315:
|
||||
ValDegre = 12;
|
||||
nbNoeuds = 8;
|
||||
if (ValElement == 315) {
|
||||
NoeudsMaille[3] = NoeudsMaille[6];
|
||||
NoeudsMaille[4] = NoeudsMaille[7];
|
||||
NoeudsMaille[5] = NoeudsMaille[8];
|
||||
NoeudsMaille[3] = NoeudsMaille[6];
|
||||
NoeudsMaille[4] = NoeudsMaille[7];
|
||||
NoeudsMaille[5] = NoeudsMaille[8];
|
||||
}
|
||||
NoeudsMaille[7] = NoeudsMaille[5];
|
||||
NoeudsMaille[6] = NoeudsMaille[5];
|
||||
@ -161,10 +161,10 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
||||
NoeudsMaille[4] = NoeudsMaille[3];
|
||||
NoeudsMaille[3] = NoeudsMaille[2];
|
||||
ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||
NoeudsMaille[2], NoeudsMaille[3],
|
||||
NoeudsMaille[4], NoeudsMaille[5],
|
||||
intNumMaille);
|
||||
break;
|
||||
NoeudsMaille[2], NoeudsMaille[3],
|
||||
NoeudsMaille[4], NoeudsMaille[5],
|
||||
intNumMaille);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/****************************************************************************
|
||||
|
@ -77,11 +77,11 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
|
||||
fprintf(stdout, "(************************)\n");
|
||||
|
||||
SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
|
||||
while(itNodes->more()){
|
||||
while(itNodes->more()){
|
||||
const SMDS_MeshNode * node = itNodes->next();
|
||||
fprintf(aFileId, "%d %e %e %e\n", node->GetID(), node->X(), node->Y(), node->Z());
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* ECRITURE DES ELEMENTS *
|
||||
****************************************************************************/
|
||||
|
@ -71,7 +71,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::Perform()
|
||||
// static methods
|
||||
|
||||
static void writeInteger( const Standard_Integer& theVal,
|
||||
OSD_File& ofile )
|
||||
OSD_File& ofile )
|
||||
{
|
||||
union {
|
||||
Standard_Integer i;
|
||||
@ -90,7 +90,7 @@ static void writeInteger( const Standard_Integer& theVal,
|
||||
}
|
||||
|
||||
static void writeFloat ( const Standard_ShortReal& theVal,
|
||||
OSD_File& ofile)
|
||||
OSD_File& ofile)
|
||||
{
|
||||
union {
|
||||
Standard_ShortReal f;
|
||||
@ -179,7 +179,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
|
||||
|
||||
SMDS_ElemIteratorPtr aNodeIter = aFace->nodesIterator();
|
||||
for (; aNodeIter->more(); ) {
|
||||
SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
|
||||
SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
|
||||
buf += " vertex ";
|
||||
sprintf (sval,"% 12e",node->X());
|
||||
buf += sval;
|
||||
@ -249,10 +249,10 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
|
||||
|
||||
SMDS_ElemIteratorPtr aNodeIter = aFace->nodesIterator();
|
||||
for (; aNodeIter->more(); ) {
|
||||
SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
|
||||
writeFloat(node->X(),aFile);
|
||||
writeFloat(node->Y(),aFile);
|
||||
writeFloat(node->Z(),aFile);
|
||||
SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
|
||||
writeFloat(node->X(),aFile);
|
||||
writeFloat(node->Y(),aFile);
|
||||
writeFloat(node->Z(),aFile);
|
||||
}
|
||||
aFile.Write (&dum,2);
|
||||
}
|
||||
|
@ -62,9 +62,9 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
|
||||
if(MYDEBUG) MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size());
|
||||
TDataSet::const_iterator anIter = aDataSet2411.begin();
|
||||
for(; anIter != aDataSet2411.end(); anIter++){
|
||||
const TNodeLab& aLabel = anIter->first;
|
||||
const TRecord& aRec = anIter->second;
|
||||
myMesh->AddNodeWithID(aRec.coord[0],aRec.coord[1],aRec.coord[2],aLabel);
|
||||
const TNodeLab& aLabel = anIter->first;
|
||||
const TRecord& aRec = anIter->second;
|
||||
myMesh->AddNodeWithID(aRec.coord[0],aRec.coord[1],aRec.coord[2],aLabel);
|
||||
}
|
||||
}
|
||||
{
|
||||
@ -75,10 +75,10 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
|
||||
TDataSet::const_iterator anIter = aDataSet2412.begin();
|
||||
if(MYDEBUG) MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
|
||||
for(; anIter != aDataSet2412.end(); anIter++){
|
||||
SMDS_MeshElement* anElement = NULL;
|
||||
const TElementLab& aLabel = anIter->first;
|
||||
const TRecord& aRec = anIter->second;
|
||||
if(IsBeam(aRec.fe_descriptor_id)) {
|
||||
SMDS_MeshElement* anElement = NULL;
|
||||
const TElementLab& aLabel = anIter->first;
|
||||
const TRecord& aRec = anIter->second;
|
||||
if(IsBeam(aRec.fe_descriptor_id)) {
|
||||
switch ( aRec.node_labels.size() ) {
|
||||
case 2: // edge with two nodes
|
||||
anElement = myMesh->AddEdgeWithID(aRec.node_labels[0],
|
||||
@ -91,178 +91,178 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
|
||||
aRec.node_labels[1],
|
||||
aLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(IsFace(aRec.fe_descriptor_id)) {
|
||||
switch(aRec.fe_descriptor_id){
|
||||
case 71: // TRI3
|
||||
case 72:
|
||||
case 74:
|
||||
|
||||
case 41: // Plane Stress Linear Triangle - TRI3
|
||||
case 91: // Thin Shell Linear Triangle - TRI3
|
||||
anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[2],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 42: // Plane Stress Quadratic Triangle - TRI6
|
||||
case 92: // Thin Shell Quadratic Triangle - TRI6
|
||||
anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[5],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 44: // Plane Stress Linear Quadrilateral - QUAD4
|
||||
case 94: // Thin Shell Linear Quadrilateral - QUAD4
|
||||
anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[3],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 45: // Plane Stress Quadratic Quadrilateral - QUAD8
|
||||
case 95: // Thin Shell Quadratic Quadrilateral - QUAD8
|
||||
anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[7],
|
||||
aLabel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch(aRec.fe_descriptor_id){
|
||||
case 71: // TRI3
|
||||
case 72:
|
||||
case 74:
|
||||
|
||||
case 41: // Plane Stress Linear Triangle - TRI3
|
||||
case 91: // Thin Shell Linear Triangle - TRI3
|
||||
anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[2],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 42: // Plane Stress Quadratic Triangle - TRI6
|
||||
case 92: // Thin Shell Quadratic Triangle - TRI6
|
||||
anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[5],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 44: // Plane Stress Linear Quadrilateral - QUAD4
|
||||
case 94: // Thin Shell Linear Quadrilateral - QUAD4
|
||||
anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[3],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 45: // Plane Stress Quadratic Quadrilateral - QUAD8
|
||||
case 95: // Thin Shell Quadratic Quadrilateral - QUAD8
|
||||
anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[7],
|
||||
aLabel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(IsVolume(aRec.fe_descriptor_id)){
|
||||
switch(aRec.fe_descriptor_id){
|
||||
|
||||
case 111: // Solid Linear Tetrahedron - TET4
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[3],
|
||||
aLabel);
|
||||
break;
|
||||
switch(aRec.fe_descriptor_id){
|
||||
|
||||
case 111: // Solid Linear Tetrahedron - TET4
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[3],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 118: // Solid Quadratic Tetrahedron - TET10
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[2],
|
||||
case 118: // Solid Quadratic Tetrahedron - TET10
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[2],
|
||||
|
||||
aRec.node_labels[9],
|
||||
aRec.node_labels[9],
|
||||
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[1],
|
||||
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[8],
|
||||
aRec.node_labels[7],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 112: // Solid Linear Prism - PRISM6
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[4],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 113: // Solid Quadratic Prism - PRISM15
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[8],
|
||||
aRec.node_labels[7],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 112: // Solid Linear Prism - PRISM6
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[4],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 113: // Solid Quadratic Prism - PRISM15
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[2],
|
||||
|
||||
aRec.node_labels[9],
|
||||
aRec.node_labels[13],
|
||||
aRec.node_labels[11],
|
||||
aRec.node_labels[9],
|
||||
aRec.node_labels[13],
|
||||
aRec.node_labels[11],
|
||||
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[1],
|
||||
|
||||
aRec.node_labels[14],
|
||||
aRec.node_labels[12],
|
||||
aRec.node_labels[14],
|
||||
aRec.node_labels[12],
|
||||
aRec.node_labels[10],
|
||||
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[8],
|
||||
aRec.node_labels[7],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 115: // Solid Linear Brick - HEX8
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[7],
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[5],
|
||||
aLabel);
|
||||
break;
|
||||
aRec.node_labels[8],
|
||||
aRec.node_labels[7],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 115: // Solid Linear Brick - HEX8
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[7],
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[5],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 116: // Solid Quadratic Brick - HEX20
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[2],
|
||||
case 116: // Solid Quadratic Brick - HEX20
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[2],
|
||||
|
||||
aRec.node_labels[12],
|
||||
aRec.node_labels[18],
|
||||
aRec.node_labels[16],
|
||||
aRec.node_labels[14],
|
||||
aRec.node_labels[12],
|
||||
aRec.node_labels[18],
|
||||
aRec.node_labels[16],
|
||||
aRec.node_labels[14],
|
||||
|
||||
aRec.node_labels[7],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[1],
|
||||
aRec.node_labels[7],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[1],
|
||||
|
||||
aRec.node_labels[19],
|
||||
aRec.node_labels[17],
|
||||
aRec.node_labels[15],
|
||||
aRec.node_labels[19],
|
||||
aRec.node_labels[17],
|
||||
aRec.node_labels[15],
|
||||
aRec.node_labels[13],
|
||||
|
||||
aRec.node_labels[8],
|
||||
aRec.node_labels[11],
|
||||
aRec.node_labels[10],
|
||||
aRec.node_labels[9],
|
||||
aLabel);
|
||||
break;
|
||||
aRec.node_labels[11],
|
||||
aRec.node_labels[10],
|
||||
aRec.node_labels[9],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
case 114: // pyramid of 13 nodes (quadratic) - PIRA13
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[7],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[1],
|
||||
case 114: // pyramid of 13 nodes (quadratic) - PIRA13
|
||||
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
|
||||
aRec.node_labels[6],
|
||||
aRec.node_labels[4],
|
||||
aRec.node_labels[2],
|
||||
aRec.node_labels[7],
|
||||
aRec.node_labels[5],
|
||||
aRec.node_labels[3],
|
||||
aRec.node_labels[1],
|
||||
|
||||
aRec.node_labels[8],
|
||||
aRec.node_labels[11],
|
||||
aRec.node_labels[10],
|
||||
aRec.node_labels[9],
|
||||
aRec.node_labels[12],
|
||||
aLabel);
|
||||
break;
|
||||
aRec.node_labels[8],
|
||||
aRec.node_labels[11],
|
||||
aRec.node_labels[10],
|
||||
aRec.node_labels[9],
|
||||
aRec.node_labels[12],
|
||||
aLabel);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
// if(!anElement)
|
||||
// MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<<aLabel<<" and type = "<<aRec.fe_descriptor_id);
|
||||
}
|
||||
}
|
||||
// if(!anElement)
|
||||
// MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<<aLabel<<" and type = "<<aRec.fe_descriptor_id);
|
||||
}
|
||||
}
|
||||
{
|
||||
@ -272,89 +272,89 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
|
||||
UNV2417::Read(in_stream,aDataSet2417);
|
||||
if(MYDEBUG) MESSAGE("Perform - aDataSet2417.size() = "<<aDataSet2417.size());
|
||||
if (aDataSet2417.size() > 0) {
|
||||
myGroup = new SMDS_MeshGroup(myMesh);
|
||||
TDataSet::const_iterator anIter = aDataSet2417.begin();
|
||||
for(; anIter != aDataSet2417.end(); anIter++){
|
||||
const TGroupId& aLabel = anIter->first;
|
||||
const TRecord& aRec = anIter->second;
|
||||
myGroup = new SMDS_MeshGroup(myMesh);
|
||||
TDataSet::const_iterator anIter = aDataSet2417.begin();
|
||||
for(; anIter != aDataSet2417.end(); anIter++){
|
||||
const TGroupId& aLabel = anIter->first;
|
||||
const TRecord& aRec = anIter->second;
|
||||
|
||||
int aNodesNb = aRec.NodeList.size();
|
||||
int aElementsNb = aRec.ElementList.size();
|
||||
int aNodesNb = aRec.NodeList.size();
|
||||
int aElementsNb = aRec.ElementList.size();
|
||||
|
||||
bool useSuffix = ((aNodesNb > 0) && (aElementsNb > 0));
|
||||
int i;
|
||||
if (aNodesNb > 0) {
|
||||
SMDS_MeshGroup* aNodesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Node);
|
||||
std::string aGrName = (useSuffix) ? aRec.GroupName + "_Nodes" : aRec.GroupName;
|
||||
int i = aGrName.find( "\r" );
|
||||
if (i > 0)
|
||||
aGrName.erase (i, 2);
|
||||
myGroupNames.insert(TGroupNamesMap::value_type(aNodesGroup, aGrName));
|
||||
myGroupId.insert(TGroupIdMap::value_type(aNodesGroup, aLabel));
|
||||
bool useSuffix = ((aNodesNb > 0) && (aElementsNb > 0));
|
||||
int i;
|
||||
if (aNodesNb > 0) {
|
||||
SMDS_MeshGroup* aNodesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Node);
|
||||
std::string aGrName = (useSuffix) ? aRec.GroupName + "_Nodes" : aRec.GroupName;
|
||||
int i = aGrName.find( "\r" );
|
||||
if (i > 0)
|
||||
aGrName.erase (i, 2);
|
||||
myGroupNames.insert(TGroupNamesMap::value_type(aNodesGroup, aGrName));
|
||||
myGroupId.insert(TGroupIdMap::value_type(aNodesGroup, aLabel));
|
||||
|
||||
for (i = 0; i < aNodesNb; i++) {
|
||||
const SMDS_MeshNode* aNode = myMesh->FindNode(aRec.NodeList[i]);
|
||||
if (aNode)
|
||||
aNodesGroup->Add(aNode);
|
||||
}
|
||||
}
|
||||
if (aElementsNb > 0){
|
||||
SMDS_MeshGroup* aEdgesGroup = 0;
|
||||
SMDS_MeshGroup* aFacesGroup = 0;
|
||||
SMDS_MeshGroup* aVolumeGroup = 0;
|
||||
bool createdGroup = false;
|
||||
for (i = 0; i < aNodesNb; i++) {
|
||||
const SMDS_MeshNode* aNode = myMesh->FindNode(aRec.NodeList[i]);
|
||||
if (aNode)
|
||||
aNodesGroup->Add(aNode);
|
||||
}
|
||||
}
|
||||
if (aElementsNb > 0){
|
||||
SMDS_MeshGroup* aEdgesGroup = 0;
|
||||
SMDS_MeshGroup* aFacesGroup = 0;
|
||||
SMDS_MeshGroup* aVolumeGroup = 0;
|
||||
bool createdGroup = false;
|
||||
|
||||
for (i = 0; i < aElementsNb; i++) {
|
||||
const SMDS_MeshElement* aElement = myMesh->FindElement(aRec.ElementList[i]);
|
||||
if (aElement) {
|
||||
switch (aElement->GetType()) {
|
||||
case SMDSAbs_Edge:
|
||||
if (!aEdgesGroup) {
|
||||
aEdgesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Edge);
|
||||
if (!useSuffix && createdGroup) useSuffix = true;
|
||||
std::string aEdgesGrName = (useSuffix) ? aRec.GroupName + "_Edges" : aRec.GroupName;
|
||||
int i = aEdgesGrName.find( "\r" );
|
||||
if (i > 0)
|
||||
aEdgesGrName.erase (i, 2);
|
||||
myGroupNames.insert(TGroupNamesMap::value_type(aEdgesGroup, aEdgesGrName));
|
||||
myGroupId.insert(TGroupIdMap::value_type(aEdgesGroup, aLabel));
|
||||
createdGroup = true;
|
||||
}
|
||||
aEdgesGroup->Add(aElement);
|
||||
break;
|
||||
case SMDSAbs_Face:
|
||||
if (!aFacesGroup) {
|
||||
aFacesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Face);
|
||||
if (!useSuffix && createdGroup) useSuffix = true;
|
||||
std::string aFacesGrName = (useSuffix) ? aRec.GroupName + "_Faces" : aRec.GroupName;
|
||||
int i = aFacesGrName.find( "\r" );
|
||||
if (i > 0)
|
||||
aFacesGrName.erase (i, 2);
|
||||
myGroupNames.insert(TGroupNamesMap::value_type(aFacesGroup, aFacesGrName));
|
||||
myGroupId.insert(TGroupIdMap::value_type(aFacesGroup, aLabel));
|
||||
createdGroup = true;
|
||||
}
|
||||
aFacesGroup->Add(aElement);
|
||||
break;
|
||||
case SMDSAbs_Volume:
|
||||
if (!aVolumeGroup) {
|
||||
aVolumeGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Volume);
|
||||
if (!useSuffix && createdGroup) useSuffix = true;
|
||||
std::string aVolumeGrName = (useSuffix) ? aRec.GroupName + "_Volumes" : aRec.GroupName;
|
||||
int i = aVolumeGrName.find( "\r" );
|
||||
if (i > 0)
|
||||
aVolumeGrName.erase (i, 2);
|
||||
myGroupNames.insert(TGroupNamesMap::value_type(aVolumeGroup, aVolumeGrName));
|
||||
myGroupId.insert(TGroupIdMap::value_type(aVolumeGroup, aLabel));
|
||||
createdGroup = true;
|
||||
}
|
||||
aVolumeGroup->Add(aElement);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < aElementsNb; i++) {
|
||||
const SMDS_MeshElement* aElement = myMesh->FindElement(aRec.ElementList[i]);
|
||||
if (aElement) {
|
||||
switch (aElement->GetType()) {
|
||||
case SMDSAbs_Edge:
|
||||
if (!aEdgesGroup) {
|
||||
aEdgesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Edge);
|
||||
if (!useSuffix && createdGroup) useSuffix = true;
|
||||
std::string aEdgesGrName = (useSuffix) ? aRec.GroupName + "_Edges" : aRec.GroupName;
|
||||
int i = aEdgesGrName.find( "\r" );
|
||||
if (i > 0)
|
||||
aEdgesGrName.erase (i, 2);
|
||||
myGroupNames.insert(TGroupNamesMap::value_type(aEdgesGroup, aEdgesGrName));
|
||||
myGroupId.insert(TGroupIdMap::value_type(aEdgesGroup, aLabel));
|
||||
createdGroup = true;
|
||||
}
|
||||
aEdgesGroup->Add(aElement);
|
||||
break;
|
||||
case SMDSAbs_Face:
|
||||
if (!aFacesGroup) {
|
||||
aFacesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Face);
|
||||
if (!useSuffix && createdGroup) useSuffix = true;
|
||||
std::string aFacesGrName = (useSuffix) ? aRec.GroupName + "_Faces" : aRec.GroupName;
|
||||
int i = aFacesGrName.find( "\r" );
|
||||
if (i > 0)
|
||||
aFacesGrName.erase (i, 2);
|
||||
myGroupNames.insert(TGroupNamesMap::value_type(aFacesGroup, aFacesGrName));
|
||||
myGroupId.insert(TGroupIdMap::value_type(aFacesGroup, aLabel));
|
||||
createdGroup = true;
|
||||
}
|
||||
aFacesGroup->Add(aElement);
|
||||
break;
|
||||
case SMDSAbs_Volume:
|
||||
if (!aVolumeGroup) {
|
||||
aVolumeGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Volume);
|
||||
if (!useSuffix && createdGroup) useSuffix = true;
|
||||
std::string aVolumeGrName = (useSuffix) ? aRec.GroupName + "_Volumes" : aRec.GroupName;
|
||||
int i = aVolumeGrName.find( "\r" );
|
||||
if (i > 0)
|
||||
aVolumeGrName.erase (i, 2);
|
||||
myGroupNames.insert(TGroupNamesMap::value_type(aVolumeGroup, aVolumeGrName));
|
||||
myGroupId.insert(TGroupIdMap::value_type(aVolumeGroup, aLabel));
|
||||
createdGroup = true;
|
||||
}
|
||||
aVolumeGroup->Add(aElement);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ namespace{
|
||||
typedef std::vector<size_t> TConnect;
|
||||
|
||||
int GetConnect(const SMDS_ElemIteratorPtr& theNodesIter,
|
||||
TConnect& theConnect)
|
||||
TConnect& theConnect)
|
||||
{
|
||||
theConnect.clear();
|
||||
for(; theNodesIter->more();){
|
||||
@ -71,13 +71,13 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
||||
MESSAGE("Perform - myMesh->NbNodes() = "<<myMesh->NbNodes());
|
||||
SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();
|
||||
for(; aNodesIter->more();){
|
||||
const SMDS_MeshNode* aNode = aNodesIter->next();
|
||||
TRecord aRec;
|
||||
aRec.coord[0] = aNode->X();
|
||||
aRec.coord[1] = aNode->Y();
|
||||
aRec.coord[2] = aNode->Z();
|
||||
const TNodeLab& aLabel = aNode->GetID();
|
||||
aDataSet2411.insert(TDataSet::value_type(aLabel,aRec));
|
||||
const SMDS_MeshNode* aNode = aNodesIter->next();
|
||||
TRecord aRec;
|
||||
aRec.coord[0] = aNode->X();
|
||||
aRec.coord[1] = aNode->Y();
|
||||
aRec.coord[2] = aNode->Z();
|
||||
const TNodeLab& aLabel = aNode->GetID();
|
||||
aDataSet2411.insert(TDataSet::value_type(aLabel,aRec));
|
||||
}
|
||||
MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size());
|
||||
UNV2411::Write(out_stream,aDataSet2411);
|
||||
@ -90,14 +90,14 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
||||
// Storing SMDS Edges
|
||||
MESSAGE("Perform - myMesh->NbEdges() = "<<myMesh->NbEdges());
|
||||
if(myMesh->NbEdges()){
|
||||
SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
|
||||
for(; anIter->more();){
|
||||
const SMDS_MeshEdge* anElem = anIter->next();
|
||||
TElementLab aLabel = anElem->GetID();
|
||||
int aNbNodes = anElem->NbNodes();
|
||||
TRecord aRec;
|
||||
aRec.node_labels.reserve(aNbNodes);
|
||||
SMDS_ElemIteratorPtr aNodesIter;
|
||||
SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
|
||||
for(; anIter->more();){
|
||||
const SMDS_MeshEdge* anElem = anIter->next();
|
||||
TElementLab aLabel = anElem->GetID();
|
||||
int aNbNodes = anElem->NbNodes();
|
||||
TRecord aRec;
|
||||
aRec.node_labels.reserve(aNbNodes);
|
||||
SMDS_ElemIteratorPtr aNodesIter;
|
||||
if( anElem->IsQuadratic() ) {
|
||||
aNodesIter = static_cast<const SMDS_QuadraticEdge* >
|
||||
( anElem )->interlacedNodesElemIterator();
|
||||
@ -106,64 +106,64 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
||||
aNodesIter = anElem->nodesIterator();
|
||||
aRec.fe_descriptor_id = 11;
|
||||
}
|
||||
for(; aNodesIter->more();){
|
||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||
aRec.node_labels.push_back(aNode->GetID());
|
||||
}
|
||||
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
|
||||
}
|
||||
MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
|
||||
for(; aNodesIter->more();){
|
||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||
aRec.node_labels.push_back(aNode->GetID());
|
||||
}
|
||||
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
|
||||
}
|
||||
MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
|
||||
}
|
||||
|
||||
MESSAGE("Perform - myMesh->NbFaces() = "<<myMesh->NbFaces());
|
||||
if(myMesh->NbFaces()){
|
||||
SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
|
||||
for(; anIter->more();){
|
||||
const SMDS_MeshFace* anElem = anIter->next();
|
||||
TElementLab aLabel = anElem->GetID();
|
||||
int aNbNodes = anElem->NbNodes();
|
||||
TRecord aRec;
|
||||
aRec.node_labels.reserve(aNbNodes);
|
||||
SMDS_ElemIteratorPtr aNodesIter;
|
||||
SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
|
||||
for(; anIter->more();){
|
||||
const SMDS_MeshFace* anElem = anIter->next();
|
||||
TElementLab aLabel = anElem->GetID();
|
||||
int aNbNodes = anElem->NbNodes();
|
||||
TRecord aRec;
|
||||
aRec.node_labels.reserve(aNbNodes);
|
||||
SMDS_ElemIteratorPtr aNodesIter;
|
||||
if( anElem->IsQuadratic() )
|
||||
aNodesIter = static_cast<const SMDS_QuadraticFaceOfNodes* >
|
||||
( anElem )->interlacedNodesElemIterator();
|
||||
else
|
||||
aNodesIter = anElem->nodesIterator();
|
||||
for(; aNodesIter->more();){
|
||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||
aRec.node_labels.push_back(aNode->GetID());
|
||||
}
|
||||
switch(aNbNodes){
|
||||
case 3:
|
||||
aRec.fe_descriptor_id = 41;
|
||||
break;
|
||||
case 4:
|
||||
aRec.fe_descriptor_id = 44;
|
||||
break;
|
||||
case 6:
|
||||
aRec.fe_descriptor_id = 42;
|
||||
break;
|
||||
case 8:
|
||||
aRec.fe_descriptor_id = 45;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
|
||||
}
|
||||
MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
|
||||
for(; aNodesIter->more();){
|
||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||
aRec.node_labels.push_back(aNode->GetID());
|
||||
}
|
||||
switch(aNbNodes){
|
||||
case 3:
|
||||
aRec.fe_descriptor_id = 41;
|
||||
break;
|
||||
case 4:
|
||||
aRec.fe_descriptor_id = 44;
|
||||
break;
|
||||
case 6:
|
||||
aRec.fe_descriptor_id = 42;
|
||||
break;
|
||||
case 8:
|
||||
aRec.fe_descriptor_id = 45;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
|
||||
}
|
||||
MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
|
||||
}
|
||||
|
||||
MESSAGE("Perform - myMesh->NbVolumes() = "<<myMesh->NbVolumes());
|
||||
if(myMesh->NbVolumes()){
|
||||
SMDS_VolumeIteratorPtr anIter = myMesh->volumesIterator();
|
||||
for(; anIter->more();){
|
||||
const SMDS_MeshVolume* anElem = anIter->next();
|
||||
TElementLab aLabel = anElem->GetID();
|
||||
SMDS_VolumeIteratorPtr anIter = myMesh->volumesIterator();
|
||||
for(; anIter->more();){
|
||||
const SMDS_MeshVolume* anElem = anIter->next();
|
||||
TElementLab aLabel = anElem->GetID();
|
||||
|
||||
int aNbNodes = anElem->NbNodes();
|
||||
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
|
||||
int aNbNodes = anElem->NbNodes();
|
||||
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
|
||||
if ( anElem->IsPoly() ) {
|
||||
if ( const SMDS_PolyhedralVolumeOfNodes* ph =
|
||||
dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*> (anElem))
|
||||
@ -172,138 +172,138 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
||||
aNodesIter = ph->uniqueNodesIterator();
|
||||
}
|
||||
}
|
||||
aConnect.resize(aNbNodes);
|
||||
GetConnect(aNodesIter,aConnect);
|
||||
aConnect.resize(aNbNodes);
|
||||
GetConnect(aNodesIter,aConnect);
|
||||
|
||||
int anId = -1;
|
||||
int* aConn = NULL;
|
||||
switch(aNbNodes){
|
||||
case 4: {
|
||||
static int anIds[] = {0,2,1,3};
|
||||
aConn = anIds;
|
||||
anId = 111;
|
||||
break;
|
||||
}
|
||||
case 6: {
|
||||
static int anIds[] = {0,2,1,3,5,4};
|
||||
aConn = anIds;
|
||||
anId = 112;
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
static int anIds[] = {0,3,2,1,4,7,6,5};
|
||||
aConn = anIds;
|
||||
anId = 115;
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
static int anIds[] = {0,4,2,9,5,3, 1,6,8, 7};
|
||||
aConn = anIds;
|
||||
anId = 118;
|
||||
break;
|
||||
}
|
||||
case 13: {
|
||||
static int anIds[] = {0,6,4,2,7,5,3,1,8,11,10,9,12};
|
||||
aConn = anIds;
|
||||
anId = 114;
|
||||
break;
|
||||
}
|
||||
case 15: {
|
||||
static int anIds[] = {0,4,2,9,13,11,5,3,1,14,12,10,6,8,7};
|
||||
aConn = anIds;
|
||||
anId = 113;
|
||||
break;
|
||||
}
|
||||
case 20: {
|
||||
static int anIds[] = {0,6, 4,2, 12,18,16,14,7, 5, 3, 1, 19,17,15,13,8, 11,10,9};
|
||||
aConn = anIds;
|
||||
anId = 116;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
if(aConn){
|
||||
TRecord aRec;
|
||||
aRec.fe_descriptor_id = anId;
|
||||
aRec.node_labels.resize(aNbNodes);
|
||||
for(int aNodeId = 0; aNodeId < aNbNodes; aNodeId++){
|
||||
aRec.node_labels[aConn[aNodeId]] = aConnect[aNodeId];
|
||||
}
|
||||
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
|
||||
}
|
||||
}
|
||||
MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
|
||||
int anId = -1;
|
||||
int* aConn = NULL;
|
||||
switch(aNbNodes){
|
||||
case 4: {
|
||||
static int anIds[] = {0,2,1,3};
|
||||
aConn = anIds;
|
||||
anId = 111;
|
||||
break;
|
||||
}
|
||||
case 6: {
|
||||
static int anIds[] = {0,2,1,3,5,4};
|
||||
aConn = anIds;
|
||||
anId = 112;
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
static int anIds[] = {0,3,2,1,4,7,6,5};
|
||||
aConn = anIds;
|
||||
anId = 115;
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
static int anIds[] = {0,4,2,9,5,3, 1,6,8, 7};
|
||||
aConn = anIds;
|
||||
anId = 118;
|
||||
break;
|
||||
}
|
||||
case 13: {
|
||||
static int anIds[] = {0,6,4,2,7,5,3,1,8,11,10,9,12};
|
||||
aConn = anIds;
|
||||
anId = 114;
|
||||
break;
|
||||
}
|
||||
case 15: {
|
||||
static int anIds[] = {0,4,2,9,13,11,5,3,1,14,12,10,6,8,7};
|
||||
aConn = anIds;
|
||||
anId = 113;
|
||||
break;
|
||||
}
|
||||
case 20: {
|
||||
static int anIds[] = {0,6, 4,2, 12,18,16,14,7, 5, 3, 1, 19,17,15,13,8, 11,10,9};
|
||||
aConn = anIds;
|
||||
anId = 116;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
if(aConn){
|
||||
TRecord aRec;
|
||||
aRec.fe_descriptor_id = anId;
|
||||
aRec.node_labels.resize(aNbNodes);
|
||||
for(int aNodeId = 0; aNodeId < aNbNodes; aNodeId++){
|
||||
aRec.node_labels[aConn[aNodeId]] = aConnect[aNodeId];
|
||||
}
|
||||
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
|
||||
}
|
||||
}
|
||||
MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
|
||||
}
|
||||
UNV2412::Write(out_stream,aDataSet2412);
|
||||
}
|
||||
{
|
||||
using namespace UNV2417;
|
||||
if (myGroups.size() > 0) {
|
||||
TDataSet aDataSet2417;
|
||||
TGroupList::const_iterator aIter = myGroups.begin();
|
||||
for (; aIter != myGroups.end(); aIter++) {
|
||||
SMESHDS_GroupBase* aGroupDS = *aIter;
|
||||
TRecord aRec;
|
||||
aRec.GroupName = aGroupDS->GetStoreName();
|
||||
TDataSet aDataSet2417;
|
||||
TGroupList::const_iterator aIter = myGroups.begin();
|
||||
for (; aIter != myGroups.end(); aIter++) {
|
||||
SMESHDS_GroupBase* aGroupDS = *aIter;
|
||||
TRecord aRec;
|
||||
aRec.GroupName = aGroupDS->GetStoreName();
|
||||
|
||||
int i;
|
||||
SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
|
||||
if (aGroupDS->GetType() == SMDSAbs_Node) {
|
||||
aRec.NodeList.resize(aGroupDS->Extent());
|
||||
i = 0;
|
||||
while (aIter->more()) {
|
||||
const SMDS_MeshElement* aElem = aIter->next();
|
||||
aRec.NodeList[i] = aElem->GetID();
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
aRec.ElementList.resize(aGroupDS->Extent());
|
||||
i = 0;
|
||||
while (aIter->more()) {
|
||||
const SMDS_MeshElement* aElem = aIter->next();
|
||||
aRec.ElementList[i] = aElem->GetID();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
int i;
|
||||
SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
|
||||
if (aGroupDS->GetType() == SMDSAbs_Node) {
|
||||
aRec.NodeList.resize(aGroupDS->Extent());
|
||||
i = 0;
|
||||
while (aIter->more()) {
|
||||
const SMDS_MeshElement* aElem = aIter->next();
|
||||
aRec.NodeList[i] = aElem->GetID();
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
aRec.ElementList.resize(aGroupDS->Extent());
|
||||
i = 0;
|
||||
while (aIter->more()) {
|
||||
const SMDS_MeshElement* aElem = aIter->next();
|
||||
aRec.ElementList[i] = aElem->GetID();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
// 0019936: EDF 794 SMESH : Export UNV : Node color and group id
|
||||
//aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec));
|
||||
//aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec));
|
||||
aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID()+1, aRec));
|
||||
}
|
||||
UNV2417::Write(out_stream,aDataSet2417);
|
||||
myGroups.clear();
|
||||
}
|
||||
UNV2417::Write(out_stream,aDataSet2417);
|
||||
myGroups.clear();
|
||||
}
|
||||
}
|
||||
/* {
|
||||
using namespace UNV2417;
|
||||
TDataSet aDataSet2417;
|
||||
for ( TGroupsMap::iterator it = myGroupsMap.begin(); it != myGroupsMap.end(); it++ ) {
|
||||
SMESH_Group* aGroup = it->second;
|
||||
SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
|
||||
if ( aGroupDS ) {
|
||||
TRecord aRec;
|
||||
aRec.GroupName = aGroup->GetName();
|
||||
int i;
|
||||
SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
|
||||
if (aGroupDS->GetType() == SMDSAbs_Node) {
|
||||
aRec.NodeList.resize(aGroupDS->Extent());
|
||||
i = 0;
|
||||
while (aIter->more()) {
|
||||
const SMDS_MeshElement* aElem = aIter->next();
|
||||
aRec.NodeList[i] = aElem->GetID();
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
aRec.ElementList.resize(aGroupDS->Extent());
|
||||
i = 0;
|
||||
while (aIter->more()) {
|
||||
const SMDS_MeshElement* aElem = aIter->next();
|
||||
aRec.ElementList[i] = aElem->GetID();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec));
|
||||
}
|
||||
SMESH_Group* aGroup = it->second;
|
||||
SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
|
||||
if ( aGroupDS ) {
|
||||
TRecord aRec;
|
||||
aRec.GroupName = aGroup->GetName();
|
||||
int i;
|
||||
SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
|
||||
if (aGroupDS->GetType() == SMDSAbs_Node) {
|
||||
aRec.NodeList.resize(aGroupDS->Extent());
|
||||
i = 0;
|
||||
while (aIter->more()) {
|
||||
const SMDS_MeshElement* aElem = aIter->next();
|
||||
aRec.NodeList[i] = aElem->GetID();
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
aRec.ElementList.resize(aGroupDS->Extent());
|
||||
i = 0;
|
||||
while (aIter->more()) {
|
||||
const SMDS_MeshElement* aElem = aIter->next();
|
||||
aRec.ElementList[i] = aElem->GetID();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec));
|
||||
}
|
||||
}
|
||||
UNV2417::Write(out_stream,aDataSet2417);
|
||||
}*/
|
||||
|
@ -19,8 +19,8 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
#include <fstream>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "UNV2411_Structure.hxx"
|
||||
#include "UNV_Utilities.hxx"
|
||||
@ -98,17 +98,17 @@ void UNV2411::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
|
||||
const TRecord& aRec = anIter->second;
|
||||
char buf[78];
|
||||
sprintf(buf, "%10d%10d%10d%10d\n",
|
||||
aLabel,
|
||||
aRec.exp_coord_sys_num,
|
||||
aRec.disp_coord_sys_num,
|
||||
aRec.color);
|
||||
aLabel,
|
||||
aRec.exp_coord_sys_num,
|
||||
aRec.disp_coord_sys_num,
|
||||
aRec.color);
|
||||
out_stream<<buf;
|
||||
|
||||
// the coordinates
|
||||
sprintf(buf, "%25.16E%25.16E%25.16E\n",
|
||||
aRec.coord[0],
|
||||
aRec.coord[1],
|
||||
aRec.coord[2]);
|
||||
aRec.coord[0],
|
||||
aRec.coord[1],
|
||||
aRec.coord[2]);
|
||||
out_stream<<buf;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "SMESH_DriverUNV.hxx"
|
||||
|
||||
#include <map>
|
||||
#include <fstream>
|
||||
#include <fstream>
|
||||
|
||||
namespace UNV2411{
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
#include <fstream>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "UNV2412_Structure.hxx"
|
||||
@ -125,11 +125,11 @@ void UNV2412::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
|
||||
for(int i = 0, k = 0; i < iEnd; i++){
|
||||
int jEnd = n_nodes - 8*(i+1);
|
||||
if(jEnd < 0)
|
||||
jEnd = 8 + jEnd;
|
||||
jEnd = 8 + jEnd;
|
||||
else
|
||||
jEnd = 8;
|
||||
jEnd = 8;
|
||||
for(int j = 0; j < jEnd ; k++, j++){
|
||||
out_stream<<std::setw(10)<<aRec.node_labels[k];
|
||||
out_stream<<std::setw(10)<<aRec.node_labels[k];
|
||||
}
|
||||
out_stream<<std::endl;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <fstream>
|
||||
|
||||
|
||||
namespace UNV2412{
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "UNV2417_Structure.hxx"
|
||||
#include "UNV_Utilities.hxx"
|
||||
|
||||
#include <fstream>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
using namespace std;
|
||||
@ -37,7 +37,7 @@ static int MYDEBUG = 0;
|
||||
|
||||
|
||||
static string _group_labels[] = {"2417", "2429", "2430", "2432",
|
||||
"2435", "2452", "2467", "2477"};
|
||||
"2435", "2452", "2467", "2477"};
|
||||
#define NBGROUP 8
|
||||
|
||||
static string _label_dataset = "2467";
|
||||
@ -55,7 +55,7 @@ void UNV2417::Read(std::ifstream& in_stream, TDataSet& theDataSet)
|
||||
* a "-1" followed by a number means the beginning of a dataset
|
||||
* stop combing at the end of the file
|
||||
*/
|
||||
while( ((olds != "-1") || (news == "-1") ) && !in_stream.eof() ){
|
||||
while( ((olds != "-1") || (news == "-1") ) && !in_stream.eof() ){
|
||||
olds = news;
|
||||
in_stream >> news;
|
||||
}
|
||||
@ -63,7 +63,7 @@ void UNV2417::Read(std::ifstream& in_stream, TDataSet& theDataSet)
|
||||
return;
|
||||
for (int i = 0; i < NBGROUP; i++) {
|
||||
if (news == _group_labels[i]) {
|
||||
ReadGroup(news, in_stream, theDataSet);
|
||||
ReadGroup(news, in_stream, theDataSet);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -102,23 +102,23 @@ void UNV2417::ReadGroup(const std::string& myGroupLabel, std::ifstream& in_strea
|
||||
in_stream>>aElType;
|
||||
in_stream>>aElId;
|
||||
if ((myGroupLabel.compare("2435") == 0) ||
|
||||
(myGroupLabel.compare("2452") == 0) ||
|
||||
(myGroupLabel.compare("2467") == 0) ||
|
||||
(myGroupLabel.compare("2477") == 0)) {
|
||||
in_stream>>aTmp;
|
||||
in_stream>>aTmp;
|
||||
(myGroupLabel.compare("2452") == 0) ||
|
||||
(myGroupLabel.compare("2467") == 0) ||
|
||||
(myGroupLabel.compare("2477") == 0)) {
|
||||
in_stream>>aTmp;
|
||||
in_stream>>aTmp;
|
||||
}
|
||||
switch (aElType) {
|
||||
case 7: // Nodes
|
||||
aNum = aRec.NodeList.size();
|
||||
aRec.NodeList.resize(aNum + 1);
|
||||
aRec.NodeList[aNum] = aElId;
|
||||
break;
|
||||
aNum = aRec.NodeList.size();
|
||||
aRec.NodeList.resize(aNum + 1);
|
||||
aRec.NodeList[aNum] = aElId;
|
||||
break;
|
||||
case 8: // Elements
|
||||
aNum = aRec.ElementList.size();
|
||||
aRec.ElementList.resize(aNum + 1);
|
||||
aRec.ElementList[aNum] = aElId;
|
||||
break;
|
||||
aNum = aRec.ElementList.size();
|
||||
aRec.ElementList.resize(aNum + 1);
|
||||
aRec.ElementList[aNum] = aElId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
theDataSet.insert(TDataSet::value_type(aId,aRec));
|
||||
@ -160,8 +160,8 @@ void UNV2417::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
|
||||
int i;
|
||||
for (i = 0; i < aNbNodes; i++) {
|
||||
if (aRow == 2) {
|
||||
out_stream<<std::endl;
|
||||
aRow = 0;
|
||||
out_stream<<std::endl;
|
||||
aRow = 0;
|
||||
}
|
||||
out_stream<<std::setw(10)<<7;
|
||||
out_stream<<std::setw(10)<<aRec.NodeList[i];
|
||||
@ -171,8 +171,8 @@ void UNV2417::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
|
||||
}
|
||||
for (i = 0; i < aNbElements; i++) {
|
||||
if (aRow == 2) {
|
||||
out_stream<<std::endl;
|
||||
aRow = 0;
|
||||
out_stream<<std::endl;
|
||||
aRow = 0;
|
||||
}
|
||||
out_stream<<std::setw(10)<<8;
|
||||
out_stream<<std::setw(10)<<aRec.ElementList[i];
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace UNV2417{
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
#include "SMESH_DriverUNV.hxx"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
@ -62,14 +62,14 @@ namespace UNV{
|
||||
* a "-1" followed by a number means the beginning of a dataset
|
||||
* stop combing at the end of the file
|
||||
*/
|
||||
while( ((olds != "-1") || (news == "-1") ) && !in_file.eof() ){
|
||||
olds = news;
|
||||
in_file >> news;
|
||||
while( ((olds != "-1") || (news == "-1") ) && !in_file.eof() ){
|
||||
olds = news;
|
||||
in_file >> news;
|
||||
}
|
||||
if(in_file.eof())
|
||||
return false;
|
||||
return false;
|
||||
if (news == ds_name)
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
// should never end up here
|
||||
return false;
|
||||
|
@ -172,8 +172,8 @@ public:
|
||||
|
||||
bool DansPave( R3 & xyzMin, R3 & xyzMax )
|
||||
{ return xyzMin.x<=x && x<=xyzMax.x &&
|
||||
xyzMin.y<=y && y<=xyzMax.y &&
|
||||
xyzMin.z<=z && z<=xyzMax.z; }
|
||||
xyzMin.y<=y && y<=xyzMax.y &&
|
||||
xyzMin.z<=z && z<=xyzMax.z; }
|
||||
};
|
||||
|
||||
//la classe R4
|
||||
|
@ -87,11 +87,11 @@ deltacpu_( R & dtcpu )
|
||||
|
||||
|
||||
void aptrte( Z nutysu, R aretmx,
|
||||
Z nblf, Z * nudslf, R2 * uvslf,
|
||||
Z nbpti, R2 * uvpti,
|
||||
Z & nbst, R2 * & uvst,
|
||||
Z & nbt, Z * & nust,
|
||||
Z & ierr )
|
||||
Z nblf, Z * nudslf, R2 * uvslf,
|
||||
Z nbpti, R2 * uvpti,
|
||||
Z & nbst, R2 * & uvst,
|
||||
Z & nbt, Z * & nust,
|
||||
Z & ierr )
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// but : appel de la triangulation par un arbre-4 recouvrant
|
||||
// ----- de triangles equilateraux
|
||||
@ -184,7 +184,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
mxsomm = Max( 20000, 64*nbpti+i*i );
|
||||
MESSAGE( "APTRTE: Debut de la triangulation plane avec " );
|
||||
MESSAGE( "nutysu=" << nutysu << " aretmx=" << aretmx
|
||||
<< " mxsomm=" << mxsomm );
|
||||
<< " mxsomm=" << mxsomm );
|
||||
MESSAGE( nbarfr << " sommets sur la frontiere et " << nbpti << " points internes");
|
||||
|
||||
NEWDEPART:
|
||||
@ -247,7 +247,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
mnpxyd[ns0].y = uvslf[ns0].y;
|
||||
mnpxyd[ns0].z = areteideale();//( mnpxyd[ns0], direction );
|
||||
// MESSAGE("Sommet " << ns0 << ": " << mnpxyd[ns0].x
|
||||
// << " " << mnpxyd[ns0].y << " longueur arete=" << mnpxyd[ns0].z);
|
||||
// << " " << mnpxyd[ns0].y << " longueur arete=" << mnpxyd[ns0].z);
|
||||
|
||||
//carre de la longueur de l'arete 1 de la ligne fermee n
|
||||
d = pow( uvslf[ns0+1].x - uvslf[ns0].x, 2 )
|
||||
@ -268,8 +268,8 @@ void aptrte( Z nutysu, R aretmx,
|
||||
//le numero n de la ligne du sommet et son numero ns1 dans la ligne
|
||||
mnslig[ns0-1] = 1000000 * n + ns1-nudslf[n-1];
|
||||
fasoar( ns1, ns2, moins1, moins1, n,
|
||||
mosoar, mxsoar, n1soar, mnsoar, mnarst,
|
||||
noar0, ierr );
|
||||
mosoar, mxsoar, n1soar, mnsoar, mnarst,
|
||||
noar0, ierr );
|
||||
//pas de test sur ierr car pas de saturation possible a ce niveau
|
||||
|
||||
//le pointeur dans le hachage sur la premiere arete de la ligne fermee n
|
||||
@ -286,11 +286,11 @@ void aptrte( Z nutysu, R aretmx,
|
||||
{
|
||||
ns1 = ns2; //le numero de l'arete et le numero du premier sommet de l'arete
|
||||
if( i < nbarli )
|
||||
//nbs+1 est le 2-eme sommet de l'arete i de la ligne fermee n
|
||||
ns2 = ns1+1;
|
||||
//nbs+1 est le 2-eme sommet de l'arete i de la ligne fermee n
|
||||
ns2 = ns1+1;
|
||||
else
|
||||
//le 2-eme sommet de la derniere arete est le premier sommet de la ligne
|
||||
ns2 = ns0;
|
||||
//le 2-eme sommet de la derniere arete est le premier sommet de la ligne
|
||||
ns2 = ns0;
|
||||
|
||||
//l'arete precedente est dotee de sa suivante:celle cree ensuite
|
||||
//les 2 coordonnees du sommet ns2 de la ligne
|
||||
@ -302,7 +302,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
mnpxyd[ns].y = uvslf[ns].y;
|
||||
mnpxyd[ns].z = areteideale();//( mnpxyd[ns], direction );
|
||||
// MESSAGE("Sommet " << ns << ": " << mnpxyd[ns].x
|
||||
// << " " << mnpxyd[ns].y << " longueur arete=" << mnpxyd[ns].z);
|
||||
// << " " << mnpxyd[ns].y << " longueur arete=" << mnpxyd[ns].z);
|
||||
|
||||
//carre de la longueur de l'arete
|
||||
d = pow( uvslf[ns2-1].x - uvslf[ns1-1].x, 2)
|
||||
@ -323,8 +323,8 @@ void aptrte( Z nutysu, R aretmx,
|
||||
|
||||
//ajout de l'arete dans la liste
|
||||
fasoar( ns1, ns2, moins1, moins1, n,
|
||||
mosoar, mxsoar, n1soar, mnsoar,
|
||||
mnarst, noar, ierr );
|
||||
mosoar, mxsoar, n1soar, mnsoar,
|
||||
mnarst, noar, ierr );
|
||||
//pas de test sur ierr car pas de saturation possible a ce niveau
|
||||
|
||||
//chainage des aretes frontalieres en position 6 du tableau mnsoar
|
||||
@ -368,7 +368,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
|
||||
MESSAGE("Sur le bord: arete min=" << aremin << " arete max=" << aremax );
|
||||
MESSAGE("Triangulation: arete mx=" << aretmx
|
||||
<< " triangle aire mx=" << airemx );
|
||||
<< " triangle aire mx=" << airemx );
|
||||
|
||||
//chainage des aretes frontalieres : la derniere arete frontaliere
|
||||
mnsoar[ mosoar * noar - mosoar + 5 ] = 0;
|
||||
@ -444,9 +444,9 @@ void aptrte( Z nutysu, R aretmx,
|
||||
if( mnqueu==NULL) goto ERREUR;
|
||||
|
||||
tehote( nutysu, nbarpi, mxsomm, nbsomm, mnpxyd,
|
||||
comxmi, aretmx,
|
||||
mntree, mxqueu, mnqueu,
|
||||
ierr );
|
||||
comxmi, aretmx,
|
||||
mntree, mxqueu, mnqueu,
|
||||
ierr );
|
||||
|
||||
deltacpu_( d );
|
||||
tcpu += d;
|
||||
@ -471,9 +471,9 @@ void aptrte( Z nutysu, R aretmx,
|
||||
// et des points de la frontiere, des points internes imposes interieurs
|
||||
// ==========================================================================
|
||||
tetrte( comxmi, aretmx, nbarpi, mxsomm, mnpxyd,
|
||||
mxqueu, mnqueu, mntree, mosoar, mxsoar, n1soar, mnsoar,
|
||||
moartr, mxartr, n1artr, mnartr, mnarst,
|
||||
ierr );
|
||||
mxqueu, mnqueu, mntree, mosoar, mxsoar, n1soar, mnsoar,
|
||||
moartr, mxartr, n1artr, mnartr, mnarst,
|
||||
ierr );
|
||||
|
||||
// destruction de la queue et de l'arbre devenus inutiles
|
||||
delete [] mnqueu; mnqueu=NULL;
|
||||
@ -493,7 +493,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
|
||||
//qualites de la triangulation actuelle
|
||||
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
|
||||
nbt, quamoy, quamin );
|
||||
nbt, quamoy, quamin );
|
||||
|
||||
// boucle sur les aretes internes (non sur une ligne de la frontiere)
|
||||
// avec echange des 2 diagonales afin de rendre la triangulation delaunay
|
||||
@ -501,8 +501,8 @@ void aptrte( Z nutysu, R aretmx,
|
||||
// formation du chainage 6 des aretes internes a echanger eventuellement
|
||||
aisoar( mosoar, mxsoar, mnsoar, na );
|
||||
tedela( mnpxyd, mnarst,
|
||||
mosoar, mxsoar, n1soar, mnsoar, na,
|
||||
moartr, mxartr, n1artr, mnartr, n );
|
||||
mosoar, mxsoar, n1soar, mnsoar, na,
|
||||
moartr, mxartr, n1artr, mnartr, n );
|
||||
|
||||
MESSAGE( "Nombre d'echanges des diagonales de 2 triangles=" << n );
|
||||
deltacpu_( d );
|
||||
@ -512,7 +512,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
|
||||
//qualites de la triangulation actuelle
|
||||
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
|
||||
nbt, quamoy, quamin );
|
||||
nbt, quamoy, quamin );
|
||||
|
||||
// detection des aretes frontalieres initiales perdues
|
||||
// triangulation frontale pour les restaurer
|
||||
@ -532,10 +532,10 @@ void aptrte( Z nutysu, R aretmx,
|
||||
if( mnarcf2 == NULL ) goto ERREUR;
|
||||
|
||||
terefr( nbarpi, mnpxyd,
|
||||
mosoar, mxsoar, n1soar, mnsoar,
|
||||
moartr, mxartr, n1artr, mnartr, mnarst,
|
||||
mxarcf, mn1arcf, mnarcf, mnarcf1, mnarcf2,
|
||||
n, ierr );
|
||||
mosoar, mxsoar, n1soar, mnsoar,
|
||||
moartr, mxartr, n1artr, mnartr, mnarst,
|
||||
mxarcf, mn1arcf, mnarcf, mnarcf1, mnarcf2,
|
||||
n, ierr );
|
||||
|
||||
MESSAGE( "Restauration de " << n << " aretes perdues de la frontiere ierr=" << ierr );
|
||||
deltacpu_( d );
|
||||
@ -547,7 +547,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
|
||||
//qualites de la triangulation actuelle
|
||||
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
|
||||
nbt, quamoy, quamin );
|
||||
nbt, quamoy, quamin );
|
||||
|
||||
// fin de la triangulation avec respect des aretes initiales frontalieres
|
||||
|
||||
@ -573,10 +573,10 @@ void aptrte( Z nutysu, R aretmx,
|
||||
mnlftr[n] = n+1;
|
||||
|
||||
tesuex( nblf, mnlftr,
|
||||
ndtri0, nbsomm, mnpxyd, mnslig,
|
||||
mosoar, mxsoar, mnsoar,
|
||||
moartr, mxartr, n1artr, mnartr, mnarst,
|
||||
nbt, mntrsu, ierr );
|
||||
ndtri0, nbsomm, mnpxyd, mnslig,
|
||||
mosoar, mxsoar, mnsoar,
|
||||
moartr, mxartr, n1artr, mnartr, mnarst,
|
||||
nbt, mntrsu, ierr );
|
||||
|
||||
delete [] mnlftr; mnlftr=NULL;
|
||||
delete [] mntrsu; mntrsu=NULL;
|
||||
@ -588,7 +588,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
|
||||
//qualites de la triangulation actuelle
|
||||
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
|
||||
nbt, quamoy, quamin );
|
||||
nbt, quamoy, quamin );
|
||||
|
||||
// amelioration de la qualite de la triangulation par
|
||||
// barycentrage des sommets internes a la triangulation
|
||||
@ -603,12 +603,12 @@ void aptrte( Z nutysu, R aretmx,
|
||||
goto ERREUR;
|
||||
}
|
||||
teamqt( nutysu, aretmx, airemx,
|
||||
mnarst, mosoar, mxsoar, n1soar, mnsoar,
|
||||
moartr, mxartr, n1artr, mnartr,
|
||||
mxarcf, mnarcf2, mnarcf3,
|
||||
mn1arcf, mnarcf, mnarcf1,
|
||||
nbarpi, nbsomm, mxsomm, mnpxyd, mnslig,
|
||||
ierr );
|
||||
mnarst, mosoar, mxsoar, n1soar, mnsoar,
|
||||
moartr, mxartr, n1artr, mnartr,
|
||||
mxarcf, mnarcf2, mnarcf3,
|
||||
mn1arcf, mnarcf, mnarcf1,
|
||||
nbarpi, nbsomm, mxsomm, mnpxyd, mnslig,
|
||||
ierr );
|
||||
if( mnarcf3 != NULL ) {delete [] mnarcf3; mnarcf3=NULL;}
|
||||
if( mn1arcf != NULL ) {delete [] mn1arcf; mn1arcf=NULL;}
|
||||
if( mnarcf != NULL ) {delete [] mnarcf; mnarcf =NULL;}
|
||||
@ -623,7 +623,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
|
||||
//qualites de la triangulation finale
|
||||
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
|
||||
nbt, quamoy, quamin );
|
||||
nbt, quamoy, quamin );
|
||||
|
||||
// renumerotation des sommets internes: mnarst(i)=numero final du sommet
|
||||
// ===================================
|
||||
@ -669,22 +669,22 @@ void aptrte( Z nutysu, R aretmx,
|
||||
n = mnslig[i];
|
||||
if( n > 0 )
|
||||
{
|
||||
if( n >= 1000000 )
|
||||
{
|
||||
//sommet d'une ligne
|
||||
//retour aux coordonnees initiales dans uvslf
|
||||
l = n / 1000000;
|
||||
n = n - 1000000 * l + nudslf[l-1] - 1;
|
||||
uvst[nbst].x = uvslf[n].x;
|
||||
uvst[nbst].y = uvslf[n].y;
|
||||
}
|
||||
else
|
||||
{
|
||||
//point utilisateur n interne impose
|
||||
//retour aux coordonnees initiales dans uvpti
|
||||
uvst[nbst].x = uvpti[n-1].x;
|
||||
uvst[nbst].y = uvpti[n-1].y;
|
||||
}
|
||||
if( n >= 1000000 )
|
||||
{
|
||||
//sommet d'une ligne
|
||||
//retour aux coordonnees initiales dans uvslf
|
||||
l = n / 1000000;
|
||||
n = n - 1000000 * l + nudslf[l-1] - 1;
|
||||
uvst[nbst].x = uvslf[n].x;
|
||||
uvst[nbst].y = uvslf[n].y;
|
||||
}
|
||||
else
|
||||
{
|
||||
//point utilisateur n interne impose
|
||||
//retour aux coordonnees initiales dans uvpti
|
||||
uvst[nbst].x = uvpti[n-1].x;
|
||||
uvst[nbst].y = uvpti[n-1].y;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -712,7 +712,7 @@ void aptrte( Z nutysu, R aretmx,
|
||||
}
|
||||
nbt /= nbsttria; //le nombre final de triangles de la surface
|
||||
MESSAGE( "APTRTE: Fin de la triangulation plane avec "<<nbst<<" sommets et "
|
||||
<< nbt << " triangles" );
|
||||
<< nbt << " triangles" );
|
||||
deltacpu_( d );
|
||||
tcpu += d;
|
||||
MESSAGE( "APTRTE: Temps total de la triangulation plane=" << tcpu << " secondes" );
|
||||
@ -759,9 +759,9 @@ void
|
||||
#endif
|
||||
#endif
|
||||
qualitetrte( R3 *mnpxyd,
|
||||
Z & mosoar, Z & mxsoar, Z *mnsoar,
|
||||
Z & moartr, Z & mxartr, Z *mnartr,
|
||||
Z & nbtria, R & quamoy, R & quamin )
|
||||
Z & mosoar, Z & mxsoar, Z *mnsoar,
|
||||
Z & moartr, Z & mxartr, Z *mnartr,
|
||||
Z & nbtria, R & quamoy, R & quamin )
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// but : calculer la qualite moyenne et minimale de la triangulation
|
||||
// ----- actuelle definie par les tableaux mnsoar et mnartr
|
||||
@ -815,7 +815,7 @@ void
|
||||
|
||||
//la qualite du triangle ns1 ns2 ns3
|
||||
qutr2d( mnpxyd[nosotr[0]-1], mnpxyd[nosotr[1]-1], mnpxyd[nosotr[2]-1],
|
||||
qualite );
|
||||
qualite );
|
||||
|
||||
//la qualite moyenne
|
||||
quamoy += qualite;
|
||||
@ -831,11 +831,11 @@ void
|
||||
d = surtd2( mnpxyd[nosotr[0]-1], mnpxyd[nosotr[1]-1], mnpxyd[nosotr[2]-1] );
|
||||
if( d<0 )
|
||||
{
|
||||
//un triangle d'aire negative de plus
|
||||
nbtrianeg++;
|
||||
MESSAGE("ATTENTION: le triangle " << nt << " de sommets:"
|
||||
<< nosotr[0] << " " << nosotr[1] << " " << nosotr[2]
|
||||
<< " a une aire " << d <<"<=0");
|
||||
//un triangle d'aire negative de plus
|
||||
nbtrianeg++;
|
||||
MESSAGE("ATTENTION: le triangle " << nt << " de sommets:"
|
||||
<< nosotr[0] << " " << nosotr[1] << " " << nosotr[2]
|
||||
<< " a une aire " << d <<"<=0");
|
||||
}
|
||||
|
||||
//aire des triangles actuels
|
||||
@ -858,7 +858,7 @@ void
|
||||
<<nosotr[0]<<" "<<nosotr[1]<<" "<<nosotr[2]<<" ");
|
||||
for (int i=0;i<3;i++)
|
||||
MESSAGE("Sommet "<<nosotr[i]<<": x="<< mnpxyd[nosotr[i]-1].x
|
||||
<<" y="<< mnpxyd[nosotr[i]-1].y);
|
||||
<<" y="<< mnpxyd[nosotr[i]-1].y);
|
||||
}
|
||||
|
||||
if( nbtrianeg>0 )
|
||||
|
@ -61,10 +61,10 @@
|
||||
|
||||
MEFISTO2D_EXPORT
|
||||
void aptrte( Z nutysu, R aretmx,
|
||||
Z nblf, Z *nudslf, R2 *uvslf,
|
||||
Z nbpti, R2 *uvpti,
|
||||
Z & nbst, R2 * & uvst, Z & nbt, Z * & nust,
|
||||
Z & ierr );
|
||||
Z nblf, Z *nudslf, R2 *uvslf,
|
||||
Z nbpti, R2 *uvpti,
|
||||
Z & nbst, R2 * & uvst, Z & nbt, Z * & nust,
|
||||
Z & ierr );
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// but : appel de la triangulation par un arbre-4 recouvrant
|
||||
// ----- de triangles equilateraux
|
||||
@ -126,7 +126,7 @@ MEFISTO2D_EXPORT
|
||||
#define nusotr NUSOTR
|
||||
#define qutr2d QUTR2D
|
||||
#define surtd2 SURTD2
|
||||
#define qualitetrte QUALITETRTE
|
||||
#define qualitetrte QUALITETRTE
|
||||
|
||||
#define areteideale ARETEIDEALE
|
||||
|
||||
@ -162,9 +162,9 @@ extern "C" { void
|
||||
#endif
|
||||
#endif
|
||||
qualitetrte( R3 *mnpxyd,
|
||||
Z & mosoar, Z & mxsoar, Z *mnsoar,
|
||||
Z & moartr, Z & mxartr, Z *mnartr,
|
||||
Z & nbtria, R & quamoy, R & quamin ); }
|
||||
Z & mosoar, Z & mxsoar, Z *mnsoar,
|
||||
Z & moartr, Z & mxartr, Z *mnartr,
|
||||
Z & nbtria, R & quamoy, R & quamin ); }
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// but : calculer la qualite moyenne et minimale de la triangulation
|
||||
// ----- actuelle definie par les tableaux nosoar et noartr
|
||||
@ -248,8 +248,8 @@ extern "C" {void
|
||||
#endif
|
||||
#endif
|
||||
fasoar( Z & ns1, Z & ns2, Z & nt1, Z & nt2, Z & nolign,
|
||||
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z * mnarst,
|
||||
Z & noar, Z & ierr );
|
||||
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z * mnarst,
|
||||
Z & noar, Z & ierr );
|
||||
}
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// but : former l'arete de sommet ns1-ns2 dans le hachage du tableau
|
||||
@ -303,8 +303,8 @@ extern "C" {void
|
||||
#endif
|
||||
#endif
|
||||
teajte( Z & mxsomm, Z & nbsomm, R3 * mnpxyd, R3 * comxmi,
|
||||
R & aretmx, Z & mxtree, Z * letree,
|
||||
Z & ierr );
|
||||
R & aretmx, Z & mxtree, Z * letree,
|
||||
Z & ierr );
|
||||
}
|
||||
|
||||
extern "C" {void
|
||||
@ -315,9 +315,9 @@ extern "C" {void
|
||||
#endif
|
||||
#endif
|
||||
tehote( Z & nutysu, Z & nbarpi, Z & mxsomm, Z & nbsomm, R3 * mnpxyd,
|
||||
R3 * comxmi, R & aretmx,
|
||||
Z * letree, Z & mxqueu, Z * mnqueu,
|
||||
Z & ierr );
|
||||
R3 * comxmi, R & aretmx,
|
||||
Z * letree, Z & mxqueu, Z * mnqueu,
|
||||
Z & ierr );
|
||||
}
|
||||
// homogeneisation de l'arbre des te a un saut de taille au plus
|
||||
// prise en compte des tailles d'aretes souhaitees autour des sommets initiaux
|
||||
@ -330,10 +330,10 @@ extern "C" {void
|
||||
#endif
|
||||
#endif
|
||||
tetrte( R3 * comxmi, R & aretmx, Z & nbarpi, Z & mxsomm, R3 * mnpxyd,
|
||||
Z & mxqueu, Z * mnqueu, Z * mntree,
|
||||
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
|
||||
Z & ierr );
|
||||
Z & mxqueu, Z * mnqueu, Z * mntree,
|
||||
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
|
||||
Z & ierr );
|
||||
}
|
||||
// trianguler les triangles equilateraux feuilles a partir de leurs 3 sommets
|
||||
// et des points de la frontiere, des points internes imposes interieurs
|
||||
@ -357,8 +357,8 @@ extern "C" {void
|
||||
#endif
|
||||
#endif
|
||||
tedela( R3 * mnpxyd, Z * mnarst,
|
||||
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z & na,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z & n );
|
||||
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z & na,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z & n );
|
||||
}
|
||||
// boucle sur les aretes internes (non sur une ligne de la frontiere)
|
||||
// avec echange des 2 diagonales afin de rendre la triangulation delaunay
|
||||
@ -371,11 +371,11 @@ extern "C" {void
|
||||
#endif
|
||||
#endif
|
||||
terefr( Z & nbarpi, R3 * mnpxyd,
|
||||
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
|
||||
Z & mxarcf, Z * mnarc1, Z * mnarc2,
|
||||
Z * mnarc3, Z * mnarc4,
|
||||
Z & n, Z & ierr );
|
||||
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
|
||||
Z & mxarcf, Z * mnarc1, Z * mnarc2,
|
||||
Z * mnarc3, Z * mnarc4,
|
||||
Z & n, Z & ierr );
|
||||
}
|
||||
// detection des aretes frontalieres initiales perdues
|
||||
// triangulation frontale pour les restaurer
|
||||
@ -388,10 +388,10 @@ extern "C" {void
|
||||
#endif
|
||||
#endif
|
||||
tesuex( Z & nblf, Z * nulftr,
|
||||
Z & ndtri0, Z & nbsomm, R3 * mnpxyd, Z * mnslig,
|
||||
Z & mosoar, Z & mxsoar, Z * mnsoar,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
|
||||
Z & nbtria, Z * mntrsu, Z & ierr );
|
||||
Z & ndtri0, Z & nbsomm, R3 * mnpxyd, Z * mnslig,
|
||||
Z & mosoar, Z & mxsoar, Z * mnsoar,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
|
||||
Z & nbtria, Z * mntrsu, Z & ierr );
|
||||
}
|
||||
// suppression des triangles externes a la surface
|
||||
|
||||
@ -403,13 +403,13 @@ extern "C" {void
|
||||
#endif
|
||||
#endif
|
||||
teamqt( Z & nutysu, R & aretmx, R & airemx,
|
||||
Z * mnarst, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr,
|
||||
Z & mxarcf, Z * mntrcf, Z * mnstbo,
|
||||
Z * n1arcf, Z * mnarcf, Z * mnarc1,
|
||||
Z & nbarpi, Z & nbsomm, Z & mxsomm,
|
||||
R3 * mnpxyd, Z * mnslig,
|
||||
Z & ierr );
|
||||
Z * mnarst, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
|
||||
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr,
|
||||
Z & mxarcf, Z * mntrcf, Z * mnstbo,
|
||||
Z * n1arcf, Z * mnarcf, Z * mnarc1,
|
||||
Z & nbarpi, Z & nbsomm, Z & mxsomm,
|
||||
R3 * mnpxyd, Z * mnslig,
|
||||
Z & ierr );
|
||||
}
|
||||
// amelioration de la qualite de la triangulation par
|
||||
// barycentrage des sommets internes a la triangulation
|
||||
|
@ -114,3 +114,5 @@ dist_SMDS_MemoryLimit_SOURCES = \
|
||||
|
||||
SMDS_MemoryLimit_LDADD = \
|
||||
$(KERNEL_LDFLAGS) -lSALOMELocalTrace
|
||||
|
||||
#libSMDS_la_LDFLAGS += -L/data/eap/S5_MV/INSTALL/SMESH/lib/salome -lPerfmeter
|
||||
|
@ -34,15 +34,15 @@ class SMDS_EXPORT SMDS_EdgePosition:public SMDS_Position
|
||||
{
|
||||
|
||||
public:
|
||||
SMDS_EdgePosition(const int aEdgeId=0, const double aUParam=0);
|
||||
const virtual double * Coords() const;
|
||||
SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
void SetUParameter(double aUparam);
|
||||
double GetUParameter() const;
|
||||
SMDS_EdgePosition(const int aEdgeId=0, const double aUParam=0);
|
||||
const virtual double * Coords() const;
|
||||
SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
void SetUParameter(double aUparam);
|
||||
double GetUParameter() const;
|
||||
|
||||
private:
|
||||
|
||||
double myUParameter;
|
||||
double myUParameter;
|
||||
|
||||
};
|
||||
|
||||
|
@ -38,12 +38,12 @@ using namespace std;
|
||||
|
||||
int SMDS_FaceOfEdges::NbEdges() const
|
||||
{
|
||||
return myNbEdges;
|
||||
return myNbEdges;
|
||||
}
|
||||
|
||||
int SMDS_FaceOfEdges::NbFaces() const
|
||||
{
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : Print
|
||||
@ -52,15 +52,15 @@ int SMDS_FaceOfEdges::NbFaces() const
|
||||
|
||||
void SMDS_FaceOfEdges::Print(ostream & OS) const
|
||||
{
|
||||
OS << "face <" << GetID() << " > : ";
|
||||
int i;
|
||||
for (i = 0; i < NbEdges() - 1; i++) OS << myEdges[i] << ",";
|
||||
OS << myEdges[i] << ") " << endl;
|
||||
OS << "face <" << GetID() << " > : ";
|
||||
int i;
|
||||
for (i = 0; i < NbEdges() - 1; i++) OS << myEdges[i] << ",";
|
||||
OS << myEdges[i] << ") " << endl;
|
||||
}
|
||||
|
||||
SMDSAbs_ElementType SMDS_FaceOfEdges::GetType() const
|
||||
{
|
||||
return SMDSAbs_Face;
|
||||
return SMDSAbs_Face;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -86,7 +86,7 @@ class SMDS_FaceOfEdges_MyIterator:public SMDS_ElemIterator
|
||||
{
|
||||
index++;
|
||||
return mySet[index-1];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_FaceOfEdges::elementsIterator
|
||||
@ -110,11 +110,11 @@ SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
const SMDS_MeshEdge* edge2,
|
||||
const SMDS_MeshEdge* edge3)
|
||||
{
|
||||
myNbEdges = 3;
|
||||
myEdges[0]=edge1;
|
||||
myEdges[1]=edge2;
|
||||
myEdges[2]=edge3;
|
||||
myEdges[3]=0;
|
||||
myNbEdges = 3;
|
||||
myEdges[0]=edge1;
|
||||
myEdges[1]=edge2;
|
||||
myEdges[2]=edge3;
|
||||
myEdges[3]=0;
|
||||
}
|
||||
|
||||
SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
@ -122,38 +122,38 @@ SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
const SMDS_MeshEdge* edge3,
|
||||
const SMDS_MeshEdge* edge4)
|
||||
{
|
||||
myNbEdges = 4;
|
||||
myEdges[0]=edge1;
|
||||
myEdges[1]=edge2;
|
||||
myEdges[2]=edge3;
|
||||
myEdges[3]=edge4;
|
||||
myNbEdges = 4;
|
||||
myEdges[0]=edge1;
|
||||
myEdges[1]=edge2;
|
||||
myEdges[2]=edge3;
|
||||
myEdges[3]=edge4;
|
||||
}
|
||||
|
||||
/*bool operator<(const SMDS_FaceOfEdges& f1, const SMDS_FaceOfEdges& f2)
|
||||
{
|
||||
set<SMDS_MeshNode> set1,set2;
|
||||
SMDS_ElemIteratorPtr it;
|
||||
const SMDS_MeshNode * n;
|
||||
set<SMDS_MeshNode> set1,set2;
|
||||
SMDS_ElemIteratorPtr it;
|
||||
const SMDS_MeshNode * n;
|
||||
|
||||
it=f1.nodesIterator();
|
||||
it=f1.nodesIterator();
|
||||
|
||||
while(it->more())
|
||||
{
|
||||
n=static_cast<const SMDS_MeshNode *>(it->next());
|
||||
set1.insert(*n);
|
||||
}
|
||||
while(it->more())
|
||||
{
|
||||
n=static_cast<const SMDS_MeshNode *>(it->next());
|
||||
set1.insert(*n);
|
||||
}
|
||||
|
||||
delete it;
|
||||
it=f2.nodesIterator();
|
||||
|
||||
while(it->more())
|
||||
{
|
||||
n=static_cast<const SMDS_MeshNode *>(it->next());
|
||||
set2.insert(*n);
|
||||
}
|
||||
delete it;
|
||||
it=f2.nodesIterator();
|
||||
|
||||
while(it->more())
|
||||
{
|
||||
n=static_cast<const SMDS_MeshNode *>(it->next());
|
||||
set2.insert(*n);
|
||||
}
|
||||
|
||||
delete it;
|
||||
return set1<set2;
|
||||
delete it;
|
||||
return set1<set2;
|
||||
|
||||
}*/
|
||||
|
||||
|
@ -36,21 +36,21 @@
|
||||
class SMDS_EXPORT SMDS_FaceOfEdges:public SMDS_MeshFace
|
||||
{
|
||||
public:
|
||||
void Print(std::ostream & OS) const;
|
||||
SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
void Print(std::ostream & OS) const;
|
||||
SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
const SMDS_MeshEdge* edge2,
|
||||
const SMDS_MeshEdge* edge3);
|
||||
SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
const SMDS_MeshEdge* edge2,
|
||||
const SMDS_MeshEdge* edge3,
|
||||
const SMDS_MeshEdge* edge4);
|
||||
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
virtual SMDSAbs_EntityType GetEntityType() const;
|
||||
int NbNodes() const;
|
||||
int NbEdges() const;
|
||||
int NbFaces() const;
|
||||
// friend bool operator<(const SMDS_FaceOfEdges& e1, const SMDS_FaceOfEdges& e2);
|
||||
int NbNodes() const;
|
||||
int NbEdges() const;
|
||||
int NbFaces() const;
|
||||
// friend bool operator<(const SMDS_FaceOfEdges& e1, const SMDS_FaceOfEdges& e2);
|
||||
|
||||
|
||||
/*!
|
||||
@ -61,11 +61,11 @@ class SMDS_EXPORT SMDS_FaceOfEdges:public SMDS_MeshFace
|
||||
virtual const SMDS_MeshNode* GetNode(const int ind) const;
|
||||
|
||||
protected:
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
|
||||
private:
|
||||
const SMDS_MeshEdge* myEdges[4];
|
||||
const SMDS_MeshEdge* myEdges[4];
|
||||
int myNbEdges;
|
||||
|
||||
};
|
||||
|
@ -42,17 +42,17 @@ using namespace std;
|
||||
|
||||
int SMDS_FaceOfNodes::NbEdges() const
|
||||
{
|
||||
return NbNodes();
|
||||
return NbNodes();
|
||||
}
|
||||
|
||||
int SMDS_FaceOfNodes::NbFaces() const
|
||||
{
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SMDS_FaceOfNodes::NbNodes() const
|
||||
{
|
||||
return myNbNodes;
|
||||
return myNbNodes;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -62,10 +62,10 @@ int SMDS_FaceOfNodes::NbNodes() const
|
||||
|
||||
void SMDS_FaceOfNodes::Print(ostream & OS) const
|
||||
{
|
||||
OS << "face <" << GetID() << " > : ";
|
||||
int i;
|
||||
for (i = 0; i < NbNodes() - 1; i++) OS << myNodes[i] << ",";
|
||||
OS << myNodes[i] << ") " << endl;
|
||||
OS << "face <" << GetID() << " > : ";
|
||||
int i;
|
||||
for (i = 0; i < NbNodes() - 1; i++) OS << myNodes[i] << ",";
|
||||
OS << myNodes[i] << ") " << endl;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -132,11 +132,11 @@ SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3)
|
||||
{
|
||||
myNbNodes = 3;
|
||||
myNodes[0]=node1;
|
||||
myNodes[1]=node2;
|
||||
myNodes[2]=node3;
|
||||
myNodes[3]=0;
|
||||
myNbNodes = 3;
|
||||
myNodes[0]=node1;
|
||||
myNodes[1]=node2;
|
||||
myNodes[2]=node3;
|
||||
myNodes[3]=0;
|
||||
}
|
||||
|
||||
SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
@ -144,11 +144,11 @@ SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node3,
|
||||
const SMDS_MeshNode* node4)
|
||||
{
|
||||
myNbNodes = 4;
|
||||
myNodes[0]=node1;
|
||||
myNodes[1]=node2;
|
||||
myNodes[2]=node3;
|
||||
myNodes[3]=node4;
|
||||
myNbNodes = 4;
|
||||
myNodes[0]=node1;
|
||||
myNodes[1]=node2;
|
||||
myNodes[2]=node3;
|
||||
myNodes[3]=node4;
|
||||
}
|
||||
bool SMDS_FaceOfNodes::ChangeNodes(const SMDS_MeshNode* nodes[],
|
||||
const int nbNodes)
|
||||
|
@ -35,19 +35,19 @@
|
||||
class SMDS_EXPORT SMDS_FaceOfNodes:public SMDS_MeshFace
|
||||
{
|
||||
public:
|
||||
void Print(std::ostream & OS) const;
|
||||
SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
void Print(std::ostream & OS) const;
|
||||
SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3);
|
||||
SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3,
|
||||
const SMDS_MeshNode* node4);
|
||||
bool ChangeNodes(const SMDS_MeshNode* nodes[],
|
||||
const int nbNodes);
|
||||
int NbEdges() const;
|
||||
int NbFaces() const;
|
||||
int NbNodes() const;
|
||||
int NbEdges() const;
|
||||
int NbFaces() const;
|
||||
int NbNodes() const;
|
||||
|
||||
/*!
|
||||
* \brief Return node by its index
|
||||
@ -59,11 +59,11 @@ class SMDS_EXPORT SMDS_FaceOfNodes:public SMDS_MeshFace
|
||||
virtual SMDSAbs_EntityType GetEntityType() const;
|
||||
|
||||
protected:
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
|
||||
private:
|
||||
const SMDS_MeshNode* myNodes[4];
|
||||
const SMDS_MeshNode* myNodes[4];
|
||||
int myNbNodes;
|
||||
|
||||
};
|
||||
|
@ -36,8 +36,8 @@ using namespace std;
|
||||
//=======================================================================
|
||||
|
||||
SMDS_FacePosition::SMDS_FacePosition(const int aEdgeId,
|
||||
const double aUParam,
|
||||
const double aVParam)
|
||||
const double aUParam,
|
||||
const double aVParam)
|
||||
:SMDS_Position(aEdgeId),
|
||||
myUParameter(aUParam),myVParameter(aVParam)
|
||||
{
|
||||
@ -49,21 +49,21 @@ SMDS_FacePosition::SMDS_FacePosition(const int aEdgeId,
|
||||
//=======================================================================
|
||||
const double *SMDS_FacePosition::Coords() const
|
||||
{
|
||||
static double origin[]={0,0,0};
|
||||
MESSAGE("SMDS_EdgePosition::Coords not implemented");
|
||||
return origin;
|
||||
static double origin[]={0,0,0};
|
||||
MESSAGE("SMDS_EdgePosition::Coords not implemented");
|
||||
return origin;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
SMDS_TypeOfPosition SMDS_FacePosition::GetTypeOfPosition() const
|
||||
{
|
||||
return SMDS_TOP_FACE;
|
||||
return SMDS_TOP_FACE;
|
||||
}
|
||||
|
||||
void SMDS_FacePosition::SetUParameter(double aUparam)
|
||||
{
|
||||
myUParameter = aUparam;
|
||||
myUParameter = aUparam;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -73,7 +73,7 @@ void SMDS_FacePosition::SetUParameter(double aUparam)
|
||||
|
||||
void SMDS_FacePosition::SetVParameter(double aVparam)
|
||||
{
|
||||
myVParameter = aVparam;
|
||||
myVParameter = aVparam;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -83,7 +83,7 @@ void SMDS_FacePosition::SetVParameter(double aVparam)
|
||||
|
||||
double SMDS_FacePosition::GetUParameter() const
|
||||
{
|
||||
return myUParameter;
|
||||
return myUParameter;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -93,5 +93,5 @@ double SMDS_FacePosition::GetUParameter() const
|
||||
|
||||
double SMDS_FacePosition::GetVParameter() const
|
||||
{
|
||||
return myVParameter;
|
||||
return myVParameter;
|
||||
}
|
||||
|
@ -34,17 +34,17 @@ class SMDS_EXPORT SMDS_FacePosition:public SMDS_Position
|
||||
{
|
||||
|
||||
public:
|
||||
SMDS_FacePosition(int aFaceId=0, double aUParam=0,
|
||||
double aVParam=0);
|
||||
const virtual double * Coords() const;
|
||||
SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
void SetUParameter(double aUparam);
|
||||
void SetVParameter(double aVparam);
|
||||
double GetUParameter() const;
|
||||
double GetVParameter() const;
|
||||
SMDS_FacePosition(int aFaceId=0, double aUParam=0,
|
||||
double aVParam=0);
|
||||
const virtual double * Coords() const;
|
||||
SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
void SetUParameter(double aUparam);
|
||||
void SetVParameter(double aVparam);
|
||||
double GetUParameter() const;
|
||||
double GetVParameter() const;
|
||||
|
||||
private:
|
||||
double myUParameter;
|
||||
double myVParameter;
|
||||
double myUParameter;
|
||||
double myVParameter;
|
||||
};
|
||||
#endif
|
||||
|
@ -33,18 +33,18 @@
|
||||
template<typename VALUE> class SMDS_Iterator
|
||||
{
|
||||
public:
|
||||
/// Return true if and only if there are other object in this iterator
|
||||
virtual bool more()=0;
|
||||
|
||||
/// Return the current object and step to the next one
|
||||
virtual VALUE next()=0;
|
||||
|
||||
/// Delete the current element and step to the next one
|
||||
virtual void remove(){}
|
||||
|
||||
/// Provide virtual destructor just for case if some derived iterator
|
||||
/// Return true if and only if there are other object in this iterator
|
||||
virtual bool more()=0;
|
||||
|
||||
/// Return the current object and step to the next one
|
||||
virtual VALUE next()=0;
|
||||
|
||||
/// Delete the current element and step to the next one
|
||||
virtual void remove(){}
|
||||
|
||||
/// Provide virtual destructor just for case if some derived iterator
|
||||
/// must have a destructor
|
||||
virtual ~SMDS_Iterator(){}
|
||||
virtual ~SMDS_Iterator(){}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -29,24 +29,24 @@
|
||||
|
||||
bool SMDS_IteratorOfElements::subMore()
|
||||
{
|
||||
if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
|
||||
{
|
||||
if(t1Iterator->more())
|
||||
{
|
||||
t2Iterator=t1Iterator->next()->elementsIterator(myType);
|
||||
return subMore();
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
else return true;
|
||||
if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
|
||||
{
|
||||
if(t1Iterator->more())
|
||||
{
|
||||
t2Iterator=t1Iterator->next()->elementsIterator(myType);
|
||||
return subMore();
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
else return true;
|
||||
}
|
||||
|
||||
const SMDS_MeshElement * SMDS_IteratorOfElements::subNext()
|
||||
{
|
||||
if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
|
||||
if(t1Iterator->more())
|
||||
t2Iterator=t1Iterator->next()->elementsIterator(myType);
|
||||
return t2Iterator->next();
|
||||
if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
|
||||
if(t1Iterator->more())
|
||||
t2Iterator=t1Iterator->next()->elementsIterator(myType);
|
||||
return t2Iterator->next();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -61,48 +61,48 @@ SMDS_IteratorOfElements::SMDS_IteratorOfElements(const SMDS_MeshElement * elemen
|
||||
myType(type), myElement(element),
|
||||
myProxyElement(NULL)
|
||||
{
|
||||
while(subMore())
|
||||
alreadyReturnedElements.insert(subNext());
|
||||
itAlreadyReturned= alreadyReturnedElements.begin();
|
||||
switch(myElement->GetType())
|
||||
{
|
||||
case SMDSAbs_Node:
|
||||
case SMDSAbs_Edge: myReverseIteration=true; break;
|
||||
case SMDSAbs_Face: myReverseIteration=(type==SMDSAbs_Volume); break;
|
||||
default: myReverseIteration=false;
|
||||
}
|
||||
while(subMore())
|
||||
alreadyReturnedElements.insert(subNext());
|
||||
itAlreadyReturned= alreadyReturnedElements.begin();
|
||||
switch(myElement->GetType())
|
||||
{
|
||||
case SMDSAbs_Node:
|
||||
case SMDSAbs_Edge: myReverseIteration=true; break;
|
||||
case SMDSAbs_Face: myReverseIteration=(type==SMDSAbs_Volume); break;
|
||||
default: myReverseIteration=false;
|
||||
}
|
||||
}
|
||||
|
||||
bool SMDS_IteratorOfElements::more()
|
||||
{
|
||||
if(myProxyElement==NULL)
|
||||
{
|
||||
while(itAlreadyReturned!=alreadyReturnedElements.end())
|
||||
{
|
||||
myProxyElement=*itAlreadyReturned;
|
||||
itAlreadyReturned++;
|
||||
if(myProxyElement==NULL)
|
||||
{
|
||||
while(itAlreadyReturned!=alreadyReturnedElements.end())
|
||||
{
|
||||
myProxyElement=*itAlreadyReturned;
|
||||
itAlreadyReturned++;
|
||||
|
||||
if(myReverseIteration)
|
||||
{
|
||||
SMDS_ElemIteratorPtr it=
|
||||
myProxyElement->elementsIterator(myElement->GetType());
|
||||
while(it->more())
|
||||
{
|
||||
if(it->next()==myElement) return true;
|
||||
}
|
||||
}
|
||||
else return true;
|
||||
}
|
||||
myProxyElement=NULL;
|
||||
return false;
|
||||
}
|
||||
else return true;
|
||||
if(myReverseIteration)
|
||||
{
|
||||
SMDS_ElemIteratorPtr it=
|
||||
myProxyElement->elementsIterator(myElement->GetType());
|
||||
while(it->more())
|
||||
{
|
||||
if(it->next()==myElement) return true;
|
||||
}
|
||||
}
|
||||
else return true;
|
||||
}
|
||||
myProxyElement=NULL;
|
||||
return false;
|
||||
}
|
||||
else return true;
|
||||
}
|
||||
|
||||
const SMDS_MeshElement * SMDS_IteratorOfElements::next()
|
||||
{
|
||||
more();
|
||||
const SMDS_MeshElement *e=myProxyElement;
|
||||
myProxyElement=NULL;
|
||||
return e;
|
||||
more();
|
||||
const SMDS_MeshElement *e=myProxyElement;
|
||||
myProxyElement=NULL;
|
||||
return e;
|
||||
}
|
||||
|
@ -35,22 +35,22 @@ class SMDS_EXPORT SMDS_IteratorOfElements:public SMDS_ElemIterator
|
||||
/// Create an iterator which look for elements of type type which are linked
|
||||
/// to the element element. it is the iterator to get connectivity of element
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_IteratorOfElements(const SMDS_MeshElement * element,
|
||||
SMDS_IteratorOfElements(const SMDS_MeshElement * element,
|
||||
SMDSAbs_ElementType type,
|
||||
const SMDS_ElemIteratorPtr& it);
|
||||
bool more();
|
||||
const SMDS_MeshElement * next();
|
||||
bool more();
|
||||
const SMDS_MeshElement * next();
|
||||
|
||||
private:
|
||||
SMDS_ElemIteratorPtr t2Iterator;
|
||||
SMDS_ElemIteratorPtr t1Iterator;
|
||||
SMDSAbs_ElementType myType;
|
||||
const SMDS_MeshElement * myProxyElement;
|
||||
const SMDS_MeshElement * myElement;
|
||||
bool myReverseIteration;
|
||||
SMDS_ElemIteratorPtr t2Iterator;
|
||||
SMDS_ElemIteratorPtr t1Iterator;
|
||||
SMDSAbs_ElementType myType;
|
||||
const SMDS_MeshElement * myProxyElement;
|
||||
const SMDS_MeshElement * myElement;
|
||||
bool myReverseIteration;
|
||||
|
||||
std::set<const SMDS_MeshElement*> alreadyReturnedElements;
|
||||
std::set<const SMDS_MeshElement*>::iterator itAlreadyReturned;
|
||||
bool subMore();
|
||||
const SMDS_MeshElement * subNext();
|
||||
std::set<const SMDS_MeshElement*> alreadyReturnedElements;
|
||||
std::set<const SMDS_MeshElement*>::iterator itAlreadyReturned;
|
||||
bool subMore();
|
||||
const SMDS_MeshElement * subNext();
|
||||
};
|
||||
|
@ -39,7 +39,7 @@ using namespace std;
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_Mesh0DElement::SMDS_Mesh0DElement (const SMDS_MeshNode * node)
|
||||
{
|
||||
{
|
||||
myNode = node;
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,9 @@ using namespace std;
|
||||
|
||||
SMDS_MeshEdge::SMDS_MeshEdge(const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2)
|
||||
{
|
||||
myNodes[0]=node1;
|
||||
myNodes[1]=node2;
|
||||
{
|
||||
myNodes[0]=node1;
|
||||
myNodes[1]=node2;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -53,23 +53,23 @@ SMDS_MeshEdge::SMDS_MeshEdge(const SMDS_MeshNode * node1,
|
||||
|
||||
void SMDS_MeshEdge::Print(ostream & OS) const
|
||||
{
|
||||
OS << "edge <" << GetID() << "> : (" << myNodes[0] << " , " << myNodes[1] <<
|
||||
") " << endl;
|
||||
OS << "edge <" << GetID() << "> : (" << myNodes[0] << " , " << myNodes[1] <<
|
||||
") " << endl;
|
||||
}
|
||||
|
||||
int SMDS_MeshEdge::NbNodes() const
|
||||
{
|
||||
return 2;
|
||||
return 2;
|
||||
}
|
||||
|
||||
int SMDS_MeshEdge::NbEdges() const
|
||||
{
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
SMDSAbs_ElementType SMDS_MeshEdge::GetType() const
|
||||
{
|
||||
return SMDSAbs_Edge;
|
||||
return SMDSAbs_Edge;
|
||||
}
|
||||
|
||||
class SMDS_MeshEdge_MyNodeIterator:public SMDS_ElemIterator
|
||||
@ -93,7 +93,7 @@ class SMDS_MeshEdge_MyNodeIterator:public SMDS_ElemIterator
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_MeshEdge::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
@ -110,28 +110,28 @@ SMDS_ElemIteratorPtr SMDS_MeshEdge::
|
||||
|
||||
bool operator<(const SMDS_MeshEdge & e1, const SMDS_MeshEdge & e2)
|
||||
{
|
||||
int id11=e1.myNodes[0]->GetID();
|
||||
int id21=e2.myNodes[0]->GetID();
|
||||
int id12=e1.myNodes[1]->GetID();
|
||||
int id22=e2.myNodes[1]->GetID();
|
||||
int tmp;
|
||||
int id11=e1.myNodes[0]->GetID();
|
||||
int id21=e2.myNodes[0]->GetID();
|
||||
int id12=e1.myNodes[1]->GetID();
|
||||
int id22=e2.myNodes[1]->GetID();
|
||||
int tmp;
|
||||
|
||||
if(id11>=id12)
|
||||
{
|
||||
tmp=id11;
|
||||
id11=id12;
|
||||
id12=tmp;
|
||||
}
|
||||
if(id21>=id22)
|
||||
{
|
||||
tmp=id21;
|
||||
id21=id22;
|
||||
id22=tmp;
|
||||
}
|
||||
if(id11>=id12)
|
||||
{
|
||||
tmp=id11;
|
||||
id11=id12;
|
||||
id12=tmp;
|
||||
}
|
||||
if(id21>=id22)
|
||||
{
|
||||
tmp=id21;
|
||||
id21=id22;
|
||||
id22=tmp;
|
||||
}
|
||||
|
||||
if(id11<id21) return true;
|
||||
else if(id11==id21) return (id21<id22);
|
||||
else return false;
|
||||
if(id11<id21) return true;
|
||||
else if(id11==id21) return (id21<id22);
|
||||
else return false;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -35,17 +35,17 @@ class SMDS_EXPORT SMDS_MeshEdge:public SMDS_MeshElement
|
||||
{
|
||||
|
||||
public:
|
||||
SMDS_MeshEdge(const SMDS_MeshNode * node1,
|
||||
SMDS_MeshEdge(const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2);
|
||||
bool ChangeNodes(const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2);
|
||||
void Print(std::ostream & OS) const;
|
||||
void Print(std::ostream & OS) const;
|
||||
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Edge; }
|
||||
int NbNodes() const;
|
||||
int NbEdges() const;
|
||||
friend bool operator<(const SMDS_MeshEdge& e1, const SMDS_MeshEdge& e2);
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Edge; }
|
||||
int NbNodes() const;
|
||||
int NbEdges() const;
|
||||
friend bool operator<(const SMDS_MeshEdge& e1, const SMDS_MeshEdge& e2);
|
||||
|
||||
/*!
|
||||
* \brief Return node by its index
|
||||
@ -55,11 +55,11 @@ class SMDS_EXPORT SMDS_MeshEdge:public SMDS_MeshElement
|
||||
virtual const SMDS_MeshNode* GetNode(const int ind) const;
|
||||
|
||||
protected:
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
|
||||
protected:
|
||||
const SMDS_MeshNode* myNodes[3];
|
||||
const SMDS_MeshNode* myNodes[3];
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@ -40,13 +40,13 @@ SMDS_MeshElement::SMDS_MeshElement(int ID):myID(ID)
|
||||
|
||||
void SMDS_MeshElement::Print(ostream & OS) const
|
||||
{
|
||||
OS << "dump of mesh element" << endl;
|
||||
OS << "dump of mesh element" << endl;
|
||||
}
|
||||
|
||||
ostream & operator <<(ostream & OS, const SMDS_MeshElement * ME)
|
||||
{
|
||||
ME->Print(OS);
|
||||
return OS;
|
||||
ME->Print(OS);
|
||||
return OS;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -55,7 +55,7 @@ ostream & operator <<(ostream & OS, const SMDS_MeshElement * ME)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_ElemIteratorPtr SMDS_MeshElement::nodesIterator() const
|
||||
{
|
||||
return elementsIterator(SMDSAbs_Node);
|
||||
return elementsIterator(SMDSAbs_Node);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -64,7 +64,7 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::nodesIterator() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_ElemIteratorPtr SMDS_MeshElement::edgesIterator() const
|
||||
{
|
||||
return elementsIterator(SMDSAbs_Edge);
|
||||
return elementsIterator(SMDSAbs_Edge);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -73,7 +73,7 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::edgesIterator() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_ElemIteratorPtr SMDS_MeshElement::facesIterator() const
|
||||
{
|
||||
return elementsIterator(SMDSAbs_Face);
|
||||
return elementsIterator(SMDSAbs_Face);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -81,14 +81,14 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::facesIterator() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int SMDS_MeshElement::NbNodes() const
|
||||
{
|
||||
int nbnodes=0;
|
||||
SMDS_ElemIteratorPtr it=nodesIterator();
|
||||
while(it->more())
|
||||
{
|
||||
it->next();
|
||||
nbnodes++;
|
||||
}
|
||||
return nbnodes;
|
||||
int nbnodes=0;
|
||||
SMDS_ElemIteratorPtr it=nodesIterator();
|
||||
while(it->more())
|
||||
{
|
||||
it->next();
|
||||
nbnodes++;
|
||||
}
|
||||
return nbnodes;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -96,14 +96,14 @@ int SMDS_MeshElement::NbNodes() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int SMDS_MeshElement::NbEdges() const
|
||||
{
|
||||
int nbedges=0;
|
||||
SMDS_ElemIteratorPtr it=edgesIterator();
|
||||
while(it->more())
|
||||
{
|
||||
it->next();
|
||||
nbedges++;
|
||||
}
|
||||
return nbedges;
|
||||
int nbedges=0;
|
||||
SMDS_ElemIteratorPtr it=edgesIterator();
|
||||
while(it->more())
|
||||
{
|
||||
it->next();
|
||||
nbedges++;
|
||||
}
|
||||
return nbedges;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -111,14 +111,14 @@ int SMDS_MeshElement::NbEdges() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int SMDS_MeshElement::NbFaces() const
|
||||
{
|
||||
int nbfaces=0;
|
||||
SMDS_ElemIteratorPtr it=facesIterator();
|
||||
while(it->more())
|
||||
{
|
||||
it->next();
|
||||
nbfaces++;
|
||||
}
|
||||
return nbfaces;
|
||||
int nbfaces=0;
|
||||
SMDS_ElemIteratorPtr it=facesIterator();
|
||||
while(it->more())
|
||||
{
|
||||
it->next();
|
||||
nbfaces++;
|
||||
}
|
||||
return nbfaces;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -142,23 +142,23 @@ class SMDS_MeshElement_MyIterator:public SMDS_ElemIterator
|
||||
const SMDS_MeshElement* next()
|
||||
{
|
||||
myMore=false;
|
||||
return myElement;
|
||||
}
|
||||
return myElement;
|
||||
}
|
||||
};
|
||||
SMDS_ElemIteratorPtr SMDS_MeshElement::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
/** @todo Check that iterator in the child classes return elements
|
||||
in the same order for each different implementation (i.e: SMDS_VolumeOfNodes
|
||||
and SMDS_VolumeOfFaces */
|
||||
|
||||
if(type==GetType())
|
||||
/** @todo Check that iterator in the child classes return elements
|
||||
in the same order for each different implementation (i.e: SMDS_VolumeOfNodes
|
||||
and SMDS_VolumeOfFaces */
|
||||
|
||||
if(type==GetType())
|
||||
return SMDS_ElemIteratorPtr(new SMDS_MeshElement_MyIterator(this));
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
MESSAGE("Iterator not implemented");
|
||||
return SMDS_ElemIteratorPtr((SMDS_ElemIterator*)NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -166,32 +166,32 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int SMDS_MeshElement::GetID() const
|
||||
{
|
||||
return myID;
|
||||
return myID;
|
||||
}
|
||||
|
||||
bool operator<(const SMDS_MeshElement& e1, const SMDS_MeshElement& e2)
|
||||
{
|
||||
if(e1.GetType()!=e2.GetType()) return false;
|
||||
switch(e1.GetType())
|
||||
{
|
||||
case SMDSAbs_Node:
|
||||
return static_cast<const SMDS_MeshNode &>(e1) <
|
||||
static_cast<const SMDS_MeshNode &>(e2);
|
||||
if(e1.GetType()!=e2.GetType()) return false;
|
||||
switch(e1.GetType())
|
||||
{
|
||||
case SMDSAbs_Node:
|
||||
return static_cast<const SMDS_MeshNode &>(e1) <
|
||||
static_cast<const SMDS_MeshNode &>(e2);
|
||||
|
||||
case SMDSAbs_Edge:
|
||||
return static_cast<const SMDS_MeshEdge &>(e1) <
|
||||
static_cast<const SMDS_MeshEdge &>(e2);
|
||||
case SMDSAbs_Edge:
|
||||
return static_cast<const SMDS_MeshEdge &>(e1) <
|
||||
static_cast<const SMDS_MeshEdge &>(e2);
|
||||
|
||||
case SMDSAbs_Face:
|
||||
return static_cast<const SMDS_MeshFace &>(e1) <
|
||||
static_cast<const SMDS_MeshFace &>(e2);
|
||||
case SMDSAbs_Face:
|
||||
return static_cast<const SMDS_MeshFace &>(e1) <
|
||||
static_cast<const SMDS_MeshFace &>(e2);
|
||||
|
||||
case SMDSAbs_Volume:
|
||||
return static_cast<const SMDS_MeshVolume &>(e1) <
|
||||
static_cast<const SMDS_MeshVolume &>(e2);
|
||||
case SMDSAbs_Volume:
|
||||
return static_cast<const SMDS_MeshVolume &>(e1) <
|
||||
static_cast<const SMDS_MeshVolume &>(e2);
|
||||
|
||||
default : MESSAGE("Internal Error");
|
||||
}
|
||||
default : MESSAGE("Internal Error");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#define _SMDS_MeshElement_HeaderFile
|
||||
|
||||
#include "SMESH_SMDS.hxx"
|
||||
|
||||
|
||||
#include "SMDSAbs_ElementType.hxx"
|
||||
#include "SMDS_MeshObject.hxx"
|
||||
#include "SMDS_ElemIterator.hxx"
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
class SMDS_MeshNode;
|
||||
class SMDS_MeshEdge;
|
||||
class SMDS_MeshFace;
|
||||
class SMDS_MeshFace;
|
||||
|
||||
// ============================================================
|
||||
/*!
|
||||
|
@ -25,5 +25,5 @@
|
||||
|
||||
SMDSAbs_ElementType SMDS_MeshFace::GetType() const
|
||||
{
|
||||
return SMDSAbs_Face;
|
||||
return SMDSAbs_Face;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
class SMDS_EXPORT SMDS_MeshFace:public SMDS_MeshElement
|
||||
{
|
||||
public:
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -40,7 +40,7 @@ using namespace std;
|
||||
|
||||
SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh,
|
||||
const SMDSAbs_ElementType theType)
|
||||
:myMesh(theMesh),myType(theType), myParent(NULL)
|
||||
:myMesh(theMesh),myType(theType), myParent(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh,
|
||||
|
||||
SMDS_MeshGroup::SMDS_MeshGroup(SMDS_MeshGroup * theParent,
|
||||
const SMDSAbs_ElementType theType)
|
||||
:myMesh(theParent->myMesh),myType(theType), myParent(theParent)
|
||||
:myMesh(theParent->myMesh),myType(theType), myParent(theParent)
|
||||
{
|
||||
}
|
||||
|
||||
@ -63,9 +63,9 @@ SMDS_MeshGroup::SMDS_MeshGroup(SMDS_MeshGroup * theParent,
|
||||
const SMDS_MeshGroup *SMDS_MeshGroup::AddSubGroup
|
||||
(const SMDSAbs_ElementType theType)
|
||||
{
|
||||
const SMDS_MeshGroup * subgroup = new SMDS_MeshGroup(this,theType);
|
||||
myChildren.insert(myChildren.end(),subgroup);
|
||||
return subgroup;
|
||||
const SMDS_MeshGroup * subgroup = new SMDS_MeshGroup(this,theType);
|
||||
myChildren.insert(myChildren.end(),subgroup);
|
||||
return subgroup;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -75,19 +75,19 @@ const SMDS_MeshGroup *SMDS_MeshGroup::AddSubGroup
|
||||
|
||||
bool SMDS_MeshGroup::RemoveSubGroup(const SMDS_MeshGroup * theGroup)
|
||||
{
|
||||
bool found = false;
|
||||
list<const SMDS_MeshGroup*>::iterator itgroup;
|
||||
for(itgroup=myChildren.begin(); itgroup!=myChildren.end(); itgroup++)
|
||||
{
|
||||
const SMDS_MeshGroup* subgroup=*itgroup;
|
||||
if (subgroup == theGroup)
|
||||
{
|
||||
found = true;
|
||||
myChildren.erase(itgroup);
|
||||
}
|
||||
}
|
||||
bool found = false;
|
||||
list<const SMDS_MeshGroup*>::iterator itgroup;
|
||||
for(itgroup=myChildren.begin(); itgroup!=myChildren.end(); itgroup++)
|
||||
{
|
||||
const SMDS_MeshGroup* subgroup=*itgroup;
|
||||
if (subgroup == theGroup)
|
||||
{
|
||||
found = true;
|
||||
myChildren.erase(itgroup);
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
return found;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -97,12 +97,12 @@ bool SMDS_MeshGroup::RemoveSubGroup(const SMDS_MeshGroup * theGroup)
|
||||
|
||||
bool SMDS_MeshGroup::RemoveFromParent()
|
||||
{
|
||||
|
||||
if (myParent==NULL) return false;
|
||||
else
|
||||
{
|
||||
return (myParent->RemoveSubGroup(this));
|
||||
}
|
||||
|
||||
if (myParent==NULL) return false;
|
||||
else
|
||||
{
|
||||
return (myParent->RemoveSubGroup(this));
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
//function : Clear
|
||||
@ -111,8 +111,8 @@ bool SMDS_MeshGroup::RemoveFromParent()
|
||||
|
||||
void SMDS_MeshGroup::Clear()
|
||||
{
|
||||
myElements.clear();
|
||||
myType = SMDSAbs_All;
|
||||
myElements.clear();
|
||||
myType = SMDSAbs_All;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -122,14 +122,14 @@ void SMDS_MeshGroup::Clear()
|
||||
|
||||
void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
|
||||
{
|
||||
// the type of the group is determined by the first element added
|
||||
if (myElements.empty()) myType = theElem->GetType();
|
||||
else if (theElem->GetType() != myType) {
|
||||
MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
|
||||
return;
|
||||
}
|
||||
|
||||
myElements.insert(theElem);
|
||||
// the type of the group is determined by the first element added
|
||||
if (myElements.empty()) myType = theElem->GetType();
|
||||
else if (theElem->GetType() != myType) {
|
||||
MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
|
||||
return;
|
||||
}
|
||||
|
||||
myElements.insert(theElem);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -156,7 +156,7 @@ bool SMDS_MeshGroup::Remove(const SMDS_MeshElement * theElem)
|
||||
|
||||
bool SMDS_MeshGroup::Contains(const SMDS_MeshElement * theElem) const
|
||||
{
|
||||
return myElements.find(theElem)!=myElements.end();
|
||||
return myElements.find(theElem)!=myElements.end();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -34,27 +34,27 @@
|
||||
class SMDS_EXPORT SMDS_MeshGroup:public SMDS_MeshObject
|
||||
{
|
||||
public:
|
||||
SMDS_MeshGroup(const SMDS_Mesh * theMesh,
|
||||
SMDS_MeshGroup(const SMDS_Mesh * theMesh,
|
||||
const SMDSAbs_ElementType theType = SMDSAbs_All);
|
||||
const SMDS_MeshGroup * AddSubGroup
|
||||
const SMDS_MeshGroup * AddSubGroup
|
||||
(const SMDSAbs_ElementType theType = SMDSAbs_All);
|
||||
virtual bool RemoveSubGroup(const SMDS_MeshGroup* theGroup);
|
||||
virtual bool RemoveFromParent();
|
||||
virtual bool RemoveSubGroup(const SMDS_MeshGroup* theGroup);
|
||||
virtual bool RemoveFromParent();
|
||||
|
||||
const SMDS_Mesh* GetMesh() const { return myMesh; }
|
||||
|
||||
void SetType (const SMDSAbs_ElementType theType);
|
||||
void Clear();
|
||||
void Add(const SMDS_MeshElement * theElem);
|
||||
bool Remove(const SMDS_MeshElement * theElem);
|
||||
bool IsEmpty() const { return myElements.empty(); }
|
||||
int Extent() const { return myElements.size(); }
|
||||
void Add(const SMDS_MeshElement * theElem);
|
||||
bool Remove(const SMDS_MeshElement * theElem);
|
||||
bool IsEmpty() const { return myElements.empty(); }
|
||||
int Extent() const { return myElements.size(); }
|
||||
|
||||
int SubGroupsNb() const { return myChildren.size(); }
|
||||
int SubGroupsNb() const { return myChildren.size(); }
|
||||
|
||||
SMDSAbs_ElementType GetType() const { return myType; }
|
||||
|
||||
bool Contains(const SMDS_MeshElement * theElem) const;
|
||||
bool Contains(const SMDS_MeshElement * theElem) const;
|
||||
|
||||
void InitIterator() const
|
||||
{ const_cast<TIterator&>(myIterator) = myElements.begin(); }
|
||||
@ -73,17 +73,17 @@ class SMDS_EXPORT SMDS_MeshGroup:public SMDS_MeshObject
|
||||
{ return *(const_cast<TGroupIterator&>(myGroupIterator))++; }
|
||||
|
||||
private:
|
||||
SMDS_MeshGroup(SMDS_MeshGroup* theParent,
|
||||
SMDS_MeshGroup(SMDS_MeshGroup* theParent,
|
||||
const SMDSAbs_ElementType theType = SMDSAbs_All);
|
||||
|
||||
typedef std::set<const SMDS_MeshElement *>::const_iterator TIterator;
|
||||
typedef std::list<const SMDS_MeshGroup *>::const_iterator TGroupIterator;
|
||||
|
||||
const SMDS_Mesh * myMesh;
|
||||
SMDSAbs_ElementType myType;
|
||||
std::set<const SMDS_MeshElement *> myElements;
|
||||
SMDS_MeshGroup * myParent;
|
||||
std::list<const SMDS_MeshGroup*> myChildren;
|
||||
const SMDS_Mesh * myMesh;
|
||||
SMDSAbs_ElementType myType;
|
||||
std::set<const SMDS_MeshElement *> myElements;
|
||||
SMDS_MeshGroup * myParent;
|
||||
std::list<const SMDS_MeshGroup*> myChildren;
|
||||
TIterator myIterator;
|
||||
TGroupIterator myGroupIterator;
|
||||
};
|
||||
|
@ -39,14 +39,14 @@ SMDS_MeshIDFactory::SMDS_MeshIDFactory():myMaxID(0)
|
||||
|
||||
int SMDS_MeshIDFactory::GetFreeID()
|
||||
{
|
||||
if (myPoolOfID.empty()) return ++myMaxID;
|
||||
else
|
||||
{
|
||||
if (myPoolOfID.empty()) return ++myMaxID;
|
||||
else
|
||||
{
|
||||
set<int>::iterator i = myPoolOfID.begin();
|
||||
int ID = *i;//myPoolOfID.top();
|
||||
myPoolOfID.erase( i );//myPoolOfID.pop();
|
||||
return ID;
|
||||
}
|
||||
int ID = *i;//myPoolOfID.top();
|
||||
myPoolOfID.erase( i );//myPoolOfID.pop();
|
||||
return ID;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -40,9 +40,9 @@ public:
|
||||
virtual void Clear();
|
||||
|
||||
protected:
|
||||
SMDS_MeshIDFactory();
|
||||
int myMaxID;
|
||||
std::set<int> myPoolOfID;
|
||||
SMDS_MeshIDFactory();
|
||||
int myMaxID;
|
||||
std::set<int> myPoolOfID;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -37,8 +37,8 @@ using namespace std;
|
||||
//=======================================================================
|
||||
|
||||
SMDS_MeshNode::SMDS_MeshNode(double x, double y, double z):
|
||||
myX(x), myY(y), myZ(z),
|
||||
myPosition(SMDS_SpacePosition::originSpacePosition())
|
||||
myX(x), myY(y), myZ(z),
|
||||
myPosition(SMDS_SpacePosition::originSpacePosition())
|
||||
{
|
||||
}
|
||||
|
||||
@ -66,8 +66,8 @@ void SMDS_MeshNode::RemoveInverseElement(const SMDS_MeshElement * parent)
|
||||
|
||||
void SMDS_MeshNode::Print(ostream & OS) const
|
||||
{
|
||||
OS << "Node <" << GetID() << "> : X = " << myX << " Y = "
|
||||
<< myY << " Z = " << myZ << endl;
|
||||
OS << "Node <" << GetID() << "> : X = " << myX << " Y = "
|
||||
<< myY << " Z = " << myZ << endl;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -77,7 +77,7 @@ void SMDS_MeshNode::Print(ostream & OS) const
|
||||
|
||||
void SMDS_MeshNode::SetPosition(const SMDS_PositionPtr& aPos)
|
||||
{
|
||||
myPosition = aPos;
|
||||
myPosition = aPos;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -87,7 +87,7 @@ void SMDS_MeshNode::SetPosition(const SMDS_PositionPtr& aPos)
|
||||
|
||||
const SMDS_PositionPtr& SMDS_MeshNode::GetPosition() const
|
||||
{
|
||||
return myPosition;
|
||||
return myPosition;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -120,11 +120,11 @@ class SMDS_MeshNode_MyInvIterator:public SMDS_ElemIterator
|
||||
const SMDS_MeshElement* current=myIterator.Value();
|
||||
myIterator.Next();
|
||||
return current;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_MeshNode::
|
||||
GetInverseElementIterator(SMDSAbs_ElementType type) const
|
||||
GetInverseElementIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(myInverseElements,type));
|
||||
}
|
||||
@ -170,7 +170,7 @@ class SMDS_MeshNode_MyIterator:public SMDS_ElemIterator
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_MeshNode::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
if(type==SMDSAbs_Node)
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
|
||||
@ -183,34 +183,34 @@ SMDS_ElemIteratorPtr SMDS_MeshNode::
|
||||
|
||||
int SMDS_MeshNode::NbNodes() const
|
||||
{
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
double SMDS_MeshNode::X() const
|
||||
{
|
||||
return myX;
|
||||
return myX;
|
||||
}
|
||||
|
||||
double SMDS_MeshNode::Y() const
|
||||
{
|
||||
return myY;
|
||||
return myY;
|
||||
}
|
||||
|
||||
double SMDS_MeshNode::Z() const
|
||||
{
|
||||
return myZ;
|
||||
return myZ;
|
||||
}
|
||||
|
||||
void SMDS_MeshNode::setXYZ(double x, double y, double z)
|
||||
{
|
||||
myX=x;
|
||||
myY=y;
|
||||
myZ=z;
|
||||
myX=x;
|
||||
myY=y;
|
||||
myZ=z;
|
||||
}
|
||||
|
||||
SMDSAbs_ElementType SMDS_MeshNode::GetType() const
|
||||
{
|
||||
return SMDSAbs_Node;
|
||||
return SMDSAbs_Node;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -265,14 +265,14 @@ int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool operator<(const SMDS_MeshNode& e1, const SMDS_MeshNode& e2)
|
||||
{
|
||||
return e1.GetID()<e2.GetID();
|
||||
/*if(e1.myX<e2.myX) return true;
|
||||
else if(e1.myX==e2.myX)
|
||||
{
|
||||
if(e1.myY<e2.myY) return true;
|
||||
else if(e1.myY==e2.myY) return (e1.myZ<e2.myZ);
|
||||
else return false;
|
||||
}
|
||||
else return false;*/
|
||||
return e1.GetID()<e2.GetID();
|
||||
/*if(e1.myX<e2.myX) return true;
|
||||
else if(e1.myX==e2.myX)
|
||||
{
|
||||
if(e1.myY<e2.myY) return true;
|
||||
else if(e1.myY==e2.myY) return (e1.myZ<e2.myZ);
|
||||
else return false;
|
||||
}
|
||||
else return false;*/
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,6 @@
|
||||
|
||||
SMDSAbs_ElementType SMDS_MeshVolume::GetType() const
|
||||
{
|
||||
return SMDSAbs_Volume;
|
||||
return SMDSAbs_Volume;
|
||||
}
|
||||
|
||||
|
@ -32,8 +32,8 @@
|
||||
|
||||
class SMDS_EXPORT SMDS_MeshVolume:public SMDS_MeshElement
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
#endif
|
||||
|
@ -38,7 +38,7 @@ class SMDS_EXPORT SMDS_PolyhedralVolumeOfNodes:public SMDS_VolumeOfNodes
|
||||
|
||||
//virtual ~SMDS_PolyhedralVolumeOfNodes();
|
||||
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Polyhedra; }
|
||||
virtual bool IsPoly() const { return true; };
|
||||
|
||||
|
@ -42,7 +42,7 @@ SMDS_Position::SMDS_Position(int aShapeId) :myShapeId(aShapeId)
|
||||
|
||||
void SMDS_Position::SetShapeId(int aShapeId)
|
||||
{
|
||||
myShapeId = aShapeId;
|
||||
myShapeId = aShapeId;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -52,7 +52,7 @@ void SMDS_Position::SetShapeId(int aShapeId)
|
||||
|
||||
int SMDS_Position::GetShapeId() const
|
||||
{
|
||||
return myShapeId;
|
||||
return myShapeId;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -38,18 +38,18 @@ class SMDS_EXPORT SMDS_Position
|
||||
{
|
||||
|
||||
public:
|
||||
const virtual double * Coords() const = 0;
|
||||
virtual SMDS_TypeOfPosition GetTypeOfPosition() const = 0;
|
||||
virtual int GetDim() const;
|
||||
void SetShapeId(int aShapeId);
|
||||
int GetShapeId() const;
|
||||
virtual ~SMDS_Position() {}
|
||||
const virtual double * Coords() const = 0;
|
||||
virtual SMDS_TypeOfPosition GetTypeOfPosition() const = 0;
|
||||
virtual int GetDim() const;
|
||||
void SetShapeId(int aShapeId);
|
||||
int GetShapeId() const;
|
||||
virtual ~SMDS_Position() {}
|
||||
|
||||
protected:
|
||||
SMDS_Position(int aShapeId);
|
||||
SMDS_Position(int aShapeId);
|
||||
|
||||
private:
|
||||
int myShapeId;
|
||||
int myShapeId;
|
||||
};
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ SMDS_QuadraticEdge::SMDS_QuadraticEdge(const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node12)
|
||||
:SMDS_MeshEdge(node1,node2)
|
||||
{
|
||||
{
|
||||
myNodes[2]=node12;
|
||||
}
|
||||
|
||||
|
@ -32,23 +32,23 @@
|
||||
//=======================================================================
|
||||
|
||||
SMDS_SpacePosition::SMDS_SpacePosition(double x, double y, double z):
|
||||
SMDS_Position(0)
|
||||
SMDS_Position(0)
|
||||
{
|
||||
myCoords[0]=x;
|
||||
myCoords[1]=y;
|
||||
myCoords[2]=z;
|
||||
myCoords[0]=x;
|
||||
myCoords[1]=y;
|
||||
myCoords[2]=z;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
SMDS_TypeOfPosition SMDS_SpacePosition::GetTypeOfPosition() const
|
||||
{
|
||||
return SMDS_TOP_3DSPACE;
|
||||
return SMDS_TOP_3DSPACE;
|
||||
}
|
||||
|
||||
const double * SMDS_SpacePosition::Coords() const
|
||||
{
|
||||
return myCoords;
|
||||
return myCoords;
|
||||
}
|
||||
|
||||
SMDS_PositionPtr SMDS_SpacePosition::originSpacePosition()
|
||||
|
@ -34,13 +34,13 @@ class SMDS_EXPORT SMDS_SpacePosition:public SMDS_Position
|
||||
{
|
||||
|
||||
public:
|
||||
SMDS_SpacePosition(double x=0, double y=0, double z=0);
|
||||
const virtual double * Coords() const;
|
||||
virtual inline SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
inline void SetCoords(const double x, const double y, const double z);
|
||||
SMDS_SpacePosition(double x=0, double y=0, double z=0);
|
||||
const virtual double * Coords() const;
|
||||
virtual inline SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
inline void SetCoords(const double x, const double y, const double z);
|
||||
static SMDS_PositionPtr originSpacePosition();
|
||||
private:
|
||||
double myCoords[3];
|
||||
double myCoords[3];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -28,11 +28,11 @@
|
||||
|
||||
enum SMDS_TypeOfPosition // Value is equal to shape dimention
|
||||
{
|
||||
SMDS_TOP_UNSPEC = -1,
|
||||
SMDS_TOP_VERTEX = 0,
|
||||
SMDS_TOP_EDGE = 1,
|
||||
SMDS_TOP_FACE = 2,
|
||||
SMDS_TOP_3DSPACE = 3
|
||||
SMDS_TOP_UNSPEC = -1,
|
||||
SMDS_TOP_VERTEX = 0,
|
||||
SMDS_TOP_EDGE = 1,
|
||||
SMDS_TOP_FACE = 2,
|
||||
SMDS_TOP_3DSPACE = 3
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@ using namespace std;
|
||||
//=======================================================================
|
||||
|
||||
SMDS_VertexPosition:: SMDS_VertexPosition(const int aVertexId)
|
||||
:SMDS_Position(aVertexId)
|
||||
:SMDS_Position(aVertexId)
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,13 +47,13 @@ SMDS_VertexPosition:: SMDS_VertexPosition(const int aVertexId)
|
||||
|
||||
const double *SMDS_VertexPosition::Coords() const
|
||||
{
|
||||
const static double origin[]={0,0,0};
|
||||
MESSAGE("SMDS_VertexPosition::Coords not implemented");
|
||||
return origin;
|
||||
const static double origin[]={0,0,0};
|
||||
MESSAGE("SMDS_VertexPosition::Coords not implemented");
|
||||
return origin;
|
||||
}
|
||||
|
||||
|
||||
SMDS_TypeOfPosition SMDS_VertexPosition::GetTypeOfPosition() const
|
||||
{
|
||||
return SMDS_TOP_VERTEX;
|
||||
return SMDS_TOP_VERTEX;
|
||||
}
|
||||
|
@ -33,10 +33,10 @@
|
||||
class SMDS_EXPORT SMDS_VertexPosition:public SMDS_Position
|
||||
{
|
||||
|
||||
public:
|
||||
SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
SMDS_VertexPosition(int aVertexId=0);
|
||||
const double *Coords() const;
|
||||
public:
|
||||
SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
SMDS_VertexPosition(int aVertexId=0);
|
||||
const double *Coords() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -40,16 +40,16 @@ using namespace std;
|
||||
|
||||
void SMDS_VolumeOfFaces::Print(ostream & OS) const
|
||||
{
|
||||
OS << "volume <" << GetID() << "> : ";
|
||||
int i;
|
||||
for (i = 0; i < NbFaces()-1; ++i) OS << myFaces[i] << ",";
|
||||
OS << myFaces[i]<< ") " << endl;
|
||||
OS << "volume <" << GetID() << "> : ";
|
||||
int i;
|
||||
for (i = 0; i < NbFaces()-1; ++i) OS << myFaces[i] << ",";
|
||||
OS << myFaces[i]<< ") " << endl;
|
||||
}
|
||||
|
||||
|
||||
int SMDS_VolumeOfFaces::NbFaces() const
|
||||
{
|
||||
return myNbFaces;
|
||||
return myNbFaces;
|
||||
}
|
||||
|
||||
class SMDS_VolumeOfFaces_MyIterator:public SMDS_ElemIterator
|
||||
@ -74,7 +74,7 @@ class SMDS_VolumeOfFaces_MyIterator:public SMDS_ElemIterator
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_VolumeOfFaces::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
@ -95,13 +95,13 @@ SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4)
|
||||
{
|
||||
myNbFaces = 4;
|
||||
myFaces[0]=face1;
|
||||
myFaces[1]=face2;
|
||||
myFaces[2]=face3;
|
||||
myFaces[3]=face4;
|
||||
myFaces[4]=0;
|
||||
myFaces[5]=0;
|
||||
myNbFaces = 4;
|
||||
myFaces[0]=face1;
|
||||
myFaces[1]=face2;
|
||||
myFaces[2]=face3;
|
||||
myFaces[3]=face4;
|
||||
myFaces[4]=0;
|
||||
myFaces[5]=0;
|
||||
}
|
||||
|
||||
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
@ -110,13 +110,13 @@ SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face4,
|
||||
const SMDS_MeshFace * face5)
|
||||
{
|
||||
myNbFaces = 5;
|
||||
myFaces[0]=face1;
|
||||
myFaces[1]=face2;
|
||||
myFaces[2]=face3;
|
||||
myFaces[3]=face4;
|
||||
myFaces[4]=face5;
|
||||
myFaces[5]=0;
|
||||
myNbFaces = 5;
|
||||
myFaces[0]=face1;
|
||||
myFaces[1]=face2;
|
||||
myFaces[2]=face3;
|
||||
myFaces[3]=face4;
|
||||
myFaces[4]=face5;
|
||||
myFaces[5]=0;
|
||||
}
|
||||
|
||||
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
@ -126,13 +126,13 @@ SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face5,
|
||||
const SMDS_MeshFace * face6)
|
||||
{
|
||||
myNbFaces = 6;
|
||||
myFaces[0]=face1;
|
||||
myFaces[1]=face2;
|
||||
myFaces[2]=face3;
|
||||
myFaces[3]=face4;
|
||||
myFaces[4]=face5;
|
||||
myFaces[5]=face6;
|
||||
myNbFaces = 6;
|
||||
myFaces[0]=face1;
|
||||
myFaces[1]=face2;
|
||||
myFaces[2]=face3;
|
||||
myFaces[3]=face4;
|
||||
myFaces[4]=face5;
|
||||
myFaces[5]=face6;
|
||||
}
|
||||
|
||||
SMDSAbs_EntityType SMDS_VolumeOfFaces::GetEntityType() const
|
||||
|
@ -36,18 +36,18 @@
|
||||
|
||||
class SMDS_EXPORT SMDS_VolumeOfFaces:public SMDS_MeshVolume
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face2,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4);
|
||||
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face2,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4,
|
||||
const SMDS_MeshFace * face5);
|
||||
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face2,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4,
|
||||
@ -55,14 +55,14 @@ class SMDS_EXPORT SMDS_VolumeOfFaces:public SMDS_MeshVolume
|
||||
const SMDS_MeshFace * face6);
|
||||
|
||||
virtual SMDSAbs_EntityType GetEntityType() const;
|
||||
void Print(std::ostream & OS) const;
|
||||
|
||||
int NbFaces() const;
|
||||
void Print(std::ostream & OS) const;
|
||||
|
||||
int NbFaces() const;
|
||||
|
||||
protected:
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
const SMDS_MeshFace * myFaces[6];
|
||||
int myNbFaces;
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
const SMDS_MeshFace * myFaces[6];
|
||||
int myNbFaces;
|
||||
};
|
||||
#endif
|
||||
|
@ -32,44 +32,44 @@
|
||||
|
||||
class SMDS_EXPORT SMDS_VolumeOfNodes:public SMDS_MeshVolume
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
SMDS_VolumeOfNodes(
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4);
|
||||
SMDS_VolumeOfNodes(
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5);
|
||||
SMDS_VolumeOfNodes(
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6);
|
||||
SMDS_VolumeOfNodes(
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6,
|
||||
const SMDS_MeshNode * node7,
|
||||
const SMDS_MeshNode * node8);
|
||||
SMDS_VolumeOfNodes(
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4);
|
||||
SMDS_VolumeOfNodes(
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5);
|
||||
SMDS_VolumeOfNodes(
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6);
|
||||
SMDS_VolumeOfNodes(
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6,
|
||||
const SMDS_MeshNode * node7,
|
||||
const SMDS_MeshNode * node8);
|
||||
bool ChangeNodes(const SMDS_MeshNode* nodes[],
|
||||
const int nbNodes);
|
||||
~SMDS_VolumeOfNodes();
|
||||
|
||||
void Print(std::ostream & OS) const;
|
||||
int NbFaces() const;
|
||||
int NbNodes() const;
|
||||
int NbEdges() const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
void Print(std::ostream & OS) const;
|
||||
int NbFaces() const;
|
||||
int NbNodes() const;
|
||||
int NbEdges() const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
virtual SMDSAbs_EntityType GetEntityType() const;
|
||||
|
||||
/*!
|
||||
@ -80,9 +80,9 @@ class SMDS_EXPORT SMDS_VolumeOfNodes:public SMDS_MeshVolume
|
||||
virtual const SMDS_MeshNode* GetNode(const int ind) const;
|
||||
|
||||
protected:
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
const SMDS_MeshNode** myNodes;
|
||||
int myNbNodes;
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
const SMDS_MeshNode** myNodes;
|
||||
int myNbNodes;
|
||||
};
|
||||
#endif
|
||||
|
@ -148,7 +148,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
int _localId; // unique Id of created objects, within SMESH_Gen entity
|
||||
int _localId; // unique Id of created objects, within SMESH_Gen entity
|
||||
std::map < int, StudyContextStruct * >_mapStudyContext;
|
||||
|
||||
// hypotheses managing
|
||||
|
@ -84,8 +84,8 @@ namespace
|
||||
//function : AddNodesWithID
|
||||
//=======================================================================
|
||||
inline void AddNodesWithID(SMDS_Mesh* theMesh,
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
{
|
||||
const SMESH::double_array& aCoords = theSeq[theId].coords;
|
||||
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||
@ -94,11 +94,11 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddNodesWithID - 3*aNbElems != aCoords.length()");
|
||||
for(CORBA::Long aCoordId = 0; anElemId < aNbElems; anElemId++, aCoordId+=3){
|
||||
SMDS_MeshElement* anElem = theMesh->AddNodeWithID(aCoords[aCoordId],
|
||||
aCoords[aCoordId+1],
|
||||
aCoords[aCoordId+2],
|
||||
anIndexes[anElemId]);
|
||||
aCoords[aCoordId+1],
|
||||
aCoords[aCoordId+2],
|
||||
anIndexes[anElemId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddNodeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddNodeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ namespace
|
||||
SMDS_MeshElement* anElem = theMesh->Add0DElementWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId]);
|
||||
if (!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot Add0DElementWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot Add0DElementWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,8 +129,8 @@ namespace
|
||||
//function : AddEdgesWithID
|
||||
//=======================================================================
|
||||
inline void AddEdgesWithID(SMDS_Mesh* theMesh,
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
{
|
||||
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
|
||||
@ -138,10 +138,10 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddEdgeWithID - 3*aNbElems != aCoords.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=3){
|
||||
SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,8 +150,8 @@ namespace
|
||||
//function : AddTriasWithID
|
||||
//=======================================================================
|
||||
inline void AddTriasWithID(SMDS_Mesh* theMesh,
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
{
|
||||
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
|
||||
@ -159,11 +159,11 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddTriasWithID - 4*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){
|
||||
SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -172,8 +172,8 @@ namespace
|
||||
//function : AddQuadsWithID
|
||||
//=======================================================================
|
||||
inline void AddQuadsWithID(SMDS_Mesh* theMesh,
|
||||
SMESH::log_array_var theSeq,
|
||||
CORBA::Long theId)
|
||||
SMESH::log_array_var theSeq,
|
||||
CORBA::Long theId)
|
||||
{
|
||||
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
|
||||
@ -181,12 +181,12 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddQuadsWithID - 4*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){
|
||||
SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ namespace
|
||||
|
||||
SMDS_MeshElement* anElem = theMesh->AddPolygonalFaceWithID(nodes_ids, aFaceId);
|
||||
if (!anElem)
|
||||
EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolygonalFaceWithID for ID = "
|
||||
EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolygonalFaceWithID for ID = "
|
||||
<< anElemId);
|
||||
}
|
||||
}
|
||||
@ -222,8 +222,8 @@ namespace
|
||||
//function : AddTetrasWithID
|
||||
//=======================================================================
|
||||
inline void AddTetrasWithID(SMDS_Mesh* theMesh,
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
{
|
||||
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
|
||||
@ -231,12 +231,12 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddTetrasWithID - 5*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){
|
||||
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,8 +245,8 @@ namespace
|
||||
//function : AddPiramidsWithID
|
||||
//=======================================================================
|
||||
inline void AddPiramidsWithID(SMDS_Mesh* theMesh,
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
{
|
||||
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
|
||||
@ -254,13 +254,13 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddPiramidsWithID - 6*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=6){
|
||||
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -269,8 +269,8 @@ namespace
|
||||
//function : AddPrismsWithID
|
||||
//=======================================================================
|
||||
inline void AddPrismsWithID(SMDS_Mesh* theMesh,
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
{
|
||||
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
|
||||
@ -278,14 +278,14 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddPrismsWithID - 7*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=7){
|
||||
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,8 +294,8 @@ namespace
|
||||
//function : AddHexasWithID
|
||||
//=======================================================================
|
||||
inline void AddHexasWithID(SMDS_Mesh* theMesh,
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
SMESH::log_array_var& theSeq,
|
||||
CORBA::Long theId)
|
||||
{
|
||||
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
|
||||
@ -303,16 +303,16 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddHexasWithID - 9*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=9){
|
||||
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -345,7 +345,7 @@ namespace
|
||||
SMDS_MeshElement* anElem =
|
||||
theMesh->AddPolyhedralVolumeWithID(nodes_ids, quantities, aFaceId);
|
||||
if (!anElem)
|
||||
EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolyhedralVolumeWithID for ID = "
|
||||
EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolyhedralVolumeWithID for ID = "
|
||||
<< anElemId);
|
||||
}
|
||||
}
|
||||
@ -364,11 +364,11 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddQuadEdgeWithID - 4*aNbElems != aCoords.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){
|
||||
SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -386,14 +386,14 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddQuadTriasWithID - 7*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=7){
|
||||
SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -411,16 +411,16 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddQuadQuadsWithID - 9*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=9){
|
||||
SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -438,18 +438,18 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddQuadTetrasWithID - 11*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=11){
|
||||
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId+9],
|
||||
anIndexes[anIndexId+10],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId+9],
|
||||
anIndexes[anIndexId+10],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -467,21 +467,21 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddQuadPiramidsWithID - 14*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=14){
|
||||
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId+9],
|
||||
anIndexes[anIndexId+10],
|
||||
anIndexes[anIndexId+11],
|
||||
anIndexes[anIndexId+12],
|
||||
anIndexes[anIndexId+13],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId+9],
|
||||
anIndexes[anIndexId+10],
|
||||
anIndexes[anIndexId+11],
|
||||
anIndexes[anIndexId+12],
|
||||
anIndexes[anIndexId+13],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -499,23 +499,23 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddQuadPentasWithID - 16*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=16){
|
||||
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId+9],
|
||||
anIndexes[anIndexId+10],
|
||||
anIndexes[anIndexId+11],
|
||||
anIndexes[anIndexId+12],
|
||||
anIndexes[anIndexId+13],
|
||||
anIndexes[anIndexId+14],
|
||||
anIndexes[anIndexId+15],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId+9],
|
||||
anIndexes[anIndexId+10],
|
||||
anIndexes[anIndexId+11],
|
||||
anIndexes[anIndexId+12],
|
||||
anIndexes[anIndexId+13],
|
||||
anIndexes[anIndexId+14],
|
||||
anIndexes[anIndexId+15],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -533,28 +533,28 @@ namespace
|
||||
EXCEPTION(runtime_error,"AddQuadHexasWithID - 21*aNbElems != anIndexes.length()");
|
||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=21){
|
||||
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId+9],
|
||||
anIndexes[anIndexId+10],
|
||||
anIndexes[anIndexId+11],
|
||||
anIndexes[anIndexId+12],
|
||||
anIndexes[anIndexId+13],
|
||||
anIndexes[anIndexId+14],
|
||||
anIndexes[anIndexId+15],
|
||||
anIndexes[anIndexId+16],
|
||||
anIndexes[anIndexId+17],
|
||||
anIndexes[anIndexId+18],
|
||||
anIndexes[anIndexId+19],
|
||||
anIndexes[anIndexId+20],
|
||||
anIndexes[anIndexId]);
|
||||
anIndexes[anIndexId+2],
|
||||
anIndexes[anIndexId+3],
|
||||
anIndexes[anIndexId+4],
|
||||
anIndexes[anIndexId+5],
|
||||
anIndexes[anIndexId+6],
|
||||
anIndexes[anIndexId+7],
|
||||
anIndexes[anIndexId+8],
|
||||
anIndexes[anIndexId+9],
|
||||
anIndexes[anIndexId+10],
|
||||
anIndexes[anIndexId+11],
|
||||
anIndexes[anIndexId+12],
|
||||
anIndexes[anIndexId+13],
|
||||
anIndexes[anIndexId+14],
|
||||
anIndexes[anIndexId+15],
|
||||
anIndexes[anIndexId+16],
|
||||
anIndexes[anIndexId+17],
|
||||
anIndexes[anIndexId+18],
|
||||
anIndexes[anIndexId+19],
|
||||
anIndexes[anIndexId+20],
|
||||
anIndexes[anIndexId]);
|
||||
if(!anElem)
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -596,7 +596,7 @@ namespace
|
||||
//=======================================================================
|
||||
SMESH::SMESH_Gen_var
|
||||
SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
|
||||
CORBA::Boolean& theIsEmbeddedMode)
|
||||
CORBA::Boolean& theIsEmbeddedMode)
|
||||
{
|
||||
static SMESH::SMESH_Gen_var aMeshGen;
|
||||
|
||||
@ -629,7 +629,7 @@ SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
|
||||
SMESH::SMESH_Mesh_ptr theMesh):
|
||||
SMESH::SMESH_Mesh_ptr theMesh):
|
||||
myMeshServer(SMESH::SMESH_Mesh::_duplicate(theMesh)),
|
||||
mySMESHDSMesh(NULL),
|
||||
mySMDSMesh(NULL)
|
||||
@ -722,14 +722,14 @@ SMESH_Client::Update(bool theIsClear)
|
||||
{
|
||||
for ( CORBA::Long anId = 0; anId < aLength; anId++)
|
||||
{
|
||||
const SMESH::double_array& aCoords = aSeq[anId].coords;
|
||||
const SMESH::long_array& anIndexes = aSeq[anId].indexes;
|
||||
CORBA::Long anElemId = 0, aNbElems = aSeq[anId].number;
|
||||
CORBA::Long aCommand = aSeq[anId].commandType;
|
||||
const SMESH::double_array& aCoords = aSeq[anId].coords;
|
||||
const SMESH::long_array& anIndexes = aSeq[anId].indexes;
|
||||
CORBA::Long anElemId = 0, aNbElems = aSeq[anId].number;
|
||||
CORBA::Long aCommand = aSeq[anId].commandType;
|
||||
|
||||
switch(aCommand)
|
||||
switch(aCommand)
|
||||
{
|
||||
case SMESH::ADD_NODE : AddNodesWithID ( mySMDSMesh, aSeq, anId ); break;
|
||||
case SMESH::ADD_NODE : AddNodesWithID ( mySMDSMesh, aSeq, anId ); break;
|
||||
case SMESH::ADD_ELEM0D : Add0DElementsWithID ( mySMDSMesh, aSeq, anId ); break;
|
||||
case SMESH::ADD_EDGE : AddEdgesWithID ( mySMDSMesh, aSeq, anId ); break;
|
||||
case SMESH::ADD_TRIANGLE : AddTriasWithID ( mySMDSMesh, aSeq, anId ); break;
|
||||
@ -800,7 +800,7 @@ SMESH_Client::Update(bool theIsClear)
|
||||
break;
|
||||
|
||||
default:;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( SALOME::SALOME_Exception& exc )
|
||||
|
@ -54,10 +54,10 @@ public:
|
||||
static
|
||||
SMESH::SMESH_Gen_var
|
||||
GetSMESHGen(CORBA::ORB_ptr theORB,
|
||||
CORBA::Boolean& theIsEmbeddedMode);
|
||||
CORBA::Boolean& theIsEmbeddedMode);
|
||||
|
||||
SMESH_Client(CORBA::ORB_ptr theORB,
|
||||
SMESH::SMESH_Mesh_ptr theMesh);
|
||||
SMESH::SMESH_Mesh_ptr theMesh);
|
||||
~SMESH_Client();
|
||||
|
||||
bool
|
||||
|
@ -54,16 +54,16 @@ SMESHDS_Command::~SMESHDS_Command()
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z)
|
||||
{
|
||||
if (!myType == SMESHDS_AddNode)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddNode : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewNodeID);
|
||||
myReals.push_back(x);
|
||||
myReals.push_back(y);
|
||||
myReals.push_back(z);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_AddNode)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddNode : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewNodeID);
|
||||
myReals.push_back(x);
|
||||
myReals.push_back(y);
|
||||
myReals.push_back(z);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -72,16 +72,16 @@ void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z)
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::MoveNode(int NodeID, double x, double y, double z)
|
||||
{
|
||||
if (!myType == SMESHDS_MoveNode)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::MoveNode : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NodeID);
|
||||
myReals.push_back(x);
|
||||
myReals.push_back(y);
|
||||
myReals.push_back(z);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_MoveNode)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::MoveNode : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NodeID);
|
||||
myReals.push_back(x);
|
||||
myReals.push_back(y);
|
||||
myReals.push_back(z);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -106,15 +106,15 @@ void SMESHDS_Command::Add0DElement(int New0DElementID, int idnode)
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2)
|
||||
{
|
||||
if (!myType == SMESHDS_AddEdge)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddEdge : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewEdgeID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_AddEdge)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddEdge : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewEdgeID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -122,18 +122,18 @@ void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddFace(int NewFaceID,
|
||||
int idnode1, int idnode2, int idnode3)
|
||||
int idnode1, int idnode2, int idnode3)
|
||||
{
|
||||
if (!myType == SMESHDS_AddTriangle)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddFace : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewFaceID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_AddTriangle)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddFace : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewFaceID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -141,19 +141,19 @@ void SMESHDS_Command::AddFace(int NewFaceID,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddFace(int NewFaceID,
|
||||
int idnode1, int idnode2, int idnode3, int idnode4)
|
||||
int idnode1, int idnode2, int idnode3, int idnode4)
|
||||
{
|
||||
if (!myType == SMESHDS_AddQuadrangle)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddFace : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewFaceID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_AddQuadrangle)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddFace : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewFaceID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -161,19 +161,19 @@ void SMESHDS_Command::AddFace(int NewFaceID,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddVolume(int NewVolID,
|
||||
int idnode1, int idnode2, int idnode3, int idnode4)
|
||||
int idnode1, int idnode2, int idnode3, int idnode4)
|
||||
{
|
||||
if (!myType == SMESHDS_AddTetrahedron)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewVolID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_AddTetrahedron)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewVolID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -181,20 +181,20 @@ void SMESHDS_Command::AddVolume(int NewVolID,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddVolume(int NewVolID,
|
||||
int idnode1, int idnode2, int idnode3, int idnode4, int idnode5)
|
||||
int idnode1, int idnode2, int idnode3, int idnode4, int idnode5)
|
||||
{
|
||||
if (!myType == SMESHDS_AddPyramid)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewVolID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myIntegers.push_back(idnode5);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_AddPyramid)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewVolID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myIntegers.push_back(idnode5);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -202,22 +202,22 @@ void SMESHDS_Command::AddVolume(int NewVolID,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddVolume(int NewVolID,
|
||||
int idnode1,
|
||||
int idnode2, int idnode3, int idnode4, int idnode5, int idnode6)
|
||||
int idnode1,
|
||||
int idnode2, int idnode3, int idnode4, int idnode5, int idnode6)
|
||||
{
|
||||
if (!myType == SMESHDS_AddPrism)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewVolID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myIntegers.push_back(idnode5);
|
||||
myIntegers.push_back(idnode6);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_AddPrism)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewVolID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myIntegers.push_back(idnode5);
|
||||
myIntegers.push_back(idnode6);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -225,26 +225,26 @@ void SMESHDS_Command::AddVolume(int NewVolID,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddVolume(int NewVolID,
|
||||
int idnode1,
|
||||
int idnode2,
|
||||
int idnode3,
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8)
|
||||
int idnode1,
|
||||
int idnode2,
|
||||
int idnode3,
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8)
|
||||
{
|
||||
if (!myType == SMESHDS_AddHexahedron)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewVolID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myIntegers.push_back(idnode5);
|
||||
myIntegers.push_back(idnode6);
|
||||
myIntegers.push_back(idnode7);
|
||||
myIntegers.push_back(idnode8);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_AddHexahedron)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NewVolID);
|
||||
myIntegers.push_back(idnode1);
|
||||
myIntegers.push_back(idnode2);
|
||||
myIntegers.push_back(idnode3);
|
||||
myIntegers.push_back(idnode4);
|
||||
myIntegers.push_back(idnode5);
|
||||
myIntegers.push_back(idnode6);
|
||||
myIntegers.push_back(idnode7);
|
||||
myIntegers.push_back(idnode8);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -304,13 +304,13 @@ void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::RemoveNode(int NodeID)
|
||||
{
|
||||
if (!myType == SMESHDS_RemoveNode)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::RemoveNode : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NodeID);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_RemoveNode)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::RemoveNode : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(NodeID);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -319,13 +319,13 @@ void SMESHDS_Command::RemoveNode(int NodeID)
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::RemoveElement(int ElementID)
|
||||
{
|
||||
if (!myType == SMESHDS_RemoveElement)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::RemoveElement : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(ElementID);
|
||||
myNumber++;
|
||||
if (!myType == SMESHDS_RemoveElement)
|
||||
{
|
||||
MESSAGE("SMESHDS_Command::RemoveElement : Bad Type");
|
||||
return;
|
||||
}
|
||||
myIntegers.push_back(ElementID);
|
||||
myNumber++;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -402,7 +402,7 @@ void SMESHDS_Command::Renumber (const bool isNodes, const int startID, const int
|
||||
//=======================================================================
|
||||
SMESHDS_CommandType SMESHDS_Command::GetType()
|
||||
{
|
||||
return myType;
|
||||
return myType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -411,7 +411,7 @@ SMESHDS_CommandType SMESHDS_Command::GetType()
|
||||
//=======================================================================
|
||||
int SMESHDS_Command::GetNumber()
|
||||
{
|
||||
return myNumber;
|
||||
return myNumber;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -420,7 +420,7 @@ int SMESHDS_Command::GetNumber()
|
||||
//=======================================================================
|
||||
const list < int >&SMESHDS_Command::GetIndexes()
|
||||
{
|
||||
return myIntegers;
|
||||
return myIntegers;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -429,7 +429,7 @@ const list < int >&SMESHDS_Command::GetIndexes()
|
||||
//=======================================================================
|
||||
const list < double >&SMESHDS_Command::GetCoords()
|
||||
{
|
||||
return myReals;
|
||||
return myReals;
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,28 +36,28 @@ class SMESHDS_EXPORT SMESHDS_Command
|
||||
{
|
||||
|
||||
public:
|
||||
SMESHDS_Command(const SMESHDS_CommandType aType);
|
||||
void AddNode(int NewNodeID, double x, double y, double z);
|
||||
void Add0DElement(int New0DElementID, int idnode);
|
||||
void AddEdge(int NewEdgeID, int idnode1, int idnode2);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
|
||||
SMESHDS_Command(const SMESHDS_CommandType aType);
|
||||
void AddNode(int NewNodeID, double x, double y, double z);
|
||||
void Add0DElement(int New0DElementID, int idnode);
|
||||
void AddEdge(int NewEdgeID, int idnode1, int idnode2);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
|
||||
void AddPolygonalFace (const int ElementID,
|
||||
std::vector<int> nodes_ids);
|
||||
void AddPolyhedralVolume (const int ElementID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities);
|
||||
// special methods for quadratic elements
|
||||
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
||||
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
||||
void AddFace(int NewFaceID, int n1, int n2, int n3,
|
||||
int n12, int n23, int n31);
|
||||
void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
|
||||
@ -78,23 +78,23 @@ class SMESHDS_EXPORT SMESHDS_Command
|
||||
int n56, int n67, int n78, int n85,
|
||||
int n15, int n26, int n37, int n48);
|
||||
|
||||
void MoveNode(int NewNodeID, double x, double y, double z);
|
||||
void RemoveNode(int NodeID);
|
||||
void RemoveElement(int ElementID);
|
||||
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
||||
void ChangePolyhedronNodes(const int ElementID,
|
||||
void MoveNode(int NewNodeID, double x, double y, double z);
|
||||
void RemoveNode(int NodeID);
|
||||
void RemoveElement(int ElementID);
|
||||
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
||||
void ChangePolyhedronNodes(const int ElementID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities);
|
||||
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
||||
SMESHDS_CommandType GetType();
|
||||
int GetNumber();
|
||||
const std::list<int> & GetIndexes();
|
||||
const std::list<double> & GetCoords();
|
||||
~SMESHDS_Command();
|
||||
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
||||
SMESHDS_CommandType GetType();
|
||||
int GetNumber();
|
||||
const std::list<int> & GetIndexes();
|
||||
const std::list<double> & GetCoords();
|
||||
~SMESHDS_Command();
|
||||
private:
|
||||
SMESHDS_CommandType myType;
|
||||
int myNumber;
|
||||
std::list<double> myReals;
|
||||
std::list<int> myIntegers;
|
||||
SMESHDS_CommandType myType;
|
||||
int myNumber;
|
||||
std::list<double> myReals;
|
||||
std::list<int> myIntegers;
|
||||
};
|
||||
#endif
|
||||
|
@ -69,13 +69,13 @@ int SMESHDS_Document::NewMesh(bool theIsEmbeddedMode)
|
||||
//=======================================================================
|
||||
SMESHDS_Mesh *SMESHDS_Document::GetMesh(int MeshID)
|
||||
{
|
||||
map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
|
||||
if (it==myMeshes.end())
|
||||
{
|
||||
MESSAGE("SMESHDS_Document::GetMesh : ID not found");
|
||||
return NULL;
|
||||
}
|
||||
else return (*it).second;
|
||||
map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
|
||||
if (it==myMeshes.end())
|
||||
{
|
||||
MESSAGE("SMESHDS_Document::GetMesh : ID not found");
|
||||
return NULL;
|
||||
}
|
||||
else return (*it).second;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -84,10 +84,10 @@ SMESHDS_Mesh *SMESHDS_Document::GetMesh(int MeshID)
|
||||
//=======================================================================
|
||||
void SMESHDS_Document::RemoveMesh(int MeshID)
|
||||
{
|
||||
map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
|
||||
if (it==myMeshes.end())
|
||||
MESSAGE("SMESHDS_Document::RemoveMesh : ID not found");
|
||||
myMeshes.erase(it);
|
||||
map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
|
||||
if (it==myMeshes.end())
|
||||
MESSAGE("SMESHDS_Document::RemoveMesh : ID not found");
|
||||
myMeshes.erase(it);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -96,7 +96,7 @@ void SMESHDS_Document::RemoveMesh(int MeshID)
|
||||
//=======================================================================
|
||||
void SMESHDS_Document::AddHypothesis(SMESHDS_Hypothesis * H)
|
||||
{
|
||||
myHypothesis[H->GetID()]=H;
|
||||
myHypothesis[H->GetID()]=H;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -105,13 +105,13 @@ void SMESHDS_Document::AddHypothesis(SMESHDS_Hypothesis * H)
|
||||
//=======================================================================
|
||||
SMESHDS_Hypothesis * SMESHDS_Document::GetHypothesis(int HypID)
|
||||
{
|
||||
map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
|
||||
if (it==myHypothesis.end())
|
||||
{
|
||||
MESSAGE("SMESHDS_Document::GetHypothesis : ID not found");
|
||||
return NULL;
|
||||
}
|
||||
else return (*it).second;
|
||||
map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
|
||||
if (it==myHypothesis.end())
|
||||
{
|
||||
MESSAGE("SMESHDS_Document::GetHypothesis : ID not found");
|
||||
return NULL;
|
||||
}
|
||||
else return (*it).second;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -120,10 +120,10 @@ SMESHDS_Hypothesis * SMESHDS_Document::GetHypothesis(int HypID)
|
||||
//=======================================================================
|
||||
void SMESHDS_Document::RemoveHypothesis(int HypID)
|
||||
{
|
||||
map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
|
||||
if (it==myHypothesis.end())
|
||||
MESSAGE("SMESHDS_Document::RemoveHypothesis : ID not found");
|
||||
myHypothesis.erase(it);
|
||||
map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
|
||||
if (it==myHypothesis.end())
|
||||
MESSAGE("SMESHDS_Document::RemoveHypothesis : ID not found");
|
||||
myHypothesis.erase(it);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -132,7 +132,7 @@ void SMESHDS_Document::RemoveHypothesis(int HypID)
|
||||
//=======================================================================
|
||||
int SMESHDS_Document::NbMeshes()
|
||||
{
|
||||
return myMeshes.size();
|
||||
return myMeshes.size();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -141,7 +141,7 @@ int SMESHDS_Document::NbMeshes()
|
||||
//=======================================================================
|
||||
int SMESHDS_Document::NbHypothesis()
|
||||
{
|
||||
return myHypothesis.size();
|
||||
return myHypothesis.size();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -150,7 +150,7 @@ int SMESHDS_Document::NbHypothesis()
|
||||
//=======================================================================
|
||||
void SMESHDS_Document::InitMeshesIterator()
|
||||
{
|
||||
myMeshesIt=myMeshes.begin();
|
||||
myMeshesIt=myMeshes.begin();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -159,9 +159,9 @@ void SMESHDS_Document::InitMeshesIterator()
|
||||
//=======================================================================
|
||||
SMESHDS_Mesh * SMESHDS_Document::NextMesh()
|
||||
{
|
||||
SMESHDS_Mesh * toReturn=(*myMeshesIt).second;
|
||||
myMeshesIt++;
|
||||
return toReturn;
|
||||
SMESHDS_Mesh * toReturn=(*myMeshesIt).second;
|
||||
myMeshesIt++;
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -170,7 +170,7 @@ SMESHDS_Mesh * SMESHDS_Document::NextMesh()
|
||||
//=======================================================================
|
||||
bool SMESHDS_Document::MoreMesh()
|
||||
{
|
||||
return myMeshesIt!=myMeshes.end();
|
||||
return myMeshesIt!=myMeshes.end();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -179,7 +179,7 @@ bool SMESHDS_Document::MoreMesh()
|
||||
//=======================================================================
|
||||
void SMESHDS_Document::InitHypothesisIterator()
|
||||
{
|
||||
myHypothesisIt=myHypothesis.begin();
|
||||
myHypothesisIt=myHypothesis.begin();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -188,9 +188,9 @@ void SMESHDS_Document::InitHypothesisIterator()
|
||||
//=======================================================================
|
||||
SMESHDS_Hypothesis * SMESHDS_Document::NextHypothesis()
|
||||
{
|
||||
SMESHDS_Hypothesis * toReturn=(*myHypothesisIt).second;
|
||||
myHypothesisIt++;
|
||||
return toReturn;
|
||||
SMESHDS_Hypothesis * toReturn=(*myHypothesisIt).second;
|
||||
myHypothesisIt++;
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -199,5 +199,5 @@ SMESHDS_Hypothesis * SMESHDS_Document::NextHypothesis()
|
||||
//=======================================================================
|
||||
bool SMESHDS_Document::MoreHypothesis()
|
||||
{
|
||||
return myHypothesisIt!=myHypothesis.end();
|
||||
return myHypothesisIt!=myHypothesis.end();
|
||||
}
|
||||
|
@ -36,29 +36,29 @@
|
||||
class SMESHDS_EXPORT SMESHDS_Document
|
||||
{
|
||||
public:
|
||||
SMESHDS_Document(int UserID);
|
||||
int NewMesh(bool theIsEmbeddedMode);
|
||||
void RemoveMesh(int MeshID);
|
||||
SMESHDS_Mesh * GetMesh(int MeshID);
|
||||
void AddHypothesis(SMESHDS_Hypothesis * H);
|
||||
void RemoveHypothesis(int HypID);
|
||||
SMESHDS_Hypothesis * GetHypothesis(int HypID);
|
||||
int NbMeshes();
|
||||
int NbHypothesis();
|
||||
void InitMeshesIterator();
|
||||
SMESHDS_Mesh * NextMesh();
|
||||
bool MoreMesh();
|
||||
void InitHypothesisIterator();
|
||||
SMESHDS_Hypothesis * NextHypothesis();
|
||||
bool MoreHypothesis();
|
||||
~SMESHDS_Document();
|
||||
SMESHDS_Document(int UserID);
|
||||
int NewMesh(bool theIsEmbeddedMode);
|
||||
void RemoveMesh(int MeshID);
|
||||
SMESHDS_Mesh * GetMesh(int MeshID);
|
||||
void AddHypothesis(SMESHDS_Hypothesis * H);
|
||||
void RemoveHypothesis(int HypID);
|
||||
SMESHDS_Hypothesis * GetHypothesis(int HypID);
|
||||
int NbMeshes();
|
||||
int NbHypothesis();
|
||||
void InitMeshesIterator();
|
||||
SMESHDS_Mesh * NextMesh();
|
||||
bool MoreMesh();
|
||||
void InitHypothesisIterator();
|
||||
SMESHDS_Hypothesis * NextHypothesis();
|
||||
bool MoreHypothesis();
|
||||
~SMESHDS_Document();
|
||||
|
||||
private:
|
||||
int myUserID;
|
||||
std::map<int,SMESHDS_Mesh*> myMeshes;
|
||||
std::map<int,SMESHDS_Hypothesis*> myHypothesis;
|
||||
std::map<int,SMESHDS_Mesh*>::iterator myMeshesIt;
|
||||
std::map<int,SMESHDS_Hypothesis*>::iterator myHypothesisIt;
|
||||
int myUserID;
|
||||
std::map<int,SMESHDS_Mesh*> myMeshes;
|
||||
std::map<int,SMESHDS_Hypothesis*> myHypothesis;
|
||||
std::map<int,SMESHDS_Mesh*>::iterator myMeshesIt;
|
||||
std::map<int,SMESHDS_Hypothesis*>::iterator myHypothesisIt;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -37,35 +37,35 @@
|
||||
class SMESHDS_EXPORT SMESHDS_Script
|
||||
{
|
||||
public:
|
||||
SMESHDS_Script(bool theIsEmbeddedMode);
|
||||
~SMESHDS_Script();
|
||||
SMESHDS_Script(bool theIsEmbeddedMode);
|
||||
~SMESHDS_Script();
|
||||
|
||||
void SetModified(bool theModified);
|
||||
bool IsModified();
|
||||
|
||||
void AddNode(int NewNodeID, double x, double y, double z);
|
||||
void Add0DElement(int New0DElementID, int idnode);
|
||||
void AddEdge(int NewEdgeID, int idnode1, int idnode2);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
|
||||
void AddNode(int NewNodeID, double x, double y, double z);
|
||||
void Add0DElement(int New0DElementID, int idnode);
|
||||
void AddEdge(int NewEdgeID, int idnode1, int idnode2);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
|
||||
|
||||
void AddPolygonalFace (const int NewFaceID,
|
||||
std::vector<int> nodes_ids);
|
||||
void AddPolyhedralVolume (const int NewVolID,
|
||||
void AddPolyhedralVolume (const int NewVolID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities);
|
||||
|
||||
// special methods for quadratic elements
|
||||
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
||||
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
||||
void AddFace(int NewFaceID, int n1, int n2, int n3,
|
||||
int n12, int n23, int n31);
|
||||
void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
|
||||
@ -86,21 +86,21 @@ class SMESHDS_EXPORT SMESHDS_Script
|
||||
int n56, int n67, int n78, int n85,
|
||||
int n15, int n26, int n37, int n48);
|
||||
void MoveNode(int NewNodeID, double x, double y, double z);
|
||||
void RemoveNode(int NodeID);
|
||||
void RemoveElement(int ElementID);
|
||||
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
||||
void ChangePolyhedronNodes(const int ElementID,
|
||||
void RemoveNode(int NodeID);
|
||||
void RemoveElement(int ElementID);
|
||||
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
||||
void ChangePolyhedronNodes(const int ElementID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities);
|
||||
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
||||
void ClearMesh();
|
||||
void Clear();
|
||||
const std::list<SMESHDS_Command*> & GetCommands();
|
||||
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
||||
void ClearMesh();
|
||||
void Clear();
|
||||
const std::list<SMESHDS_Command*> & GetCommands();
|
||||
|
||||
private:
|
||||
SMESHDS_Command* getCommand(const SMESHDS_CommandType aType);
|
||||
SMESHDS_Command* getCommand(const SMESHDS_CommandType aType);
|
||||
|
||||
std::list<SMESHDS_Command*> myCommands;
|
||||
std::list<SMESHDS_Command*> myCommands;
|
||||
|
||||
bool myIsEmbeddedMode;
|
||||
bool myIsModified;
|
||||
|
@ -141,9 +141,9 @@ template<class ELEM, typename TSET> class MySetIterator:
|
||||
{
|
||||
typedef SMDS_SetIterator<ELEM, typename TSET::const_iterator > TFather;
|
||||
public:
|
||||
MySetIterator(const TSET& s):TFather(s.begin(),s.end())
|
||||
{
|
||||
}
|
||||
MySetIterator(const TSET& s):TFather(s.begin(),s.end())
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
// =====================
|
||||
|
@ -87,90 +87,90 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
|
||||
switch (myType)
|
||||
{
|
||||
case HYPOTHESIS:
|
||||
{
|
||||
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_HypothesisRoot))
|
||||
{
|
||||
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_HypothesisRoot))
|
||||
// hypo definition
|
||||
Ok = true;
|
||||
else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
|
||||
Ok = true;
|
||||
else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
|
||||
// applied global hypo
|
||||
Ok = true;
|
||||
else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
|
||||
Ok = true;
|
||||
else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
|
||||
// applied local hypo
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case ALGORITHM:
|
||||
{
|
||||
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_AlgorithmsRoot))
|
||||
{
|
||||
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_AlgorithmsRoot))
|
||||
// algo definition
|
||||
Ok = true;
|
||||
else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
|
||||
Ok = true;
|
||||
else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
|
||||
// applied global algo
|
||||
Ok = true;
|
||||
else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
|
||||
Ok = true;
|
||||
else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
|
||||
// applied local algo
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case MESH:
|
||||
{
|
||||
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH:
|
||||
{
|
||||
// see SMESH_Gen_i.cxx for tag numbers
|
||||
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
|
||||
{
|
||||
// see SMESH_Gen_i.cxx for tag numbers
|
||||
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
|
||||
objFather->Tag() <= SMESH::Tag_LastSubMesh))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case MESHorSUBMESH:
|
||||
{
|
||||
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
|
||||
Ok = true; // mesh
|
||||
{
|
||||
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
|
||||
Ok = true; // mesh
|
||||
else if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
|
||||
objFather->Tag() <= SMESH::Tag_LastSubMesh))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnVertex))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnVertex))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH_EDGE:
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnEdge))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnEdge))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH_FACE:
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnFace))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnFace))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH_SOLID:
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnSolid))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnSolid))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH_COMPOUND:
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnCompound))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnCompound))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case GROUP:
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstGroup))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstGroup))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Ok;
|
||||
|
@ -112,8 +112,8 @@ void SMESHGUI_MeshOrderOp::initDialog()
|
||||
aMesh = SMESH::GetMeshByIO(selected.First());
|
||||
if (aMesh->_is_nil()) {
|
||||
SUIT_MessageBox::warning(desktop(),
|
||||
tr("SMESH_WRN_WARNING"),
|
||||
tr("SMESH_WRN_NO_AVAILABLE_DATA"));
|
||||
tr("SMESH_WRN_WARNING"),
|
||||
tr("SMESH_WRN_NO_AVAILABLE_DATA"));
|
||||
onCancel();
|
||||
return;
|
||||
}
|
||||
@ -122,8 +122,8 @@ void SMESHGUI_MeshOrderOp::initDialog()
|
||||
myMgr->SetMesh( aMesh );
|
||||
if ( !myMgr->GetMeshOrder() ) {
|
||||
SUIT_MessageBox::information(desktop(),
|
||||
tr("SMESH_INFORMATION"),
|
||||
tr("SMESH_NO_CONCURENT_MESH"));
|
||||
tr("SMESH_INFORMATION"),
|
||||
tr("SMESH_NO_CONCURENT_MESH"));
|
||||
|
||||
onCancel();
|
||||
return;
|
||||
|
@ -71,10 +71,10 @@ namespace
|
||||
inline
|
||||
SALOMEDS::SObject_var
|
||||
GetDomainRoot(const SALOMEDS::SComponent_var& theSComponentMesh,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder,
|
||||
CORBA::Long theDomainRootTag,
|
||||
const QString& theName,
|
||||
const QString& thePixmap)
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder,
|
||||
CORBA::Long theDomainRootTag,
|
||||
const QString& theName,
|
||||
const QString& thePixmap)
|
||||
{
|
||||
SALOMEDS::SObject_var aDomainRoot;
|
||||
if (!theSComponentMesh->FindSubObject(theDomainRootTag,aDomainRoot)) {
|
||||
@ -98,13 +98,13 @@ namespace
|
||||
inline
|
||||
SALOMEDS::SObject_var
|
||||
GetHypothesisRoot(const SALOMEDS::SComponent_var& theSComponentMesh,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
{
|
||||
return GetDomainRoot(theSComponentMesh,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_HypothesisRoot,
|
||||
QObject::tr("SMESH_MEN_HYPOTHESIS"),
|
||||
"ICON_SMESH_TREE_HYPO");
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_HypothesisRoot,
|
||||
QObject::tr("SMESH_MEN_HYPOTHESIS"),
|
||||
"ICON_SMESH_TREE_HYPO");
|
||||
}
|
||||
|
||||
|
||||
@ -112,13 +112,13 @@ namespace
|
||||
inline
|
||||
SALOMEDS::SObject_var
|
||||
GetAlgorithmsRoot(const SALOMEDS::SComponent_var& theSComponentMesh,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
{
|
||||
return GetDomainRoot(theSComponentMesh,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_AlgorithmsRoot,
|
||||
QObject::tr("SMESH_MEN_ALGORITHMS"),
|
||||
"ICON_SMESH_TREE_ALGO");
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_AlgorithmsRoot,
|
||||
QObject::tr("SMESH_MEN_ALGORITHMS"),
|
||||
"ICON_SMESH_TREE_ALGO");
|
||||
}
|
||||
|
||||
|
||||
@ -126,17 +126,17 @@ namespace
|
||||
inline
|
||||
SALOMEDS::SObject_var
|
||||
AddToDomain(const std::string& theIOR,
|
||||
const SALOMEDS::SComponent_var& theSComponentMesh,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder,
|
||||
CORBA::Long theDomainRootTag,
|
||||
const QString& theDomainName,
|
||||
const QString& theDomainPixmap)
|
||||
const SALOMEDS::SComponent_var& theSComponentMesh,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder,
|
||||
CORBA::Long theDomainRootTag,
|
||||
const QString& theDomainName,
|
||||
const QString& theDomainPixmap)
|
||||
{
|
||||
SALOMEDS::SObject_var aDomain = GetDomainRoot(theSComponentMesh,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_AlgorithmsRoot,
|
||||
theDomainName,
|
||||
theDomainPixmap);
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_AlgorithmsRoot,
|
||||
theDomainName,
|
||||
theDomainPixmap);
|
||||
// Add New Hypothesis
|
||||
SALOMEDS::SObject_var aSObject = theStudyBuilder->NewObject(aDomain);
|
||||
SALOMEDS::GenericAttribute_var anAttr = theStudyBuilder->FindOrCreateAttribute(aSObject,"AttributePixMap");
|
||||
@ -157,42 +157,42 @@ namespace
|
||||
//---------------------------------------------------------------
|
||||
SALOMEDS::SObject_var
|
||||
AddHypothesis(const std::string& theIOR,
|
||||
const SALOMEDS::SComponent_var& theSComponentMesh,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
const SALOMEDS::SComponent_var& theSComponentMesh,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
{
|
||||
return AddToDomain(theIOR,
|
||||
theSComponentMesh,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_HypothesisRoot,
|
||||
QObject::tr("SMESH_MEN_HYPOTHESIS"),
|
||||
"ICON_SMESH_TREE_HYPO");
|
||||
theSComponentMesh,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_HypothesisRoot,
|
||||
QObject::tr("SMESH_MEN_HYPOTHESIS"),
|
||||
"ICON_SMESH_TREE_HYPO");
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------
|
||||
SALOMEDS::SObject_var
|
||||
AddAlgorithms(const std::string& theIOR,
|
||||
const SALOMEDS::SComponent_var& theSComponentMesh,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
const SALOMEDS::SComponent_var& theSComponentMesh,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
{
|
||||
return AddToDomain(theIOR,
|
||||
theSComponentMesh,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_AlgorithmsRoot,
|
||||
QObject::tr("SMESH_MEN_ALGORITHMS"),
|
||||
"ICON_SMESH_TREE_ALGO");
|
||||
theSComponentMesh,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_AlgorithmsRoot,
|
||||
QObject::tr("SMESH_MEN_ALGORITHMS"),
|
||||
"ICON_SMESH_TREE_ALGO");
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------
|
||||
void
|
||||
SetDomain(const char* theMeshOrSubMeshEntry,
|
||||
const char* theDomainEntry,
|
||||
const SALOMEDS::Study_var& theStudy,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder,
|
||||
long theRefOnAppliedDomainTag,
|
||||
const QString& theAppliedDomainMEN,
|
||||
const QString& theAppliedDomainICON)
|
||||
const char* theDomainEntry,
|
||||
const SALOMEDS::Study_var& theStudy,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder,
|
||||
long theRefOnAppliedDomainTag,
|
||||
const QString& theAppliedDomainMEN,
|
||||
const QString& theAppliedDomainICON)
|
||||
{
|
||||
SALOMEDS::SObject_var aMeshOrSubMeshSO = theStudy->FindObjectID(theMeshOrSubMeshEntry);
|
||||
SALOMEDS::SObject_var aHypothesisSO = theStudy->FindObjectID(theDomainEntry);
|
||||
@ -201,17 +201,17 @@ namespace
|
||||
//Find or Create Applied Hypothesis root
|
||||
SALOMEDS::SObject_var anAppliedDomainSO;
|
||||
if(!aMeshOrSubMeshSO->FindSubObject(theRefOnAppliedDomainTag,anAppliedDomainSO)){
|
||||
anAppliedDomainSO = theStudyBuilder->NewObjectToTag(aMeshOrSubMeshSO,theRefOnAppliedDomainTag);
|
||||
SALOMEDS::GenericAttribute_var anAttr =
|
||||
theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeName");
|
||||
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
aName->SetValue(theAppliedDomainMEN.toLatin1().data());
|
||||
anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeSelectable");
|
||||
SALOMEDS::AttributeSelectable_var aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr);
|
||||
aSelAttr->SetSelectable(false);
|
||||
anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributePixMap");
|
||||
SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
|
||||
aPixmap->SetPixMap(theAppliedDomainICON.toLatin1().data());
|
||||
anAppliedDomainSO = theStudyBuilder->NewObjectToTag(aMeshOrSubMeshSO,theRefOnAppliedDomainTag);
|
||||
SALOMEDS::GenericAttribute_var anAttr =
|
||||
theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeName");
|
||||
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
aName->SetValue(theAppliedDomainMEN.toLatin1().data());
|
||||
anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeSelectable");
|
||||
SALOMEDS::AttributeSelectable_var aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr);
|
||||
aSelAttr->SetSelectable(false);
|
||||
anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributePixMap");
|
||||
SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
|
||||
aPixmap->SetPixMap(theAppliedDomainICON.toLatin1().data());
|
||||
}
|
||||
SALOMEDS::SObject_var aSObject = theStudyBuilder->NewObject(anAppliedDomainSO);
|
||||
theStudyBuilder->Addreference(aSObject,aHypothesisSO);
|
||||
@ -222,34 +222,34 @@ namespace
|
||||
//---------------------------------------------------------------
|
||||
void
|
||||
SetHypothesis(const char* theMeshOrSubMeshEntry,
|
||||
const char* theDomainEntry,
|
||||
const SALOMEDS::Study_var& theStudy,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
const char* theDomainEntry,
|
||||
const SALOMEDS::Study_var& theStudy,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
{
|
||||
SetDomain(theMeshOrSubMeshEntry,
|
||||
theDomainEntry,
|
||||
theStudy,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_RefOnAppliedHypothesis,
|
||||
QObject::tr("SMESH_MEN_APPLIED_HYPOTHESIS"),
|
||||
"ICON_SMESH_TREE_HYPO");
|
||||
theDomainEntry,
|
||||
theStudy,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_RefOnAppliedHypothesis,
|
||||
QObject::tr("SMESH_MEN_APPLIED_HYPOTHESIS"),
|
||||
"ICON_SMESH_TREE_HYPO");
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------
|
||||
void
|
||||
SetAlgorithms(const char* theMeshOrSubMeshEntry,
|
||||
const char* theDomainEntry,
|
||||
const SALOMEDS::Study_var& theStudy,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
const char* theDomainEntry,
|
||||
const SALOMEDS::Study_var& theStudy,
|
||||
const SALOMEDS::StudyBuilder_var& theStudyBuilder)
|
||||
{
|
||||
SetDomain(theMeshOrSubMeshEntry,
|
||||
theDomainEntry,
|
||||
theStudy,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_RefOnAppliedAlgorithms,
|
||||
QObject::tr("SMESH_MEN_APPLIED_ALGORIHTMS"),
|
||||
"ICON_SMESH_TREE_ALGO");
|
||||
theDomainEntry,
|
||||
theStudy,
|
||||
theStudyBuilder,
|
||||
SMESH::Tag_RefOnAppliedAlgorithms,
|
||||
QObject::tr("SMESH_MEN_APPLIED_ALGORIHTMS"),
|
||||
"ICON_SMESH_TREE_ALGO");
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,11 +271,11 @@ SMESH_Swig::SMESH_Swig()
|
||||
Execute()
|
||||
{
|
||||
try {
|
||||
ORB_INIT &anORBInit = *SINGLETON_<ORB_INIT>::Instance();
|
||||
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
|
||||
myORB = anORBInit( 0, 0 );
|
||||
ORB_INIT &anORBInit = *SINGLETON_<ORB_INIT>::Instance();
|
||||
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
|
||||
myORB = anORBInit( 0, 0 );
|
||||
} catch (...) {
|
||||
INFOS("internal error : orb not found");
|
||||
INFOS("internal error : orb not found");
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -301,9 +301,9 @@ SMESH_Swig::Init(int theStudyID)
|
||||
SALOMEDS::SComponent_var& mySComponentMesh;
|
||||
public:
|
||||
TEvent(int theStudyID,
|
||||
SALOMEDS::Study_var& theStudy,
|
||||
SALOMEDS::StudyBuilder_var& theStudyBuilder,
|
||||
SALOMEDS::SComponent_var& theSComponentMesh):
|
||||
SALOMEDS::Study_var& theStudy,
|
||||
SALOMEDS::StudyBuilder_var& theStudyBuilder,
|
||||
SALOMEDS::SComponent_var& theSComponentMesh):
|
||||
myStudyID(theStudyID),
|
||||
myStudy(theStudy),
|
||||
myStudyBuilder(theStudyBuilder),
|
||||
@ -334,28 +334,28 @@ SMESH_Swig::Init(int theStudyID)
|
||||
|
||||
SALOMEDS::SComponent_var aSComponent = myStudy->FindComponent("SMESH");
|
||||
if(aSComponent->_is_nil()){
|
||||
bool aLocked = myStudy->GetProperties()->IsLocked();
|
||||
if (aLocked)
|
||||
myStudy->GetProperties()->SetLocked(false);
|
||||
|
||||
aSComponent = myStudyBuilder->NewComponent("SMESH");
|
||||
anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributeName");
|
||||
aName = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
bool aLocked = myStudy->GetProperties()->IsLocked();
|
||||
if (aLocked)
|
||||
myStudy->GetProperties()->SetLocked(false);
|
||||
|
||||
aSComponent = myStudyBuilder->NewComponent("SMESH");
|
||||
anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributeName");
|
||||
aName = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
|
||||
SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI(); //SRN: BugID IPAL9186, load a SMESH gui if it hasn't been loaded
|
||||
if (!aSMESHGUI){
|
||||
CAM_Module* aModule = anApp->module("Mesh");
|
||||
if(!aModule)
|
||||
aModule = anApp->loadModule("Mesh");
|
||||
aSMESHGUI = dynamic_cast<SMESHGUI*>(aModule);
|
||||
} //SRN: BugID IPAL9186: end of a fix
|
||||
aName->SetValue(aSMESHGUI->moduleName().toLatin1().data());
|
||||
anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributePixMap");
|
||||
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
|
||||
aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
|
||||
myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen);
|
||||
if (aLocked)
|
||||
myStudy->GetProperties()->SetLocked(true);
|
||||
SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI(); //SRN: BugID IPAL9186, load a SMESH gui if it hasn't been loaded
|
||||
if (!aSMESHGUI){
|
||||
CAM_Module* aModule = anApp->module("Mesh");
|
||||
if(!aModule)
|
||||
aModule = anApp->loadModule("Mesh");
|
||||
aSMESHGUI = dynamic_cast<SMESHGUI*>(aModule);
|
||||
} //SRN: BugID IPAL9186: end of a fix
|
||||
aName->SetValue(aSMESHGUI->moduleName().toLatin1().data());
|
||||
anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributePixMap");
|
||||
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
|
||||
aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
|
||||
myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen);
|
||||
if (aLocked)
|
||||
myStudy->GetProperties()->SetLocked(true);
|
||||
}
|
||||
|
||||
mySComponentMesh = SALOMEDS::SComponent::_narrow(aSComponent);
|
||||
@ -367,9 +367,9 @@ SMESH_Swig::Init(int theStudyID)
|
||||
MESSAGE("Init");
|
||||
|
||||
ProcessVoidEvent(new TEvent(theStudyID,
|
||||
myStudy,
|
||||
myStudyBuilder,
|
||||
mySComponentMesh));
|
||||
myStudy,
|
||||
myStudyBuilder,
|
||||
mySComponentMesh));
|
||||
}
|
||||
|
||||
|
||||
@ -414,8 +414,8 @@ const char* SMESH_Swig::AddNewHypothesis(const char* theIOR)
|
||||
MESSAGE("AddNewHypothesis");
|
||||
|
||||
SALOMEDS::SObject_var aSObject = ::AddHypothesis(theIOR,
|
||||
mySComponentMesh,
|
||||
myStudyBuilder);
|
||||
mySComponentMesh,
|
||||
myStudyBuilder);
|
||||
CORBA::String_var anEntry = aSObject->GetID();
|
||||
return anEntry._retn();
|
||||
}
|
||||
@ -427,8 +427,8 @@ const char* SMESH_Swig::AddNewAlgorithms(const char* theIOR)
|
||||
MESSAGE("AddNewAlgorithms");
|
||||
|
||||
SALOMEDS::SObject_var aSObject = ::AddAlgorithms(theIOR,
|
||||
mySComponentMesh,
|
||||
myStudyBuilder);
|
||||
mySComponentMesh,
|
||||
myStudyBuilder);
|
||||
CORBA::String_var anEntry = aSObject->GetID();
|
||||
return anEntry._retn();
|
||||
}
|
||||
@ -453,9 +453,9 @@ void SMESH_Swig::SetHypothesis(const char* theMeshOrSubMeshEntry,
|
||||
const char* theDomainEntry)
|
||||
{
|
||||
::SetHypothesis(theMeshOrSubMeshEntry,
|
||||
theDomainEntry,
|
||||
myStudy,
|
||||
myStudyBuilder);
|
||||
theDomainEntry,
|
||||
myStudy,
|
||||
myStudyBuilder);
|
||||
}
|
||||
|
||||
|
||||
@ -464,9 +464,9 @@ void SMESH_Swig::SetAlgorithms(const char* theMeshOrSubMeshEntry,
|
||||
const char* theDomainEntry)
|
||||
{
|
||||
::SetAlgorithms(theMeshOrSubMeshEntry,
|
||||
theDomainEntry,
|
||||
myStudy,
|
||||
myStudyBuilder);
|
||||
theDomainEntry,
|
||||
myStudy,
|
||||
myStudyBuilder);
|
||||
}
|
||||
|
||||
|
||||
@ -599,7 +599,7 @@ void SMESH_Swig::SetName(const char* theEntry,
|
||||
//================================================================================
|
||||
|
||||
void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
|
||||
const bool theIsComputed,
|
||||
const bool theIsComputed,
|
||||
const bool isEmpty)
|
||||
{
|
||||
class TEvent: public SALOME_Event
|
||||
@ -609,8 +609,8 @@ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
|
||||
bool myIsComputed, myIsEmpty;
|
||||
public:
|
||||
TEvent(const SALOMEDS::Study_var& theStudy,
|
||||
const std::string& theMeshEntry,
|
||||
const bool theIsComputed,
|
||||
const std::string& theMeshEntry,
|
||||
const bool theIsComputed,
|
||||
const bool isEmpty):
|
||||
myStudy(theStudy),
|
||||
myMeshEntry(theMeshEntry),
|
||||
@ -624,13 +624,13 @@ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
|
||||
{
|
||||
SALOMEDS::SObject_var aMeshSO = myStudy->FindObjectID(myMeshEntry.c_str());
|
||||
if(!aMeshSO->_is_nil())
|
||||
if(_PTR(SObject) aMesh = ClientFactory::SObject(aMeshSO))
|
||||
SMESH::ModifiedMesh(aMesh,myIsComputed,myIsEmpty);
|
||||
if(_PTR(SObject) aMesh = ClientFactory::SObject(aMeshSO))
|
||||
SMESH::ModifiedMesh(aMesh,myIsComputed,myIsEmpty);
|
||||
}
|
||||
};
|
||||
|
||||
ProcessVoidEvent(new TEvent(myStudy,
|
||||
theMeshEntry,
|
||||
theIsComputed,
|
||||
theMeshEntry,
|
||||
theIsComputed,
|
||||
isEmpty));
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
//virtual ~StdMeshers_CompositeHexa_3D();
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
|
||||
MapShapeNbElems& aResMap);
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
virtual ~StdMeshers_CompositeSegment_1D();
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
const TopoDS_Shape& aShape);
|
||||
/*!
|
||||
* \brief Sets event listener to submeshes if necessary
|
||||
* \param subMesh - submesh where algo is set
|
||||
|
@ -303,21 +303,21 @@ double dihotomySolve( Function& f, const double val, const double _start, const
|
||||
}
|
||||
|
||||
bool buildDistribution( const TCollection_AsciiString& f, const int conv, const double start, const double end,
|
||||
const int nbSeg, vector<double>& data, const double eps )
|
||||
const int nbSeg, vector<double>& data, const double eps )
|
||||
{
|
||||
FunctionExpr F( f.ToCString(), conv );
|
||||
return buildDistribution( F, start, end, nbSeg, data, eps );
|
||||
}
|
||||
|
||||
bool buildDistribution( const std::vector<double>& f, const int conv, const double start, const double end,
|
||||
const int nbSeg, vector<double>& data, const double eps )
|
||||
const int nbSeg, vector<double>& data, const double eps )
|
||||
{
|
||||
FunctionTable F( f, conv );
|
||||
return buildDistribution( F, start, end, nbSeg, data, eps );
|
||||
}
|
||||
|
||||
bool buildDistribution( const Function& func, const double start, const double end, const int nbSeg,
|
||||
vector<double>& data, const double eps )
|
||||
vector<double>& data, const double eps )
|
||||
{
|
||||
if( nbSeg<=0 )
|
||||
return false;
|
||||
|
@ -102,16 +102,16 @@ private:
|
||||
|
||||
STDMESHERS_EXPORT
|
||||
bool buildDistribution( const Function& f,
|
||||
const double start, const double end,
|
||||
const int nbSeg,
|
||||
std::vector<double>& data,
|
||||
const double eps );
|
||||
const double start, const double end,
|
||||
const int nbSeg,
|
||||
std::vector<double>& data,
|
||||
const double eps );
|
||||
|
||||
STDMESHERS_EXPORT
|
||||
bool buildDistribution( const TCollection_AsciiString& f, const int conv, const double start, const double end,
|
||||
const int nbSeg, std::vector<double>& data, const double eps );
|
||||
const int nbSeg, std::vector<double>& data, const double eps );
|
||||
STDMESHERS_EXPORT
|
||||
bool buildDistribution( const std::vector<double>& f, const int conv, const double start, const double end,
|
||||
const int nbSeg, std::vector<double>& data, const double eps );
|
||||
const int nbSeg, std::vector<double>& data, const double eps );
|
||||
|
||||
#endif
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
SMESH_Hypothesis::Hypothesis_Status& aStatus);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
const TopoDS_Shape& aShape)
|
||||
/*throw (SALOME_Exception)*/;
|
||||
|
||||
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
|
||||
@ -87,32 +87,32 @@ public:
|
||||
protected:
|
||||
TopoDS_Edge
|
||||
EdgeNotInFace(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
const TopoDS_Face& aFace,
|
||||
const TopoDS_Vertex& aVertex,
|
||||
const TopTools_IndexedDataMapOfShapeListOfShape& MS);
|
||||
const TopoDS_Shape& aShape,
|
||||
const TopoDS_Face& aFace,
|
||||
const TopoDS_Vertex& aVertex,
|
||||
const TopTools_IndexedDataMapOfShapeListOfShape& MS);
|
||||
|
||||
int GetFaceIndex(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
const std::vector<SMESH_subMesh*>& meshFaces,
|
||||
const TopoDS_Vertex& V0,
|
||||
const TopoDS_Vertex& V1,
|
||||
const TopoDS_Vertex& V2,
|
||||
const TopoDS_Vertex& V3);
|
||||
const TopoDS_Shape& aShape,
|
||||
const std::vector<SMESH_subMesh*>& meshFaces,
|
||||
const TopoDS_Vertex& V0,
|
||||
const TopoDS_Vertex& V1,
|
||||
const TopoDS_Vertex& V2,
|
||||
const TopoDS_Vertex& V3);
|
||||
|
||||
void GetConv2DCoefs(const faceQuadStruct& quad,
|
||||
const TopoDS_Shape& aShape,
|
||||
const TopoDS_Vertex& V0,
|
||||
const TopoDS_Vertex& V1,
|
||||
const TopoDS_Vertex& V2,
|
||||
const TopoDS_Vertex& V3,
|
||||
Conv2DStruct& conv);
|
||||
const TopoDS_Shape& aShape,
|
||||
const TopoDS_Vertex& V0,
|
||||
const TopoDS_Vertex& V1,
|
||||
const TopoDS_Vertex& V2,
|
||||
const TopoDS_Vertex& V3,
|
||||
Conv2DStruct& conv);
|
||||
|
||||
void GetPoint(Pt3 p,
|
||||
int i, int j, int k,
|
||||
int nbx, int nby, int nbz,
|
||||
Point3DStruct *np,
|
||||
const SMESHDS_Mesh* meshDS);
|
||||
int i, int j, int k,
|
||||
int nbx, int nby, int nbz,
|
||||
Point3DStruct *np,
|
||||
const SMESHDS_Mesh* meshDS);
|
||||
|
||||
bool ClearAndReturn(FaceQuadStruct* theQuads[6], const bool res);
|
||||
};
|
||||
|
@ -296,8 +296,8 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh
|
||||
//=============================================================================
|
||||
|
||||
bool StdMeshers_MEFISTO_2D::Evaluate(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
const TopoDS_Shape & aShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
{
|
||||
MESSAGE("StdMeshers_MEFISTO_2D::Evaluate");
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
SMESH_Hypothesis::Hypothesis_Status& aStatus);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
|
||||
MapShapeNbElems& aResMap);
|
||||
@ -64,19 +64,19 @@ public:
|
||||
typedef std::vector< StdMeshers_FaceSidePtr > TWireVector;
|
||||
|
||||
bool LoadPoints(TWireVector & wires,
|
||||
R2* uvslf,
|
||||
std::vector< const SMDS_MeshNode*>& mefistoToDS,
|
||||
R2* uvslf,
|
||||
std::vector< const SMDS_MeshNode*>& mefistoToDS,
|
||||
double scalex, double scaley);
|
||||
|
||||
void ComputeScaleOnFace(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Face& aFace,
|
||||
double& scalex,
|
||||
double& scaley);
|
||||
const TopoDS_Face& aFace,
|
||||
double& scalex,
|
||||
double& scaley);
|
||||
|
||||
void StoreResult (Z nbst, R2* uvst, Z nbt, Z* nust,
|
||||
std::vector< const SMDS_MeshNode*>& mefistoToDS,
|
||||
std::vector< const SMDS_MeshNode*>& mefistoToDS,
|
||||
double scalex, double scaley);
|
||||
|
||||
|
||||
protected:
|
||||
double _edgeLength;
|
||||
double _maxElementArea;
|
||||
|
@ -58,26 +58,26 @@ public:
|
||||
void Load (const TopoDS_Shell& theShell);
|
||||
|
||||
void Load (const TopoDS_Shell& theShell,
|
||||
const TopoDS_Vertex& theV000,
|
||||
const TopoDS_Vertex& theV001);
|
||||
const TopoDS_Vertex& theV000,
|
||||
const TopoDS_Vertex& theV001);
|
||||
|
||||
void ComputeParameters(const gp_Pnt& thePnt,
|
||||
gp_XYZ& theXYZ);
|
||||
gp_XYZ& theXYZ);
|
||||
|
||||
void ComputeParameters(const gp_Pnt& thePnt,
|
||||
const TopoDS_Shape& theShape,
|
||||
gp_XYZ& theXYZ);
|
||||
const TopoDS_Shape& theShape,
|
||||
gp_XYZ& theXYZ);
|
||||
|
||||
void ComputeParameters(const double& theU,
|
||||
const TopoDS_Shape& theShape,
|
||||
gp_XYZ& theXYZ);
|
||||
const TopoDS_Shape& theShape,
|
||||
gp_XYZ& theXYZ);
|
||||
|
||||
void Point(const gp_XYZ& theParams,
|
||||
gp_Pnt& thePnt);
|
||||
gp_Pnt& thePnt);
|
||||
|
||||
void Point(const gp_XYZ& theParams,
|
||||
const TopoDS_Shape& theShape,
|
||||
gp_Pnt& thePnt);
|
||||
const TopoDS_Shape& theShape,
|
||||
gp_Pnt& thePnt);
|
||||
|
||||
int ShapeID(const TopoDS_Shape& theShape);
|
||||
|
||||
@ -206,7 +206,7 @@ class STDMESHERS_EXPORT StdMeshers_Penta_3D {
|
||||
// 0-the node on theBaseEdge.
|
||||
|
||||
bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
|
||||
MapShapeNbElems& aResMap);
|
||||
MapShapeNbElems& aResMap);
|
||||
|
||||
|
||||
protected: // methods
|
||||
@ -223,17 +223,17 @@ class STDMESHERS_EXPORT StdMeshers_Penta_3D {
|
||||
std::vector<const SMDS_MeshNode*>*& aCol2);
|
||||
|
||||
void ShapeSupportID(const bool theIsUpperLayer,
|
||||
const SMESH_Block::TShapeID theBNSSID,
|
||||
SMESH_Block::TShapeID& theSSID);
|
||||
const SMESH_Block::TShapeID theBNSSID,
|
||||
SMESH_Block::TShapeID& theSSID);
|
||||
|
||||
void FindNodeOnShape(const TopoDS_Shape& aS,
|
||||
const gp_XYZ& aParams,
|
||||
const gp_XYZ& aParams,
|
||||
const int z,
|
||||
StdMeshers_TNode& aTN);
|
||||
StdMeshers_TNode& aTN);
|
||||
|
||||
void CreateNode(const bool theIsUpperLayer,
|
||||
const gp_XYZ& aParams,
|
||||
StdMeshers_TNode& aTN);
|
||||
const gp_XYZ& aParams,
|
||||
StdMeshers_TNode& aTN);
|
||||
|
||||
void ClearMeshOnFxy1();
|
||||
|
||||
|
@ -162,7 +162,7 @@ StdMeshers_Prism_3D::StdMeshers_Prism_3D(int hypId, int studyId, SMESH_Gen* gen)
|
||||
:SMESH_3D_Algo(hypId, studyId, gen)
|
||||
{
|
||||
_name = "Prism_3D";
|
||||
_shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID); // 1 bit per shape type
|
||||
_shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID); // 1 bit per shape type
|
||||
myProjectTriangles = false;
|
||||
}
|
||||
|
||||
@ -375,8 +375,8 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
|
||||
//=======================================================================
|
||||
|
||||
bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
|
||||
const TopoDS_Shape& theShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
const TopoDS_Shape& theShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
{
|
||||
// find face contains only triangles
|
||||
vector < SMESH_subMesh * >meshFaces;
|
||||
@ -436,8 +436,8 @@ bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
|
||||
bool IsOpposite = true;
|
||||
for(TopExp_Explorer exp(aFaces.Value(i), TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||
if( Edges1.Contains(exp.Current()) ) {
|
||||
IsOpposite = false;
|
||||
break;
|
||||
IsOpposite = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(IsOpposite) {
|
||||
|
@ -67,7 +67,7 @@ StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, int studyId, SMESH
|
||||
:SMESH_1D_Algo(hypId, studyId, gen)
|
||||
{
|
||||
_name = "Projection_1D";
|
||||
_shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
|
||||
_shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
|
||||
|
||||
_compatibleHypothesis.push_back("ProjectionSource1D");
|
||||
_sourceHypo = 0;
|
||||
@ -379,8 +379,8 @@ bool StdMeshers_Projection_1D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
|
||||
//=======================================================================
|
||||
|
||||
bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
|
||||
const TopoDS_Shape& theShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
const TopoDS_Shape& theShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
{
|
||||
if ( !_sourceHypo )
|
||||
return false;
|
||||
|
@ -67,7 +67,7 @@ StdMeshers_Projection_2D::StdMeshers_Projection_2D(int hypId, int studyId, SMESH
|
||||
:SMESH_2D_Algo(hypId, studyId, gen)
|
||||
{
|
||||
_name = "Projection_2D";
|
||||
_shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
|
||||
_shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
|
||||
|
||||
_compatibleHypothesis.push_back("ProjectionSource2D");
|
||||
_sourceHypo = 0;
|
||||
@ -748,8 +748,8 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
|
||||
//=======================================================================
|
||||
|
||||
bool StdMeshers_Projection_2D::Evaluate(SMESH_Mesh& theMesh,
|
||||
const TopoDS_Shape& theShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
const TopoDS_Shape& theShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
{
|
||||
if ( !_sourceHypo )
|
||||
return false;
|
||||
|
@ -48,7 +48,7 @@ using namespace std;
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(int hypId, int studyId,
|
||||
SMESH_Gen * gen)
|
||||
SMESH_Gen * gen)
|
||||
:SMESH_Hypothesis(hypId, studyId, gen)
|
||||
{
|
||||
_name = "QuadrangleParams";
|
||||
@ -142,7 +142,7 @@ istream & operator >>(istream & load, StdMeshers_QuadrangleParams & hyp)
|
||||
//================================================================================
|
||||
|
||||
bool StdMeshers_QuadrangleParams::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
||||
const TopoDS_Shape& theShape)
|
||||
const TopoDS_Shape& theShape)
|
||||
{
|
||||
if ( !theMesh || theShape.IsNull() )
|
||||
return false;
|
||||
@ -158,7 +158,7 @@ bool StdMeshers_QuadrangleParams::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
||||
//================================================================================
|
||||
|
||||
bool StdMeshers_QuadrangleParams::SetParametersByDefaults(const TDefaults& dflts,
|
||||
const SMESH_Mesh* /*mesh*/)
|
||||
const SMESH_Mesh* /*mesh*/)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -52,9 +52,9 @@ public:
|
||||
virtual std::ostream & SaveTo(std::ostream & save);
|
||||
virtual std::istream & LoadFrom(std::istream & load);
|
||||
friend std::ostream& operator << (std::ostream & save,
|
||||
StdMeshers_QuadrangleParams & hyp);
|
||||
StdMeshers_QuadrangleParams & hyp);
|
||||
friend std::istream& operator >> (std::istream & load,
|
||||
StdMeshers_QuadrangleParams & hyp);
|
||||
StdMeshers_QuadrangleParams & hyp);
|
||||
|
||||
/*!
|
||||
* \brief Initialize start and end length by the mesh built on the geometry
|
||||
@ -63,14 +63,14 @@ public:
|
||||
* \retval bool - true if parameter values have been successfully defined
|
||||
*/
|
||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh,
|
||||
const TopoDS_Shape& theShape);
|
||||
const TopoDS_Shape& theShape);
|
||||
|
||||
/*!
|
||||
* \brief Initialize my parameter values by default parameters.
|
||||
* \retval bool - true if parameter values have been successfully defined
|
||||
*/
|
||||
virtual bool SetParametersByDefaults(const TDefaults& dflts,
|
||||
const SMESH_Mesh* theMesh=0);
|
||||
const SMESH_Mesh* theMesh=0);
|
||||
|
||||
protected:
|
||||
int _triaVertexID;
|
||||
|
@ -63,13 +63,13 @@ public:
|
||||
SMESH_Hypothesis::Hypothesis_Status& aStatus);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
|
||||
MapShapeNbElems& aResMap);
|
||||
|
||||
FaceQuadStruct* CheckAnd2Dcompute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
const TopoDS_Shape& aShape,
|
||||
const bool CreateQuadratic);
|
||||
|
||||
protected:
|
||||
@ -78,14 +78,14 @@ protected:
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
bool CheckNbEdgesForEvaluate(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape & aShape,
|
||||
MapShapeNbElems& aResMap,
|
||||
std::vector<int>& aNbNodes,
|
||||
const TopoDS_Shape & aShape,
|
||||
MapShapeNbElems& aResMap,
|
||||
std::vector<int>& aNbNodes,
|
||||
bool& IsQuadratic);
|
||||
|
||||
bool SetNormalizedGrid(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
FaceQuadStruct*& quad);
|
||||
const TopoDS_Shape& aShape,
|
||||
FaceQuadStruct*& quad);
|
||||
|
||||
void SplitQuad(SMESHDS_Mesh *theMeshDS,
|
||||
const int theFaceID,
|
||||
@ -102,22 +102,22 @@ protected:
|
||||
FaceQuadStruct* quad);
|
||||
|
||||
bool EvaluateQuadPref(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
std::vector<int>& aNbNodes,
|
||||
MapShapeNbElems& aResMap,
|
||||
const TopoDS_Shape& aShape,
|
||||
std::vector<int>& aNbNodes,
|
||||
MapShapeNbElems& aResMap,
|
||||
bool IsQuadratic);
|
||||
|
||||
UVPtStruct* LoadEdgePoints2(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Face& F, const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F, const TopoDS_Edge& E,
|
||||
bool IsReverse);
|
||||
|
||||
UVPtStruct* LoadEdgePoints(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Face& F, const TopoDS_Edge& E,
|
||||
double first, double last);
|
||||
const TopoDS_Face& F, const TopoDS_Edge& E,
|
||||
double first, double last);
|
||||
|
||||
UVPtStruct* MakeEdgePoints(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Face& F, const TopoDS_Edge& E,
|
||||
double first, double last, int nb_segm);
|
||||
const TopoDS_Face& F, const TopoDS_Edge& E,
|
||||
double first, double last, int nb_segm);
|
||||
|
||||
// true if QuadranglePreference hypothesis is assigned that forces
|
||||
// construction of quadrangles if the number of nodes on opposite edges
|
||||
|
@ -71,7 +71,7 @@ StdMeshers_RadialPrism_3D::StdMeshers_RadialPrism_3D(int hypId, int studyId, SME
|
||||
:SMESH_3D_Algo(hypId, studyId, gen)
|
||||
{
|
||||
_name = "RadialPrism_3D";
|
||||
_shapeType = (1 << TopAbs_SOLID); // 1 bit per shape type
|
||||
_shapeType = (1 << TopAbs_SOLID); // 1 bit per shape type
|
||||
|
||||
_compatibleHypothesis.push_back("LayerDistribution");
|
||||
_compatibleHypothesis.push_back("NumberOfLayers");
|
||||
@ -396,8 +396,8 @@ bool StdMeshers_RadialPrism_3D::computeLayerPositions(const gp_Pnt& pIn,
|
||||
//=======================================================================
|
||||
|
||||
bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
const TopoDS_Shape& aShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
{
|
||||
// get 2 shells
|
||||
TopoDS_Solid solid = TopoDS::Solid( aShape );
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
SMESH_Hypothesis::Hypothesis_Status& aStatus);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
|
||||
MapShapeNbElems& aResMap);
|
||||
|
@ -38,7 +38,7 @@ StdMeshers_SegmentAroundVertex_0D::StdMeshers_SegmentAroundVertex_0D
|
||||
{
|
||||
_name = "SegmentAroundVertex_0D";
|
||||
// it is assigned to vertices but influence a state of EDGE submeshes
|
||||
_shapeType = (1 << TopAbs_VERTEX); // 1 bit per shape type
|
||||
_shapeType = (1 << TopAbs_VERTEX); // 1 bit per shape type
|
||||
|
||||
_compatibleHypothesis.push_back("SegmentLengthAroundVertex");
|
||||
}
|
||||
@ -100,8 +100,8 @@ bool StdMeshers_SegmentAroundVertex_0D::Compute(SMESH_Mesh&, const TopoDS_Shape&
|
||||
//=======================================================================
|
||||
|
||||
bool StdMeshers_SegmentAroundVertex_0D::Evaluate(SMESH_Mesh&,
|
||||
const TopoDS_Shape&,
|
||||
MapShapeNbElems&)
|
||||
const TopoDS_Shape&,
|
||||
MapShapeNbElems&)
|
||||
{
|
||||
// This algorithm exists in order just to enable assignation of
|
||||
// StdMeshers_SegmentLengthAroundVertex hypothesis
|
||||
|
@ -72,8 +72,8 @@ bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
|
||||
//=======================================================================
|
||||
|
||||
bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&,
|
||||
const TopoDS_Shape&,
|
||||
MapShapeNbElems&)
|
||||
const TopoDS_Shape&,
|
||||
MapShapeNbElems&)
|
||||
{
|
||||
// This algorithm exists to allow mesh generation by mesh
|
||||
// edition functions in TUI mode
|
||||
@ -126,8 +126,8 @@ bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
|
||||
//=======================================================================
|
||||
|
||||
bool StdMeshers_UseExisting_2D::Evaluate(SMESH_Mesh&,
|
||||
const TopoDS_Shape&,
|
||||
MapShapeNbElems&)
|
||||
const TopoDS_Shape&,
|
||||
MapShapeNbElems&)
|
||||
{
|
||||
// This algorithm exists to allow mesh generation by mesh edition
|
||||
// functions in TUI mode
|
||||
|
@ -222,13 +222,13 @@ void StdMeshersGUI_DistrPreview::update()
|
||||
{
|
||||
SMESH::double_array* arr = 0;
|
||||
if( isTableFunc() )
|
||||
arr = h->BuildDistributionTab( myTableFunc, myNbSeg, ( int )myConv );
|
||||
arr = h->BuildDistributionTab( myTableFunc, myNbSeg, ( int )myConv );
|
||||
else
|
||||
arr = h->BuildDistributionExpr( myFunction.toLatin1().data(), myNbSeg, ( int )myConv );
|
||||
arr = h->BuildDistributionExpr( myFunction.toLatin1().data(), myNbSeg, ( int )myConv );
|
||||
if( arr )
|
||||
{
|
||||
distr = *arr;
|
||||
delete arr;
|
||||
distr = *arr;
|
||||
delete arr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -337,7 +337,7 @@ bool isCorrectArg( const Handle( Expr_GeneralExpression )& expr )
|
||||
if( !name.IsNull() )
|
||||
{
|
||||
if( name->GetName()!="t" )
|
||||
res = false;
|
||||
res = false;
|
||||
}
|
||||
else
|
||||
res = isCorrectArg( sub );
|
||||
@ -421,15 +421,15 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
|
||||
#ifdef NO_CAS_CATCH
|
||||
OCC_CATCH_SIGNALS;
|
||||
#endif
|
||||
// in StdMeshers_NumberOfSegments.cc
|
||||
// const double PRECISION = 1e-7;
|
||||
//
|
||||
if(v < -7) v = -7.0;
|
||||
v = pow( 10.0, v );
|
||||
// in StdMeshers_NumberOfSegments.cc
|
||||
// const double PRECISION = 1e-7;
|
||||
//
|
||||
if(v < -7) v = -7.0;
|
||||
v = pow( 10.0, v );
|
||||
} catch(Standard_Failure) {
|
||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||
v = 0.0;
|
||||
ok = false;
|
||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||
v = 0.0;
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -84,14 +84,14 @@ public:
|
||||
~SpinBoxDelegate();
|
||||
|
||||
QWidget* createEditor( QWidget*,
|
||||
const QStyleOptionViewItem&,
|
||||
const QModelIndex& ) const;
|
||||
const QStyleOptionViewItem&,
|
||||
const QModelIndex& ) const;
|
||||
void setEditorData( QWidget*, const QModelIndex&) const;
|
||||
void setModelData( QWidget*, QAbstractItemModel*,
|
||||
const QModelIndex& ) const;
|
||||
const QModelIndex& ) const;
|
||||
void updateEditorGeometry( QWidget*,
|
||||
const QStyleOptionViewItem&,
|
||||
const QModelIndex& ) const;
|
||||
const QStyleOptionViewItem&,
|
||||
const QModelIndex& ) const;
|
||||
|
||||
private:
|
||||
StdMeshersGUI_DistrTableFrame::Table* myTable;
|
||||
@ -173,20 +173,20 @@ StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
|
||||
QWidget*
|
||||
StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
|
||||
createEditor( QWidget* parent,
|
||||
const QStyleOptionViewItem& /*option*/,
|
||||
const QModelIndex& index ) const
|
||||
const QStyleOptionViewItem& /*option*/,
|
||||
const QModelIndex& index ) const
|
||||
{
|
||||
QDoubleSpinBox* sb = new QDoubleSpinBox( parent );
|
||||
sb->setFrame(false);
|
||||
sb->setMinimum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
|
||||
myTable->argMinimum( index.row() ) :
|
||||
myTable->funcMinimum( index.row() ) );
|
||||
myTable->argMinimum( index.row() ) :
|
||||
myTable->funcMinimum( index.row() ) );
|
||||
sb->setMaximum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
|
||||
myTable->argMaximum( index.row() ) :
|
||||
myTable->funcMaximum( index.row() ) );
|
||||
myTable->argMaximum( index.row() ) :
|
||||
myTable->funcMaximum( index.row() ) );
|
||||
sb->setSingleStep( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
|
||||
myTable->argStep( index.row() ) :
|
||||
myTable->funcStep( index.row() ) );
|
||||
myTable->argStep( index.row() ) :
|
||||
myTable->funcStep( index.row() ) );
|
||||
myTable->setEditor( index.row(), index.column(), sb );
|
||||
return sb;
|
||||
}
|
||||
@ -208,7 +208,7 @@ setEditorData( QWidget* editor, const QModelIndex& index ) const
|
||||
void
|
||||
StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
|
||||
setModelData( QWidget* editor, QAbstractItemModel* model,
|
||||
const QModelIndex& index ) const
|
||||
const QModelIndex& index ) const
|
||||
{
|
||||
QDoubleSpinBox* sb = static_cast<QDoubleSpinBox*>(editor);
|
||||
model->setData( index, QString::number( sb->value() ), Qt::DisplayRole );
|
||||
@ -217,8 +217,8 @@ setModelData( QWidget* editor, QAbstractItemModel* model,
|
||||
void
|
||||
StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
|
||||
updateEditorGeometry( QWidget* editor,
|
||||
const QStyleOptionViewItem& option,
|
||||
const QModelIndex& /*index*/ ) const
|
||||
const QStyleOptionViewItem& option,
|
||||
const QModelIndex& /*index*/ ) const
|
||||
{
|
||||
editor->setGeometry( option.rect );
|
||||
}
|
||||
@ -530,9 +530,9 @@ StdMeshersGUI_DistrTableFrame( QWidget* parent )
|
||||
connect( myButtons[ InsertRowBtn ], SIGNAL( clicked() ), this, SLOT( onInsert() ) );
|
||||
connect( myButtons[ RemoveRowBtn ], SIGNAL( clicked() ), this, SLOT( onRemove() ) );
|
||||
connect( myTable, SIGNAL( currentCellChanged( int, int, int, int ) ),
|
||||
this, SIGNAL( currentChanged( int, int ) ) );
|
||||
this, SIGNAL( currentChanged( int, int ) ) );
|
||||
connect( myTable, SIGNAL( cellChanged( int, int ) ),
|
||||
this, SIGNAL( valueChanged( int, int ) ) );
|
||||
this, SIGNAL( valueChanged( int, int ) ) );
|
||||
}
|
||||
|
||||
StdMeshersGUI_DistrTableFrame::
|
||||
|
@ -76,8 +76,8 @@ StdMeshersGUI_FixedPointsParamWdg::LineDelegate::LineDelegate( QTreeWidget* pare
|
||||
}
|
||||
|
||||
QWidget* StdMeshersGUI_FixedPointsParamWdg::LineDelegate::createEditor( QWidget* parent,
|
||||
const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index ) const
|
||||
const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index ) const
|
||||
{
|
||||
QWidget* w = 0;
|
||||
if ( (index.column() == 1 ) ) {
|
||||
@ -91,8 +91,8 @@ QWidget* StdMeshersGUI_FixedPointsParamWdg::LineDelegate::createEditor( QWidget*
|
||||
}
|
||||
|
||||
void StdMeshersGUI_FixedPointsParamWdg::LineDelegate::setModelData( QWidget* editor,
|
||||
QAbstractItemModel* model,
|
||||
const QModelIndex& index ) const
|
||||
QAbstractItemModel* model,
|
||||
const QModelIndex& index ) const
|
||||
{
|
||||
model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::EditRole );
|
||||
model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::UserRole );
|
||||
@ -205,7 +205,7 @@ void StdMeshersGUI_FixedPointsParamWdg::onAdd()
|
||||
{
|
||||
addPoint( mySpinBox->value() );
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : onRemove()
|
||||
// purpose : Called when Remove Button Clicked
|
||||
@ -264,7 +264,7 @@ void StdMeshersGUI_FixedPointsParamWdg::addPoint( double v)
|
||||
double lv = point( i );
|
||||
if ( EQUAL_DBL(lv, v) ) { toInsert = false; break; }
|
||||
else if ( GT_DBL(lv, v) ) {
|
||||
idx = i; break;
|
||||
idx = i; break;
|
||||
}
|
||||
}
|
||||
if ( toInsert ) {
|
||||
@ -292,7 +292,7 @@ void StdMeshersGUI_FixedPointsParamWdg::removePoints()
|
||||
delete myTreeWidget->topLevelItem( idx );
|
||||
delete item;
|
||||
myTreeWidget->topLevelItem( idx )->setText( 0, treeItemText( idx == 0 ? 0 : point( idx-1 ),
|
||||
idx > myListWidget->count()-1 ? 1 : point( idx ) ) );
|
||||
idx > myListWidget->count()-1 ? 1 : point( idx ) ) );
|
||||
}
|
||||
onCheckBoxChanged();
|
||||
updateState();
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
StdMeshersGUI_LayerDistributionParamWdg
|
||||
::StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr hyp,
|
||||
const QString& theName,
|
||||
const QString& theName,
|
||||
QDialog* dlg):
|
||||
QWidget(), myName(theName), myDlg( dlg )
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ class STDMESHERSGUI_EXPORT StdMeshersGUI_LayerDistributionParamWdg : public QWid
|
||||
|
||||
public:
|
||||
StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr,
|
||||
const QString&,
|
||||
const QString&,
|
||||
QDialog*);
|
||||
~StdMeshersGUI_LayerDistributionParamWdg();
|
||||
|
||||
|
@ -214,39 +214,39 @@ void StdMeshersGUI_SubShapeSelectorWdg::SelectionIntoArgument()
|
||||
QString aMainFatherEntry = "";
|
||||
TopoDS_Shape shape;
|
||||
if ( !CORBA::is_nil( aGeomFatherObj ) ) {
|
||||
// Get Main Shape
|
||||
GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry );
|
||||
if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) { // Main Shape is a Group
|
||||
GEOM::GEOM_Object_ptr aMainFatherObj = aGeomMain->GetMainShape();
|
||||
if ( !CORBA::is_nil( aMainFatherObj ) )
|
||||
aMainFatherEntry = aMainFatherObj->GetStudyEntry();
|
||||
}
|
||||
aFatherEntry = aGeomFatherObj->GetStudyEntry();
|
||||
// Get Main Shape
|
||||
GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry );
|
||||
if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) { // Main Shape is a Group
|
||||
GEOM::GEOM_Object_ptr aMainFatherObj = aGeomMain->GetMainShape();
|
||||
if ( !CORBA::is_nil( aMainFatherObj ) )
|
||||
aMainFatherEntry = aMainFatherObj->GetStudyEntry();
|
||||
}
|
||||
aFatherEntry = aGeomFatherObj->GetStudyEntry();
|
||||
}
|
||||
|
||||
if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) ) {
|
||||
if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object
|
||||
GEOMBase::GetShape(aGeomObj, shape);
|
||||
if ( !shape.IsNull() ) {
|
||||
TopExp_Explorer exp( shape, mySubShType );
|
||||
for ( ; exp.More(); exp.Next() ) {
|
||||
int index = myPreviewActor->GetIndexByShape( exp.Current() );
|
||||
if ( index ) {
|
||||
mySelectedIDs.append( index );
|
||||
myPreviewActor->HighlightID( index );
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ( aGeomObj->GetType() == 28 /*GEOM_SUBSHAPE*/ ) {
|
||||
GEOMBase::GetShape(aGeomObj, shape);
|
||||
if ( !shape.IsNull() && shape.ShapeType() == mySubShType ) {
|
||||
int index = myPreviewActor->GetIndexByShape( shape );
|
||||
if ( index ) {
|
||||
mySelectedIDs.append( index );
|
||||
myPreviewActor->HighlightID( index );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object
|
||||
GEOMBase::GetShape(aGeomObj, shape);
|
||||
if ( !shape.IsNull() ) {
|
||||
TopExp_Explorer exp( shape, mySubShType );
|
||||
for ( ; exp.More(); exp.Next() ) {
|
||||
int index = myPreviewActor->GetIndexByShape( exp.Current() );
|
||||
if ( index ) {
|
||||
mySelectedIDs.append( index );
|
||||
myPreviewActor->HighlightID( index );
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ( aGeomObj->GetType() == 28 /*GEOM_SUBSHAPE*/ ) {
|
||||
GEOMBase::GetShape(aGeomObj, shape);
|
||||
if ( !shape.IsNull() && shape.ShapeType() == mySubShType ) {
|
||||
int index = myPreviewActor->GetIndexByShape( shape );
|
||||
if ( index ) {
|
||||
mySelectedIDs.append( index );
|
||||
myPreviewActor->HighlightID( index );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // Selected Actor from Actor Collection
|
||||
QString anEntry = IO->getEntry();
|
||||
@ -255,7 +255,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::SelectionIntoArgument()
|
||||
anEntry.remove(0, index+1);
|
||||
int ind = anEntry.toInt();
|
||||
if ( ind )
|
||||
mySelectedIDs.append( ind );
|
||||
mySelectedIDs.append( ind );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -284,7 +284,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::onAdd()
|
||||
myListWidget->blockSignals( false );
|
||||
myAddButton->setEnabled( myListOfIDs.size() < myMaxSize );
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : onRemove()
|
||||
// purpose : Called when Remove Button Clicked
|
||||
@ -421,7 +421,7 @@ SMESH::long_array_var StdMeshersGUI_SubShapeSelectorWdg::GetListOfIDs()
|
||||
anArray->length( size );
|
||||
if ( size ) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
anArray[i] = myListOfIDs.at(i);
|
||||
anArray[i] = myListOfIDs.at(i);
|
||||
}
|
||||
}
|
||||
return anArray;
|
||||
|
@ -46,15 +46,15 @@ using namespace std;
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA )
|
||||
{
|
||||
MESSAGE( "StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i" );
|
||||
myBaseImpl = new ::StdMeshers_Arithmetic1D( theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -79,7 +79,7 @@ StdMeshers_Arithmetic1D_i::~StdMeshers_Arithmetic1D_i()
|
||||
//=============================================================================
|
||||
|
||||
void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
|
||||
CORBA::Boolean theIsStart )
|
||||
CORBA::Boolean theIsStart )
|
||||
throw ( SALOME::SALOME_Exception )
|
||||
{
|
||||
MESSAGE( "StdMeshers_StartEndLength_i::SetLength" );
|
||||
@ -89,7 +89,7 @@ void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
|
||||
SALOME::BAD_PARAM );
|
||||
SALOME::BAD_PARAM );
|
||||
}
|
||||
|
||||
// Update Python script
|
||||
@ -157,7 +157,7 @@ void StdMeshers_Arithmetic1D_i::SetReversedEdges( const SMESH::long_array& theId
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
|
||||
SALOME::BAD_PARAM );
|
||||
SALOME::BAD_PARAM );
|
||||
}
|
||||
|
||||
// Update Python script
|
||||
|
@ -87,7 +87,7 @@ void StdMeshers_AutomaticLength_i::SetFineness( CORBA::Double theFineness )
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
|
||||
SALOME::BAD_PARAM );
|
||||
SALOME::BAD_PARAM );
|
||||
}
|
||||
// Update Python script
|
||||
SMESH::TPythonDump() << _this() << ".SetFineness( " << theFineness << " )";
|
||||
|
@ -47,15 +47,15 @@ using namespace std;
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA )
|
||||
{
|
||||
MESSAGE( "StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i" );
|
||||
myBaseImpl = new ::StdMeshers_Deflection1D( theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -89,7 +89,7 @@ void StdMeshers_Deflection1D_i::SetDeflection( CORBA::Double theValue )
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
|
||||
SALOME::BAD_PARAM );
|
||||
SALOME::BAD_PARAM );
|
||||
}
|
||||
|
||||
// Update Python script
|
||||
|
@ -43,8 +43,8 @@ using namespace std;
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA ),
|
||||
SMESH_Algo_i( thePOA ),
|
||||
@ -52,8 +52,8 @@ StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
|
||||
{
|
||||
MESSAGE( "StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i" );
|
||||
myBaseImpl = new ::StdMeshers_Hexa_3D( theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
// Constructor
|
||||
StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl );
|
||||
::SMESH_Gen* theGenImpl );
|
||||
|
||||
// Destructor
|
||||
virtual ~StdMeshers_Hexa_3D_i();
|
||||
|
@ -43,15 +43,15 @@ using namespace std;
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA )
|
||||
{
|
||||
MESSAGE( "StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i" );
|
||||
myBaseImpl = new ::StdMeshers_LengthFromEdges( theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -85,7 +85,7 @@ void StdMeshers_LengthFromEdges_i::SetMode( CORBA::Long theMode )
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
|
||||
SALOME::BAD_PARAM );
|
||||
SALOME::BAD_PARAM );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
|
||||
SALOME::BAD_PARAM );
|
||||
SALOME::BAD_PARAM );
|
||||
}
|
||||
|
||||
// Update Python script
|
||||
@ -112,7 +112,7 @@ void StdMeshers_LocalLength_i::SetPrecision( CORBA::Double thePrecision )
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
|
||||
SALOME::BAD_PARAM );
|
||||
SALOME::BAD_PARAM );
|
||||
}
|
||||
|
||||
// Update Python script
|
||||
|
@ -43,8 +43,8 @@ using namespace std;
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA ),
|
||||
SMESH_Algo_i( thePOA ),
|
||||
@ -52,8 +52,8 @@ StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA
|
||||
{
|
||||
MESSAGE( "StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i" );
|
||||
myBaseImpl = new ::StdMeshers_MEFISTO_2D( theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
// Constructor
|
||||
StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl );
|
||||
::SMESH_Gen* theGenImpl );
|
||||
|
||||
// Destructor
|
||||
virtual ~StdMeshers_MEFISTO_2D_i();
|
||||
|
@ -47,15 +47,15 @@ using namespace std;
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA )
|
||||
{
|
||||
MESSAGE( "StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i" );
|
||||
myBaseImpl = new ::StdMeshers_MaxElementArea( theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -89,7 +89,7 @@ void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea )
|
||||
}
|
||||
catch (SALOME_Exception& S_ex) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
|
||||
SALOME::BAD_PARAM );
|
||||
SALOME::BAD_PARAM );
|
||||
}
|
||||
|
||||
// Update Python script
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
// Constructor
|
||||
StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl );
|
||||
::SMESH_Gen* theGenImpl );
|
||||
// Destructor
|
||||
virtual ~StdMeshers_MaxElementArea_i();
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user