This commit is contained in:
eap 2009-12-10 14:52:59 +00:00
parent f2c45dcff7
commit 5e7f07d3da
112 changed files with 1936 additions and 1934 deletions

View File

@ -102,58 +102,58 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
ValDegre = 3; ValDegre = 3;
nbNoeuds = 2; nbNoeuds = 2;
ok = myMesh->AddEdgeWithID(NoeudsMaille[0], NoeudsMaille[1], ok = myMesh->AddEdgeWithID(NoeudsMaille[0], NoeudsMaille[1],
intNumMaille); intNumMaille);
break; break;
case 204: case 204:
case 208: case 208:
ValDegre = 9; ValDegre = 9;
nbNoeuds = 4; nbNoeuds = 4;
ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1], ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
NoeudsMaille[2], NoeudsMaille[3], NoeudsMaille[2], NoeudsMaille[3],
intNumMaille); intNumMaille);
break; break;
case 203: case 203:
case 206: case 206:
ValDegre = 5; ValDegre = 5;
nbNoeuds = 3; nbNoeuds = 3;
ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1], ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
NoeudsMaille[2], intNumMaille); NoeudsMaille[2], intNumMaille);
break; break;
case 308: case 308:
case 320: case 320:
ValDegre = 12; ValDegre = 12;
nbNoeuds = 8; nbNoeuds = 8;
if (ValElement == 320){ if (ValElement == 320){
//A voir, correspondance VTK //A voir, correspondance VTK
NoeudsMaille[4] = NoeudsMaille[8]; NoeudsMaille[4] = NoeudsMaille[8];
NoeudsMaille[5] = NoeudsMaille[9]; NoeudsMaille[5] = NoeudsMaille[9];
NoeudsMaille[6] = NoeudsMaille[10]; NoeudsMaille[6] = NoeudsMaille[10];
NoeudsMaille[7] = NoeudsMaille[11]; NoeudsMaille[7] = NoeudsMaille[11];
} }
ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1], ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
NoeudsMaille[2], NoeudsMaille[3], NoeudsMaille[2], NoeudsMaille[3],
NoeudsMaille[4], NoeudsMaille[5], NoeudsMaille[4], NoeudsMaille[5],
NoeudsMaille[6], NoeudsMaille[7], NoeudsMaille[6], NoeudsMaille[7],
intNumMaille); intNumMaille);
break; break;
case 304: case 304:
case 310: case 310:
ValDegre = 10; ValDegre = 10;
nbNoeuds = 4; nbNoeuds = 4;
if (ValElement == 310) if (ValElement == 310)
NoeudsMaille[3] = NoeudsMaille[6]; NoeudsMaille[3] = NoeudsMaille[6];
ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1], ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
NoeudsMaille[2], NoeudsMaille[3], NoeudsMaille[2], NoeudsMaille[3],
intNumMaille); intNumMaille);
break; break;
case 306: case 306:
case 315: case 315:
ValDegre = 12; ValDegre = 12;
nbNoeuds = 8; nbNoeuds = 8;
if (ValElement == 315) { if (ValElement == 315) {
NoeudsMaille[3] = NoeudsMaille[6]; NoeudsMaille[3] = NoeudsMaille[6];
NoeudsMaille[4] = NoeudsMaille[7]; NoeudsMaille[4] = NoeudsMaille[7];
NoeudsMaille[5] = NoeudsMaille[8]; NoeudsMaille[5] = NoeudsMaille[8];
} }
NoeudsMaille[7] = NoeudsMaille[5]; NoeudsMaille[7] = NoeudsMaille[5];
NoeudsMaille[6] = NoeudsMaille[5]; NoeudsMaille[6] = NoeudsMaille[5];
@ -161,10 +161,10 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
NoeudsMaille[4] = NoeudsMaille[3]; NoeudsMaille[4] = NoeudsMaille[3];
NoeudsMaille[3] = NoeudsMaille[2]; NoeudsMaille[3] = NoeudsMaille[2];
ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1], ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
NoeudsMaille[2], NoeudsMaille[3], NoeudsMaille[2], NoeudsMaille[3],
NoeudsMaille[4], NoeudsMaille[5], NoeudsMaille[4], NoeudsMaille[5],
intNumMaille); intNumMaille);
break; break;
} }
} }
/**************************************************************************** /****************************************************************************

View File

@ -71,7 +71,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::Perform()
// static methods // static methods
static void writeInteger( const Standard_Integer& theVal, static void writeInteger( const Standard_Integer& theVal,
OSD_File& ofile ) OSD_File& ofile )
{ {
union { union {
Standard_Integer i; Standard_Integer i;
@ -90,7 +90,7 @@ static void writeInteger( const Standard_Integer& theVal,
} }
static void writeFloat ( const Standard_ShortReal& theVal, static void writeFloat ( const Standard_ShortReal& theVal,
OSD_File& ofile) OSD_File& ofile)
{ {
union { union {
Standard_ShortReal f; Standard_ShortReal f;
@ -179,7 +179,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
SMDS_ElemIteratorPtr aNodeIter = aFace->nodesIterator(); SMDS_ElemIteratorPtr aNodeIter = aFace->nodesIterator();
for (; aNodeIter->more(); ) { for (; aNodeIter->more(); ) {
SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next(); SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
buf += " vertex "; buf += " vertex ";
sprintf (sval,"% 12e",node->X()); sprintf (sval,"% 12e",node->X());
buf += sval; buf += sval;
@ -249,10 +249,10 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
SMDS_ElemIteratorPtr aNodeIter = aFace->nodesIterator(); SMDS_ElemIteratorPtr aNodeIter = aFace->nodesIterator();
for (; aNodeIter->more(); ) { for (; aNodeIter->more(); ) {
SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next(); SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
writeFloat(node->X(),aFile); writeFloat(node->X(),aFile);
writeFloat(node->Y(),aFile); writeFloat(node->Y(),aFile);
writeFloat(node->Z(),aFile); writeFloat(node->Z(),aFile);
} }
aFile.Write (&dum,2); aFile.Write (&dum,2);
} }

View File

@ -62,9 +62,9 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
if(MYDEBUG) MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size()); if(MYDEBUG) MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size());
TDataSet::const_iterator anIter = aDataSet2411.begin(); TDataSet::const_iterator anIter = aDataSet2411.begin();
for(; anIter != aDataSet2411.end(); anIter++){ for(; anIter != aDataSet2411.end(); anIter++){
const TNodeLab& aLabel = anIter->first; const TNodeLab& aLabel = anIter->first;
const TRecord& aRec = anIter->second; const TRecord& aRec = anIter->second;
myMesh->AddNodeWithID(aRec.coord[0],aRec.coord[1],aRec.coord[2],aLabel); 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(); TDataSet::const_iterator anIter = aDataSet2412.begin();
if(MYDEBUG) MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size()); if(MYDEBUG) MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
for(; anIter != aDataSet2412.end(); anIter++){ for(; anIter != aDataSet2412.end(); anIter++){
SMDS_MeshElement* anElement = NULL; SMDS_MeshElement* anElement = NULL;
const TElementLab& aLabel = anIter->first; const TElementLab& aLabel = anIter->first;
const TRecord& aRec = anIter->second; const TRecord& aRec = anIter->second;
if(IsBeam(aRec.fe_descriptor_id)) { if(IsBeam(aRec.fe_descriptor_id)) {
switch ( aRec.node_labels.size() ) { switch ( aRec.node_labels.size() ) {
case 2: // edge with two nodes case 2: // edge with two nodes
anElement = myMesh->AddEdgeWithID(aRec.node_labels[0], anElement = myMesh->AddEdgeWithID(aRec.node_labels[0],
@ -91,178 +91,178 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
aRec.node_labels[1], aRec.node_labels[1],
aLabel); aLabel);
} }
} }
else if(IsFace(aRec.fe_descriptor_id)) { else if(IsFace(aRec.fe_descriptor_id)) {
switch(aRec.fe_descriptor_id){ switch(aRec.fe_descriptor_id){
case 71: // TRI3 case 71: // TRI3
case 72: case 72:
case 74: case 74:
case 41: // Plane Stress Linear Triangle - TRI3 case 41: // Plane Stress Linear Triangle - TRI3
case 91: // Thin Shell Linear Triangle - TRI3 case 91: // Thin Shell Linear Triangle - TRI3
anElement = myMesh->AddFaceWithID(aRec.node_labels[0], anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[2], aRec.node_labels[2],
aLabel); aLabel);
break; break;
case 42: // Plane Stress Quadratic Triangle - TRI6 case 42: // Plane Stress Quadratic Triangle - TRI6
case 92: // Thin Shell Quadratic Triangle - TRI6 case 92: // Thin Shell Quadratic Triangle - TRI6
anElement = myMesh->AddFaceWithID(aRec.node_labels[0], anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[4], aRec.node_labels[4],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[3], aRec.node_labels[3],
aRec.node_labels[5], aRec.node_labels[5],
aLabel); aLabel);
break; break;
case 44: // Plane Stress Linear Quadrilateral - QUAD4 case 44: // Plane Stress Linear Quadrilateral - QUAD4
case 94: // Thin Shell Linear Quadrilateral - QUAD4 case 94: // Thin Shell Linear Quadrilateral - QUAD4
anElement = myMesh->AddFaceWithID(aRec.node_labels[0], anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[3], aRec.node_labels[3],
aLabel); aLabel);
break; break;
case 45: // Plane Stress Quadratic Quadrilateral - QUAD8 case 45: // Plane Stress Quadratic Quadrilateral - QUAD8
case 95: // Thin Shell Quadratic Quadrilateral - QUAD8 case 95: // Thin Shell Quadratic Quadrilateral - QUAD8
anElement = myMesh->AddFaceWithID(aRec.node_labels[0], anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[4], aRec.node_labels[4],
aRec.node_labels[6], aRec.node_labels[6],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[3], aRec.node_labels[3],
aRec.node_labels[5], aRec.node_labels[5],
aRec.node_labels[7], aRec.node_labels[7],
aLabel); aLabel);
break; break;
} }
} }
else if(IsVolume(aRec.fe_descriptor_id)){ else if(IsVolume(aRec.fe_descriptor_id)){
switch(aRec.fe_descriptor_id){ switch(aRec.fe_descriptor_id){
case 111: // Solid Linear Tetrahedron - TET4 case 111: // Solid Linear Tetrahedron - TET4
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0], anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[3], aRec.node_labels[3],
aLabel); aLabel);
break; break;
case 118: // Solid Quadratic Tetrahedron - TET10 case 118: // Solid Quadratic Tetrahedron - TET10
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0], anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
aRec.node_labels[4], aRec.node_labels[4],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[9], aRec.node_labels[9],
aRec.node_labels[5], aRec.node_labels[5],
aRec.node_labels[3], aRec.node_labels[3],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[6], aRec.node_labels[6],
aRec.node_labels[8], aRec.node_labels[8],
aRec.node_labels[7], aRec.node_labels[7],
aLabel); aLabel);
break; break;
case 112: // Solid Linear Prism - PRISM6 case 112: // Solid Linear Prism - PRISM6
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0], anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[3], aRec.node_labels[3],
aRec.node_labels[5], aRec.node_labels[5],
aRec.node_labels[4], aRec.node_labels[4],
aLabel); aLabel);
break; break;
case 113: // Solid Quadratic Prism - PRISM15 case 113: // Solid Quadratic Prism - PRISM15
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0], anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
aRec.node_labels[4], aRec.node_labels[4],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[9], aRec.node_labels[9],
aRec.node_labels[13], aRec.node_labels[13],
aRec.node_labels[11], aRec.node_labels[11],
aRec.node_labels[5], aRec.node_labels[5],
aRec.node_labels[3], aRec.node_labels[3],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[14], aRec.node_labels[14],
aRec.node_labels[12], aRec.node_labels[12],
aRec.node_labels[10], aRec.node_labels[10],
aRec.node_labels[6], aRec.node_labels[6],
aRec.node_labels[8], aRec.node_labels[8],
aRec.node_labels[7], aRec.node_labels[7],
aLabel); aLabel);
break; break;
case 115: // Solid Linear Brick - HEX8 case 115: // Solid Linear Brick - HEX8
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0], anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
aRec.node_labels[3], aRec.node_labels[3],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[4], aRec.node_labels[4],
aRec.node_labels[7], aRec.node_labels[7],
aRec.node_labels[6], aRec.node_labels[6],
aRec.node_labels[5], aRec.node_labels[5],
aLabel); aLabel);
break; break;
case 116: // Solid Quadratic Brick - HEX20 case 116: // Solid Quadratic Brick - HEX20
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0], anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
aRec.node_labels[6], aRec.node_labels[6],
aRec.node_labels[4], aRec.node_labels[4],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[12], aRec.node_labels[12],
aRec.node_labels[18], aRec.node_labels[18],
aRec.node_labels[16], aRec.node_labels[16],
aRec.node_labels[14], aRec.node_labels[14],
aRec.node_labels[7], aRec.node_labels[7],
aRec.node_labels[5], aRec.node_labels[5],
aRec.node_labels[3], aRec.node_labels[3],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[19], aRec.node_labels[19],
aRec.node_labels[17], aRec.node_labels[17],
aRec.node_labels[15], aRec.node_labels[15],
aRec.node_labels[13], aRec.node_labels[13],
aRec.node_labels[8], aRec.node_labels[8],
aRec.node_labels[11], aRec.node_labels[11],
aRec.node_labels[10], aRec.node_labels[10],
aRec.node_labels[9], aRec.node_labels[9],
aLabel); aLabel);
break; break;
case 114: // pyramid of 13 nodes (quadratic) - PIRA13 case 114: // pyramid of 13 nodes (quadratic) - PIRA13
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0], anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
aRec.node_labels[6], aRec.node_labels[6],
aRec.node_labels[4], aRec.node_labels[4],
aRec.node_labels[2], aRec.node_labels[2],
aRec.node_labels[7], aRec.node_labels[7],
aRec.node_labels[5], aRec.node_labels[5],
aRec.node_labels[3], aRec.node_labels[3],
aRec.node_labels[1], aRec.node_labels[1],
aRec.node_labels[8], aRec.node_labels[8],
aRec.node_labels[11], aRec.node_labels[11],
aRec.node_labels[10], aRec.node_labels[10],
aRec.node_labels[9], aRec.node_labels[9],
aRec.node_labels[12], aRec.node_labels[12],
aLabel); aLabel);
break; break;
} }
} }
// if(!anElement) // if(!anElement)
// MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<<aLabel<<" and type = "<<aRec.fe_descriptor_id); // 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); UNV2417::Read(in_stream,aDataSet2417);
if(MYDEBUG) MESSAGE("Perform - aDataSet2417.size() = "<<aDataSet2417.size()); if(MYDEBUG) MESSAGE("Perform - aDataSet2417.size() = "<<aDataSet2417.size());
if (aDataSet2417.size() > 0) { if (aDataSet2417.size() > 0) {
myGroup = new SMDS_MeshGroup(myMesh); myGroup = new SMDS_MeshGroup(myMesh);
TDataSet::const_iterator anIter = aDataSet2417.begin(); TDataSet::const_iterator anIter = aDataSet2417.begin();
for(; anIter != aDataSet2417.end(); anIter++){ for(; anIter != aDataSet2417.end(); anIter++){
const TGroupId& aLabel = anIter->first; const TGroupId& aLabel = anIter->first;
const TRecord& aRec = anIter->second; const TRecord& aRec = anIter->second;
int aNodesNb = aRec.NodeList.size(); int aNodesNb = aRec.NodeList.size();
int aElementsNb = aRec.ElementList.size(); int aElementsNb = aRec.ElementList.size();
bool useSuffix = ((aNodesNb > 0) && (aElementsNb > 0)); bool useSuffix = ((aNodesNb > 0) && (aElementsNb > 0));
int i; int i;
if (aNodesNb > 0) { if (aNodesNb > 0) {
SMDS_MeshGroup* aNodesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Node); SMDS_MeshGroup* aNodesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Node);
std::string aGrName = (useSuffix) ? aRec.GroupName + "_Nodes" : aRec.GroupName; std::string aGrName = (useSuffix) ? aRec.GroupName + "_Nodes" : aRec.GroupName;
int i = aGrName.find( "\r" ); int i = aGrName.find( "\r" );
if (i > 0) if (i > 0)
aGrName.erase (i, 2); aGrName.erase (i, 2);
myGroupNames.insert(TGroupNamesMap::value_type(aNodesGroup, aGrName)); myGroupNames.insert(TGroupNamesMap::value_type(aNodesGroup, aGrName));
myGroupId.insert(TGroupIdMap::value_type(aNodesGroup, aLabel)); myGroupId.insert(TGroupIdMap::value_type(aNodesGroup, aLabel));
for (i = 0; i < aNodesNb; i++) { for (i = 0; i < aNodesNb; i++) {
const SMDS_MeshNode* aNode = myMesh->FindNode(aRec.NodeList[i]); const SMDS_MeshNode* aNode = myMesh->FindNode(aRec.NodeList[i]);
if (aNode) if (aNode)
aNodesGroup->Add(aNode); aNodesGroup->Add(aNode);
} }
} }
if (aElementsNb > 0){ if (aElementsNb > 0){
SMDS_MeshGroup* aEdgesGroup = 0; SMDS_MeshGroup* aEdgesGroup = 0;
SMDS_MeshGroup* aFacesGroup = 0; SMDS_MeshGroup* aFacesGroup = 0;
SMDS_MeshGroup* aVolumeGroup = 0; SMDS_MeshGroup* aVolumeGroup = 0;
bool createdGroup = false; bool createdGroup = false;
for (i = 0; i < aElementsNb; i++) { for (i = 0; i < aElementsNb; i++) {
const SMDS_MeshElement* aElement = myMesh->FindElement(aRec.ElementList[i]); const SMDS_MeshElement* aElement = myMesh->FindElement(aRec.ElementList[i]);
if (aElement) { if (aElement) {
switch (aElement->GetType()) { switch (aElement->GetType()) {
case SMDSAbs_Edge: case SMDSAbs_Edge:
if (!aEdgesGroup) { if (!aEdgesGroup) {
aEdgesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Edge); aEdgesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Edge);
if (!useSuffix && createdGroup) useSuffix = true; if (!useSuffix && createdGroup) useSuffix = true;
std::string aEdgesGrName = (useSuffix) ? aRec.GroupName + "_Edges" : aRec.GroupName; std::string aEdgesGrName = (useSuffix) ? aRec.GroupName + "_Edges" : aRec.GroupName;
int i = aEdgesGrName.find( "\r" ); int i = aEdgesGrName.find( "\r" );
if (i > 0) if (i > 0)
aEdgesGrName.erase (i, 2); aEdgesGrName.erase (i, 2);
myGroupNames.insert(TGroupNamesMap::value_type(aEdgesGroup, aEdgesGrName)); myGroupNames.insert(TGroupNamesMap::value_type(aEdgesGroup, aEdgesGrName));
myGroupId.insert(TGroupIdMap::value_type(aEdgesGroup, aLabel)); myGroupId.insert(TGroupIdMap::value_type(aEdgesGroup, aLabel));
createdGroup = true; createdGroup = true;
} }
aEdgesGroup->Add(aElement); aEdgesGroup->Add(aElement);
break; break;
case SMDSAbs_Face: case SMDSAbs_Face:
if (!aFacesGroup) { if (!aFacesGroup) {
aFacesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Face); aFacesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Face);
if (!useSuffix && createdGroup) useSuffix = true; if (!useSuffix && createdGroup) useSuffix = true;
std::string aFacesGrName = (useSuffix) ? aRec.GroupName + "_Faces" : aRec.GroupName; std::string aFacesGrName = (useSuffix) ? aRec.GroupName + "_Faces" : aRec.GroupName;
int i = aFacesGrName.find( "\r" ); int i = aFacesGrName.find( "\r" );
if (i > 0) if (i > 0)
aFacesGrName.erase (i, 2); aFacesGrName.erase (i, 2);
myGroupNames.insert(TGroupNamesMap::value_type(aFacesGroup, aFacesGrName)); myGroupNames.insert(TGroupNamesMap::value_type(aFacesGroup, aFacesGrName));
myGroupId.insert(TGroupIdMap::value_type(aFacesGroup, aLabel)); myGroupId.insert(TGroupIdMap::value_type(aFacesGroup, aLabel));
createdGroup = true; createdGroup = true;
} }
aFacesGroup->Add(aElement); aFacesGroup->Add(aElement);
break; break;
case SMDSAbs_Volume: case SMDSAbs_Volume:
if (!aVolumeGroup) { if (!aVolumeGroup) {
aVolumeGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Volume); aVolumeGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Volume);
if (!useSuffix && createdGroup) useSuffix = true; if (!useSuffix && createdGroup) useSuffix = true;
std::string aVolumeGrName = (useSuffix) ? aRec.GroupName + "_Volumes" : aRec.GroupName; std::string aVolumeGrName = (useSuffix) ? aRec.GroupName + "_Volumes" : aRec.GroupName;
int i = aVolumeGrName.find( "\r" ); int i = aVolumeGrName.find( "\r" );
if (i > 0) if (i > 0)
aVolumeGrName.erase (i, 2); aVolumeGrName.erase (i, 2);
myGroupNames.insert(TGroupNamesMap::value_type(aVolumeGroup, aVolumeGrName)); myGroupNames.insert(TGroupNamesMap::value_type(aVolumeGroup, aVolumeGrName));
myGroupId.insert(TGroupIdMap::value_type(aVolumeGroup, aLabel)); myGroupId.insert(TGroupIdMap::value_type(aVolumeGroup, aLabel));
createdGroup = true; createdGroup = true;
} }
aVolumeGroup->Add(aElement); aVolumeGroup->Add(aElement);
break; break;
} }
} }
} }
} }
} }
} }
} }
} }

View File

@ -45,7 +45,7 @@ namespace{
typedef std::vector<size_t> TConnect; typedef std::vector<size_t> TConnect;
int GetConnect(const SMDS_ElemIteratorPtr& theNodesIter, int GetConnect(const SMDS_ElemIteratorPtr& theNodesIter,
TConnect& theConnect) TConnect& theConnect)
{ {
theConnect.clear(); theConnect.clear();
for(; theNodesIter->more();){ for(; theNodesIter->more();){
@ -71,13 +71,13 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
MESSAGE("Perform - myMesh->NbNodes() = "<<myMesh->NbNodes()); MESSAGE("Perform - myMesh->NbNodes() = "<<myMesh->NbNodes());
SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator(); SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();
for(; aNodesIter->more();){ for(; aNodesIter->more();){
const SMDS_MeshNode* aNode = aNodesIter->next(); const SMDS_MeshNode* aNode = aNodesIter->next();
TRecord aRec; TRecord aRec;
aRec.coord[0] = aNode->X(); aRec.coord[0] = aNode->X();
aRec.coord[1] = aNode->Y(); aRec.coord[1] = aNode->Y();
aRec.coord[2] = aNode->Z(); aRec.coord[2] = aNode->Z();
const TNodeLab& aLabel = aNode->GetID(); const TNodeLab& aLabel = aNode->GetID();
aDataSet2411.insert(TDataSet::value_type(aLabel,aRec)); aDataSet2411.insert(TDataSet::value_type(aLabel,aRec));
} }
MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size()); MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size());
UNV2411::Write(out_stream,aDataSet2411); UNV2411::Write(out_stream,aDataSet2411);
@ -90,14 +90,14 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
// Storing SMDS Edges // Storing SMDS Edges
MESSAGE("Perform - myMesh->NbEdges() = "<<myMesh->NbEdges()); MESSAGE("Perform - myMesh->NbEdges() = "<<myMesh->NbEdges());
if(myMesh->NbEdges()){ if(myMesh->NbEdges()){
SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator(); SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
for(; anIter->more();){ for(; anIter->more();){
const SMDS_MeshEdge* anElem = anIter->next(); const SMDS_MeshEdge* anElem = anIter->next();
TElementLab aLabel = anElem->GetID(); TElementLab aLabel = anElem->GetID();
int aNbNodes = anElem->NbNodes(); int aNbNodes = anElem->NbNodes();
TRecord aRec; TRecord aRec;
aRec.node_labels.reserve(aNbNodes); aRec.node_labels.reserve(aNbNodes);
SMDS_ElemIteratorPtr aNodesIter; SMDS_ElemIteratorPtr aNodesIter;
if( anElem->IsQuadratic() ) { if( anElem->IsQuadratic() ) {
aNodesIter = static_cast<const SMDS_QuadraticEdge* > aNodesIter = static_cast<const SMDS_QuadraticEdge* >
( anElem )->interlacedNodesElemIterator(); ( anElem )->interlacedNodesElemIterator();
@ -106,64 +106,64 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
aNodesIter = anElem->nodesIterator(); aNodesIter = anElem->nodesIterator();
aRec.fe_descriptor_id = 11; aRec.fe_descriptor_id = 11;
} }
for(; aNodesIter->more();){ for(; aNodesIter->more();){
const SMDS_MeshElement* aNode = aNodesIter->next(); const SMDS_MeshElement* aNode = aNodesIter->next();
aRec.node_labels.push_back(aNode->GetID()); aRec.node_labels.push_back(aNode->GetID());
} }
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec)); aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
} }
MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size()); MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
} }
MESSAGE("Perform - myMesh->NbFaces() = "<<myMesh->NbFaces()); MESSAGE("Perform - myMesh->NbFaces() = "<<myMesh->NbFaces());
if(myMesh->NbFaces()){ if(myMesh->NbFaces()){
SMDS_FaceIteratorPtr anIter = myMesh->facesIterator(); SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
for(; anIter->more();){ for(; anIter->more();){
const SMDS_MeshFace* anElem = anIter->next(); const SMDS_MeshFace* anElem = anIter->next();
TElementLab aLabel = anElem->GetID(); TElementLab aLabel = anElem->GetID();
int aNbNodes = anElem->NbNodes(); int aNbNodes = anElem->NbNodes();
TRecord aRec; TRecord aRec;
aRec.node_labels.reserve(aNbNodes); aRec.node_labels.reserve(aNbNodes);
SMDS_ElemIteratorPtr aNodesIter; SMDS_ElemIteratorPtr aNodesIter;
if( anElem->IsQuadratic() ) if( anElem->IsQuadratic() )
aNodesIter = static_cast<const SMDS_QuadraticFaceOfNodes* > aNodesIter = static_cast<const SMDS_QuadraticFaceOfNodes* >
( anElem )->interlacedNodesElemIterator(); ( anElem )->interlacedNodesElemIterator();
else else
aNodesIter = anElem->nodesIterator(); aNodesIter = anElem->nodesIterator();
for(; aNodesIter->more();){ for(; aNodesIter->more();){
const SMDS_MeshElement* aNode = aNodesIter->next(); const SMDS_MeshElement* aNode = aNodesIter->next();
aRec.node_labels.push_back(aNode->GetID()); aRec.node_labels.push_back(aNode->GetID());
} }
switch(aNbNodes){ switch(aNbNodes){
case 3: case 3:
aRec.fe_descriptor_id = 41; aRec.fe_descriptor_id = 41;
break; break;
case 4: case 4:
aRec.fe_descriptor_id = 44; aRec.fe_descriptor_id = 44;
break; break;
case 6: case 6:
aRec.fe_descriptor_id = 42; aRec.fe_descriptor_id = 42;
break; break;
case 8: case 8:
aRec.fe_descriptor_id = 45; aRec.fe_descriptor_id = 45;
break; break;
default: default:
continue; continue;
} }
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec)); aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
} }
MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size()); MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
} }
MESSAGE("Perform - myMesh->NbVolumes() = "<<myMesh->NbVolumes()); MESSAGE("Perform - myMesh->NbVolumes() = "<<myMesh->NbVolumes());
if(myMesh->NbVolumes()){ if(myMesh->NbVolumes()){
SMDS_VolumeIteratorPtr anIter = myMesh->volumesIterator(); SMDS_VolumeIteratorPtr anIter = myMesh->volumesIterator();
for(; anIter->more();){ for(; anIter->more();){
const SMDS_MeshVolume* anElem = anIter->next(); const SMDS_MeshVolume* anElem = anIter->next();
TElementLab aLabel = anElem->GetID(); TElementLab aLabel = anElem->GetID();
int aNbNodes = anElem->NbNodes(); int aNbNodes = anElem->NbNodes();
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator(); SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
if ( anElem->IsPoly() ) { if ( anElem->IsPoly() ) {
if ( const SMDS_PolyhedralVolumeOfNodes* ph = if ( const SMDS_PolyhedralVolumeOfNodes* ph =
dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*> (anElem)) dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*> (anElem))
@ -172,138 +172,138 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
aNodesIter = ph->uniqueNodesIterator(); aNodesIter = ph->uniqueNodesIterator();
} }
} }
aConnect.resize(aNbNodes); aConnect.resize(aNbNodes);
GetConnect(aNodesIter,aConnect); GetConnect(aNodesIter,aConnect);
int anId = -1; int anId = -1;
int* aConn = NULL; int* aConn = NULL;
switch(aNbNodes){ switch(aNbNodes){
case 4: { case 4: {
static int anIds[] = {0,2,1,3}; static int anIds[] = {0,2,1,3};
aConn = anIds; aConn = anIds;
anId = 111; anId = 111;
break; break;
} }
case 6: { case 6: {
static int anIds[] = {0,2,1,3,5,4}; static int anIds[] = {0,2,1,3,5,4};
aConn = anIds; aConn = anIds;
anId = 112; anId = 112;
break; break;
} }
case 8: { case 8: {
static int anIds[] = {0,3,2,1,4,7,6,5}; static int anIds[] = {0,3,2,1,4,7,6,5};
aConn = anIds; aConn = anIds;
anId = 115; anId = 115;
break; break;
} }
case 10: { case 10: {
static int anIds[] = {0,4,2,9,5,3, 1,6,8, 7}; static int anIds[] = {0,4,2,9,5,3, 1,6,8, 7};
aConn = anIds; aConn = anIds;
anId = 118; anId = 118;
break; break;
} }
case 13: { case 13: {
static int anIds[] = {0,6,4,2,7,5,3,1,8,11,10,9,12}; static int anIds[] = {0,6,4,2,7,5,3,1,8,11,10,9,12};
aConn = anIds; aConn = anIds;
anId = 114; anId = 114;
break; break;
} }
case 15: { case 15: {
static int anIds[] = {0,4,2,9,13,11,5,3,1,14,12,10,6,8,7}; static int anIds[] = {0,4,2,9,13,11,5,3,1,14,12,10,6,8,7};
aConn = anIds; aConn = anIds;
anId = 113; anId = 113;
break; break;
} }
case 20: { 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}; 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; aConn = anIds;
anId = 116; anId = 116;
break; break;
} }
default: default:
continue; continue;
} }
if(aConn){ if(aConn){
TRecord aRec; TRecord aRec;
aRec.fe_descriptor_id = anId; aRec.fe_descriptor_id = anId;
aRec.node_labels.resize(aNbNodes); aRec.node_labels.resize(aNbNodes);
for(int aNodeId = 0; aNodeId < aNbNodes; aNodeId++){ for(int aNodeId = 0; aNodeId < aNbNodes; aNodeId++){
aRec.node_labels[aConn[aNodeId]] = aConnect[aNodeId]; aRec.node_labels[aConn[aNodeId]] = aConnect[aNodeId];
} }
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec)); aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
} }
} }
MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size()); MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
} }
UNV2412::Write(out_stream,aDataSet2412); UNV2412::Write(out_stream,aDataSet2412);
} }
{ {
using namespace UNV2417; using namespace UNV2417;
if (myGroups.size() > 0) { if (myGroups.size() > 0) {
TDataSet aDataSet2417; TDataSet aDataSet2417;
TGroupList::const_iterator aIter = myGroups.begin(); TGroupList::const_iterator aIter = myGroups.begin();
for (; aIter != myGroups.end(); aIter++) { for (; aIter != myGroups.end(); aIter++) {
SMESHDS_GroupBase* aGroupDS = *aIter; SMESHDS_GroupBase* aGroupDS = *aIter;
TRecord aRec; TRecord aRec;
aRec.GroupName = aGroupDS->GetStoreName(); aRec.GroupName = aGroupDS->GetStoreName();
int i; int i;
SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements(); SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
if (aGroupDS->GetType() == SMDSAbs_Node) { if (aGroupDS->GetType() == SMDSAbs_Node) {
aRec.NodeList.resize(aGroupDS->Extent()); aRec.NodeList.resize(aGroupDS->Extent());
i = 0; i = 0;
while (aIter->more()) { while (aIter->more()) {
const SMDS_MeshElement* aElem = aIter->next(); const SMDS_MeshElement* aElem = aIter->next();
aRec.NodeList[i] = aElem->GetID(); aRec.NodeList[i] = aElem->GetID();
i++; i++;
} }
} else { } else {
aRec.ElementList.resize(aGroupDS->Extent()); aRec.ElementList.resize(aGroupDS->Extent());
i = 0; i = 0;
while (aIter->more()) { while (aIter->more()) {
const SMDS_MeshElement* aElem = aIter->next(); const SMDS_MeshElement* aElem = aIter->next();
aRec.ElementList[i] = aElem->GetID(); aRec.ElementList[i] = aElem->GetID();
i++; i++;
} }
} }
// 0019936: EDF 794 SMESH : Export UNV : Node color and group id // 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)); aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID()+1, aRec));
} }
UNV2417::Write(out_stream,aDataSet2417); UNV2417::Write(out_stream,aDataSet2417);
myGroups.clear(); myGroups.clear();
} }
} }
/* { /* {
using namespace UNV2417; using namespace UNV2417;
TDataSet aDataSet2417; TDataSet aDataSet2417;
for ( TGroupsMap::iterator it = myGroupsMap.begin(); it != myGroupsMap.end(); it++ ) { for ( TGroupsMap::iterator it = myGroupsMap.begin(); it != myGroupsMap.end(); it++ ) {
SMESH_Group* aGroup = it->second; SMESH_Group* aGroup = it->second;
SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS(); SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
if ( aGroupDS ) { if ( aGroupDS ) {
TRecord aRec; TRecord aRec;
aRec.GroupName = aGroup->GetName(); aRec.GroupName = aGroup->GetName();
int i; int i;
SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements(); SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
if (aGroupDS->GetType() == SMDSAbs_Node) { if (aGroupDS->GetType() == SMDSAbs_Node) {
aRec.NodeList.resize(aGroupDS->Extent()); aRec.NodeList.resize(aGroupDS->Extent());
i = 0; i = 0;
while (aIter->more()) { while (aIter->more()) {
const SMDS_MeshElement* aElem = aIter->next(); const SMDS_MeshElement* aElem = aIter->next();
aRec.NodeList[i] = aElem->GetID(); aRec.NodeList[i] = aElem->GetID();
i++; i++;
} }
} else { } else {
aRec.ElementList.resize(aGroupDS->Extent()); aRec.ElementList.resize(aGroupDS->Extent());
i = 0; i = 0;
while (aIter->more()) { while (aIter->more()) {
const SMDS_MeshElement* aElem = aIter->next(); const SMDS_MeshElement* aElem = aIter->next();
aRec.ElementList[i] = aElem->GetID(); aRec.ElementList[i] = aElem->GetID();
i++; i++;
} }
} }
aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec)); aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec));
} }
} }
UNV2417::Write(out_stream,aDataSet2417); UNV2417::Write(out_stream,aDataSet2417);
}*/ }*/

View File

@ -98,17 +98,17 @@ void UNV2411::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
const TRecord& aRec = anIter->second; const TRecord& aRec = anIter->second;
char buf[78]; char buf[78];
sprintf(buf, "%10d%10d%10d%10d\n", sprintf(buf, "%10d%10d%10d%10d\n",
aLabel, aLabel,
aRec.exp_coord_sys_num, aRec.exp_coord_sys_num,
aRec.disp_coord_sys_num, aRec.disp_coord_sys_num,
aRec.color); aRec.color);
out_stream<<buf; out_stream<<buf;
// the coordinates // the coordinates
sprintf(buf, "%25.16E%25.16E%25.16E\n", sprintf(buf, "%25.16E%25.16E%25.16E\n",
aRec.coord[0], aRec.coord[0],
aRec.coord[1], aRec.coord[1],
aRec.coord[2]); aRec.coord[2]);
out_stream<<buf; out_stream<<buf;
} }

View File

@ -125,11 +125,11 @@ void UNV2412::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
for(int i = 0, k = 0; i < iEnd; i++){ for(int i = 0, k = 0; i < iEnd; i++){
int jEnd = n_nodes - 8*(i+1); int jEnd = n_nodes - 8*(i+1);
if(jEnd < 0) if(jEnd < 0)
jEnd = 8 + jEnd; jEnd = 8 + jEnd;
else else
jEnd = 8; jEnd = 8;
for(int j = 0; j < jEnd ; k++, j++){ 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; out_stream<<std::endl;
} }

View File

@ -37,7 +37,7 @@ static int MYDEBUG = 0;
static string _group_labels[] = {"2417", "2429", "2430", "2432", static string _group_labels[] = {"2417", "2429", "2430", "2432",
"2435", "2452", "2467", "2477"}; "2435", "2452", "2467", "2477"};
#define NBGROUP 8 #define NBGROUP 8
static string _label_dataset = "2467"; static string _label_dataset = "2467";
@ -63,7 +63,7 @@ void UNV2417::Read(std::ifstream& in_stream, TDataSet& theDataSet)
return; return;
for (int i = 0; i < NBGROUP; i++) { for (int i = 0; i < NBGROUP; i++) {
if (news == _group_labels[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>>aElType;
in_stream>>aElId; in_stream>>aElId;
if ((myGroupLabel.compare("2435") == 0) || if ((myGroupLabel.compare("2435") == 0) ||
(myGroupLabel.compare("2452") == 0) || (myGroupLabel.compare("2452") == 0) ||
(myGroupLabel.compare("2467") == 0) || (myGroupLabel.compare("2467") == 0) ||
(myGroupLabel.compare("2477") == 0)) { (myGroupLabel.compare("2477") == 0)) {
in_stream>>aTmp; in_stream>>aTmp;
in_stream>>aTmp; in_stream>>aTmp;
} }
switch (aElType) { switch (aElType) {
case 7: // Nodes case 7: // Nodes
aNum = aRec.NodeList.size(); aNum = aRec.NodeList.size();
aRec.NodeList.resize(aNum + 1); aRec.NodeList.resize(aNum + 1);
aRec.NodeList[aNum] = aElId; aRec.NodeList[aNum] = aElId;
break; break;
case 8: // Elements case 8: // Elements
aNum = aRec.ElementList.size(); aNum = aRec.ElementList.size();
aRec.ElementList.resize(aNum + 1); aRec.ElementList.resize(aNum + 1);
aRec.ElementList[aNum] = aElId; aRec.ElementList[aNum] = aElId;
break; break;
} }
} }
theDataSet.insert(TDataSet::value_type(aId,aRec)); theDataSet.insert(TDataSet::value_type(aId,aRec));
@ -160,8 +160,8 @@ void UNV2417::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
int i; int i;
for (i = 0; i < aNbNodes; i++) { for (i = 0; i < aNbNodes; i++) {
if (aRow == 2) { if (aRow == 2) {
out_stream<<std::endl; out_stream<<std::endl;
aRow = 0; aRow = 0;
} }
out_stream<<std::setw(10)<<7; out_stream<<std::setw(10)<<7;
out_stream<<std::setw(10)<<aRec.NodeList[i]; 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++) { for (i = 0; i < aNbElements; i++) {
if (aRow == 2) { if (aRow == 2) {
out_stream<<std::endl; out_stream<<std::endl;
aRow = 0; aRow = 0;
} }
out_stream<<std::setw(10)<<8; out_stream<<std::setw(10)<<8;
out_stream<<std::setw(10)<<aRec.ElementList[i]; out_stream<<std::setw(10)<<aRec.ElementList[i];

View File

@ -63,13 +63,13 @@ namespace UNV{
* stop combing at the end of the file * stop combing at the end of the file
*/ */
while( ((olds != "-1") || (news == "-1") ) && !in_file.eof() ){ while( ((olds != "-1") || (news == "-1") ) && !in_file.eof() ){
olds = news; olds = news;
in_file >> news; in_file >> news;
} }
if(in_file.eof()) if(in_file.eof())
return false; return false;
if (news == ds_name) if (news == ds_name)
return true; return true;
} }
// should never end up here // should never end up here
return false; return false;

View File

@ -172,8 +172,8 @@ public:
bool DansPave( R3 & xyzMin, R3 & xyzMax ) bool DansPave( R3 & xyzMin, R3 & xyzMax )
{ return xyzMin.x<=x && x<=xyzMax.x && { return xyzMin.x<=x && x<=xyzMax.x &&
xyzMin.y<=y && y<=xyzMax.y && xyzMin.y<=y && y<=xyzMax.y &&
xyzMin.z<=z && z<=xyzMax.z; } xyzMin.z<=z && z<=xyzMax.z; }
}; };
//la classe R4 //la classe R4

View File

@ -87,11 +87,11 @@ deltacpu_( R & dtcpu )
void aptrte( Z nutysu, R aretmx, void aptrte( Z nutysu, R aretmx,
Z nblf, Z * nudslf, R2 * uvslf, Z nblf, Z * nudslf, R2 * uvslf,
Z nbpti, R2 * uvpti, Z nbpti, R2 * uvpti,
Z & nbst, R2 * & uvst, Z & nbst, R2 * & uvst,
Z & nbt, Z * & nust, Z & nbt, Z * & nust,
Z & ierr ) Z & ierr )
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// but : appel de la triangulation par un arbre-4 recouvrant // but : appel de la triangulation par un arbre-4 recouvrant
// ----- de triangles equilateraux // ----- de triangles equilateraux
@ -184,7 +184,7 @@ void aptrte( Z nutysu, R aretmx,
mxsomm = Max( 20000, 64*nbpti+i*i ); mxsomm = Max( 20000, 64*nbpti+i*i );
MESSAGE( "APTRTE: Debut de la triangulation plane avec " ); MESSAGE( "APTRTE: Debut de la triangulation plane avec " );
MESSAGE( "nutysu=" << nutysu << " aretmx=" << aretmx MESSAGE( "nutysu=" << nutysu << " aretmx=" << aretmx
<< " mxsomm=" << mxsomm ); << " mxsomm=" << mxsomm );
MESSAGE( nbarfr << " sommets sur la frontiere et " << nbpti << " points internes"); MESSAGE( nbarfr << " sommets sur la frontiere et " << nbpti << " points internes");
NEWDEPART: NEWDEPART:
@ -247,7 +247,7 @@ void aptrte( Z nutysu, R aretmx,
mnpxyd[ns0].y = uvslf[ns0].y; mnpxyd[ns0].y = uvslf[ns0].y;
mnpxyd[ns0].z = areteideale();//( mnpxyd[ns0], direction ); mnpxyd[ns0].z = areteideale();//( mnpxyd[ns0], direction );
// MESSAGE("Sommet " << ns0 << ": " << mnpxyd[ns0].x // 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 //carre de la longueur de l'arete 1 de la ligne fermee n
d = pow( uvslf[ns0+1].x - uvslf[ns0].x, 2 ) 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 //le numero n de la ligne du sommet et son numero ns1 dans la ligne
mnslig[ns0-1] = 1000000 * n + ns1-nudslf[n-1]; mnslig[ns0-1] = 1000000 * n + ns1-nudslf[n-1];
fasoar( ns1, ns2, moins1, moins1, n, fasoar( ns1, ns2, moins1, moins1, n,
mosoar, mxsoar, n1soar, mnsoar, mnarst, mosoar, mxsoar, n1soar, mnsoar, mnarst,
noar0, ierr ); noar0, ierr );
//pas de test sur ierr car pas de saturation possible a ce niveau //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 //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 ns1 = ns2; //le numero de l'arete et le numero du premier sommet de l'arete
if( i < nbarli ) if( i < nbarli )
//nbs+1 est le 2-eme sommet de l'arete i de la ligne fermee n //nbs+1 est le 2-eme sommet de l'arete i de la ligne fermee n
ns2 = ns1+1; ns2 = ns1+1;
else else
//le 2-eme sommet de la derniere arete est le premier sommet de la ligne //le 2-eme sommet de la derniere arete est le premier sommet de la ligne
ns2 = ns0; ns2 = ns0;
//l'arete precedente est dotee de sa suivante:celle cree ensuite //l'arete precedente est dotee de sa suivante:celle cree ensuite
//les 2 coordonnees du sommet ns2 de la ligne //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].y = uvslf[ns].y;
mnpxyd[ns].z = areteideale();//( mnpxyd[ns], direction ); mnpxyd[ns].z = areteideale();//( mnpxyd[ns], direction );
// MESSAGE("Sommet " << ns << ": " << mnpxyd[ns].x // 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 //carre de la longueur de l'arete
d = pow( uvslf[ns2-1].x - uvslf[ns1-1].x, 2) 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 //ajout de l'arete dans la liste
fasoar( ns1, ns2, moins1, moins1, n, fasoar( ns1, ns2, moins1, moins1, n,
mosoar, mxsoar, n1soar, mnsoar, mosoar, mxsoar, n1soar, mnsoar,
mnarst, noar, ierr ); mnarst, noar, ierr );
//pas de test sur ierr car pas de saturation possible a ce niveau //pas de test sur ierr car pas de saturation possible a ce niveau
//chainage des aretes frontalieres en position 6 du tableau mnsoar //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("Sur le bord: arete min=" << aremin << " arete max=" << aremax );
MESSAGE("Triangulation: arete mx=" << aretmx MESSAGE("Triangulation: arete mx=" << aretmx
<< " triangle aire mx=" << airemx ); << " triangle aire mx=" << airemx );
//chainage des aretes frontalieres : la derniere arete frontaliere //chainage des aretes frontalieres : la derniere arete frontaliere
mnsoar[ mosoar * noar - mosoar + 5 ] = 0; mnsoar[ mosoar * noar - mosoar + 5 ] = 0;
@ -444,9 +444,9 @@ void aptrte( Z nutysu, R aretmx,
if( mnqueu==NULL) goto ERREUR; if( mnqueu==NULL) goto ERREUR;
tehote( nutysu, nbarpi, mxsomm, nbsomm, mnpxyd, tehote( nutysu, nbarpi, mxsomm, nbsomm, mnpxyd,
comxmi, aretmx, comxmi, aretmx,
mntree, mxqueu, mnqueu, mntree, mxqueu, mnqueu,
ierr ); ierr );
deltacpu_( d ); deltacpu_( d );
tcpu += d; tcpu += d;
@ -471,9 +471,9 @@ void aptrte( Z nutysu, R aretmx,
// et des points de la frontiere, des points internes imposes interieurs // et des points de la frontiere, des points internes imposes interieurs
// ========================================================================== // ==========================================================================
tetrte( comxmi, aretmx, nbarpi, mxsomm, mnpxyd, tetrte( comxmi, aretmx, nbarpi, mxsomm, mnpxyd,
mxqueu, mnqueu, mntree, mosoar, mxsoar, n1soar, mnsoar, mxqueu, mnqueu, mntree, mosoar, mxsoar, n1soar, mnsoar,
moartr, mxartr, n1artr, mnartr, mnarst, moartr, mxartr, n1artr, mnartr, mnarst,
ierr ); ierr );
// destruction de la queue et de l'arbre devenus inutiles // destruction de la queue et de l'arbre devenus inutiles
delete [] mnqueu; mnqueu=NULL; delete [] mnqueu; mnqueu=NULL;
@ -493,7 +493,7 @@ void aptrte( Z nutysu, R aretmx,
//qualites de la triangulation actuelle //qualites de la triangulation actuelle
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr, 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) // boucle sur les aretes internes (non sur une ligne de la frontiere)
// avec echange des 2 diagonales afin de rendre la triangulation delaunay // 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 // formation du chainage 6 des aretes internes a echanger eventuellement
aisoar( mosoar, mxsoar, mnsoar, na ); aisoar( mosoar, mxsoar, mnsoar, na );
tedela( mnpxyd, mnarst, tedela( mnpxyd, mnarst,
mosoar, mxsoar, n1soar, mnsoar, na, mosoar, mxsoar, n1soar, mnsoar, na,
moartr, mxartr, n1artr, mnartr, n ); moartr, mxartr, n1artr, mnartr, n );
MESSAGE( "Nombre d'echanges des diagonales de 2 triangles=" << n ); MESSAGE( "Nombre d'echanges des diagonales de 2 triangles=" << n );
deltacpu_( d ); deltacpu_( d );
@ -512,7 +512,7 @@ void aptrte( Z nutysu, R aretmx,
//qualites de la triangulation actuelle //qualites de la triangulation actuelle
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr, qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
nbt, quamoy, quamin ); nbt, quamoy, quamin );
// detection des aretes frontalieres initiales perdues // detection des aretes frontalieres initiales perdues
// triangulation frontale pour les restaurer // triangulation frontale pour les restaurer
@ -532,10 +532,10 @@ void aptrte( Z nutysu, R aretmx,
if( mnarcf2 == NULL ) goto ERREUR; if( mnarcf2 == NULL ) goto ERREUR;
terefr( nbarpi, mnpxyd, terefr( nbarpi, mnpxyd,
mosoar, mxsoar, n1soar, mnsoar, mosoar, mxsoar, n1soar, mnsoar,
moartr, mxartr, n1artr, mnartr, mnarst, moartr, mxartr, n1artr, mnartr, mnarst,
mxarcf, mn1arcf, mnarcf, mnarcf1, mnarcf2, mxarcf, mn1arcf, mnarcf, mnarcf1, mnarcf2,
n, ierr ); n, ierr );
MESSAGE( "Restauration de " << n << " aretes perdues de la frontiere ierr=" << ierr ); MESSAGE( "Restauration de " << n << " aretes perdues de la frontiere ierr=" << ierr );
deltacpu_( d ); deltacpu_( d );
@ -547,7 +547,7 @@ void aptrte( Z nutysu, R aretmx,
//qualites de la triangulation actuelle //qualites de la triangulation actuelle
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr, qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
nbt, quamoy, quamin ); nbt, quamoy, quamin );
// fin de la triangulation avec respect des aretes initiales frontalieres // fin de la triangulation avec respect des aretes initiales frontalieres
@ -573,10 +573,10 @@ void aptrte( Z nutysu, R aretmx,
mnlftr[n] = n+1; mnlftr[n] = n+1;
tesuex( nblf, mnlftr, tesuex( nblf, mnlftr,
ndtri0, nbsomm, mnpxyd, mnslig, ndtri0, nbsomm, mnpxyd, mnslig,
mosoar, mxsoar, mnsoar, mosoar, mxsoar, mnsoar,
moartr, mxartr, n1artr, mnartr, mnarst, moartr, mxartr, n1artr, mnartr, mnarst,
nbt, mntrsu, ierr ); nbt, mntrsu, ierr );
delete [] mnlftr; mnlftr=NULL; delete [] mnlftr; mnlftr=NULL;
delete [] mntrsu; mntrsu=NULL; delete [] mntrsu; mntrsu=NULL;
@ -588,7 +588,7 @@ void aptrte( Z nutysu, R aretmx,
//qualites de la triangulation actuelle //qualites de la triangulation actuelle
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr, qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
nbt, quamoy, quamin ); nbt, quamoy, quamin );
// amelioration de la qualite de la triangulation par // amelioration de la qualite de la triangulation par
// barycentrage des sommets internes a la triangulation // barycentrage des sommets internes a la triangulation
@ -603,12 +603,12 @@ void aptrte( Z nutysu, R aretmx,
goto ERREUR; goto ERREUR;
} }
teamqt( nutysu, aretmx, airemx, teamqt( nutysu, aretmx, airemx,
mnarst, mosoar, mxsoar, n1soar, mnsoar, mnarst, mosoar, mxsoar, n1soar, mnsoar,
moartr, mxartr, n1artr, mnartr, moartr, mxartr, n1artr, mnartr,
mxarcf, mnarcf2, mnarcf3, mxarcf, mnarcf2, mnarcf3,
mn1arcf, mnarcf, mnarcf1, mn1arcf, mnarcf, mnarcf1,
nbarpi, nbsomm, mxsomm, mnpxyd, mnslig, nbarpi, nbsomm, mxsomm, mnpxyd, mnslig,
ierr ); ierr );
if( mnarcf3 != NULL ) {delete [] mnarcf3; mnarcf3=NULL;} if( mnarcf3 != NULL ) {delete [] mnarcf3; mnarcf3=NULL;}
if( mn1arcf != NULL ) {delete [] mn1arcf; mn1arcf=NULL;} if( mn1arcf != NULL ) {delete [] mn1arcf; mn1arcf=NULL;}
if( mnarcf != NULL ) {delete [] mnarcf; mnarcf =NULL;} if( mnarcf != NULL ) {delete [] mnarcf; mnarcf =NULL;}
@ -623,7 +623,7 @@ void aptrte( Z nutysu, R aretmx,
//qualites de la triangulation finale //qualites de la triangulation finale
qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr, qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
nbt, quamoy, quamin ); nbt, quamoy, quamin );
// renumerotation des sommets internes: mnarst(i)=numero final du sommet // renumerotation des sommets internes: mnarst(i)=numero final du sommet
// =================================== // ===================================
@ -669,22 +669,22 @@ void aptrte( Z nutysu, R aretmx,
n = mnslig[i]; n = mnslig[i];
if( n > 0 ) if( n > 0 )
{ {
if( n >= 1000000 ) if( n >= 1000000 )
{ {
//sommet d'une ligne //sommet d'une ligne
//retour aux coordonnees initiales dans uvslf //retour aux coordonnees initiales dans uvslf
l = n / 1000000; l = n / 1000000;
n = n - 1000000 * l + nudslf[l-1] - 1; n = n - 1000000 * l + nudslf[l-1] - 1;
uvst[nbst].x = uvslf[n].x; uvst[nbst].x = uvslf[n].x;
uvst[nbst].y = uvslf[n].y; uvst[nbst].y = uvslf[n].y;
} }
else else
{ {
//point utilisateur n interne impose //point utilisateur n interne impose
//retour aux coordonnees initiales dans uvpti //retour aux coordonnees initiales dans uvpti
uvst[nbst].x = uvpti[n-1].x; uvst[nbst].x = uvpti[n-1].x;
uvst[nbst].y = uvpti[n-1].y; 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 nbt /= nbsttria; //le nombre final de triangles de la surface
MESSAGE( "APTRTE: Fin de la triangulation plane avec "<<nbst<<" sommets et " MESSAGE( "APTRTE: Fin de la triangulation plane avec "<<nbst<<" sommets et "
<< nbt << " triangles" ); << nbt << " triangles" );
deltacpu_( d ); deltacpu_( d );
tcpu += d; tcpu += d;
MESSAGE( "APTRTE: Temps total de la triangulation plane=" << tcpu << " secondes" ); MESSAGE( "APTRTE: Temps total de la triangulation plane=" << tcpu << " secondes" );
@ -759,9 +759,9 @@ void
#endif #endif
#endif #endif
qualitetrte( R3 *mnpxyd, qualitetrte( R3 *mnpxyd,
Z & mosoar, Z & mxsoar, Z *mnsoar, Z & mosoar, Z & mxsoar, Z *mnsoar,
Z & moartr, Z & mxartr, Z *mnartr, Z & moartr, Z & mxartr, Z *mnartr,
Z & nbtria, R & quamoy, R & quamin ) Z & nbtria, R & quamoy, R & quamin )
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// but : calculer la qualite moyenne et minimale de la triangulation // but : calculer la qualite moyenne et minimale de la triangulation
// ----- actuelle definie par les tableaux mnsoar et mnartr // ----- actuelle definie par les tableaux mnsoar et mnartr
@ -815,7 +815,7 @@ void
//la qualite du triangle ns1 ns2 ns3 //la qualite du triangle ns1 ns2 ns3
qutr2d( mnpxyd[nosotr[0]-1], mnpxyd[nosotr[1]-1], mnpxyd[nosotr[2]-1], qutr2d( mnpxyd[nosotr[0]-1], mnpxyd[nosotr[1]-1], mnpxyd[nosotr[2]-1],
qualite ); qualite );
//la qualite moyenne //la qualite moyenne
quamoy += qualite; quamoy += qualite;
@ -831,11 +831,11 @@ void
d = surtd2( mnpxyd[nosotr[0]-1], mnpxyd[nosotr[1]-1], mnpxyd[nosotr[2]-1] ); d = surtd2( mnpxyd[nosotr[0]-1], mnpxyd[nosotr[1]-1], mnpxyd[nosotr[2]-1] );
if( d<0 ) if( d<0 )
{ {
//un triangle d'aire negative de plus //un triangle d'aire negative de plus
nbtrianeg++; nbtrianeg++;
MESSAGE("ATTENTION: le triangle " << nt << " de sommets:" MESSAGE("ATTENTION: le triangle " << nt << " de sommets:"
<< nosotr[0] << " " << nosotr[1] << " " << nosotr[2] << nosotr[0] << " " << nosotr[1] << " " << nosotr[2]
<< " a une aire " << d <<"<=0"); << " a une aire " << d <<"<=0");
} }
//aire des triangles actuels //aire des triangles actuels
@ -858,7 +858,7 @@ void
<<nosotr[0]<<" "<<nosotr[1]<<" "<<nosotr[2]<<" "); <<nosotr[0]<<" "<<nosotr[1]<<" "<<nosotr[2]<<" ");
for (int i=0;i<3;i++) for (int i=0;i<3;i++)
MESSAGE("Sommet "<<nosotr[i]<<": x="<< mnpxyd[nosotr[i]-1].x 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 ) if( nbtrianeg>0 )

View File

@ -61,10 +61,10 @@
MEFISTO2D_EXPORT MEFISTO2D_EXPORT
void aptrte( Z nutysu, R aretmx, void aptrte( Z nutysu, R aretmx,
Z nblf, Z *nudslf, R2 *uvslf, Z nblf, Z *nudslf, R2 *uvslf,
Z nbpti, R2 *uvpti, Z nbpti, R2 *uvpti,
Z & nbst, R2 * & uvst, Z & nbt, Z * & nust, Z & nbst, R2 * & uvst, Z & nbt, Z * & nust,
Z & ierr ); Z & ierr );
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// but : appel de la triangulation par un arbre-4 recouvrant // but : appel de la triangulation par un arbre-4 recouvrant
// ----- de triangles equilateraux // ----- de triangles equilateraux
@ -126,7 +126,7 @@ MEFISTO2D_EXPORT
#define nusotr NUSOTR #define nusotr NUSOTR
#define qutr2d QUTR2D #define qutr2d QUTR2D
#define surtd2 SURTD2 #define surtd2 SURTD2
#define qualitetrte QUALITETRTE #define qualitetrte QUALITETRTE
#define areteideale ARETEIDEALE #define areteideale ARETEIDEALE
@ -162,9 +162,9 @@ extern "C" { void
#endif #endif
#endif #endif
qualitetrte( R3 *mnpxyd, qualitetrte( R3 *mnpxyd,
Z & mosoar, Z & mxsoar, Z *mnsoar, Z & mosoar, Z & mxsoar, Z *mnsoar,
Z & moartr, Z & mxartr, Z *mnartr, Z & moartr, Z & mxartr, Z *mnartr,
Z & nbtria, R & quamoy, R & quamin ); } Z & nbtria, R & quamoy, R & quamin ); }
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// but : calculer la qualite moyenne et minimale de la triangulation // but : calculer la qualite moyenne et minimale de la triangulation
// ----- actuelle definie par les tableaux nosoar et noartr // ----- actuelle definie par les tableaux nosoar et noartr
@ -248,8 +248,8 @@ extern "C" {void
#endif #endif
#endif #endif
fasoar( Z & ns1, Z & ns2, Z & nt1, Z & nt2, Z & nolign, fasoar( Z & ns1, Z & ns2, Z & nt1, Z & nt2, Z & nolign,
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z * mnarst, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z * mnarst,
Z & noar, Z & ierr ); Z & noar, Z & ierr );
} }
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// but : former l'arete de sommet ns1-ns2 dans le hachage du tableau // but : former l'arete de sommet ns1-ns2 dans le hachage du tableau
@ -303,8 +303,8 @@ extern "C" {void
#endif #endif
#endif #endif
teajte( Z & mxsomm, Z & nbsomm, R3 * mnpxyd, R3 * comxmi, teajte( Z & mxsomm, Z & nbsomm, R3 * mnpxyd, R3 * comxmi,
R & aretmx, Z & mxtree, Z * letree, R & aretmx, Z & mxtree, Z * letree,
Z & ierr ); Z & ierr );
} }
extern "C" {void extern "C" {void
@ -315,9 +315,9 @@ extern "C" {void
#endif #endif
#endif #endif
tehote( Z & nutysu, Z & nbarpi, Z & mxsomm, Z & nbsomm, R3 * mnpxyd, tehote( Z & nutysu, Z & nbarpi, Z & mxsomm, Z & nbsomm, R3 * mnpxyd,
R3 * comxmi, R & aretmx, R3 * comxmi, R & aretmx,
Z * letree, Z & mxqueu, Z * mnqueu, Z * letree, Z & mxqueu, Z * mnqueu,
Z & ierr ); Z & ierr );
} }
// homogeneisation de l'arbre des te a un saut de taille au plus // 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 // prise en compte des tailles d'aretes souhaitees autour des sommets initiaux
@ -330,10 +330,10 @@ extern "C" {void
#endif #endif
#endif #endif
tetrte( R3 * comxmi, R & aretmx, Z & nbarpi, Z & mxsomm, R3 * mnpxyd, tetrte( R3 * comxmi, R & aretmx, Z & nbarpi, Z & mxsomm, R3 * mnpxyd,
Z & mxqueu, Z * mnqueu, Z * mntree, Z & mxqueu, Z * mnqueu, Z * mntree,
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst, Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
Z & ierr ); Z & ierr );
} }
// trianguler les triangles equilateraux feuilles a partir de leurs 3 sommets // trianguler les triangles equilateraux feuilles a partir de leurs 3 sommets
// et des points de la frontiere, des points internes imposes interieurs // et des points de la frontiere, des points internes imposes interieurs
@ -357,8 +357,8 @@ extern "C" {void
#endif #endif
#endif #endif
tedela( R3 * mnpxyd, Z * mnarst, tedela( R3 * mnpxyd, Z * mnarst,
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z & na, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z & na,
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z & n ); Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z & n );
} }
// boucle sur les aretes internes (non sur une ligne de la frontiere) // boucle sur les aretes internes (non sur une ligne de la frontiere)
// avec echange des 2 diagonales afin de rendre la triangulation delaunay // avec echange des 2 diagonales afin de rendre la triangulation delaunay
@ -371,11 +371,11 @@ extern "C" {void
#endif #endif
#endif #endif
terefr( Z & nbarpi, R3 * mnpxyd, terefr( Z & nbarpi, R3 * mnpxyd,
Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst, Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
Z & mxarcf, Z * mnarc1, Z * mnarc2, Z & mxarcf, Z * mnarc1, Z * mnarc2,
Z * mnarc3, Z * mnarc4, Z * mnarc3, Z * mnarc4,
Z & n, Z & ierr ); Z & n, Z & ierr );
} }
// detection des aretes frontalieres initiales perdues // detection des aretes frontalieres initiales perdues
// triangulation frontale pour les restaurer // triangulation frontale pour les restaurer
@ -388,10 +388,10 @@ extern "C" {void
#endif #endif
#endif #endif
tesuex( Z & nblf, Z * nulftr, tesuex( Z & nblf, Z * nulftr,
Z & ndtri0, Z & nbsomm, R3 * mnpxyd, Z * mnslig, Z & ndtri0, Z & nbsomm, R3 * mnpxyd, Z * mnslig,
Z & mosoar, Z & mxsoar, Z * mnsoar, Z & mosoar, Z & mxsoar, Z * mnsoar,
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst, Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
Z & nbtria, Z * mntrsu, Z & ierr ); Z & nbtria, Z * mntrsu, Z & ierr );
} }
// suppression des triangles externes a la surface // suppression des triangles externes a la surface
@ -403,13 +403,13 @@ extern "C" {void
#endif #endif
#endif #endif
teamqt( Z & nutysu, R & aretmx, R & airemx, teamqt( Z & nutysu, R & aretmx, R & airemx,
Z * mnarst, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z * mnarst, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr,
Z & mxarcf, Z * mntrcf, Z * mnstbo, Z & mxarcf, Z * mntrcf, Z * mnstbo,
Z * n1arcf, Z * mnarcf, Z * mnarc1, Z * n1arcf, Z * mnarcf, Z * mnarc1,
Z & nbarpi, Z & nbsomm, Z & mxsomm, Z & nbarpi, Z & nbsomm, Z & mxsomm,
R3 * mnpxyd, Z * mnslig, R3 * mnpxyd, Z * mnslig,
Z & ierr ); Z & ierr );
} }
// amelioration de la qualite de la triangulation par // amelioration de la qualite de la triangulation par
// barycentrage des sommets internes a la triangulation // barycentrage des sommets internes a la triangulation

View File

@ -114,3 +114,5 @@ dist_SMDS_MemoryLimit_SOURCES = \
SMDS_MemoryLimit_LDADD = \ SMDS_MemoryLimit_LDADD = \
$(KERNEL_LDFLAGS) -lSALOMELocalTrace $(KERNEL_LDFLAGS) -lSALOMELocalTrace
#libSMDS_la_LDFLAGS += -L/data/eap/S5_MV/INSTALL/SMESH/lib/salome -lPerfmeter

View File

@ -34,15 +34,15 @@ class SMDS_EXPORT SMDS_EdgePosition:public SMDS_Position
{ {
public: public:
SMDS_EdgePosition(const int aEdgeId=0, const double aUParam=0); SMDS_EdgePosition(const int aEdgeId=0, const double aUParam=0);
const virtual double * Coords() const; const virtual double * Coords() const;
SMDS_TypeOfPosition GetTypeOfPosition() const; SMDS_TypeOfPosition GetTypeOfPosition() const;
void SetUParameter(double aUparam); void SetUParameter(double aUparam);
double GetUParameter() const; double GetUParameter() const;
private: private:
double myUParameter; double myUParameter;
}; };

View File

@ -38,12 +38,12 @@ using namespace std;
int SMDS_FaceOfEdges::NbEdges() const int SMDS_FaceOfEdges::NbEdges() const
{ {
return myNbEdges; return myNbEdges;
} }
int SMDS_FaceOfEdges::NbFaces() const int SMDS_FaceOfEdges::NbFaces() const
{ {
return 1; return 1;
} }
//======================================================================= //=======================================================================
//function : Print //function : Print
@ -52,15 +52,15 @@ int SMDS_FaceOfEdges::NbFaces() const
void SMDS_FaceOfEdges::Print(ostream & OS) const void SMDS_FaceOfEdges::Print(ostream & OS) const
{ {
OS << "face <" << GetID() << " > : "; OS << "face <" << GetID() << " > : ";
int i; int i;
for (i = 0; i < NbEdges() - 1; i++) OS << myEdges[i] << ","; for (i = 0; i < NbEdges() - 1; i++) OS << myEdges[i] << ",";
OS << myEdges[i] << ") " << endl; OS << myEdges[i] << ") " << endl;
} }
SMDSAbs_ElementType SMDS_FaceOfEdges::GetType() const SMDSAbs_ElementType SMDS_FaceOfEdges::GetType() const
{ {
return SMDSAbs_Face; return SMDSAbs_Face;
} }
//======================================================================= //=======================================================================
@ -110,11 +110,11 @@ SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
const SMDS_MeshEdge* edge2, const SMDS_MeshEdge* edge2,
const SMDS_MeshEdge* edge3) const SMDS_MeshEdge* edge3)
{ {
myNbEdges = 3; myNbEdges = 3;
myEdges[0]=edge1; myEdges[0]=edge1;
myEdges[1]=edge2; myEdges[1]=edge2;
myEdges[2]=edge3; myEdges[2]=edge3;
myEdges[3]=0; myEdges[3]=0;
} }
SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1, 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* edge3,
const SMDS_MeshEdge* edge4) const SMDS_MeshEdge* edge4)
{ {
myNbEdges = 4; myNbEdges = 4;
myEdges[0]=edge1; myEdges[0]=edge1;
myEdges[1]=edge2; myEdges[1]=edge2;
myEdges[2]=edge3; myEdges[2]=edge3;
myEdges[3]=edge4; myEdges[3]=edge4;
} }
/*bool operator<(const SMDS_FaceOfEdges& f1, const SMDS_FaceOfEdges& f2) /*bool operator<(const SMDS_FaceOfEdges& f1, const SMDS_FaceOfEdges& f2)
{ {
set<SMDS_MeshNode> set1,set2; set<SMDS_MeshNode> set1,set2;
SMDS_ElemIteratorPtr it; SMDS_ElemIteratorPtr it;
const SMDS_MeshNode * n; const SMDS_MeshNode * n;
it=f1.nodesIterator(); it=f1.nodesIterator();
while(it->more()) while(it->more())
{ {
n=static_cast<const SMDS_MeshNode *>(it->next()); n=static_cast<const SMDS_MeshNode *>(it->next());
set1.insert(*n); set1.insert(*n);
} }
delete it; delete it;
it=f2.nodesIterator(); it=f2.nodesIterator();
while(it->more()) while(it->more())
{ {
n=static_cast<const SMDS_MeshNode *>(it->next()); n=static_cast<const SMDS_MeshNode *>(it->next());
set2.insert(*n); set2.insert(*n);
} }
delete it; delete it;
return set1<set2; return set1<set2;
}*/ }*/

View File

@ -36,21 +36,21 @@
class SMDS_EXPORT SMDS_FaceOfEdges:public SMDS_MeshFace class SMDS_EXPORT SMDS_FaceOfEdges:public SMDS_MeshFace
{ {
public: public:
void Print(std::ostream & OS) const; void Print(std::ostream & OS) const;
SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1, SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
const SMDS_MeshEdge* edge2, const SMDS_MeshEdge* edge2,
const SMDS_MeshEdge* edge3); const SMDS_MeshEdge* edge3);
SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1, SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
const SMDS_MeshEdge* edge2, const SMDS_MeshEdge* edge2,
const SMDS_MeshEdge* edge3, const SMDS_MeshEdge* edge3,
const SMDS_MeshEdge* edge4); const SMDS_MeshEdge* edge4);
SMDSAbs_ElementType GetType() const; SMDSAbs_ElementType GetType() const;
virtual SMDSAbs_EntityType GetEntityType() const; virtual SMDSAbs_EntityType GetEntityType() const;
int NbNodes() const; int NbNodes() const;
int NbEdges() const; int NbEdges() const;
int NbFaces() const; int NbFaces() const;
// friend bool operator<(const SMDS_FaceOfEdges& e1, const SMDS_FaceOfEdges& e2); // 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; virtual const SMDS_MeshNode* GetNode(const int ind) const;
protected: protected:
SMDS_ElemIteratorPtr SMDS_ElemIteratorPtr
elementsIterator(SMDSAbs_ElementType type) const; elementsIterator(SMDSAbs_ElementType type) const;
private: private:
const SMDS_MeshEdge* myEdges[4]; const SMDS_MeshEdge* myEdges[4];
int myNbEdges; int myNbEdges;
}; };

View File

@ -42,17 +42,17 @@ using namespace std;
int SMDS_FaceOfNodes::NbEdges() const int SMDS_FaceOfNodes::NbEdges() const
{ {
return NbNodes(); return NbNodes();
} }
int SMDS_FaceOfNodes::NbFaces() const int SMDS_FaceOfNodes::NbFaces() const
{ {
return 1; return 1;
} }
int SMDS_FaceOfNodes::NbNodes() const 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 void SMDS_FaceOfNodes::Print(ostream & OS) const
{ {
OS << "face <" << GetID() << " > : "; OS << "face <" << GetID() << " > : ";
int i; int i;
for (i = 0; i < NbNodes() - 1; i++) OS << myNodes[i] << ","; for (i = 0; i < NbNodes() - 1; i++) OS << myNodes[i] << ",";
OS << myNodes[i] << ") " << endl; OS << myNodes[i] << ") " << endl;
} }
//======================================================================= //=======================================================================
@ -132,11 +132,11 @@ SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
const SMDS_MeshNode* node2, const SMDS_MeshNode* node2,
const SMDS_MeshNode* node3) const SMDS_MeshNode* node3)
{ {
myNbNodes = 3; myNbNodes = 3;
myNodes[0]=node1; myNodes[0]=node1;
myNodes[1]=node2; myNodes[1]=node2;
myNodes[2]=node3; myNodes[2]=node3;
myNodes[3]=0; myNodes[3]=0;
} }
SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1, 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* node3,
const SMDS_MeshNode* node4) const SMDS_MeshNode* node4)
{ {
myNbNodes = 4; myNbNodes = 4;
myNodes[0]=node1; myNodes[0]=node1;
myNodes[1]=node2; myNodes[1]=node2;
myNodes[2]=node3; myNodes[2]=node3;
myNodes[3]=node4; myNodes[3]=node4;
} }
bool SMDS_FaceOfNodes::ChangeNodes(const SMDS_MeshNode* nodes[], bool SMDS_FaceOfNodes::ChangeNodes(const SMDS_MeshNode* nodes[],
const int nbNodes) const int nbNodes)

View File

@ -35,19 +35,19 @@
class SMDS_EXPORT SMDS_FaceOfNodes:public SMDS_MeshFace class SMDS_EXPORT SMDS_FaceOfNodes:public SMDS_MeshFace
{ {
public: public:
void Print(std::ostream & OS) const; void Print(std::ostream & OS) const;
SMDS_FaceOfNodes(const SMDS_MeshNode* node1, SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
const SMDS_MeshNode* node2, const SMDS_MeshNode* node2,
const SMDS_MeshNode* node3); const SMDS_MeshNode* node3);
SMDS_FaceOfNodes(const SMDS_MeshNode* node1, SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
const SMDS_MeshNode* node2, const SMDS_MeshNode* node2,
const SMDS_MeshNode* node3, const SMDS_MeshNode* node3,
const SMDS_MeshNode* node4); const SMDS_MeshNode* node4);
bool ChangeNodes(const SMDS_MeshNode* nodes[], bool ChangeNodes(const SMDS_MeshNode* nodes[],
const int nbNodes); const int nbNodes);
int NbEdges() const; int NbEdges() const;
int NbFaces() const; int NbFaces() const;
int NbNodes() const; int NbNodes() const;
/*! /*!
* \brief Return node by its index * \brief Return node by its index
@ -59,11 +59,11 @@ class SMDS_EXPORT SMDS_FaceOfNodes:public SMDS_MeshFace
virtual SMDSAbs_EntityType GetEntityType() const; virtual SMDSAbs_EntityType GetEntityType() const;
protected: protected:
SMDS_ElemIteratorPtr SMDS_ElemIteratorPtr
elementsIterator(SMDSAbs_ElementType type) const; elementsIterator(SMDSAbs_ElementType type) const;
private: private:
const SMDS_MeshNode* myNodes[4]; const SMDS_MeshNode* myNodes[4];
int myNbNodes; int myNbNodes;
}; };

View File

@ -36,8 +36,8 @@ using namespace std;
//======================================================================= //=======================================================================
SMDS_FacePosition::SMDS_FacePosition(const int aEdgeId, SMDS_FacePosition::SMDS_FacePosition(const int aEdgeId,
const double aUParam, const double aUParam,
const double aVParam) const double aVParam)
:SMDS_Position(aEdgeId), :SMDS_Position(aEdgeId),
myUParameter(aUParam),myVParameter(aVParam) myUParameter(aUParam),myVParameter(aVParam)
{ {
@ -49,21 +49,21 @@ SMDS_FacePosition::SMDS_FacePosition(const int aEdgeId,
//======================================================================= //=======================================================================
const double *SMDS_FacePosition::Coords() const const double *SMDS_FacePosition::Coords() const
{ {
static double origin[]={0,0,0}; static double origin[]={0,0,0};
MESSAGE("SMDS_EdgePosition::Coords not implemented"); MESSAGE("SMDS_EdgePosition::Coords not implemented");
return origin; return origin;
} }
/** /**
*/ */
SMDS_TypeOfPosition SMDS_FacePosition::GetTypeOfPosition() const SMDS_TypeOfPosition SMDS_FacePosition::GetTypeOfPosition() const
{ {
return SMDS_TOP_FACE; return SMDS_TOP_FACE;
} }
void SMDS_FacePosition::SetUParameter(double aUparam) 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) 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 double SMDS_FacePosition::GetUParameter() const
{ {
return myUParameter; return myUParameter;
} }
//======================================================================= //=======================================================================
@ -93,5 +93,5 @@ double SMDS_FacePosition::GetUParameter() const
double SMDS_FacePosition::GetVParameter() const double SMDS_FacePosition::GetVParameter() const
{ {
return myVParameter; return myVParameter;
} }

View File

@ -34,17 +34,17 @@ class SMDS_EXPORT SMDS_FacePosition:public SMDS_Position
{ {
public: public:
SMDS_FacePosition(int aFaceId=0, double aUParam=0, SMDS_FacePosition(int aFaceId=0, double aUParam=0,
double aVParam=0); double aVParam=0);
const virtual double * Coords() const; const virtual double * Coords() const;
SMDS_TypeOfPosition GetTypeOfPosition() const; SMDS_TypeOfPosition GetTypeOfPosition() const;
void SetUParameter(double aUparam); void SetUParameter(double aUparam);
void SetVParameter(double aVparam); void SetVParameter(double aVparam);
double GetUParameter() const; double GetUParameter() const;
double GetVParameter() const; double GetVParameter() const;
private: private:
double myUParameter; double myUParameter;
double myVParameter; double myVParameter;
}; };
#endif #endif

View File

@ -33,18 +33,18 @@
template<typename VALUE> class SMDS_Iterator template<typename VALUE> class SMDS_Iterator
{ {
public: public:
/// Return true if and only if there are other object in this iterator /// Return true if and only if there are other object in this iterator
virtual bool more()=0; virtual bool more()=0;
/// Return the current object and step to the next one /// Return the current object and step to the next one
virtual VALUE next()=0; virtual VALUE next()=0;
/// Delete the current element and step to the next one /// Delete the current element and step to the next one
virtual void remove(){} virtual void remove(){}
/// Provide virtual destructor just for case if some derived iterator /// Provide virtual destructor just for case if some derived iterator
/// must have a destructor /// must have a destructor
virtual ~SMDS_Iterator(){} virtual ~SMDS_Iterator(){}
}; };
#endif #endif

View File

@ -29,24 +29,24 @@
bool SMDS_IteratorOfElements::subMore() bool SMDS_IteratorOfElements::subMore()
{ {
if((t2Iterator.get()==NULL)||(!t2Iterator->more())) if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
{ {
if(t1Iterator->more()) if(t1Iterator->more())
{ {
t2Iterator=t1Iterator->next()->elementsIterator(myType); t2Iterator=t1Iterator->next()->elementsIterator(myType);
return subMore(); return subMore();
} }
else return false; else return false;
} }
else return true; else return true;
} }
const SMDS_MeshElement * SMDS_IteratorOfElements::subNext() const SMDS_MeshElement * SMDS_IteratorOfElements::subNext()
{ {
if((t2Iterator.get()==NULL)||(!t2Iterator->more())) if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
if(t1Iterator->more()) if(t1Iterator->more())
t2Iterator=t1Iterator->next()->elementsIterator(myType); t2Iterator=t1Iterator->next()->elementsIterator(myType);
return t2Iterator->next(); return t2Iterator->next();
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -61,48 +61,48 @@ SMDS_IteratorOfElements::SMDS_IteratorOfElements(const SMDS_MeshElement * elemen
myType(type), myElement(element), myType(type), myElement(element),
myProxyElement(NULL) myProxyElement(NULL)
{ {
while(subMore()) while(subMore())
alreadyReturnedElements.insert(subNext()); alreadyReturnedElements.insert(subNext());
itAlreadyReturned= alreadyReturnedElements.begin(); itAlreadyReturned= alreadyReturnedElements.begin();
switch(myElement->GetType()) switch(myElement->GetType())
{ {
case SMDSAbs_Node: case SMDSAbs_Node:
case SMDSAbs_Edge: myReverseIteration=true; break; case SMDSAbs_Edge: myReverseIteration=true; break;
case SMDSAbs_Face: myReverseIteration=(type==SMDSAbs_Volume); break; case SMDSAbs_Face: myReverseIteration=(type==SMDSAbs_Volume); break;
default: myReverseIteration=false; default: myReverseIteration=false;
} }
} }
bool SMDS_IteratorOfElements::more() bool SMDS_IteratorOfElements::more()
{ {
if(myProxyElement==NULL) if(myProxyElement==NULL)
{ {
while(itAlreadyReturned!=alreadyReturnedElements.end()) while(itAlreadyReturned!=alreadyReturnedElements.end())
{ {
myProxyElement=*itAlreadyReturned; myProxyElement=*itAlreadyReturned;
itAlreadyReturned++; itAlreadyReturned++;
if(myReverseIteration) if(myReverseIteration)
{ {
SMDS_ElemIteratorPtr it= SMDS_ElemIteratorPtr it=
myProxyElement->elementsIterator(myElement->GetType()); myProxyElement->elementsIterator(myElement->GetType());
while(it->more()) while(it->more())
{ {
if(it->next()==myElement) return true; if(it->next()==myElement) return true;
} }
} }
else return true; else return true;
} }
myProxyElement=NULL; myProxyElement=NULL;
return false; return false;
} }
else return true; else return true;
} }
const SMDS_MeshElement * SMDS_IteratorOfElements::next() const SMDS_MeshElement * SMDS_IteratorOfElements::next()
{ {
more(); more();
const SMDS_MeshElement *e=myProxyElement; const SMDS_MeshElement *e=myProxyElement;
myProxyElement=NULL; myProxyElement=NULL;
return e; return e;
} }

View File

@ -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 /// 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 /// 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, SMDSAbs_ElementType type,
const SMDS_ElemIteratorPtr& it); const SMDS_ElemIteratorPtr& it);
bool more(); bool more();
const SMDS_MeshElement * next(); const SMDS_MeshElement * next();
private: private:
SMDS_ElemIteratorPtr t2Iterator; SMDS_ElemIteratorPtr t2Iterator;
SMDS_ElemIteratorPtr t1Iterator; SMDS_ElemIteratorPtr t1Iterator;
SMDSAbs_ElementType myType; SMDSAbs_ElementType myType;
const SMDS_MeshElement * myProxyElement; const SMDS_MeshElement * myProxyElement;
const SMDS_MeshElement * myElement; const SMDS_MeshElement * myElement;
bool myReverseIteration; bool myReverseIteration;
std::set<const SMDS_MeshElement*> alreadyReturnedElements; std::set<const SMDS_MeshElement*> alreadyReturnedElements;
std::set<const SMDS_MeshElement*>::iterator itAlreadyReturned; std::set<const SMDS_MeshElement*>::iterator itAlreadyReturned;
bool subMore(); bool subMore();
const SMDS_MeshElement * subNext(); const SMDS_MeshElement * subNext();
}; };

View File

@ -42,8 +42,8 @@ using namespace std;
SMDS_MeshEdge::SMDS_MeshEdge(const SMDS_MeshNode * node1, SMDS_MeshEdge::SMDS_MeshEdge(const SMDS_MeshNode * node1,
const SMDS_MeshNode * node2) const SMDS_MeshNode * node2)
{ {
myNodes[0]=node1; myNodes[0]=node1;
myNodes[1]=node2; myNodes[1]=node2;
} }
//======================================================================= //=======================================================================
@ -53,23 +53,23 @@ SMDS_MeshEdge::SMDS_MeshEdge(const SMDS_MeshNode * node1,
void SMDS_MeshEdge::Print(ostream & OS) const void SMDS_MeshEdge::Print(ostream & OS) const
{ {
OS << "edge <" << GetID() << "> : (" << myNodes[0] << " , " << myNodes[1] << OS << "edge <" << GetID() << "> : (" << myNodes[0] << " , " << myNodes[1] <<
") " << endl; ") " << endl;
} }
int SMDS_MeshEdge::NbNodes() const int SMDS_MeshEdge::NbNodes() const
{ {
return 2; return 2;
} }
int SMDS_MeshEdge::NbEdges() const int SMDS_MeshEdge::NbEdges() const
{ {
return 1; return 1;
} }
SMDSAbs_ElementType SMDS_MeshEdge::GetType() const SMDSAbs_ElementType SMDS_MeshEdge::GetType() const
{ {
return SMDSAbs_Edge; return SMDSAbs_Edge;
} }
class SMDS_MeshEdge_MyNodeIterator:public SMDS_ElemIterator class SMDS_MeshEdge_MyNodeIterator:public SMDS_ElemIterator
@ -93,7 +93,7 @@ class SMDS_MeshEdge_MyNodeIterator:public SMDS_ElemIterator
}; };
SMDS_ElemIteratorPtr SMDS_MeshEdge:: SMDS_ElemIteratorPtr SMDS_MeshEdge::
elementsIterator(SMDSAbs_ElementType type) const elementsIterator(SMDSAbs_ElementType type) const
{ {
switch(type) switch(type)
{ {
@ -110,28 +110,28 @@ SMDS_ElemIteratorPtr SMDS_MeshEdge::
bool operator<(const SMDS_MeshEdge & e1, const SMDS_MeshEdge & e2) bool operator<(const SMDS_MeshEdge & e1, const SMDS_MeshEdge & e2)
{ {
int id11=e1.myNodes[0]->GetID(); int id11=e1.myNodes[0]->GetID();
int id21=e2.myNodes[0]->GetID(); int id21=e2.myNodes[0]->GetID();
int id12=e1.myNodes[1]->GetID(); int id12=e1.myNodes[1]->GetID();
int id22=e2.myNodes[1]->GetID(); int id22=e2.myNodes[1]->GetID();
int tmp; int tmp;
if(id11>=id12) if(id11>=id12)
{ {
tmp=id11; tmp=id11;
id11=id12; id11=id12;
id12=tmp; id12=tmp;
} }
if(id21>=id22) if(id21>=id22)
{ {
tmp=id21; tmp=id21;
id21=id22; id21=id22;
id22=tmp; id22=tmp;
} }
if(id11<id21) return true; if(id11<id21) return true;
else if(id11==id21) return (id21<id22); else if(id11==id21) return (id21<id22);
else return false; else return false;
} }
/*! /*!

View File

@ -35,17 +35,17 @@ class SMDS_EXPORT SMDS_MeshEdge:public SMDS_MeshElement
{ {
public: public:
SMDS_MeshEdge(const SMDS_MeshNode * node1, SMDS_MeshEdge(const SMDS_MeshNode * node1,
const SMDS_MeshNode * node2); const SMDS_MeshNode * node2);
bool ChangeNodes(const SMDS_MeshNode * node1, bool ChangeNodes(const SMDS_MeshNode * node1,
const SMDS_MeshNode * node2); const SMDS_MeshNode * node2);
void Print(std::ostream & OS) const; void Print(std::ostream & OS) const;
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Edge; } virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Edge; }
int NbNodes() const; int NbNodes() const;
int NbEdges() const; int NbEdges() const;
friend bool operator<(const SMDS_MeshEdge& e1, const SMDS_MeshEdge& e2); friend bool operator<(const SMDS_MeshEdge& e1, const SMDS_MeshEdge& e2);
/*! /*!
* \brief Return node by its index * \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; virtual const SMDS_MeshNode* GetNode(const int ind) const;
protected: protected:
SMDS_ElemIteratorPtr SMDS_ElemIteratorPtr
elementsIterator(SMDSAbs_ElementType type) const; elementsIterator(SMDSAbs_ElementType type) const;
protected: protected:
const SMDS_MeshNode* myNodes[3]; const SMDS_MeshNode* myNodes[3];
}; };
#endif #endif

View File

@ -40,13 +40,13 @@ SMDS_MeshElement::SMDS_MeshElement(int ID):myID(ID)
void SMDS_MeshElement::Print(ostream & OS) const 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) ostream & operator <<(ostream & OS, const SMDS_MeshElement * ME)
{ {
ME->Print(OS); ME->Print(OS);
return OS; return OS;
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -55,7 +55,7 @@ ostream & operator <<(ostream & OS, const SMDS_MeshElement * ME)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
SMDS_ElemIteratorPtr SMDS_MeshElement::nodesIterator() const 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 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 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 SMDS_MeshElement::NbNodes() const
{ {
int nbnodes=0; int nbnodes=0;
SMDS_ElemIteratorPtr it=nodesIterator(); SMDS_ElemIteratorPtr it=nodesIterator();
while(it->more()) while(it->more())
{ {
it->next(); it->next();
nbnodes++; nbnodes++;
} }
return nbnodes; return nbnodes;
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -96,14 +96,14 @@ int SMDS_MeshElement::NbNodes() const
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_MeshElement::NbEdges() const int SMDS_MeshElement::NbEdges() const
{ {
int nbedges=0; int nbedges=0;
SMDS_ElemIteratorPtr it=edgesIterator(); SMDS_ElemIteratorPtr it=edgesIterator();
while(it->more()) while(it->more())
{ {
it->next(); it->next();
nbedges++; nbedges++;
} }
return nbedges; return nbedges;
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -111,14 +111,14 @@ int SMDS_MeshElement::NbEdges() const
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_MeshElement::NbFaces() const int SMDS_MeshElement::NbFaces() const
{ {
int nbfaces=0; int nbfaces=0;
SMDS_ElemIteratorPtr it=facesIterator(); SMDS_ElemIteratorPtr it=facesIterator();
while(it->more()) while(it->more())
{ {
it->next(); it->next();
nbfaces++; nbfaces++;
} }
return nbfaces; return nbfaces;
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -146,19 +146,19 @@ class SMDS_MeshElement_MyIterator:public SMDS_ElemIterator
} }
}; };
SMDS_ElemIteratorPtr SMDS_MeshElement:: SMDS_ElemIteratorPtr SMDS_MeshElement::
elementsIterator(SMDSAbs_ElementType type) const elementsIterator(SMDSAbs_ElementType type) const
{ {
/** @todo Check that iterator in the child classes return elements /** @todo Check that iterator in the child classes return elements
in the same order for each different implementation (i.e: SMDS_VolumeOfNodes in the same order for each different implementation (i.e: SMDS_VolumeOfNodes
and SMDS_VolumeOfFaces */ and SMDS_VolumeOfFaces */
if(type==GetType()) if(type==GetType())
return SMDS_ElemIteratorPtr(new SMDS_MeshElement_MyIterator(this)); return SMDS_ElemIteratorPtr(new SMDS_MeshElement_MyIterator(this));
else else
{ {
MESSAGE("Iterator not implemented"); MESSAGE("Iterator not implemented");
return SMDS_ElemIteratorPtr((SMDS_ElemIterator*)NULL); return SMDS_ElemIteratorPtr((SMDS_ElemIterator*)NULL);
} }
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -166,32 +166,32 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_MeshElement::GetID() const int SMDS_MeshElement::GetID() const
{ {
return myID; return myID;
} }
bool operator<(const SMDS_MeshElement& e1, const SMDS_MeshElement& e2) bool operator<(const SMDS_MeshElement& e1, const SMDS_MeshElement& e2)
{ {
if(e1.GetType()!=e2.GetType()) return false; if(e1.GetType()!=e2.GetType()) return false;
switch(e1.GetType()) switch(e1.GetType())
{ {
case SMDSAbs_Node: case SMDSAbs_Node:
return static_cast<const SMDS_MeshNode &>(e1) < return static_cast<const SMDS_MeshNode &>(e1) <
static_cast<const SMDS_MeshNode &>(e2); static_cast<const SMDS_MeshNode &>(e2);
case SMDSAbs_Edge: case SMDSAbs_Edge:
return static_cast<const SMDS_MeshEdge &>(e1) < return static_cast<const SMDS_MeshEdge &>(e1) <
static_cast<const SMDS_MeshEdge &>(e2); static_cast<const SMDS_MeshEdge &>(e2);
case SMDSAbs_Face: case SMDSAbs_Face:
return static_cast<const SMDS_MeshFace &>(e1) < return static_cast<const SMDS_MeshFace &>(e1) <
static_cast<const SMDS_MeshFace &>(e2); static_cast<const SMDS_MeshFace &>(e2);
case SMDSAbs_Volume: case SMDSAbs_Volume:
return static_cast<const SMDS_MeshVolume &>(e1) < return static_cast<const SMDS_MeshVolume &>(e1) <
static_cast<const SMDS_MeshVolume &>(e2); static_cast<const SMDS_MeshVolume &>(e2);
default : MESSAGE("Internal Error"); default : MESSAGE("Internal Error");
} }
return false; return false;
} }

View File

@ -25,5 +25,5 @@
SMDSAbs_ElementType SMDS_MeshFace::GetType() const SMDSAbs_ElementType SMDS_MeshFace::GetType() const
{ {
return SMDSAbs_Face; return SMDSAbs_Face;
} }

View File

@ -33,7 +33,7 @@
class SMDS_EXPORT SMDS_MeshFace:public SMDS_MeshElement class SMDS_EXPORT SMDS_MeshFace:public SMDS_MeshElement
{ {
public: public:
SMDSAbs_ElementType GetType() const; SMDSAbs_ElementType GetType() const;
}; };
#endif #endif

View File

@ -40,7 +40,7 @@ using namespace std;
SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh, SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh,
const SMDSAbs_ElementType theType) 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, SMDS_MeshGroup::SMDS_MeshGroup(SMDS_MeshGroup * theParent,
const SMDSAbs_ElementType theType) 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 SMDS_MeshGroup *SMDS_MeshGroup::AddSubGroup
(const SMDSAbs_ElementType theType) (const SMDSAbs_ElementType theType)
{ {
const SMDS_MeshGroup * subgroup = new SMDS_MeshGroup(this,theType); const SMDS_MeshGroup * subgroup = new SMDS_MeshGroup(this,theType);
myChildren.insert(myChildren.end(),subgroup); myChildren.insert(myChildren.end(),subgroup);
return subgroup; return subgroup;
} }
//======================================================================= //=======================================================================
@ -75,19 +75,19 @@ const SMDS_MeshGroup *SMDS_MeshGroup::AddSubGroup
bool SMDS_MeshGroup::RemoveSubGroup(const SMDS_MeshGroup * theGroup) bool SMDS_MeshGroup::RemoveSubGroup(const SMDS_MeshGroup * theGroup)
{ {
bool found = false; bool found = false;
list<const SMDS_MeshGroup*>::iterator itgroup; list<const SMDS_MeshGroup*>::iterator itgroup;
for(itgroup=myChildren.begin(); itgroup!=myChildren.end(); itgroup++) for(itgroup=myChildren.begin(); itgroup!=myChildren.end(); itgroup++)
{ {
const SMDS_MeshGroup* subgroup=*itgroup; const SMDS_MeshGroup* subgroup=*itgroup;
if (subgroup == theGroup) if (subgroup == theGroup)
{ {
found = true; found = true;
myChildren.erase(itgroup); myChildren.erase(itgroup);
} }
} }
return found; return found;
} }
//======================================================================= //=======================================================================
@ -98,11 +98,11 @@ bool SMDS_MeshGroup::RemoveSubGroup(const SMDS_MeshGroup * theGroup)
bool SMDS_MeshGroup::RemoveFromParent() bool SMDS_MeshGroup::RemoveFromParent()
{ {
if (myParent==NULL) return false; if (myParent==NULL) return false;
else else
{ {
return (myParent->RemoveSubGroup(this)); return (myParent->RemoveSubGroup(this));
} }
} }
//======================================================================= //=======================================================================
//function : Clear //function : Clear
@ -111,8 +111,8 @@ bool SMDS_MeshGroup::RemoveFromParent()
void SMDS_MeshGroup::Clear() void SMDS_MeshGroup::Clear()
{ {
myElements.clear(); myElements.clear();
myType = SMDSAbs_All; myType = SMDSAbs_All;
} }
//======================================================================= //=======================================================================
@ -122,14 +122,14 @@ void SMDS_MeshGroup::Clear()
void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem) void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
{ {
// the type of the group is determined by the first element added // the type of the group is determined by the first element added
if (myElements.empty()) myType = theElem->GetType(); if (myElements.empty()) myType = theElem->GetType();
else if (theElem->GetType() != myType) { else if (theElem->GetType() != myType) {
MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType); MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
return; return;
} }
myElements.insert(theElem); myElements.insert(theElem);
} }
//======================================================================= //=======================================================================
@ -156,7 +156,7 @@ bool SMDS_MeshGroup::Remove(const SMDS_MeshElement * theElem)
bool SMDS_MeshGroup::Contains(const SMDS_MeshElement * theElem) const bool SMDS_MeshGroup::Contains(const SMDS_MeshElement * theElem) const
{ {
return myElements.find(theElem)!=myElements.end(); return myElements.find(theElem)!=myElements.end();
} }
//======================================================================= //=======================================================================

View File

@ -34,27 +34,27 @@
class SMDS_EXPORT SMDS_MeshGroup:public SMDS_MeshObject class SMDS_EXPORT SMDS_MeshGroup:public SMDS_MeshObject
{ {
public: public:
SMDS_MeshGroup(const SMDS_Mesh * theMesh, SMDS_MeshGroup(const SMDS_Mesh * theMesh,
const SMDSAbs_ElementType theType = SMDSAbs_All); const SMDSAbs_ElementType theType = SMDSAbs_All);
const SMDS_MeshGroup * AddSubGroup const SMDS_MeshGroup * AddSubGroup
(const SMDSAbs_ElementType theType = SMDSAbs_All); (const SMDSAbs_ElementType theType = SMDSAbs_All);
virtual bool RemoveSubGroup(const SMDS_MeshGroup* theGroup); virtual bool RemoveSubGroup(const SMDS_MeshGroup* theGroup);
virtual bool RemoveFromParent(); virtual bool RemoveFromParent();
const SMDS_Mesh* GetMesh() const { return myMesh; } const SMDS_Mesh* GetMesh() const { return myMesh; }
void SetType (const SMDSAbs_ElementType theType); void SetType (const SMDSAbs_ElementType theType);
void Clear(); void Clear();
void Add(const SMDS_MeshElement * theElem); void Add(const SMDS_MeshElement * theElem);
bool Remove(const SMDS_MeshElement * theElem); bool Remove(const SMDS_MeshElement * theElem);
bool IsEmpty() const { return myElements.empty(); } bool IsEmpty() const { return myElements.empty(); }
int Extent() const { return myElements.size(); } int Extent() const { return myElements.size(); }
int SubGroupsNb() const { return myChildren.size(); } int SubGroupsNb() const { return myChildren.size(); }
SMDSAbs_ElementType GetType() const { return myType; } SMDSAbs_ElementType GetType() const { return myType; }
bool Contains(const SMDS_MeshElement * theElem) const; bool Contains(const SMDS_MeshElement * theElem) const;
void InitIterator() const void InitIterator() const
{ const_cast<TIterator&>(myIterator) = myElements.begin(); } { const_cast<TIterator&>(myIterator) = myElements.begin(); }
@ -73,17 +73,17 @@ class SMDS_EXPORT SMDS_MeshGroup:public SMDS_MeshObject
{ return *(const_cast<TGroupIterator&>(myGroupIterator))++; } { return *(const_cast<TGroupIterator&>(myGroupIterator))++; }
private: private:
SMDS_MeshGroup(SMDS_MeshGroup* theParent, SMDS_MeshGroup(SMDS_MeshGroup* theParent,
const SMDSAbs_ElementType theType = SMDSAbs_All); const SMDSAbs_ElementType theType = SMDSAbs_All);
typedef std::set<const SMDS_MeshElement *>::const_iterator TIterator; typedef std::set<const SMDS_MeshElement *>::const_iterator TIterator;
typedef std::list<const SMDS_MeshGroup *>::const_iterator TGroupIterator; typedef std::list<const SMDS_MeshGroup *>::const_iterator TGroupIterator;
const SMDS_Mesh * myMesh; const SMDS_Mesh * myMesh;
SMDSAbs_ElementType myType; SMDSAbs_ElementType myType;
std::set<const SMDS_MeshElement *> myElements; std::set<const SMDS_MeshElement *> myElements;
SMDS_MeshGroup * myParent; SMDS_MeshGroup * myParent;
std::list<const SMDS_MeshGroup*> myChildren; std::list<const SMDS_MeshGroup*> myChildren;
TIterator myIterator; TIterator myIterator;
TGroupIterator myGroupIterator; TGroupIterator myGroupIterator;
}; };

View File

@ -39,14 +39,14 @@ SMDS_MeshIDFactory::SMDS_MeshIDFactory():myMaxID(0)
int SMDS_MeshIDFactory::GetFreeID() int SMDS_MeshIDFactory::GetFreeID()
{ {
if (myPoolOfID.empty()) return ++myMaxID; if (myPoolOfID.empty()) return ++myMaxID;
else else
{ {
set<int>::iterator i = myPoolOfID.begin(); set<int>::iterator i = myPoolOfID.begin();
int ID = *i;//myPoolOfID.top(); int ID = *i;//myPoolOfID.top();
myPoolOfID.erase( i );//myPoolOfID.pop(); myPoolOfID.erase( i );//myPoolOfID.pop();
return ID; return ID;
} }
} }
//======================================================================= //=======================================================================

View File

@ -40,9 +40,9 @@ public:
virtual void Clear(); virtual void Clear();
protected: protected:
SMDS_MeshIDFactory(); SMDS_MeshIDFactory();
int myMaxID; int myMaxID;
std::set<int> myPoolOfID; std::set<int> myPoolOfID;
}; };
#endif #endif

View File

@ -37,8 +37,8 @@ using namespace std;
//======================================================================= //=======================================================================
SMDS_MeshNode::SMDS_MeshNode(double x, double y, double z): SMDS_MeshNode::SMDS_MeshNode(double x, double y, double z):
myX(x), myY(y), myZ(z), myX(x), myY(y), myZ(z),
myPosition(SMDS_SpacePosition::originSpacePosition()) myPosition(SMDS_SpacePosition::originSpacePosition())
{ {
} }
@ -66,8 +66,8 @@ void SMDS_MeshNode::RemoveInverseElement(const SMDS_MeshElement * parent)
void SMDS_MeshNode::Print(ostream & OS) const void SMDS_MeshNode::Print(ostream & OS) const
{ {
OS << "Node <" << GetID() << "> : X = " << myX << " Y = " OS << "Node <" << GetID() << "> : X = " << myX << " Y = "
<< myY << " Z = " << myZ << endl; << myY << " Z = " << myZ << endl;
} }
//======================================================================= //=======================================================================
@ -77,7 +77,7 @@ void SMDS_MeshNode::Print(ostream & OS) const
void SMDS_MeshNode::SetPosition(const SMDS_PositionPtr& aPos) 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 const SMDS_PositionPtr& SMDS_MeshNode::GetPosition() const
{ {
return myPosition; return myPosition;
} }
//======================================================================= //=======================================================================
@ -124,7 +124,7 @@ class SMDS_MeshNode_MyInvIterator:public SMDS_ElemIterator
}; };
SMDS_ElemIteratorPtr SMDS_MeshNode:: SMDS_ElemIteratorPtr SMDS_MeshNode::
GetInverseElementIterator(SMDSAbs_ElementType type) const GetInverseElementIterator(SMDSAbs_ElementType type) const
{ {
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(myInverseElements,type)); return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(myInverseElements,type));
} }
@ -170,7 +170,7 @@ class SMDS_MeshNode_MyIterator:public SMDS_ElemIterator
}; };
SMDS_ElemIteratorPtr SMDS_MeshNode:: SMDS_ElemIteratorPtr SMDS_MeshNode::
elementsIterator(SMDSAbs_ElementType type) const elementsIterator(SMDSAbs_ElementType type) const
{ {
if(type==SMDSAbs_Node) if(type==SMDSAbs_Node)
return SMDS_MeshElement::elementsIterator(SMDSAbs_Node); return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
@ -183,34 +183,34 @@ SMDS_ElemIteratorPtr SMDS_MeshNode::
int SMDS_MeshNode::NbNodes() const int SMDS_MeshNode::NbNodes() const
{ {
return 1; return 1;
} }
double SMDS_MeshNode::X() const double SMDS_MeshNode::X() const
{ {
return myX; return myX;
} }
double SMDS_MeshNode::Y() const double SMDS_MeshNode::Y() const
{ {
return myY; return myY;
} }
double SMDS_MeshNode::Z() const double SMDS_MeshNode::Z() const
{ {
return myZ; return myZ;
} }
void SMDS_MeshNode::setXYZ(double x, double y, double z) void SMDS_MeshNode::setXYZ(double x, double y, double z)
{ {
myX=x; myX=x;
myY=y; myY=y;
myZ=z; myZ=z;
} }
SMDSAbs_ElementType SMDS_MeshNode::GetType() const 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) bool operator<(const SMDS_MeshNode& e1, const SMDS_MeshNode& e2)
{ {
return e1.GetID()<e2.GetID(); return e1.GetID()<e2.GetID();
/*if(e1.myX<e2.myX) return true; /*if(e1.myX<e2.myX) return true;
else if(e1.myX==e2.myX) else if(e1.myX==e2.myX)
{ {
if(e1.myY<e2.myY) return true; if(e1.myY<e2.myY) return true;
else if(e1.myY==e2.myY) return (e1.myZ<e2.myZ); else if(e1.myY==e2.myY) return (e1.myZ<e2.myZ);
else return false; else return false;
} }
else return false;*/ else return false;*/
} }

View File

@ -32,6 +32,6 @@
SMDSAbs_ElementType SMDS_MeshVolume::GetType() const SMDSAbs_ElementType SMDS_MeshVolume::GetType() const
{ {
return SMDSAbs_Volume; return SMDSAbs_Volume;
} }

View File

@ -34,6 +34,6 @@ class SMDS_EXPORT SMDS_MeshVolume:public SMDS_MeshElement
{ {
public: public:
SMDSAbs_ElementType GetType() const; SMDSAbs_ElementType GetType() const;
}; };
#endif #endif

View File

@ -42,7 +42,7 @@ SMDS_Position::SMDS_Position(int aShapeId) :myShapeId(aShapeId)
void SMDS_Position::SetShapeId(int 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 int SMDS_Position::GetShapeId() const
{ {
return myShapeId; return myShapeId;
} }
//======================================================================= //=======================================================================

View File

@ -38,18 +38,18 @@ class SMDS_EXPORT SMDS_Position
{ {
public: public:
const virtual double * Coords() const = 0; const virtual double * Coords() const = 0;
virtual SMDS_TypeOfPosition GetTypeOfPosition() const = 0; virtual SMDS_TypeOfPosition GetTypeOfPosition() const = 0;
virtual int GetDim() const; virtual int GetDim() const;
void SetShapeId(int aShapeId); void SetShapeId(int aShapeId);
int GetShapeId() const; int GetShapeId() const;
virtual ~SMDS_Position() {} virtual ~SMDS_Position() {}
protected: protected:
SMDS_Position(int aShapeId); SMDS_Position(int aShapeId);
private: private:
int myShapeId; int myShapeId;
}; };

View File

@ -32,23 +32,23 @@
//======================================================================= //=======================================================================
SMDS_SpacePosition::SMDS_SpacePosition(double x, double y, double z): SMDS_SpacePosition::SMDS_SpacePosition(double x, double y, double z):
SMDS_Position(0) SMDS_Position(0)
{ {
myCoords[0]=x; myCoords[0]=x;
myCoords[1]=y; myCoords[1]=y;
myCoords[2]=z; myCoords[2]=z;
} }
/** /**
*/ */
SMDS_TypeOfPosition SMDS_SpacePosition::GetTypeOfPosition() const SMDS_TypeOfPosition SMDS_SpacePosition::GetTypeOfPosition() const
{ {
return SMDS_TOP_3DSPACE; return SMDS_TOP_3DSPACE;
} }
const double * SMDS_SpacePosition::Coords() const const double * SMDS_SpacePosition::Coords() const
{ {
return myCoords; return myCoords;
} }
SMDS_PositionPtr SMDS_SpacePosition::originSpacePosition() SMDS_PositionPtr SMDS_SpacePosition::originSpacePosition()

View File

@ -34,13 +34,13 @@ class SMDS_EXPORT SMDS_SpacePosition:public SMDS_Position
{ {
public: public:
SMDS_SpacePosition(double x=0, double y=0, double z=0); SMDS_SpacePosition(double x=0, double y=0, double z=0);
const virtual double * Coords() const; const virtual double * Coords() const;
virtual inline SMDS_TypeOfPosition GetTypeOfPosition() const; virtual inline SMDS_TypeOfPosition GetTypeOfPosition() const;
inline void SetCoords(const double x, const double y, const double z); inline void SetCoords(const double x, const double y, const double z);
static SMDS_PositionPtr originSpacePosition(); static SMDS_PositionPtr originSpacePosition();
private: private:
double myCoords[3]; double myCoords[3];
}; };
#endif #endif

View File

@ -28,11 +28,11 @@
enum SMDS_TypeOfPosition // Value is equal to shape dimention enum SMDS_TypeOfPosition // Value is equal to shape dimention
{ {
SMDS_TOP_UNSPEC = -1, SMDS_TOP_UNSPEC = -1,
SMDS_TOP_VERTEX = 0, SMDS_TOP_VERTEX = 0,
SMDS_TOP_EDGE = 1, SMDS_TOP_EDGE = 1,
SMDS_TOP_FACE = 2, SMDS_TOP_FACE = 2,
SMDS_TOP_3DSPACE = 3 SMDS_TOP_3DSPACE = 3
}; };
#endif #endif

View File

@ -36,7 +36,7 @@ using namespace std;
//======================================================================= //=======================================================================
SMDS_VertexPosition:: SMDS_VertexPosition(const int aVertexId) 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 double *SMDS_VertexPosition::Coords() const
{ {
const static double origin[]={0,0,0}; const static double origin[]={0,0,0};
MESSAGE("SMDS_VertexPosition::Coords not implemented"); MESSAGE("SMDS_VertexPosition::Coords not implemented");
return origin; return origin;
} }
SMDS_TypeOfPosition SMDS_VertexPosition::GetTypeOfPosition() const SMDS_TypeOfPosition SMDS_VertexPosition::GetTypeOfPosition() const
{ {
return SMDS_TOP_VERTEX; return SMDS_TOP_VERTEX;
} }

View File

@ -34,9 +34,9 @@ class SMDS_EXPORT SMDS_VertexPosition:public SMDS_Position
{ {
public: public:
SMDS_TypeOfPosition GetTypeOfPosition() const; SMDS_TypeOfPosition GetTypeOfPosition() const;
SMDS_VertexPosition(int aVertexId=0); SMDS_VertexPosition(int aVertexId=0);
const double *Coords() const; const double *Coords() const;
}; };
#endif #endif

View File

@ -40,16 +40,16 @@ using namespace std;
void SMDS_VolumeOfFaces::Print(ostream & OS) const void SMDS_VolumeOfFaces::Print(ostream & OS) const
{ {
OS << "volume <" << GetID() << "> : "; OS << "volume <" << GetID() << "> : ";
int i; int i;
for (i = 0; i < NbFaces()-1; ++i) OS << myFaces[i] << ","; for (i = 0; i < NbFaces()-1; ++i) OS << myFaces[i] << ",";
OS << myFaces[i]<< ") " << endl; OS << myFaces[i]<< ") " << endl;
} }
int SMDS_VolumeOfFaces::NbFaces() const int SMDS_VolumeOfFaces::NbFaces() const
{ {
return myNbFaces; return myNbFaces;
} }
class SMDS_VolumeOfFaces_MyIterator:public SMDS_ElemIterator class SMDS_VolumeOfFaces_MyIterator:public SMDS_ElemIterator
@ -74,7 +74,7 @@ class SMDS_VolumeOfFaces_MyIterator:public SMDS_ElemIterator
}; };
SMDS_ElemIteratorPtr SMDS_VolumeOfFaces:: SMDS_ElemIteratorPtr SMDS_VolumeOfFaces::
elementsIterator(SMDSAbs_ElementType type) const elementsIterator(SMDSAbs_ElementType type) const
{ {
switch(type) switch(type)
{ {
@ -95,13 +95,13 @@ SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
const SMDS_MeshFace * face3, const SMDS_MeshFace * face3,
const SMDS_MeshFace * face4) const SMDS_MeshFace * face4)
{ {
myNbFaces = 4; myNbFaces = 4;
myFaces[0]=face1; myFaces[0]=face1;
myFaces[1]=face2; myFaces[1]=face2;
myFaces[2]=face3; myFaces[2]=face3;
myFaces[3]=face4; myFaces[3]=face4;
myFaces[4]=0; myFaces[4]=0;
myFaces[5]=0; myFaces[5]=0;
} }
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1, 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 * face4,
const SMDS_MeshFace * face5) const SMDS_MeshFace * face5)
{ {
myNbFaces = 5; myNbFaces = 5;
myFaces[0]=face1; myFaces[0]=face1;
myFaces[1]=face2; myFaces[1]=face2;
myFaces[2]=face3; myFaces[2]=face3;
myFaces[3]=face4; myFaces[3]=face4;
myFaces[4]=face5; myFaces[4]=face5;
myFaces[5]=0; myFaces[5]=0;
} }
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1, 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 * face5,
const SMDS_MeshFace * face6) const SMDS_MeshFace * face6)
{ {
myNbFaces = 6; myNbFaces = 6;
myFaces[0]=face1; myFaces[0]=face1;
myFaces[1]=face2; myFaces[1]=face2;
myFaces[2]=face3; myFaces[2]=face3;
myFaces[3]=face4; myFaces[3]=face4;
myFaces[4]=face5; myFaces[4]=face5;
myFaces[5]=face6; myFaces[5]=face6;
} }
SMDSAbs_EntityType SMDS_VolumeOfFaces::GetEntityType() const SMDSAbs_EntityType SMDS_VolumeOfFaces::GetEntityType() const

View File

@ -38,16 +38,16 @@ class SMDS_EXPORT SMDS_VolumeOfFaces:public SMDS_MeshVolume
{ {
public: public:
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1, SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
const SMDS_MeshFace * face2, const SMDS_MeshFace * face2,
const SMDS_MeshFace * face3, const SMDS_MeshFace * face3,
const SMDS_MeshFace * face4); const SMDS_MeshFace * face4);
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1, SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
const SMDS_MeshFace * face2, const SMDS_MeshFace * face2,
const SMDS_MeshFace * face3, const SMDS_MeshFace * face3,
const SMDS_MeshFace * face4, const SMDS_MeshFace * face4,
const SMDS_MeshFace * face5); const SMDS_MeshFace * face5);
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1, SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
const SMDS_MeshFace * face2, const SMDS_MeshFace * face2,
const SMDS_MeshFace * face3, const SMDS_MeshFace * face3,
const SMDS_MeshFace * face4, const SMDS_MeshFace * face4,
@ -55,14 +55,14 @@ class SMDS_EXPORT SMDS_VolumeOfFaces:public SMDS_MeshVolume
const SMDS_MeshFace * face6); const SMDS_MeshFace * face6);
virtual SMDSAbs_EntityType GetEntityType() const; virtual SMDSAbs_EntityType GetEntityType() const;
void Print(std::ostream & OS) const; void Print(std::ostream & OS) const;
int NbFaces() const; int NbFaces() const;
protected: protected:
SMDS_ElemIteratorPtr SMDS_ElemIteratorPtr
elementsIterator(SMDSAbs_ElementType type) const; elementsIterator(SMDSAbs_ElementType type) const;
const SMDS_MeshFace * myFaces[6]; const SMDS_MeshFace * myFaces[6];
int myNbFaces; int myNbFaces;
}; };
#endif #endif

View File

@ -34,42 +34,42 @@ class SMDS_EXPORT SMDS_VolumeOfNodes:public SMDS_MeshVolume
{ {
public: public:
SMDS_VolumeOfNodes( SMDS_VolumeOfNodes(
const SMDS_MeshNode * node1, const SMDS_MeshNode * node1,
const SMDS_MeshNode * node2, const SMDS_MeshNode * node2,
const SMDS_MeshNode * node3, const SMDS_MeshNode * node3,
const SMDS_MeshNode * node4); const SMDS_MeshNode * node4);
SMDS_VolumeOfNodes( SMDS_VolumeOfNodes(
const SMDS_MeshNode * node1, const SMDS_MeshNode * node1,
const SMDS_MeshNode * node2, const SMDS_MeshNode * node2,
const SMDS_MeshNode * node3, const SMDS_MeshNode * node3,
const SMDS_MeshNode * node4, const SMDS_MeshNode * node4,
const SMDS_MeshNode * node5); const SMDS_MeshNode * node5);
SMDS_VolumeOfNodes( SMDS_VolumeOfNodes(
const SMDS_MeshNode * node1, const SMDS_MeshNode * node1,
const SMDS_MeshNode * node2, const SMDS_MeshNode * node2,
const SMDS_MeshNode * node3, const SMDS_MeshNode * node3,
const SMDS_MeshNode * node4, const SMDS_MeshNode * node4,
const SMDS_MeshNode * node5, const SMDS_MeshNode * node5,
const SMDS_MeshNode * node6); const SMDS_MeshNode * node6);
SMDS_VolumeOfNodes( SMDS_VolumeOfNodes(
const SMDS_MeshNode * node1, const SMDS_MeshNode * node1,
const SMDS_MeshNode * node2, const SMDS_MeshNode * node2,
const SMDS_MeshNode * node3, const SMDS_MeshNode * node3,
const SMDS_MeshNode * node4, const SMDS_MeshNode * node4,
const SMDS_MeshNode * node5, const SMDS_MeshNode * node5,
const SMDS_MeshNode * node6, const SMDS_MeshNode * node6,
const SMDS_MeshNode * node7, const SMDS_MeshNode * node7,
const SMDS_MeshNode * node8); const SMDS_MeshNode * node8);
bool ChangeNodes(const SMDS_MeshNode* nodes[], bool ChangeNodes(const SMDS_MeshNode* nodes[],
const int nbNodes); const int nbNodes);
~SMDS_VolumeOfNodes(); ~SMDS_VolumeOfNodes();
void Print(std::ostream & OS) const; void Print(std::ostream & OS) const;
int NbFaces() const; int NbFaces() const;
int NbNodes() const; int NbNodes() const;
int NbEdges() const; int NbEdges() const;
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
virtual SMDSAbs_EntityType GetEntityType() 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; virtual const SMDS_MeshNode* GetNode(const int ind) const;
protected: protected:
SMDS_ElemIteratorPtr SMDS_ElemIteratorPtr
elementsIterator(SMDSAbs_ElementType type) const; elementsIterator(SMDSAbs_ElementType type) const;
const SMDS_MeshNode** myNodes; const SMDS_MeshNode** myNodes;
int myNbNodes; int myNbNodes;
}; };
#endif #endif

View File

@ -148,7 +148,7 @@ public:
private: 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; std::map < int, StudyContextStruct * >_mapStudyContext;
// hypotheses managing // hypotheses managing

View File

@ -84,8 +84,8 @@ namespace
//function : AddNodesWithID //function : AddNodesWithID
//======================================================================= //=======================================================================
inline void AddNodesWithID(SMDS_Mesh* theMesh, inline void AddNodesWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq, SMESH::log_array_var& theSeq,
CORBA::Long theId) CORBA::Long theId)
{ {
const SMESH::double_array& aCoords = theSeq[theId].coords; const SMESH::double_array& aCoords = theSeq[theId].coords;
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
@ -94,11 +94,11 @@ namespace
EXCEPTION(runtime_error,"AddNodesWithID - 3*aNbElems != aCoords.length()"); EXCEPTION(runtime_error,"AddNodesWithID - 3*aNbElems != aCoords.length()");
for(CORBA::Long aCoordId = 0; anElemId < aNbElems; anElemId++, aCoordId+=3){ for(CORBA::Long aCoordId = 0; anElemId < aNbElems; anElemId++, aCoordId+=3){
SMDS_MeshElement* anElem = theMesh->AddNodeWithID(aCoords[aCoordId], SMDS_MeshElement* anElem = theMesh->AddNodeWithID(aCoords[aCoordId],
aCoords[aCoordId+1], aCoords[aCoordId+1],
aCoords[aCoordId+2], aCoords[aCoordId+2],
anIndexes[anElemId]); anIndexes[anElemId]);
if(!anElem) 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], SMDS_MeshElement* anElem = theMesh->Add0DElementWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if (!anElem) 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 //function : AddEdgesWithID
//======================================================================= //=======================================================================
inline void AddEdgesWithID(SMDS_Mesh* theMesh, inline void AddEdgesWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq, SMESH::log_array_var& theSeq,
CORBA::Long theId) CORBA::Long theId)
{ {
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@ -138,10 +138,10 @@ namespace
EXCEPTION(runtime_error,"AddEdgeWithID - 3*aNbElems != aCoords.length()"); EXCEPTION(runtime_error,"AddEdgeWithID - 3*aNbElems != aCoords.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=3){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=3){
SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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 //function : AddTriasWithID
//======================================================================= //=======================================================================
inline void AddTriasWithID(SMDS_Mesh* theMesh, inline void AddTriasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq, SMESH::log_array_var& theSeq,
CORBA::Long theId) CORBA::Long theId)
{ {
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@ -159,11 +159,11 @@ namespace
EXCEPTION(runtime_error,"AddTriasWithID - 4*aNbElems != anIndexes.length()"); EXCEPTION(runtime_error,"AddTriasWithID - 4*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){
SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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 //function : AddQuadsWithID
//======================================================================= //=======================================================================
inline void AddQuadsWithID(SMDS_Mesh* theMesh, inline void AddQuadsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var theSeq, SMESH::log_array_var theSeq,
CORBA::Long theId) CORBA::Long theId)
{ {
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@ -181,12 +181,12 @@ namespace
EXCEPTION(runtime_error,"AddQuadsWithID - 4*aNbElems != anIndexes.length()"); EXCEPTION(runtime_error,"AddQuadsWithID - 4*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){
SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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); SMDS_MeshElement* anElem = theMesh->AddPolygonalFaceWithID(nodes_ids, aFaceId);
if (!anElem) if (!anElem)
EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolygonalFaceWithID for ID = " EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolygonalFaceWithID for ID = "
<< anElemId); << anElemId);
} }
} }
@ -222,8 +222,8 @@ namespace
//function : AddTetrasWithID //function : AddTetrasWithID
//======================================================================= //=======================================================================
inline void AddTetrasWithID(SMDS_Mesh* theMesh, inline void AddTetrasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq, SMESH::log_array_var& theSeq,
CORBA::Long theId) CORBA::Long theId)
{ {
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@ -231,12 +231,12 @@ namespace
EXCEPTION(runtime_error,"AddTetrasWithID - 5*aNbElems != anIndexes.length()"); EXCEPTION(runtime_error,"AddTetrasWithID - 5*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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 //function : AddPiramidsWithID
//======================================================================= //=======================================================================
inline void AddPiramidsWithID(SMDS_Mesh* theMesh, inline void AddPiramidsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq, SMESH::log_array_var& theSeq,
CORBA::Long theId) CORBA::Long theId)
{ {
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@ -254,13 +254,13 @@ namespace
EXCEPTION(runtime_error,"AddPiramidsWithID - 6*aNbElems != anIndexes.length()"); EXCEPTION(runtime_error,"AddPiramidsWithID - 6*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=6){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=6){
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId+5], anIndexes[anIndexId+5],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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 //function : AddPrismsWithID
//======================================================================= //=======================================================================
inline void AddPrismsWithID(SMDS_Mesh* theMesh, inline void AddPrismsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq, SMESH::log_array_var& theSeq,
CORBA::Long theId) CORBA::Long theId)
{ {
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@ -278,14 +278,14 @@ namespace
EXCEPTION(runtime_error,"AddPrismsWithID - 7*aNbElems != anIndexes.length()"); EXCEPTION(runtime_error,"AddPrismsWithID - 7*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=7){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=7){
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId+5], anIndexes[anIndexId+5],
anIndexes[anIndexId+6], anIndexes[anIndexId+6],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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 //function : AddHexasWithID
//======================================================================= //=======================================================================
inline void AddHexasWithID(SMDS_Mesh* theMesh, inline void AddHexasWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq, SMESH::log_array_var& theSeq,
CORBA::Long theId) CORBA::Long theId)
{ {
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@ -303,16 +303,16 @@ namespace
EXCEPTION(runtime_error,"AddHexasWithID - 9*aNbElems != anIndexes.length()"); EXCEPTION(runtime_error,"AddHexasWithID - 9*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=9){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=9){
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId+5], anIndexes[anIndexId+5],
anIndexes[anIndexId+6], anIndexes[anIndexId+6],
anIndexes[anIndexId+7], anIndexes[anIndexId+7],
anIndexes[anIndexId+8], anIndexes[anIndexId+8],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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 = SMDS_MeshElement* anElem =
theMesh->AddPolyhedralVolumeWithID(nodes_ids, quantities, aFaceId); theMesh->AddPolyhedralVolumeWithID(nodes_ids, quantities, aFaceId);
if (!anElem) if (!anElem)
EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolyhedralVolumeWithID for ID = " EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolyhedralVolumeWithID for ID = "
<< anElemId); << anElemId);
} }
} }
@ -364,11 +364,11 @@ namespace
EXCEPTION(runtime_error,"AddQuadEdgeWithID - 4*aNbElems != aCoords.length()"); EXCEPTION(runtime_error,"AddQuadEdgeWithID - 4*aNbElems != aCoords.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){
SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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()"); EXCEPTION(runtime_error,"AddQuadTriasWithID - 7*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=7){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=7){
SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId+5], anIndexes[anIndexId+5],
anIndexes[anIndexId+6], anIndexes[anIndexId+6],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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()"); EXCEPTION(runtime_error,"AddQuadQuadsWithID - 9*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=9){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=9){
SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId+5], anIndexes[anIndexId+5],
anIndexes[anIndexId+6], anIndexes[anIndexId+6],
anIndexes[anIndexId+7], anIndexes[anIndexId+7],
anIndexes[anIndexId+8], anIndexes[anIndexId+8],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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()"); EXCEPTION(runtime_error,"AddQuadTetrasWithID - 11*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=11){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=11){
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId+5], anIndexes[anIndexId+5],
anIndexes[anIndexId+6], anIndexes[anIndexId+6],
anIndexes[anIndexId+7], anIndexes[anIndexId+7],
anIndexes[anIndexId+8], anIndexes[anIndexId+8],
anIndexes[anIndexId+9], anIndexes[anIndexId+9],
anIndexes[anIndexId+10], anIndexes[anIndexId+10],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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()"); EXCEPTION(runtime_error,"AddQuadPiramidsWithID - 14*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=14){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=14){
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId+5], anIndexes[anIndexId+5],
anIndexes[anIndexId+6], anIndexes[anIndexId+6],
anIndexes[anIndexId+7], anIndexes[anIndexId+7],
anIndexes[anIndexId+8], anIndexes[anIndexId+8],
anIndexes[anIndexId+9], anIndexes[anIndexId+9],
anIndexes[anIndexId+10], anIndexes[anIndexId+10],
anIndexes[anIndexId+11], anIndexes[anIndexId+11],
anIndexes[anIndexId+12], anIndexes[anIndexId+12],
anIndexes[anIndexId+13], anIndexes[anIndexId+13],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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()"); EXCEPTION(runtime_error,"AddQuadPentasWithID - 16*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=16){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=16){
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId+5], anIndexes[anIndexId+5],
anIndexes[anIndexId+6], anIndexes[anIndexId+6],
anIndexes[anIndexId+7], anIndexes[anIndexId+7],
anIndexes[anIndexId+8], anIndexes[anIndexId+8],
anIndexes[anIndexId+9], anIndexes[anIndexId+9],
anIndexes[anIndexId+10], anIndexes[anIndexId+10],
anIndexes[anIndexId+11], anIndexes[anIndexId+11],
anIndexes[anIndexId+12], anIndexes[anIndexId+12],
anIndexes[anIndexId+13], anIndexes[anIndexId+13],
anIndexes[anIndexId+14], anIndexes[anIndexId+14],
anIndexes[anIndexId+15], anIndexes[anIndexId+15],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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()"); EXCEPTION(runtime_error,"AddQuadHexasWithID - 21*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=21){ for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=21){
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
anIndexes[anIndexId+4], anIndexes[anIndexId+4],
anIndexes[anIndexId+5], anIndexes[anIndexId+5],
anIndexes[anIndexId+6], anIndexes[anIndexId+6],
anIndexes[anIndexId+7], anIndexes[anIndexId+7],
anIndexes[anIndexId+8], anIndexes[anIndexId+8],
anIndexes[anIndexId+9], anIndexes[anIndexId+9],
anIndexes[anIndexId+10], anIndexes[anIndexId+10],
anIndexes[anIndexId+11], anIndexes[anIndexId+11],
anIndexes[anIndexId+12], anIndexes[anIndexId+12],
anIndexes[anIndexId+13], anIndexes[anIndexId+13],
anIndexes[anIndexId+14], anIndexes[anIndexId+14],
anIndexes[anIndexId+15], anIndexes[anIndexId+15],
anIndexes[anIndexId+16], anIndexes[anIndexId+16],
anIndexes[anIndexId+17], anIndexes[anIndexId+17],
anIndexes[anIndexId+18], anIndexes[anIndexId+18],
anIndexes[anIndexId+19], anIndexes[anIndexId+19],
anIndexes[anIndexId+20], anIndexes[anIndexId+20],
anIndexes[anIndexId]); anIndexes[anIndexId]);
if(!anElem) 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::SMESH_Gen_var
SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB, SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
CORBA::Boolean& theIsEmbeddedMode) CORBA::Boolean& theIsEmbeddedMode)
{ {
static SMESH::SMESH_Gen_var aMeshGen; static SMESH::SMESH_Gen_var aMeshGen;
@ -629,7 +629,7 @@ SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
// purpose : // purpose :
//======================================================================= //=======================================================================
SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB, SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
SMESH::SMESH_Mesh_ptr theMesh): SMESH::SMESH_Mesh_ptr theMesh):
myMeshServer(SMESH::SMESH_Mesh::_duplicate(theMesh)), myMeshServer(SMESH::SMESH_Mesh::_duplicate(theMesh)),
mySMESHDSMesh(NULL), mySMESHDSMesh(NULL),
mySMDSMesh(NULL) mySMDSMesh(NULL)
@ -722,14 +722,14 @@ SMESH_Client::Update(bool theIsClear)
{ {
for ( CORBA::Long anId = 0; anId < aLength; anId++) for ( CORBA::Long anId = 0; anId < aLength; anId++)
{ {
const SMESH::double_array& aCoords = aSeq[anId].coords; const SMESH::double_array& aCoords = aSeq[anId].coords;
const SMESH::long_array& anIndexes = aSeq[anId].indexes; const SMESH::long_array& anIndexes = aSeq[anId].indexes;
CORBA::Long anElemId = 0, aNbElems = aSeq[anId].number; CORBA::Long anElemId = 0, aNbElems = aSeq[anId].number;
CORBA::Long aCommand = aSeq[anId].commandType; 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_ELEM0D : Add0DElementsWithID ( mySMDSMesh, aSeq, anId ); break;
case SMESH::ADD_EDGE : AddEdgesWithID ( mySMDSMesh, aSeq, anId ); break; case SMESH::ADD_EDGE : AddEdgesWithID ( mySMDSMesh, aSeq, anId ); break;
case SMESH::ADD_TRIANGLE : AddTriasWithID ( mySMDSMesh, aSeq, anId ); break; case SMESH::ADD_TRIANGLE : AddTriasWithID ( mySMDSMesh, aSeq, anId ); break;
@ -800,7 +800,7 @@ SMESH_Client::Update(bool theIsClear)
break; break;
default:; default:;
} }
} }
} }
catch ( SALOME::SALOME_Exception& exc ) catch ( SALOME::SALOME_Exception& exc )

View File

@ -54,10 +54,10 @@ public:
static static
SMESH::SMESH_Gen_var SMESH::SMESH_Gen_var
GetSMESHGen(CORBA::ORB_ptr theORB, GetSMESHGen(CORBA::ORB_ptr theORB,
CORBA::Boolean& theIsEmbeddedMode); CORBA::Boolean& theIsEmbeddedMode);
SMESH_Client(CORBA::ORB_ptr theORB, SMESH_Client(CORBA::ORB_ptr theORB,
SMESH::SMESH_Mesh_ptr theMesh); SMESH::SMESH_Mesh_ptr theMesh);
~SMESH_Client(); ~SMESH_Client();
bool bool

View File

@ -54,16 +54,16 @@ SMESHDS_Command::~SMESHDS_Command()
//======================================================================= //=======================================================================
void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z) void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z)
{ {
if (!myType == SMESHDS_AddNode) if (!myType == SMESHDS_AddNode)
{ {
MESSAGE("SMESHDS_Command::AddNode : Bad Type"); MESSAGE("SMESHDS_Command::AddNode : Bad Type");
return; return;
} }
myIntegers.push_back(NewNodeID); myIntegers.push_back(NewNodeID);
myReals.push_back(x); myReals.push_back(x);
myReals.push_back(y); myReals.push_back(y);
myReals.push_back(z); myReals.push_back(z);
myNumber++; 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) void SMESHDS_Command::MoveNode(int NodeID, double x, double y, double z)
{ {
if (!myType == SMESHDS_MoveNode) if (!myType == SMESHDS_MoveNode)
{ {
MESSAGE("SMESHDS_Command::MoveNode : Bad Type"); MESSAGE("SMESHDS_Command::MoveNode : Bad Type");
return; return;
} }
myIntegers.push_back(NodeID); myIntegers.push_back(NodeID);
myReals.push_back(x); myReals.push_back(x);
myReals.push_back(y); myReals.push_back(y);
myReals.push_back(z); myReals.push_back(z);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -106,15 +106,15 @@ void SMESHDS_Command::Add0DElement(int New0DElementID, int idnode)
//======================================================================= //=======================================================================
void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2) void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2)
{ {
if (!myType == SMESHDS_AddEdge) if (!myType == SMESHDS_AddEdge)
{ {
MESSAGE("SMESHDS_Command::AddEdge : Bad Type"); MESSAGE("SMESHDS_Command::AddEdge : Bad Type");
return; return;
} }
myIntegers.push_back(NewEdgeID); myIntegers.push_back(NewEdgeID);
myIntegers.push_back(idnode1); myIntegers.push_back(idnode1);
myIntegers.push_back(idnode2); myIntegers.push_back(idnode2);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -122,18 +122,18 @@ void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2)
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddFace(int NewFaceID, void SMESHDS_Command::AddFace(int NewFaceID,
int idnode1, int idnode2, int idnode3) int idnode1, int idnode2, int idnode3)
{ {
if (!myType == SMESHDS_AddTriangle) if (!myType == SMESHDS_AddTriangle)
{ {
MESSAGE("SMESHDS_Command::AddFace : Bad Type"); MESSAGE("SMESHDS_Command::AddFace : Bad Type");
return; return;
} }
myIntegers.push_back(NewFaceID); myIntegers.push_back(NewFaceID);
myIntegers.push_back(idnode1); myIntegers.push_back(idnode1);
myIntegers.push_back(idnode2); myIntegers.push_back(idnode2);
myIntegers.push_back(idnode3); myIntegers.push_back(idnode3);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -141,19 +141,19 @@ void SMESHDS_Command::AddFace(int NewFaceID,
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddFace(int NewFaceID, 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) if (!myType == SMESHDS_AddQuadrangle)
{ {
MESSAGE("SMESHDS_Command::AddFace : Bad Type"); MESSAGE("SMESHDS_Command::AddFace : Bad Type");
return; return;
} }
myIntegers.push_back(NewFaceID); myIntegers.push_back(NewFaceID);
myIntegers.push_back(idnode1); myIntegers.push_back(idnode1);
myIntegers.push_back(idnode2); myIntegers.push_back(idnode2);
myIntegers.push_back(idnode3); myIntegers.push_back(idnode3);
myIntegers.push_back(idnode4); myIntegers.push_back(idnode4);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -161,19 +161,19 @@ void SMESHDS_Command::AddFace(int NewFaceID,
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, 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) if (!myType == SMESHDS_AddTetrahedron)
{ {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return; return;
} }
myIntegers.push_back(NewVolID); myIntegers.push_back(NewVolID);
myIntegers.push_back(idnode1); myIntegers.push_back(idnode1);
myIntegers.push_back(idnode2); myIntegers.push_back(idnode2);
myIntegers.push_back(idnode3); myIntegers.push_back(idnode3);
myIntegers.push_back(idnode4); myIntegers.push_back(idnode4);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -181,20 +181,20 @@ void SMESHDS_Command::AddVolume(int NewVolID,
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, 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) if (!myType == SMESHDS_AddPyramid)
{ {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return; return;
} }
myIntegers.push_back(NewVolID); myIntegers.push_back(NewVolID);
myIntegers.push_back(idnode1); myIntegers.push_back(idnode1);
myIntegers.push_back(idnode2); myIntegers.push_back(idnode2);
myIntegers.push_back(idnode3); myIntegers.push_back(idnode3);
myIntegers.push_back(idnode4); myIntegers.push_back(idnode4);
myIntegers.push_back(idnode5); myIntegers.push_back(idnode5);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -202,22 +202,22 @@ void SMESHDS_Command::AddVolume(int NewVolID,
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, void SMESHDS_Command::AddVolume(int NewVolID,
int idnode1, int idnode1,
int idnode2, int idnode3, int idnode4, int idnode5, int idnode6) int idnode2, int idnode3, int idnode4, int idnode5, int idnode6)
{ {
if (!myType == SMESHDS_AddPrism) if (!myType == SMESHDS_AddPrism)
{ {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return; return;
} }
myIntegers.push_back(NewVolID); myIntegers.push_back(NewVolID);
myIntegers.push_back(idnode1); myIntegers.push_back(idnode1);
myIntegers.push_back(idnode2); myIntegers.push_back(idnode2);
myIntegers.push_back(idnode3); myIntegers.push_back(idnode3);
myIntegers.push_back(idnode4); myIntegers.push_back(idnode4);
myIntegers.push_back(idnode5); myIntegers.push_back(idnode5);
myIntegers.push_back(idnode6); myIntegers.push_back(idnode6);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -225,26 +225,26 @@ void SMESHDS_Command::AddVolume(int NewVolID,
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, void SMESHDS_Command::AddVolume(int NewVolID,
int idnode1, int idnode1,
int idnode2, int idnode2,
int idnode3, int idnode3,
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8) int idnode4, int idnode5, int idnode6, int idnode7, int idnode8)
{ {
if (!myType == SMESHDS_AddHexahedron) if (!myType == SMESHDS_AddHexahedron)
{ {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return; return;
} }
myIntegers.push_back(NewVolID); myIntegers.push_back(NewVolID);
myIntegers.push_back(idnode1); myIntegers.push_back(idnode1);
myIntegers.push_back(idnode2); myIntegers.push_back(idnode2);
myIntegers.push_back(idnode3); myIntegers.push_back(idnode3);
myIntegers.push_back(idnode4); myIntegers.push_back(idnode4);
myIntegers.push_back(idnode5); myIntegers.push_back(idnode5);
myIntegers.push_back(idnode6); myIntegers.push_back(idnode6);
myIntegers.push_back(idnode7); myIntegers.push_back(idnode7);
myIntegers.push_back(idnode8); myIntegers.push_back(idnode8);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -304,13 +304,13 @@ void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
//======================================================================= //=======================================================================
void SMESHDS_Command::RemoveNode(int NodeID) void SMESHDS_Command::RemoveNode(int NodeID)
{ {
if (!myType == SMESHDS_RemoveNode) if (!myType == SMESHDS_RemoveNode)
{ {
MESSAGE("SMESHDS_Command::RemoveNode : Bad Type"); MESSAGE("SMESHDS_Command::RemoveNode : Bad Type");
return; return;
} }
myIntegers.push_back(NodeID); myIntegers.push_back(NodeID);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -319,13 +319,13 @@ void SMESHDS_Command::RemoveNode(int NodeID)
//======================================================================= //=======================================================================
void SMESHDS_Command::RemoveElement(int ElementID) void SMESHDS_Command::RemoveElement(int ElementID)
{ {
if (!myType == SMESHDS_RemoveElement) if (!myType == SMESHDS_RemoveElement)
{ {
MESSAGE("SMESHDS_Command::RemoveElement : Bad Type"); MESSAGE("SMESHDS_Command::RemoveElement : Bad Type");
return; return;
} }
myIntegers.push_back(ElementID); myIntegers.push_back(ElementID);
myNumber++; myNumber++;
} }
//======================================================================= //=======================================================================
@ -402,7 +402,7 @@ void SMESHDS_Command::Renumber (const bool isNodes, const int startID, const int
//======================================================================= //=======================================================================
SMESHDS_CommandType SMESHDS_Command::GetType() SMESHDS_CommandType SMESHDS_Command::GetType()
{ {
return myType; return myType;
} }
//======================================================================= //=======================================================================
@ -411,7 +411,7 @@ SMESHDS_CommandType SMESHDS_Command::GetType()
//======================================================================= //=======================================================================
int SMESHDS_Command::GetNumber() int SMESHDS_Command::GetNumber()
{ {
return myNumber; return myNumber;
} }
//======================================================================= //=======================================================================
@ -420,7 +420,7 @@ int SMESHDS_Command::GetNumber()
//======================================================================= //=======================================================================
const list < int >&SMESHDS_Command::GetIndexes() 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() const list < double >&SMESHDS_Command::GetCoords()
{ {
return myReals; return myReals;
} }

View File

@ -36,28 +36,28 @@ class SMESHDS_EXPORT SMESHDS_Command
{ {
public: public:
SMESHDS_Command(const SMESHDS_CommandType aType); SMESHDS_Command(const SMESHDS_CommandType aType);
void AddNode(int NewNodeID, double x, double y, double z); void AddNode(int NewNodeID, double x, double y, double z);
void Add0DElement(int New0DElementID, int idnode); void Add0DElement(int New0DElementID, int idnode);
void AddEdge(int NewEdgeID, int idnode1, int idnode2); 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);
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3, void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
int idnode4); int idnode4);
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
int idnode4); int idnode4);
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
int idnode4, int idnode5); int idnode4, int idnode5);
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
int idnode4, int idnode5, int idnode6); int idnode4, int idnode5, int idnode6);
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8); int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
void AddPolygonalFace (const int ElementID, void AddPolygonalFace (const int ElementID,
std::vector<int> nodes_ids); std::vector<int> nodes_ids);
void AddPolyhedralVolume (const int ElementID, void AddPolyhedralVolume (const int ElementID,
std::vector<int> nodes_ids, std::vector<int> nodes_ids,
std::vector<int> quantities); std::vector<int> quantities);
// special methods for quadratic elements // 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, void AddFace(int NewFaceID, int n1, int n2, int n3,
int n12, int n23, int n31); int n12, int n23, int n31);
void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, 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 n56, int n67, int n78, int n85,
int n15, int n26, int n37, int n48); int n15, int n26, int n37, int n48);
void MoveNode(int NewNodeID, double x, double y, double z); void MoveNode(int NewNodeID, double x, double y, double z);
void RemoveNode(int NodeID); void RemoveNode(int NodeID);
void RemoveElement(int ElementID); void RemoveElement(int ElementID);
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes); void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
void ChangePolyhedronNodes(const int ElementID, void ChangePolyhedronNodes(const int ElementID,
std::vector<int> nodes_ids, std::vector<int> nodes_ids,
std::vector<int> quantities); std::vector<int> quantities);
void Renumber (const bool isNodes, const int startID, const int deltaID); void Renumber (const bool isNodes, const int startID, const int deltaID);
SMESHDS_CommandType GetType(); SMESHDS_CommandType GetType();
int GetNumber(); int GetNumber();
const std::list<int> & GetIndexes(); const std::list<int> & GetIndexes();
const std::list<double> & GetCoords(); const std::list<double> & GetCoords();
~SMESHDS_Command(); ~SMESHDS_Command();
private: private:
SMESHDS_CommandType myType; SMESHDS_CommandType myType;
int myNumber; int myNumber;
std::list<double> myReals; std::list<double> myReals;
std::list<int> myIntegers; std::list<int> myIntegers;
}; };
#endif #endif

View File

@ -69,13 +69,13 @@ int SMESHDS_Document::NewMesh(bool theIsEmbeddedMode)
//======================================================================= //=======================================================================
SMESHDS_Mesh *SMESHDS_Document::GetMesh(int MeshID) SMESHDS_Mesh *SMESHDS_Document::GetMesh(int MeshID)
{ {
map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID); map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
if (it==myMeshes.end()) if (it==myMeshes.end())
{ {
MESSAGE("SMESHDS_Document::GetMesh : ID not found"); MESSAGE("SMESHDS_Document::GetMesh : ID not found");
return NULL; return NULL;
} }
else return (*it).second; else return (*it).second;
} }
//======================================================================= //=======================================================================
@ -84,10 +84,10 @@ SMESHDS_Mesh *SMESHDS_Document::GetMesh(int MeshID)
//======================================================================= //=======================================================================
void SMESHDS_Document::RemoveMesh(int MeshID) void SMESHDS_Document::RemoveMesh(int MeshID)
{ {
map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID); map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
if (it==myMeshes.end()) if (it==myMeshes.end())
MESSAGE("SMESHDS_Document::RemoveMesh : ID not found"); MESSAGE("SMESHDS_Document::RemoveMesh : ID not found");
myMeshes.erase(it); myMeshes.erase(it);
} }
//======================================================================= //=======================================================================
@ -96,7 +96,7 @@ void SMESHDS_Document::RemoveMesh(int MeshID)
//======================================================================= //=======================================================================
void SMESHDS_Document::AddHypothesis(SMESHDS_Hypothesis * H) 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) SMESHDS_Hypothesis * SMESHDS_Document::GetHypothesis(int HypID)
{ {
map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID); map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
if (it==myHypothesis.end()) if (it==myHypothesis.end())
{ {
MESSAGE("SMESHDS_Document::GetHypothesis : ID not found"); MESSAGE("SMESHDS_Document::GetHypothesis : ID not found");
return NULL; return NULL;
} }
else return (*it).second; else return (*it).second;
} }
//======================================================================= //=======================================================================
@ -120,10 +120,10 @@ SMESHDS_Hypothesis * SMESHDS_Document::GetHypothesis(int HypID)
//======================================================================= //=======================================================================
void SMESHDS_Document::RemoveHypothesis(int HypID) void SMESHDS_Document::RemoveHypothesis(int HypID)
{ {
map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID); map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
if (it==myHypothesis.end()) if (it==myHypothesis.end())
MESSAGE("SMESHDS_Document::RemoveHypothesis : ID not found"); MESSAGE("SMESHDS_Document::RemoveHypothesis : ID not found");
myHypothesis.erase(it); myHypothesis.erase(it);
} }
//======================================================================= //=======================================================================
@ -132,7 +132,7 @@ void SMESHDS_Document::RemoveHypothesis(int HypID)
//======================================================================= //=======================================================================
int SMESHDS_Document::NbMeshes() int SMESHDS_Document::NbMeshes()
{ {
return myMeshes.size(); return myMeshes.size();
} }
//======================================================================= //=======================================================================
@ -141,7 +141,7 @@ int SMESHDS_Document::NbMeshes()
//======================================================================= //=======================================================================
int SMESHDS_Document::NbHypothesis() int SMESHDS_Document::NbHypothesis()
{ {
return myHypothesis.size(); return myHypothesis.size();
} }
//======================================================================= //=======================================================================
@ -150,7 +150,7 @@ int SMESHDS_Document::NbHypothesis()
//======================================================================= //=======================================================================
void SMESHDS_Document::InitMeshesIterator() 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 * SMESHDS_Document::NextMesh()
{ {
SMESHDS_Mesh * toReturn=(*myMeshesIt).second; SMESHDS_Mesh * toReturn=(*myMeshesIt).second;
myMeshesIt++; myMeshesIt++;
return toReturn; return toReturn;
} }
//======================================================================= //=======================================================================
@ -170,7 +170,7 @@ SMESHDS_Mesh * SMESHDS_Document::NextMesh()
//======================================================================= //=======================================================================
bool SMESHDS_Document::MoreMesh() bool SMESHDS_Document::MoreMesh()
{ {
return myMeshesIt!=myMeshes.end(); return myMeshesIt!=myMeshes.end();
} }
//======================================================================= //=======================================================================
@ -179,7 +179,7 @@ bool SMESHDS_Document::MoreMesh()
//======================================================================= //=======================================================================
void SMESHDS_Document::InitHypothesisIterator() 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 * SMESHDS_Document::NextHypothesis()
{ {
SMESHDS_Hypothesis * toReturn=(*myHypothesisIt).second; SMESHDS_Hypothesis * toReturn=(*myHypothesisIt).second;
myHypothesisIt++; myHypothesisIt++;
return toReturn; return toReturn;
} }
//======================================================================= //=======================================================================
@ -199,5 +199,5 @@ SMESHDS_Hypothesis * SMESHDS_Document::NextHypothesis()
//======================================================================= //=======================================================================
bool SMESHDS_Document::MoreHypothesis() bool SMESHDS_Document::MoreHypothesis()
{ {
return myHypothesisIt!=myHypothesis.end(); return myHypothesisIt!=myHypothesis.end();
} }

View File

@ -36,29 +36,29 @@
class SMESHDS_EXPORT SMESHDS_Document class SMESHDS_EXPORT SMESHDS_Document
{ {
public: public:
SMESHDS_Document(int UserID); SMESHDS_Document(int UserID);
int NewMesh(bool theIsEmbeddedMode); int NewMesh(bool theIsEmbeddedMode);
void RemoveMesh(int MeshID); void RemoveMesh(int MeshID);
SMESHDS_Mesh * GetMesh(int MeshID); SMESHDS_Mesh * GetMesh(int MeshID);
void AddHypothesis(SMESHDS_Hypothesis * H); void AddHypothesis(SMESHDS_Hypothesis * H);
void RemoveHypothesis(int HypID); void RemoveHypothesis(int HypID);
SMESHDS_Hypothesis * GetHypothesis(int HypID); SMESHDS_Hypothesis * GetHypothesis(int HypID);
int NbMeshes(); int NbMeshes();
int NbHypothesis(); int NbHypothesis();
void InitMeshesIterator(); void InitMeshesIterator();
SMESHDS_Mesh * NextMesh(); SMESHDS_Mesh * NextMesh();
bool MoreMesh(); bool MoreMesh();
void InitHypothesisIterator(); void InitHypothesisIterator();
SMESHDS_Hypothesis * NextHypothesis(); SMESHDS_Hypothesis * NextHypothesis();
bool MoreHypothesis(); bool MoreHypothesis();
~SMESHDS_Document(); ~SMESHDS_Document();
private: private:
int myUserID; int myUserID;
std::map<int,SMESHDS_Mesh*> myMeshes; std::map<int,SMESHDS_Mesh*> myMeshes;
std::map<int,SMESHDS_Hypothesis*> myHypothesis; std::map<int,SMESHDS_Hypothesis*> myHypothesis;
std::map<int,SMESHDS_Mesh*>::iterator myMeshesIt; std::map<int,SMESHDS_Mesh*>::iterator myMeshesIt;
std::map<int,SMESHDS_Hypothesis*>::iterator myHypothesisIt; std::map<int,SMESHDS_Hypothesis*>::iterator myHypothesisIt;
}; };
#endif #endif

View File

@ -37,35 +37,35 @@
class SMESHDS_EXPORT SMESHDS_Script class SMESHDS_EXPORT SMESHDS_Script
{ {
public: public:
SMESHDS_Script(bool theIsEmbeddedMode); SMESHDS_Script(bool theIsEmbeddedMode);
~SMESHDS_Script(); ~SMESHDS_Script();
void SetModified(bool theModified); void SetModified(bool theModified);
bool IsModified(); bool IsModified();
void AddNode(int NewNodeID, double x, double y, double z); void AddNode(int NewNodeID, double x, double y, double z);
void Add0DElement(int New0DElementID, int idnode); void Add0DElement(int New0DElementID, int idnode);
void AddEdge(int NewEdgeID, int idnode1, int idnode2); 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);
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3, void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
int idnode4); int idnode4);
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
int idnode4); int idnode4);
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
int idnode4, int idnode5); int idnode4, int idnode5);
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
int idnode4, int idnode5, int idnode6); int idnode4, int idnode5, int idnode6);
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8); int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
void AddPolygonalFace (const int NewFaceID, void AddPolygonalFace (const int NewFaceID,
std::vector<int> nodes_ids); std::vector<int> nodes_ids);
void AddPolyhedralVolume (const int NewVolID, void AddPolyhedralVolume (const int NewVolID,
std::vector<int> nodes_ids, std::vector<int> nodes_ids,
std::vector<int> quantities); std::vector<int> quantities);
// special methods for quadratic elements // 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, void AddFace(int NewFaceID, int n1, int n2, int n3,
int n12, int n23, int n31); int n12, int n23, int n31);
void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, 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 n56, int n67, int n78, int n85,
int n15, int n26, int n37, int n48); int n15, int n26, int n37, int n48);
void MoveNode(int NewNodeID, double x, double y, double z); void MoveNode(int NewNodeID, double x, double y, double z);
void RemoveNode(int NodeID); void RemoveNode(int NodeID);
void RemoveElement(int ElementID); void RemoveElement(int ElementID);
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes); void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
void ChangePolyhedronNodes(const int ElementID, void ChangePolyhedronNodes(const int ElementID,
std::vector<int> nodes_ids, std::vector<int> nodes_ids,
std::vector<int> quantities); std::vector<int> quantities);
void Renumber (const bool isNodes, const int startID, const int deltaID); void Renumber (const bool isNodes, const int startID, const int deltaID);
void ClearMesh(); void ClearMesh();
void Clear(); void Clear();
const std::list<SMESHDS_Command*> & GetCommands(); const std::list<SMESHDS_Command*> & GetCommands();
private: 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 myIsEmbeddedMode;
bool myIsModified; bool myIsModified;

View File

@ -141,9 +141,9 @@ template<class ELEM, typename TSET> class MySetIterator:
{ {
typedef SMDS_SetIterator<ELEM, typename TSET::const_iterator > TFather; typedef SMDS_SetIterator<ELEM, typename TSET::const_iterator > TFather;
public: public:
MySetIterator(const TSET& s):TFather(s.begin(),s.end()) MySetIterator(const TSET& s):TFather(s.begin(),s.end())
{ {
} }
}; };
// ===================== // =====================

View File

@ -87,90 +87,90 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
switch (myType) switch (myType)
{ {
case HYPOTHESIS: case HYPOTHESIS:
{ {
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_HypothesisRoot)) if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_HypothesisRoot))
// hypo definition // hypo definition
Ok = true; Ok = true;
else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis)) else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
// applied global hypo // applied global hypo
Ok = true; Ok = true;
else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis)) else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
// applied local hypo // applied local hypo
Ok = true; Ok = true;
break; break;
} }
case ALGORITHM: case ALGORITHM:
{ {
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_AlgorithmsRoot)) if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_AlgorithmsRoot))
// algo definition // algo definition
Ok = true; Ok = true;
else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms)) else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
// applied global algo // applied global algo
Ok = true; Ok = true;
else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms)) else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
// applied local algo // applied local algo
Ok = true; Ok = true;
break; break;
} }
case MESH: case MESH:
{ {
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot)) if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
Ok = true; Ok = true;
break; break;
} }
case SUBMESH: case SUBMESH:
{ {
// see SMESH_Gen_i.cxx for tag numbers // see SMESH_Gen_i.cxx for tag numbers
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh && if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
objFather->Tag() <= SMESH::Tag_LastSubMesh)) objFather->Tag() <= SMESH::Tag_LastSubMesh))
Ok = true; Ok = true;
break; break;
} }
case MESHorSUBMESH: case MESHorSUBMESH:
{ {
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot)) if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
Ok = true; // mesh Ok = true; // mesh
else if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh && else if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
objFather->Tag() <= SMESH::Tag_LastSubMesh)) objFather->Tag() <= SMESH::Tag_LastSubMesh))
Ok = true; Ok = true;
break; break;
} }
case SUBMESH_VERTEX: // Label "SubMeshes on vertexes" case SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
{ {
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnVertex)) if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnVertex))
Ok = true; Ok = true;
break; break;
} }
case SUBMESH_EDGE: case SUBMESH_EDGE:
{ {
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnEdge)) if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnEdge))
Ok = true; Ok = true;
break; break;
} }
case SUBMESH_FACE: case SUBMESH_FACE:
{ {
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnFace)) if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnFace))
Ok = true; Ok = true;
break; break;
} }
case SUBMESH_SOLID: case SUBMESH_SOLID:
{ {
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnSolid)) if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnSolid))
Ok = true; Ok = true;
break; break;
} }
case SUBMESH_COMPOUND: case SUBMESH_COMPOUND:
{ {
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnCompound)) if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnCompound))
Ok = true; Ok = true;
break; break;
} }
case GROUP: case GROUP:
{ {
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstGroup)) if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstGroup))
Ok = true; Ok = true;
break; break;
} }
} }
} }
return Ok; return Ok;

View File

@ -112,8 +112,8 @@ void SMESHGUI_MeshOrderOp::initDialog()
aMesh = SMESH::GetMeshByIO(selected.First()); aMesh = SMESH::GetMeshByIO(selected.First());
if (aMesh->_is_nil()) { if (aMesh->_is_nil()) {
SUIT_MessageBox::warning(desktop(), SUIT_MessageBox::warning(desktop(),
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_WARNING"),
tr("SMESH_WRN_NO_AVAILABLE_DATA")); tr("SMESH_WRN_NO_AVAILABLE_DATA"));
onCancel(); onCancel();
return; return;
} }
@ -122,8 +122,8 @@ void SMESHGUI_MeshOrderOp::initDialog()
myMgr->SetMesh( aMesh ); myMgr->SetMesh( aMesh );
if ( !myMgr->GetMeshOrder() ) { if ( !myMgr->GetMeshOrder() ) {
SUIT_MessageBox::information(desktop(), SUIT_MessageBox::information(desktop(),
tr("SMESH_INFORMATION"), tr("SMESH_INFORMATION"),
tr("SMESH_NO_CONCURENT_MESH")); tr("SMESH_NO_CONCURENT_MESH"));
onCancel(); onCancel();
return; return;

View File

@ -71,10 +71,10 @@ namespace
inline inline
SALOMEDS::SObject_var SALOMEDS::SObject_var
GetDomainRoot(const SALOMEDS::SComponent_var& theSComponentMesh, GetDomainRoot(const SALOMEDS::SComponent_var& theSComponentMesh,
const SALOMEDS::StudyBuilder_var& theStudyBuilder, const SALOMEDS::StudyBuilder_var& theStudyBuilder,
CORBA::Long theDomainRootTag, CORBA::Long theDomainRootTag,
const QString& theName, const QString& theName,
const QString& thePixmap) const QString& thePixmap)
{ {
SALOMEDS::SObject_var aDomainRoot; SALOMEDS::SObject_var aDomainRoot;
if (!theSComponentMesh->FindSubObject(theDomainRootTag,aDomainRoot)) { if (!theSComponentMesh->FindSubObject(theDomainRootTag,aDomainRoot)) {
@ -98,13 +98,13 @@ namespace
inline inline
SALOMEDS::SObject_var SALOMEDS::SObject_var
GetHypothesisRoot(const SALOMEDS::SComponent_var& theSComponentMesh, GetHypothesisRoot(const SALOMEDS::SComponent_var& theSComponentMesh,
const SALOMEDS::StudyBuilder_var& theStudyBuilder) const SALOMEDS::StudyBuilder_var& theStudyBuilder)
{ {
return GetDomainRoot(theSComponentMesh, return GetDomainRoot(theSComponentMesh,
theStudyBuilder, theStudyBuilder,
SMESH::Tag_HypothesisRoot, SMESH::Tag_HypothesisRoot,
QObject::tr("SMESH_MEN_HYPOTHESIS"), QObject::tr("SMESH_MEN_HYPOTHESIS"),
"ICON_SMESH_TREE_HYPO"); "ICON_SMESH_TREE_HYPO");
} }
@ -112,13 +112,13 @@ namespace
inline inline
SALOMEDS::SObject_var SALOMEDS::SObject_var
GetAlgorithmsRoot(const SALOMEDS::SComponent_var& theSComponentMesh, GetAlgorithmsRoot(const SALOMEDS::SComponent_var& theSComponentMesh,
const SALOMEDS::StudyBuilder_var& theStudyBuilder) const SALOMEDS::StudyBuilder_var& theStudyBuilder)
{ {
return GetDomainRoot(theSComponentMesh, return GetDomainRoot(theSComponentMesh,
theStudyBuilder, theStudyBuilder,
SMESH::Tag_AlgorithmsRoot, SMESH::Tag_AlgorithmsRoot,
QObject::tr("SMESH_MEN_ALGORITHMS"), QObject::tr("SMESH_MEN_ALGORITHMS"),
"ICON_SMESH_TREE_ALGO"); "ICON_SMESH_TREE_ALGO");
} }
@ -126,17 +126,17 @@ namespace
inline inline
SALOMEDS::SObject_var SALOMEDS::SObject_var
AddToDomain(const std::string& theIOR, AddToDomain(const std::string& theIOR,
const SALOMEDS::SComponent_var& theSComponentMesh, const SALOMEDS::SComponent_var& theSComponentMesh,
const SALOMEDS::StudyBuilder_var& theStudyBuilder, const SALOMEDS::StudyBuilder_var& theStudyBuilder,
CORBA::Long theDomainRootTag, CORBA::Long theDomainRootTag,
const QString& theDomainName, const QString& theDomainName,
const QString& theDomainPixmap) const QString& theDomainPixmap)
{ {
SALOMEDS::SObject_var aDomain = GetDomainRoot(theSComponentMesh, SALOMEDS::SObject_var aDomain = GetDomainRoot(theSComponentMesh,
theStudyBuilder, theStudyBuilder,
SMESH::Tag_AlgorithmsRoot, SMESH::Tag_AlgorithmsRoot,
theDomainName, theDomainName,
theDomainPixmap); theDomainPixmap);
// Add New Hypothesis // Add New Hypothesis
SALOMEDS::SObject_var aSObject = theStudyBuilder->NewObject(aDomain); SALOMEDS::SObject_var aSObject = theStudyBuilder->NewObject(aDomain);
SALOMEDS::GenericAttribute_var anAttr = theStudyBuilder->FindOrCreateAttribute(aSObject,"AttributePixMap"); SALOMEDS::GenericAttribute_var anAttr = theStudyBuilder->FindOrCreateAttribute(aSObject,"AttributePixMap");
@ -157,42 +157,42 @@ namespace
//--------------------------------------------------------------- //---------------------------------------------------------------
SALOMEDS::SObject_var SALOMEDS::SObject_var
AddHypothesis(const std::string& theIOR, AddHypothesis(const std::string& theIOR,
const SALOMEDS::SComponent_var& theSComponentMesh, const SALOMEDS::SComponent_var& theSComponentMesh,
const SALOMEDS::StudyBuilder_var& theStudyBuilder) const SALOMEDS::StudyBuilder_var& theStudyBuilder)
{ {
return AddToDomain(theIOR, return AddToDomain(theIOR,
theSComponentMesh, theSComponentMesh,
theStudyBuilder, theStudyBuilder,
SMESH::Tag_HypothesisRoot, SMESH::Tag_HypothesisRoot,
QObject::tr("SMESH_MEN_HYPOTHESIS"), QObject::tr("SMESH_MEN_HYPOTHESIS"),
"ICON_SMESH_TREE_HYPO"); "ICON_SMESH_TREE_HYPO");
} }
//--------------------------------------------------------------- //---------------------------------------------------------------
SALOMEDS::SObject_var SALOMEDS::SObject_var
AddAlgorithms(const std::string& theIOR, AddAlgorithms(const std::string& theIOR,
const SALOMEDS::SComponent_var& theSComponentMesh, const SALOMEDS::SComponent_var& theSComponentMesh,
const SALOMEDS::StudyBuilder_var& theStudyBuilder) const SALOMEDS::StudyBuilder_var& theStudyBuilder)
{ {
return AddToDomain(theIOR, return AddToDomain(theIOR,
theSComponentMesh, theSComponentMesh,
theStudyBuilder, theStudyBuilder,
SMESH::Tag_AlgorithmsRoot, SMESH::Tag_AlgorithmsRoot,
QObject::tr("SMESH_MEN_ALGORITHMS"), QObject::tr("SMESH_MEN_ALGORITHMS"),
"ICON_SMESH_TREE_ALGO"); "ICON_SMESH_TREE_ALGO");
} }
//--------------------------------------------------------------- //---------------------------------------------------------------
void void
SetDomain(const char* theMeshOrSubMeshEntry, SetDomain(const char* theMeshOrSubMeshEntry,
const char* theDomainEntry, const char* theDomainEntry,
const SALOMEDS::Study_var& theStudy, const SALOMEDS::Study_var& theStudy,
const SALOMEDS::StudyBuilder_var& theStudyBuilder, const SALOMEDS::StudyBuilder_var& theStudyBuilder,
long theRefOnAppliedDomainTag, long theRefOnAppliedDomainTag,
const QString& theAppliedDomainMEN, const QString& theAppliedDomainMEN,
const QString& theAppliedDomainICON) const QString& theAppliedDomainICON)
{ {
SALOMEDS::SObject_var aMeshOrSubMeshSO = theStudy->FindObjectID(theMeshOrSubMeshEntry); SALOMEDS::SObject_var aMeshOrSubMeshSO = theStudy->FindObjectID(theMeshOrSubMeshEntry);
SALOMEDS::SObject_var aHypothesisSO = theStudy->FindObjectID(theDomainEntry); SALOMEDS::SObject_var aHypothesisSO = theStudy->FindObjectID(theDomainEntry);
@ -201,17 +201,17 @@ namespace
//Find or Create Applied Hypothesis root //Find or Create Applied Hypothesis root
SALOMEDS::SObject_var anAppliedDomainSO; SALOMEDS::SObject_var anAppliedDomainSO;
if(!aMeshOrSubMeshSO->FindSubObject(theRefOnAppliedDomainTag,anAppliedDomainSO)){ if(!aMeshOrSubMeshSO->FindSubObject(theRefOnAppliedDomainTag,anAppliedDomainSO)){
anAppliedDomainSO = theStudyBuilder->NewObjectToTag(aMeshOrSubMeshSO,theRefOnAppliedDomainTag); anAppliedDomainSO = theStudyBuilder->NewObjectToTag(aMeshOrSubMeshSO,theRefOnAppliedDomainTag);
SALOMEDS::GenericAttribute_var anAttr = SALOMEDS::GenericAttribute_var anAttr =
theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeName"); theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeName");
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr); SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
aName->SetValue(theAppliedDomainMEN.toLatin1().data()); aName->SetValue(theAppliedDomainMEN.toLatin1().data());
anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeSelectable"); anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeSelectable");
SALOMEDS::AttributeSelectable_var aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr); SALOMEDS::AttributeSelectable_var aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr);
aSelAttr->SetSelectable(false); aSelAttr->SetSelectable(false);
anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributePixMap"); anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributePixMap");
SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
aPixmap->SetPixMap(theAppliedDomainICON.toLatin1().data()); aPixmap->SetPixMap(theAppliedDomainICON.toLatin1().data());
} }
SALOMEDS::SObject_var aSObject = theStudyBuilder->NewObject(anAppliedDomainSO); SALOMEDS::SObject_var aSObject = theStudyBuilder->NewObject(anAppliedDomainSO);
theStudyBuilder->Addreference(aSObject,aHypothesisSO); theStudyBuilder->Addreference(aSObject,aHypothesisSO);
@ -222,34 +222,34 @@ namespace
//--------------------------------------------------------------- //---------------------------------------------------------------
void void
SetHypothesis(const char* theMeshOrSubMeshEntry, SetHypothesis(const char* theMeshOrSubMeshEntry,
const char* theDomainEntry, const char* theDomainEntry,
const SALOMEDS::Study_var& theStudy, const SALOMEDS::Study_var& theStudy,
const SALOMEDS::StudyBuilder_var& theStudyBuilder) const SALOMEDS::StudyBuilder_var& theStudyBuilder)
{ {
SetDomain(theMeshOrSubMeshEntry, SetDomain(theMeshOrSubMeshEntry,
theDomainEntry, theDomainEntry,
theStudy, theStudy,
theStudyBuilder, theStudyBuilder,
SMESH::Tag_RefOnAppliedHypothesis, SMESH::Tag_RefOnAppliedHypothesis,
QObject::tr("SMESH_MEN_APPLIED_HYPOTHESIS"), QObject::tr("SMESH_MEN_APPLIED_HYPOTHESIS"),
"ICON_SMESH_TREE_HYPO"); "ICON_SMESH_TREE_HYPO");
} }
//--------------------------------------------------------------- //---------------------------------------------------------------
void void
SetAlgorithms(const char* theMeshOrSubMeshEntry, SetAlgorithms(const char* theMeshOrSubMeshEntry,
const char* theDomainEntry, const char* theDomainEntry,
const SALOMEDS::Study_var& theStudy, const SALOMEDS::Study_var& theStudy,
const SALOMEDS::StudyBuilder_var& theStudyBuilder) const SALOMEDS::StudyBuilder_var& theStudyBuilder)
{ {
SetDomain(theMeshOrSubMeshEntry, SetDomain(theMeshOrSubMeshEntry,
theDomainEntry, theDomainEntry,
theStudy, theStudy,
theStudyBuilder, theStudyBuilder,
SMESH::Tag_RefOnAppliedAlgorithms, SMESH::Tag_RefOnAppliedAlgorithms,
QObject::tr("SMESH_MEN_APPLIED_ALGORIHTMS"), QObject::tr("SMESH_MEN_APPLIED_ALGORIHTMS"),
"ICON_SMESH_TREE_ALGO"); "ICON_SMESH_TREE_ALGO");
} }
} }
@ -271,11 +271,11 @@ SMESH_Swig::SMESH_Swig()
Execute() Execute()
{ {
try { try {
ORB_INIT &anORBInit = *SINGLETON_<ORB_INIT>::Instance(); ORB_INIT &anORBInit = *SINGLETON_<ORB_INIT>::Instance();
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()); ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
myORB = anORBInit( 0, 0 ); myORB = anORBInit( 0, 0 );
} catch (...) { } 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; SALOMEDS::SComponent_var& mySComponentMesh;
public: public:
TEvent(int theStudyID, TEvent(int theStudyID,
SALOMEDS::Study_var& theStudy, SALOMEDS::Study_var& theStudy,
SALOMEDS::StudyBuilder_var& theStudyBuilder, SALOMEDS::StudyBuilder_var& theStudyBuilder,
SALOMEDS::SComponent_var& theSComponentMesh): SALOMEDS::SComponent_var& theSComponentMesh):
myStudyID(theStudyID), myStudyID(theStudyID),
myStudy(theStudy), myStudy(theStudy),
myStudyBuilder(theStudyBuilder), myStudyBuilder(theStudyBuilder),
@ -334,28 +334,28 @@ SMESH_Swig::Init(int theStudyID)
SALOMEDS::SComponent_var aSComponent = myStudy->FindComponent("SMESH"); SALOMEDS::SComponent_var aSComponent = myStudy->FindComponent("SMESH");
if(aSComponent->_is_nil()){ if(aSComponent->_is_nil()){
bool aLocked = myStudy->GetProperties()->IsLocked(); bool aLocked = myStudy->GetProperties()->IsLocked();
if (aLocked) if (aLocked)
myStudy->GetProperties()->SetLocked(false); myStudy->GetProperties()->SetLocked(false);
aSComponent = myStudyBuilder->NewComponent("SMESH"); aSComponent = myStudyBuilder->NewComponent("SMESH");
anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributeName"); anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributeName");
aName = SALOMEDS::AttributeName::_narrow(anAttr); aName = SALOMEDS::AttributeName::_narrow(anAttr);
SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI(); //SRN: BugID IPAL9186, load a SMESH gui if it hasn't been loaded SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI(); //SRN: BugID IPAL9186, load a SMESH gui if it hasn't been loaded
if (!aSMESHGUI){ if (!aSMESHGUI){
CAM_Module* aModule = anApp->module("Mesh"); CAM_Module* aModule = anApp->module("Mesh");
if(!aModule) if(!aModule)
aModule = anApp->loadModule("Mesh"); aModule = anApp->loadModule("Mesh");
aSMESHGUI = dynamic_cast<SMESHGUI*>(aModule); aSMESHGUI = dynamic_cast<SMESHGUI*>(aModule);
} //SRN: BugID IPAL9186: end of a fix } //SRN: BugID IPAL9186: end of a fix
aName->SetValue(aSMESHGUI->moduleName().toLatin1().data()); aName->SetValue(aSMESHGUI->moduleName().toLatin1().data());
anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributePixMap"); anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" ); aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen); myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen);
if (aLocked) if (aLocked)
myStudy->GetProperties()->SetLocked(true); myStudy->GetProperties()->SetLocked(true);
} }
mySComponentMesh = SALOMEDS::SComponent::_narrow(aSComponent); mySComponentMesh = SALOMEDS::SComponent::_narrow(aSComponent);
@ -367,9 +367,9 @@ SMESH_Swig::Init(int theStudyID)
MESSAGE("Init"); MESSAGE("Init");
ProcessVoidEvent(new TEvent(theStudyID, ProcessVoidEvent(new TEvent(theStudyID,
myStudy, myStudy,
myStudyBuilder, myStudyBuilder,
mySComponentMesh)); mySComponentMesh));
} }
@ -414,8 +414,8 @@ const char* SMESH_Swig::AddNewHypothesis(const char* theIOR)
MESSAGE("AddNewHypothesis"); MESSAGE("AddNewHypothesis");
SALOMEDS::SObject_var aSObject = ::AddHypothesis(theIOR, SALOMEDS::SObject_var aSObject = ::AddHypothesis(theIOR,
mySComponentMesh, mySComponentMesh,
myStudyBuilder); myStudyBuilder);
CORBA::String_var anEntry = aSObject->GetID(); CORBA::String_var anEntry = aSObject->GetID();
return anEntry._retn(); return anEntry._retn();
} }
@ -427,8 +427,8 @@ const char* SMESH_Swig::AddNewAlgorithms(const char* theIOR)
MESSAGE("AddNewAlgorithms"); MESSAGE("AddNewAlgorithms");
SALOMEDS::SObject_var aSObject = ::AddAlgorithms(theIOR, SALOMEDS::SObject_var aSObject = ::AddAlgorithms(theIOR,
mySComponentMesh, mySComponentMesh,
myStudyBuilder); myStudyBuilder);
CORBA::String_var anEntry = aSObject->GetID(); CORBA::String_var anEntry = aSObject->GetID();
return anEntry._retn(); return anEntry._retn();
} }
@ -453,9 +453,9 @@ void SMESH_Swig::SetHypothesis(const char* theMeshOrSubMeshEntry,
const char* theDomainEntry) const char* theDomainEntry)
{ {
::SetHypothesis(theMeshOrSubMeshEntry, ::SetHypothesis(theMeshOrSubMeshEntry,
theDomainEntry, theDomainEntry,
myStudy, myStudy,
myStudyBuilder); myStudyBuilder);
} }
@ -464,9 +464,9 @@ void SMESH_Swig::SetAlgorithms(const char* theMeshOrSubMeshEntry,
const char* theDomainEntry) const char* theDomainEntry)
{ {
::SetAlgorithms(theMeshOrSubMeshEntry, ::SetAlgorithms(theMeshOrSubMeshEntry,
theDomainEntry, theDomainEntry,
myStudy, myStudy,
myStudyBuilder); myStudyBuilder);
} }
@ -599,7 +599,7 @@ void SMESH_Swig::SetName(const char* theEntry,
//================================================================================ //================================================================================
void SMESH_Swig::SetMeshIcon(const char* theMeshEntry, void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
const bool theIsComputed, const bool theIsComputed,
const bool isEmpty) const bool isEmpty)
{ {
class TEvent: public SALOME_Event class TEvent: public SALOME_Event
@ -609,8 +609,8 @@ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
bool myIsComputed, myIsEmpty; bool myIsComputed, myIsEmpty;
public: public:
TEvent(const SALOMEDS::Study_var& theStudy, TEvent(const SALOMEDS::Study_var& theStudy,
const std::string& theMeshEntry, const std::string& theMeshEntry,
const bool theIsComputed, const bool theIsComputed,
const bool isEmpty): const bool isEmpty):
myStudy(theStudy), myStudy(theStudy),
myMeshEntry(theMeshEntry), myMeshEntry(theMeshEntry),
@ -624,13 +624,13 @@ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
{ {
SALOMEDS::SObject_var aMeshSO = myStudy->FindObjectID(myMeshEntry.c_str()); SALOMEDS::SObject_var aMeshSO = myStudy->FindObjectID(myMeshEntry.c_str());
if(!aMeshSO->_is_nil()) if(!aMeshSO->_is_nil())
if(_PTR(SObject) aMesh = ClientFactory::SObject(aMeshSO)) if(_PTR(SObject) aMesh = ClientFactory::SObject(aMeshSO))
SMESH::ModifiedMesh(aMesh,myIsComputed,myIsEmpty); SMESH::ModifiedMesh(aMesh,myIsComputed,myIsEmpty);
} }
}; };
ProcessVoidEvent(new TEvent(myStudy, ProcessVoidEvent(new TEvent(myStudy,
theMeshEntry, theMeshEntry,
theIsComputed, theIsComputed,
isEmpty)); isEmpty));
} }

View File

@ -48,7 +48,7 @@ public:
//virtual ~StdMeshers_CompositeHexa_3D(); //virtual ~StdMeshers_CompositeHexa_3D();
virtual bool Compute(SMESH_Mesh& aMesh, virtual bool Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape); const TopoDS_Shape& aShape);
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
MapShapeNbElems& aResMap); MapShapeNbElems& aResMap);

View File

@ -43,7 +43,7 @@ public:
virtual ~StdMeshers_CompositeSegment_1D(); virtual ~StdMeshers_CompositeSegment_1D();
virtual bool Compute(SMESH_Mesh& aMesh, virtual bool Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape); const TopoDS_Shape& aShape);
/*! /*!
* \brief Sets event listener to submeshes if necessary * \brief Sets event listener to submeshes if necessary
* \param subMesh - submesh where algo is set * \param subMesh - submesh where algo is set

View File

@ -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, 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 ); FunctionExpr F( f.ToCString(), conv );
return buildDistribution( F, start, end, nbSeg, data, eps ); return buildDistribution( F, start, end, nbSeg, data, eps );
} }
bool buildDistribution( const std::vector<double>& f, const int conv, const double start, const double end, 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 ); FunctionTable F( f, conv );
return buildDistribution( F, start, end, nbSeg, data, eps ); return buildDistribution( F, start, end, nbSeg, data, eps );
} }
bool buildDistribution( const Function& func, const double start, const double end, const int nbSeg, 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 ) if( nbSeg<=0 )
return false; return false;

View File

@ -102,16 +102,16 @@ private:
STDMESHERS_EXPORT STDMESHERS_EXPORT
bool buildDistribution( const Function& f, bool buildDistribution( const Function& f,
const double start, const double end, const double start, const double end,
const int nbSeg, const int nbSeg,
std::vector<double>& data, std::vector<double>& data,
const double eps ); const double eps );
STDMESHERS_EXPORT STDMESHERS_EXPORT
bool buildDistribution( const TCollection_AsciiString& f, const int conv, const double start, const double end, 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 STDMESHERS_EXPORT
bool buildDistribution( const std::vector<double>& f, const int conv, const double start, const double end, 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 #endif

View File

@ -74,7 +74,7 @@ public:
SMESH_Hypothesis::Hypothesis_Status& aStatus); SMESH_Hypothesis::Hypothesis_Status& aStatus);
virtual bool Compute(SMESH_Mesh& aMesh, virtual bool Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape) const TopoDS_Shape& aShape)
/*throw (SALOME_Exception)*/; /*throw (SALOME_Exception)*/;
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
@ -87,32 +87,32 @@ public:
protected: protected:
TopoDS_Edge TopoDS_Edge
EdgeNotInFace(SMESH_Mesh& aMesh, EdgeNotInFace(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape, const TopoDS_Shape& aShape,
const TopoDS_Face& aFace, const TopoDS_Face& aFace,
const TopoDS_Vertex& aVertex, const TopoDS_Vertex& aVertex,
const TopTools_IndexedDataMapOfShapeListOfShape& MS); const TopTools_IndexedDataMapOfShapeListOfShape& MS);
int GetFaceIndex(SMESH_Mesh& aMesh, int GetFaceIndex(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape, const TopoDS_Shape& aShape,
const std::vector<SMESH_subMesh*>& meshFaces, const std::vector<SMESH_subMesh*>& meshFaces,
const TopoDS_Vertex& V0, const TopoDS_Vertex& V0,
const TopoDS_Vertex& V1, const TopoDS_Vertex& V1,
const TopoDS_Vertex& V2, const TopoDS_Vertex& V2,
const TopoDS_Vertex& V3); const TopoDS_Vertex& V3);
void GetConv2DCoefs(const faceQuadStruct& quad, void GetConv2DCoefs(const faceQuadStruct& quad,
const TopoDS_Shape& aShape, const TopoDS_Shape& aShape,
const TopoDS_Vertex& V0, const TopoDS_Vertex& V0,
const TopoDS_Vertex& V1, const TopoDS_Vertex& V1,
const TopoDS_Vertex& V2, const TopoDS_Vertex& V2,
const TopoDS_Vertex& V3, const TopoDS_Vertex& V3,
Conv2DStruct& conv); Conv2DStruct& conv);
void GetPoint(Pt3 p, void GetPoint(Pt3 p,
int i, int j, int k, int i, int j, int k,
int nbx, int nby, int nbz, int nbx, int nby, int nbz,
Point3DStruct *np, Point3DStruct *np,
const SMESHDS_Mesh* meshDS); const SMESHDS_Mesh* meshDS);
bool ClearAndReturn(FaceQuadStruct* theQuads[6], const bool res); bool ClearAndReturn(FaceQuadStruct* theQuads[6], const bool res);
}; };

View File

@ -296,8 +296,8 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh
//============================================================================= //=============================================================================
bool StdMeshers_MEFISTO_2D::Evaluate(SMESH_Mesh & aMesh, bool StdMeshers_MEFISTO_2D::Evaluate(SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape, const TopoDS_Shape & aShape,
MapShapeNbElems& aResMap) MapShapeNbElems& aResMap)
{ {
MESSAGE("StdMeshers_MEFISTO_2D::Evaluate"); MESSAGE("StdMeshers_MEFISTO_2D::Evaluate");

View File

@ -55,7 +55,7 @@ public:
SMESH_Hypothesis::Hypothesis_Status& aStatus); SMESH_Hypothesis::Hypothesis_Status& aStatus);
virtual bool Compute(SMESH_Mesh& aMesh, virtual bool Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape); const TopoDS_Shape& aShape);
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
MapShapeNbElems& aResMap); MapShapeNbElems& aResMap);
@ -64,17 +64,17 @@ public:
typedef std::vector< StdMeshers_FaceSidePtr > TWireVector; typedef std::vector< StdMeshers_FaceSidePtr > TWireVector;
bool LoadPoints(TWireVector & wires, bool LoadPoints(TWireVector & wires,
R2* uvslf, R2* uvslf,
std::vector< const SMDS_MeshNode*>& mefistoToDS, std::vector< const SMDS_MeshNode*>& mefistoToDS,
double scalex, double scaley); double scalex, double scaley);
void ComputeScaleOnFace(SMESH_Mesh& aMesh, void ComputeScaleOnFace(SMESH_Mesh& aMesh,
const TopoDS_Face& aFace, const TopoDS_Face& aFace,
double& scalex, double& scalex,
double& scaley); double& scaley);
void StoreResult (Z nbst, R2* uvst, Z nbt, Z* nust, 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); double scalex, double scaley);
protected: protected:

View File

@ -58,26 +58,26 @@ public:
void Load (const TopoDS_Shell& theShell); void Load (const TopoDS_Shell& theShell);
void Load (const TopoDS_Shell& theShell, void Load (const TopoDS_Shell& theShell,
const TopoDS_Vertex& theV000, const TopoDS_Vertex& theV000,
const TopoDS_Vertex& theV001); const TopoDS_Vertex& theV001);
void ComputeParameters(const gp_Pnt& thePnt, void ComputeParameters(const gp_Pnt& thePnt,
gp_XYZ& theXYZ); gp_XYZ& theXYZ);
void ComputeParameters(const gp_Pnt& thePnt, void ComputeParameters(const gp_Pnt& thePnt,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
gp_XYZ& theXYZ); gp_XYZ& theXYZ);
void ComputeParameters(const double& theU, void ComputeParameters(const double& theU,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
gp_XYZ& theXYZ); gp_XYZ& theXYZ);
void Point(const gp_XYZ& theParams, void Point(const gp_XYZ& theParams,
gp_Pnt& thePnt); gp_Pnt& thePnt);
void Point(const gp_XYZ& theParams, void Point(const gp_XYZ& theParams,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
gp_Pnt& thePnt); gp_Pnt& thePnt);
int ShapeID(const TopoDS_Shape& theShape); int ShapeID(const TopoDS_Shape& theShape);
@ -206,7 +206,7 @@ class STDMESHERS_EXPORT StdMeshers_Penta_3D {
// 0-the node on theBaseEdge. // 0-the node on theBaseEdge.
bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
MapShapeNbElems& aResMap); MapShapeNbElems& aResMap);
protected: // methods protected: // methods
@ -223,17 +223,17 @@ class STDMESHERS_EXPORT StdMeshers_Penta_3D {
std::vector<const SMDS_MeshNode*>*& aCol2); std::vector<const SMDS_MeshNode*>*& aCol2);
void ShapeSupportID(const bool theIsUpperLayer, void ShapeSupportID(const bool theIsUpperLayer,
const SMESH_Block::TShapeID theBNSSID, const SMESH_Block::TShapeID theBNSSID,
SMESH_Block::TShapeID& theSSID); SMESH_Block::TShapeID& theSSID);
void FindNodeOnShape(const TopoDS_Shape& aS, void FindNodeOnShape(const TopoDS_Shape& aS,
const gp_XYZ& aParams, const gp_XYZ& aParams,
const int z, const int z,
StdMeshers_TNode& aTN); StdMeshers_TNode& aTN);
void CreateNode(const bool theIsUpperLayer, void CreateNode(const bool theIsUpperLayer,
const gp_XYZ& aParams, const gp_XYZ& aParams,
StdMeshers_TNode& aTN); StdMeshers_TNode& aTN);
void ClearMeshOnFxy1(); void ClearMeshOnFxy1();

View File

@ -162,7 +162,7 @@ StdMeshers_Prism_3D::StdMeshers_Prism_3D(int hypId, int studyId, SMESH_Gen* gen)
:SMESH_3D_Algo(hypId, studyId, gen) :SMESH_3D_Algo(hypId, studyId, gen)
{ {
_name = "Prism_3D"; _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; 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, bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
MapShapeNbElems& aResMap) MapShapeNbElems& aResMap)
{ {
// find face contains only triangles // find face contains only triangles
vector < SMESH_subMesh * >meshFaces; vector < SMESH_subMesh * >meshFaces;
@ -436,8 +436,8 @@ bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
bool IsOpposite = true; bool IsOpposite = true;
for(TopExp_Explorer exp(aFaces.Value(i), TopAbs_EDGE); exp.More(); exp.Next()) { for(TopExp_Explorer exp(aFaces.Value(i), TopAbs_EDGE); exp.More(); exp.Next()) {
if( Edges1.Contains(exp.Current()) ) { if( Edges1.Contains(exp.Current()) ) {
IsOpposite = false; IsOpposite = false;
break; break;
} }
} }
if(IsOpposite) { if(IsOpposite) {

View File

@ -67,7 +67,7 @@ StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, int studyId, SMESH
:SMESH_1D_Algo(hypId, studyId, gen) :SMESH_1D_Algo(hypId, studyId, gen)
{ {
_name = "Projection_1D"; _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"); _compatibleHypothesis.push_back("ProjectionSource1D");
_sourceHypo = 0; _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, bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
MapShapeNbElems& aResMap) MapShapeNbElems& aResMap)
{ {
if ( !_sourceHypo ) if ( !_sourceHypo )
return false; return false;

View File

@ -67,7 +67,7 @@ StdMeshers_Projection_2D::StdMeshers_Projection_2D(int hypId, int studyId, SMESH
:SMESH_2D_Algo(hypId, studyId, gen) :SMESH_2D_Algo(hypId, studyId, gen)
{ {
_name = "Projection_2D"; _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"); _compatibleHypothesis.push_back("ProjectionSource2D");
_sourceHypo = 0; _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, bool StdMeshers_Projection_2D::Evaluate(SMESH_Mesh& theMesh,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
MapShapeNbElems& aResMap) MapShapeNbElems& aResMap)
{ {
if ( !_sourceHypo ) if ( !_sourceHypo )
return false; return false;

View File

@ -48,7 +48,7 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(int hypId, int studyId, StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(int hypId, int studyId,
SMESH_Gen * gen) SMESH_Gen * gen)
:SMESH_Hypothesis(hypId, studyId, gen) :SMESH_Hypothesis(hypId, studyId, gen)
{ {
_name = "QuadrangleParams"; _name = "QuadrangleParams";
@ -142,7 +142,7 @@ istream & operator >>(istream & load, StdMeshers_QuadrangleParams & hyp)
//================================================================================ //================================================================================
bool StdMeshers_QuadrangleParams::SetParametersByMesh(const SMESH_Mesh* theMesh, bool StdMeshers_QuadrangleParams::SetParametersByMesh(const SMESH_Mesh* theMesh,
const TopoDS_Shape& theShape) const TopoDS_Shape& theShape)
{ {
if ( !theMesh || theShape.IsNull() ) if ( !theMesh || theShape.IsNull() )
return false; return false;
@ -158,7 +158,7 @@ bool StdMeshers_QuadrangleParams::SetParametersByMesh(const SMESH_Mesh* theMesh,
//================================================================================ //================================================================================
bool StdMeshers_QuadrangleParams::SetParametersByDefaults(const TDefaults& dflts, bool StdMeshers_QuadrangleParams::SetParametersByDefaults(const TDefaults& dflts,
const SMESH_Mesh* /*mesh*/) const SMESH_Mesh* /*mesh*/)
{ {
return true; return true;
} }

View File

@ -52,9 +52,9 @@ public:
virtual std::ostream & SaveTo(std::ostream & save); virtual std::ostream & SaveTo(std::ostream & save);
virtual std::istream & LoadFrom(std::istream & load); virtual std::istream & LoadFrom(std::istream & load);
friend std::ostream& operator << (std::ostream & save, friend std::ostream& operator << (std::ostream & save,
StdMeshers_QuadrangleParams & hyp); StdMeshers_QuadrangleParams & hyp);
friend std::istream& operator >> (std::istream & load, 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 * \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 * \retval bool - true if parameter values have been successfully defined
*/ */
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh,
const TopoDS_Shape& theShape); const TopoDS_Shape& theShape);
/*! /*!
* \brief Initialize my parameter values by default parameters. * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined * \retval bool - true if parameter values have been successfully defined
*/ */
virtual bool SetParametersByDefaults(const TDefaults& dflts, virtual bool SetParametersByDefaults(const TDefaults& dflts,
const SMESH_Mesh* theMesh=0); const SMESH_Mesh* theMesh=0);
protected: protected:
int _triaVertexID; int _triaVertexID;

View File

@ -63,13 +63,13 @@ public:
SMESH_Hypothesis::Hypothesis_Status& aStatus); SMESH_Hypothesis::Hypothesis_Status& aStatus);
virtual bool Compute(SMESH_Mesh& aMesh, virtual bool Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape); const TopoDS_Shape& aShape);
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
MapShapeNbElems& aResMap); MapShapeNbElems& aResMap);
FaceQuadStruct* CheckAnd2Dcompute(SMESH_Mesh& aMesh, FaceQuadStruct* CheckAnd2Dcompute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape, const TopoDS_Shape& aShape,
const bool CreateQuadratic); const bool CreateQuadratic);
protected: protected:
@ -78,14 +78,14 @@ protected:
const TopoDS_Shape& aShape); const TopoDS_Shape& aShape);
bool CheckNbEdgesForEvaluate(SMESH_Mesh& aMesh, bool CheckNbEdgesForEvaluate(SMESH_Mesh& aMesh,
const TopoDS_Shape & aShape, const TopoDS_Shape & aShape,
MapShapeNbElems& aResMap, MapShapeNbElems& aResMap,
std::vector<int>& aNbNodes, std::vector<int>& aNbNodes,
bool& IsQuadratic); bool& IsQuadratic);
bool SetNormalizedGrid(SMESH_Mesh& aMesh, bool SetNormalizedGrid(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape, const TopoDS_Shape& aShape,
FaceQuadStruct*& quad); FaceQuadStruct*& quad);
void SplitQuad(SMESHDS_Mesh *theMeshDS, void SplitQuad(SMESHDS_Mesh *theMeshDS,
const int theFaceID, const int theFaceID,
@ -102,22 +102,22 @@ protected:
FaceQuadStruct* quad); FaceQuadStruct* quad);
bool EvaluateQuadPref(SMESH_Mesh& aMesh, bool EvaluateQuadPref(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape, const TopoDS_Shape& aShape,
std::vector<int>& aNbNodes, std::vector<int>& aNbNodes,
MapShapeNbElems& aResMap, MapShapeNbElems& aResMap,
bool IsQuadratic); bool IsQuadratic);
UVPtStruct* LoadEdgePoints2(SMESH_Mesh& aMesh, UVPtStruct* LoadEdgePoints2(SMESH_Mesh& aMesh,
const TopoDS_Face& F, const TopoDS_Edge& E, const TopoDS_Face& F, const TopoDS_Edge& E,
bool IsReverse); bool IsReverse);
UVPtStruct* LoadEdgePoints(SMESH_Mesh& aMesh, UVPtStruct* LoadEdgePoints(SMESH_Mesh& aMesh,
const TopoDS_Face& F, const TopoDS_Edge& E, const TopoDS_Face& F, const TopoDS_Edge& E,
double first, double last); double first, double last);
UVPtStruct* MakeEdgePoints(SMESH_Mesh& aMesh, UVPtStruct* MakeEdgePoints(SMESH_Mesh& aMesh,
const TopoDS_Face& F, const TopoDS_Edge& E, const TopoDS_Face& F, const TopoDS_Edge& E,
double first, double last, int nb_segm); double first, double last, int nb_segm);
// true if QuadranglePreference hypothesis is assigned that forces // true if QuadranglePreference hypothesis is assigned that forces
// construction of quadrangles if the number of nodes on opposite edges // construction of quadrangles if the number of nodes on opposite edges

View File

@ -71,7 +71,7 @@ StdMeshers_RadialPrism_3D::StdMeshers_RadialPrism_3D(int hypId, int studyId, SME
:SMESH_3D_Algo(hypId, studyId, gen) :SMESH_3D_Algo(hypId, studyId, gen)
{ {
_name = "RadialPrism_3D"; _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("LayerDistribution");
_compatibleHypothesis.push_back("NumberOfLayers"); _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, bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape, const TopoDS_Shape& aShape,
MapShapeNbElems& aResMap) MapShapeNbElems& aResMap)
{ {
// get 2 shells // get 2 shells
TopoDS_Solid solid = TopoDS::Solid( aShape ); TopoDS_Solid solid = TopoDS::Solid( aShape );

View File

@ -49,7 +49,7 @@ public:
SMESH_Hypothesis::Hypothesis_Status& aStatus); SMESH_Hypothesis::Hypothesis_Status& aStatus);
virtual bool Compute(SMESH_Mesh& aMesh, virtual bool Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape); const TopoDS_Shape& aShape);
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
MapShapeNbElems& aResMap); MapShapeNbElems& aResMap);

View File

@ -38,7 +38,7 @@ StdMeshers_SegmentAroundVertex_0D::StdMeshers_SegmentAroundVertex_0D
{ {
_name = "SegmentAroundVertex_0D"; _name = "SegmentAroundVertex_0D";
// it is assigned to vertices but influence a state of EDGE submeshes // 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"); _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&, bool StdMeshers_SegmentAroundVertex_0D::Evaluate(SMESH_Mesh&,
const TopoDS_Shape&, const TopoDS_Shape&,
MapShapeNbElems&) MapShapeNbElems&)
{ {
// This algorithm exists in order just to enable assignation of // This algorithm exists in order just to enable assignation of
// StdMeshers_SegmentLengthAroundVertex hypothesis // StdMeshers_SegmentLengthAroundVertex hypothesis

View File

@ -72,8 +72,8 @@ bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
//======================================================================= //=======================================================================
bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&, bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&,
const TopoDS_Shape&, const TopoDS_Shape&,
MapShapeNbElems&) MapShapeNbElems&)
{ {
// This algorithm exists to allow mesh generation by mesh // This algorithm exists to allow mesh generation by mesh
// edition functions in TUI mode // 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&, bool StdMeshers_UseExisting_2D::Evaluate(SMESH_Mesh&,
const TopoDS_Shape&, const TopoDS_Shape&,
MapShapeNbElems&) MapShapeNbElems&)
{ {
// This algorithm exists to allow mesh generation by mesh edition // This algorithm exists to allow mesh generation by mesh edition
// functions in TUI mode // functions in TUI mode

View File

@ -222,13 +222,13 @@ void StdMeshersGUI_DistrPreview::update()
{ {
SMESH::double_array* arr = 0; SMESH::double_array* arr = 0;
if( isTableFunc() ) if( isTableFunc() )
arr = h->BuildDistributionTab( myTableFunc, myNbSeg, ( int )myConv ); arr = h->BuildDistributionTab( myTableFunc, myNbSeg, ( int )myConv );
else else
arr = h->BuildDistributionExpr( myFunction.toLatin1().data(), myNbSeg, ( int )myConv ); arr = h->BuildDistributionExpr( myFunction.toLatin1().data(), myNbSeg, ( int )myConv );
if( arr ) if( arr )
{ {
distr = *arr; distr = *arr;
delete arr; delete arr;
} }
} }
} }
@ -337,7 +337,7 @@ bool isCorrectArg( const Handle( Expr_GeneralExpression )& expr )
if( !name.IsNull() ) if( !name.IsNull() )
{ {
if( name->GetName()!="t" ) if( name->GetName()!="t" )
res = false; res = false;
} }
else else
res = isCorrectArg( sub ); res = isCorrectArg( sub );
@ -421,15 +421,15 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
#ifdef NO_CAS_CATCH #ifdef NO_CAS_CATCH
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
#endif #endif
// in StdMeshers_NumberOfSegments.cc // in StdMeshers_NumberOfSegments.cc
// const double PRECISION = 1e-7; // const double PRECISION = 1e-7;
// //
if(v < -7) v = -7.0; if(v < -7) v = -7.0;
v = pow( 10.0, v ); v = pow( 10.0, v );
} catch(Standard_Failure) { } catch(Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); Handle(Standard_Failure) aFail = Standard_Failure::Caught();
v = 0.0; v = 0.0;
ok = false; ok = false;
} }
} }
break; break;

View File

@ -84,14 +84,14 @@ public:
~SpinBoxDelegate(); ~SpinBoxDelegate();
QWidget* createEditor( QWidget*, QWidget* createEditor( QWidget*,
const QStyleOptionViewItem&, const QStyleOptionViewItem&,
const QModelIndex& ) const; const QModelIndex& ) const;
void setEditorData( QWidget*, const QModelIndex&) const; void setEditorData( QWidget*, const QModelIndex&) const;
void setModelData( QWidget*, QAbstractItemModel*, void setModelData( QWidget*, QAbstractItemModel*,
const QModelIndex& ) const; const QModelIndex& ) const;
void updateEditorGeometry( QWidget*, void updateEditorGeometry( QWidget*,
const QStyleOptionViewItem&, const QStyleOptionViewItem&,
const QModelIndex& ) const; const QModelIndex& ) const;
private: private:
StdMeshersGUI_DistrTableFrame::Table* myTable; StdMeshersGUI_DistrTableFrame::Table* myTable;
@ -173,20 +173,20 @@ StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
QWidget* QWidget*
StdMeshersGUI_DistrTableFrame::SpinBoxDelegate:: StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
createEditor( QWidget* parent, createEditor( QWidget* parent,
const QStyleOptionViewItem& /*option*/, const QStyleOptionViewItem& /*option*/,
const QModelIndex& index ) const const QModelIndex& index ) const
{ {
QDoubleSpinBox* sb = new QDoubleSpinBox( parent ); QDoubleSpinBox* sb = new QDoubleSpinBox( parent );
sb->setFrame(false); sb->setFrame(false);
sb->setMinimum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ? sb->setMinimum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
myTable->argMinimum( index.row() ) : myTable->argMinimum( index.row() ) :
myTable->funcMinimum( index.row() ) ); myTable->funcMinimum( index.row() ) );
sb->setMaximum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ? sb->setMaximum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
myTable->argMaximum( index.row() ) : myTable->argMaximum( index.row() ) :
myTable->funcMaximum( index.row() ) ); myTable->funcMaximum( index.row() ) );
sb->setSingleStep( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ? sb->setSingleStep( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
myTable->argStep( index.row() ) : myTable->argStep( index.row() ) :
myTable->funcStep( index.row() ) ); myTable->funcStep( index.row() ) );
myTable->setEditor( index.row(), index.column(), sb ); myTable->setEditor( index.row(), index.column(), sb );
return sb; return sb;
} }
@ -208,7 +208,7 @@ setEditorData( QWidget* editor, const QModelIndex& index ) const
void void
StdMeshersGUI_DistrTableFrame::SpinBoxDelegate:: StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
setModelData( QWidget* editor, QAbstractItemModel* model, setModelData( QWidget* editor, QAbstractItemModel* model,
const QModelIndex& index ) const const QModelIndex& index ) const
{ {
QDoubleSpinBox* sb = static_cast<QDoubleSpinBox*>(editor); QDoubleSpinBox* sb = static_cast<QDoubleSpinBox*>(editor);
model->setData( index, QString::number( sb->value() ), Qt::DisplayRole ); model->setData( index, QString::number( sb->value() ), Qt::DisplayRole );
@ -217,8 +217,8 @@ setModelData( QWidget* editor, QAbstractItemModel* model,
void void
StdMeshersGUI_DistrTableFrame::SpinBoxDelegate:: StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
updateEditorGeometry( QWidget* editor, updateEditorGeometry( QWidget* editor,
const QStyleOptionViewItem& option, const QStyleOptionViewItem& option,
const QModelIndex& /*index*/ ) const const QModelIndex& /*index*/ ) const
{ {
editor->setGeometry( option.rect ); editor->setGeometry( option.rect );
} }
@ -530,9 +530,9 @@ StdMeshersGUI_DistrTableFrame( QWidget* parent )
connect( myButtons[ InsertRowBtn ], SIGNAL( clicked() ), this, SLOT( onInsert() ) ); connect( myButtons[ InsertRowBtn ], SIGNAL( clicked() ), this, SLOT( onInsert() ) );
connect( myButtons[ RemoveRowBtn ], SIGNAL( clicked() ), this, SLOT( onRemove() ) ); connect( myButtons[ RemoveRowBtn ], SIGNAL( clicked() ), this, SLOT( onRemove() ) );
connect( myTable, SIGNAL( currentCellChanged( int, int, int, int ) ), connect( myTable, SIGNAL( currentCellChanged( int, int, int, int ) ),
this, SIGNAL( currentChanged( int, int ) ) ); this, SIGNAL( currentChanged( int, int ) ) );
connect( myTable, SIGNAL( cellChanged( int, int ) ), connect( myTable, SIGNAL( cellChanged( int, int ) ),
this, SIGNAL( valueChanged( int, int ) ) ); this, SIGNAL( valueChanged( int, int ) ) );
} }
StdMeshersGUI_DistrTableFrame:: StdMeshersGUI_DistrTableFrame::

View File

@ -76,8 +76,8 @@ StdMeshersGUI_FixedPointsParamWdg::LineDelegate::LineDelegate( QTreeWidget* pare
} }
QWidget* StdMeshersGUI_FixedPointsParamWdg::LineDelegate::createEditor( QWidget* parent, QWidget* StdMeshersGUI_FixedPointsParamWdg::LineDelegate::createEditor( QWidget* parent,
const QStyleOptionViewItem& option, const QStyleOptionViewItem& option,
const QModelIndex& index ) const const QModelIndex& index ) const
{ {
QWidget* w = 0; QWidget* w = 0;
if ( (index.column() == 1 ) ) { if ( (index.column() == 1 ) ) {
@ -91,8 +91,8 @@ QWidget* StdMeshersGUI_FixedPointsParamWdg::LineDelegate::createEditor( QWidget*
} }
void StdMeshersGUI_FixedPointsParamWdg::LineDelegate::setModelData( QWidget* editor, void StdMeshersGUI_FixedPointsParamWdg::LineDelegate::setModelData( QWidget* editor,
QAbstractItemModel* model, QAbstractItemModel* model,
const QModelIndex& index ) const const QModelIndex& index ) const
{ {
model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::EditRole ); model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::EditRole );
model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::UserRole ); model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::UserRole );
@ -264,7 +264,7 @@ void StdMeshersGUI_FixedPointsParamWdg::addPoint( double v)
double lv = point( i ); double lv = point( i );
if ( EQUAL_DBL(lv, v) ) { toInsert = false; break; } if ( EQUAL_DBL(lv, v) ) { toInsert = false; break; }
else if ( GT_DBL(lv, v) ) { else if ( GT_DBL(lv, v) ) {
idx = i; break; idx = i; break;
} }
} }
if ( toInsert ) { if ( toInsert ) {
@ -292,7 +292,7 @@ void StdMeshersGUI_FixedPointsParamWdg::removePoints()
delete myTreeWidget->topLevelItem( idx ); delete myTreeWidget->topLevelItem( idx );
delete item; delete item;
myTreeWidget->topLevelItem( idx )->setText( 0, treeItemText( idx == 0 ? 0 : point( idx-1 ), 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(); onCheckBoxChanged();
updateState(); updateState();

View File

@ -50,7 +50,7 @@
StdMeshersGUI_LayerDistributionParamWdg StdMeshersGUI_LayerDistributionParamWdg
::StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr hyp, ::StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr hyp,
const QString& theName, const QString& theName,
QDialog* dlg): QDialog* dlg):
QWidget(), myName(theName), myDlg( dlg ) QWidget(), myName(theName), myDlg( dlg )
{ {

View File

@ -51,7 +51,7 @@ class STDMESHERSGUI_EXPORT StdMeshersGUI_LayerDistributionParamWdg : public QWid
public: public:
StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr, StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr,
const QString&, const QString&,
QDialog*); QDialog*);
~StdMeshersGUI_LayerDistributionParamWdg(); ~StdMeshersGUI_LayerDistributionParamWdg();

View File

@ -214,39 +214,39 @@ void StdMeshersGUI_SubShapeSelectorWdg::SelectionIntoArgument()
QString aMainFatherEntry = ""; QString aMainFatherEntry = "";
TopoDS_Shape shape; TopoDS_Shape shape;
if ( !CORBA::is_nil( aGeomFatherObj ) ) { if ( !CORBA::is_nil( aGeomFatherObj ) ) {
// Get Main Shape // Get Main Shape
GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry ); GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry );
if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) { // Main Shape is a Group if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) { // Main Shape is a Group
GEOM::GEOM_Object_ptr aMainFatherObj = aGeomMain->GetMainShape(); GEOM::GEOM_Object_ptr aMainFatherObj = aGeomMain->GetMainShape();
if ( !CORBA::is_nil( aMainFatherObj ) ) if ( !CORBA::is_nil( aMainFatherObj ) )
aMainFatherEntry = aMainFatherObj->GetStudyEntry(); aMainFatherEntry = aMainFatherObj->GetStudyEntry();
} }
aFatherEntry = aGeomFatherObj->GetStudyEntry(); aFatherEntry = aGeomFatherObj->GetStudyEntry();
} }
if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) ) { if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) ) {
if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object
GEOMBase::GetShape(aGeomObj, shape); GEOMBase::GetShape(aGeomObj, shape);
if ( !shape.IsNull() ) { if ( !shape.IsNull() ) {
TopExp_Explorer exp( shape, mySubShType ); TopExp_Explorer exp( shape, mySubShType );
for ( ; exp.More(); exp.Next() ) { for ( ; exp.More(); exp.Next() ) {
int index = myPreviewActor->GetIndexByShape( exp.Current() ); int index = myPreviewActor->GetIndexByShape( exp.Current() );
if ( index ) { if ( index ) {
mySelectedIDs.append( index ); mySelectedIDs.append( index );
myPreviewActor->HighlightID( index ); myPreviewActor->HighlightID( index );
} }
} }
} }
} else if ( aGeomObj->GetType() == 28 /*GEOM_SUBSHAPE*/ ) { } else if ( aGeomObj->GetType() == 28 /*GEOM_SUBSHAPE*/ ) {
GEOMBase::GetShape(aGeomObj, shape); GEOMBase::GetShape(aGeomObj, shape);
if ( !shape.IsNull() && shape.ShapeType() == mySubShType ) { if ( !shape.IsNull() && shape.ShapeType() == mySubShType ) {
int index = myPreviewActor->GetIndexByShape( shape ); int index = myPreviewActor->GetIndexByShape( shape );
if ( index ) { if ( index ) {
mySelectedIDs.append( index ); mySelectedIDs.append( index );
myPreviewActor->HighlightID( index ); myPreviewActor->HighlightID( index );
} }
} }
} }
} }
} else { // Selected Actor from Actor Collection } else { // Selected Actor from Actor Collection
QString anEntry = IO->getEntry(); QString anEntry = IO->getEntry();
@ -255,7 +255,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::SelectionIntoArgument()
anEntry.remove(0, index+1); anEntry.remove(0, index+1);
int ind = anEntry.toInt(); int ind = anEntry.toInt();
if ( ind ) if ( ind )
mySelectedIDs.append( ind ); mySelectedIDs.append( ind );
} }
} }
} }
@ -421,7 +421,7 @@ SMESH::long_array_var StdMeshersGUI_SubShapeSelectorWdg::GetListOfIDs()
anArray->length( size ); anArray->length( size );
if ( size ) { if ( size ) {
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
anArray[i] = myListOfIDs.at(i); anArray[i] = myListOfIDs.at(i);
} }
} }
return anArray; return anArray;

View File

@ -46,15 +46,15 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA, StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) SMESH_Hypothesis_i( thePOA )
{ {
MESSAGE( "StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i" ); MESSAGE( "StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i" );
myBaseImpl = new ::StdMeshers_Arithmetic1D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_Arithmetic1D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//============================================================================= //=============================================================================
@ -79,7 +79,7 @@ StdMeshers_Arithmetic1D_i::~StdMeshers_Arithmetic1D_i()
//============================================================================= //=============================================================================
void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength, void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
CORBA::Boolean theIsStart ) CORBA::Boolean theIsStart )
throw ( SALOME::SALOME_Exception ) throw ( SALOME::SALOME_Exception )
{ {
MESSAGE( "StdMeshers_StartEndLength_i::SetLength" ); MESSAGE( "StdMeshers_StartEndLength_i::SetLength" );
@ -89,7 +89,7 @@ void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script
@ -157,7 +157,7 @@ void StdMeshers_Arithmetic1D_i::SetReversedEdges( const SMESH::long_array& theId
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script

View File

@ -87,7 +87,7 @@ void StdMeshers_AutomaticLength_i::SetFineness( CORBA::Double theFineness )
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script
SMESH::TPythonDump() << _this() << ".SetFineness( " << theFineness << " )"; SMESH::TPythonDump() << _this() << ".SetFineness( " << theFineness << " )";

View File

@ -47,15 +47,15 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA, StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) SMESH_Hypothesis_i( thePOA )
{ {
MESSAGE( "StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i" ); MESSAGE( "StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i" );
myBaseImpl = new ::StdMeshers_Deflection1D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_Deflection1D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//============================================================================= //=============================================================================
@ -89,7 +89,7 @@ void StdMeshers_Deflection1D_i::SetDeflection( CORBA::Double theValue )
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script

View File

@ -43,8 +43,8 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA, StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ), SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_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" ); MESSAGE( "StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i" );
myBaseImpl = new ::StdMeshers_Hexa_3D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_Hexa_3D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//============================================================================= //=============================================================================

View File

@ -50,7 +50,7 @@ public:
// Constructor // Constructor
StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA, StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ); ::SMESH_Gen* theGenImpl );
// Destructor // Destructor
virtual ~StdMeshers_Hexa_3D_i(); virtual ~StdMeshers_Hexa_3D_i();

View File

@ -43,15 +43,15 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA, StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) SMESH_Hypothesis_i( thePOA )
{ {
MESSAGE( "StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i" ); MESSAGE( "StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i" );
myBaseImpl = new ::StdMeshers_LengthFromEdges( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_LengthFromEdges( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//============================================================================= //=============================================================================
@ -85,7 +85,7 @@ void StdMeshers_LengthFromEdges_i::SetMode( CORBA::Long theMode )
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
} }

View File

@ -88,7 +88,7 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script
@ -112,7 +112,7 @@ void StdMeshers_LocalLength_i::SetPrecision( CORBA::Double thePrecision )
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script

View File

@ -43,8 +43,8 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA, StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ), SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_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" ); MESSAGE( "StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i" );
myBaseImpl = new ::StdMeshers_MEFISTO_2D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_MEFISTO_2D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//============================================================================= //=============================================================================

View File

@ -50,7 +50,7 @@ public:
// Constructor // Constructor
StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA, StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ); ::SMESH_Gen* theGenImpl );
// Destructor // Destructor
virtual ~StdMeshers_MEFISTO_2D_i(); virtual ~StdMeshers_MEFISTO_2D_i();

View File

@ -47,15 +47,15 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA, StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) SMESH_Hypothesis_i( thePOA )
{ {
MESSAGE( "StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i" ); MESSAGE( "StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i" );
myBaseImpl = new ::StdMeshers_MaxElementArea( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_MaxElementArea( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//============================================================================= //=============================================================================
@ -89,7 +89,7 @@ void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea )
} }
catch (SALOME_Exception& S_ex) { catch (SALOME_Exception& S_ex) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script

View File

@ -48,7 +48,7 @@ public:
// Constructor // Constructor
StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA, StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ); ::SMESH_Gen* theGenImpl );
// Destructor // Destructor
virtual ~StdMeshers_MaxElementArea_i(); virtual ~StdMeshers_MaxElementArea_i();

View File

@ -47,15 +47,15 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i( PortableServer::POA_ptr thePOA, StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) SMESH_Hypothesis_i( thePOA )
{ {
MESSAGE( "StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i" ); MESSAGE( "StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i" );
myBaseImpl = new ::StdMeshers_MaxElementVolume( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_MaxElementVolume( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//============================================================================= //=============================================================================
@ -89,7 +89,7 @@ void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume
} }
catch (SALOME_Exception& S_ex) { catch (SALOME_Exception& S_ex) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script

View File

@ -81,7 +81,7 @@ void StdMeshers_MaxLength_i::SetLength( CORBA::Double theLength )
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script
@ -102,7 +102,7 @@ void StdMeshers_MaxLength_i::SetUsePreestimatedLength( CORBA::Boolean toUse )
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// this is an internal kitchen call - no Python dump // this is an internal kitchen call - no Python dump
@ -123,7 +123,7 @@ void StdMeshers_MaxLength_i::SetPreestimatedLength( CORBA::Double theLength )
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// this is an internal kitchen call - no Python dump // this is an internal kitchen call - no Python dump
// Update Python script // Update Python script

View File

@ -46,15 +46,15 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA, StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) SMESH_Hypothesis_i( thePOA )
{ {
MESSAGE( "StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i" ); MESSAGE( "StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i" );
myBaseImpl = new ::StdMeshers_NumberOfSegments( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_NumberOfSegments( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//============================================================================= //=============================================================================
@ -78,8 +78,8 @@ StdMeshers_NumberOfSegments_i::~StdMeshers_NumberOfSegments_i()
*/ */
//============================================================================= //=============================================================================
SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionExpr( const char* func, SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionExpr( const char* func,
CORBA::Long nbSeg, CORBA::Long nbSeg,
CORBA::Long conv ) CORBA::Long conv )
throw ( SALOME::SALOME_Exception ) throw ( SALOME::SALOME_Exception )
{ {
ASSERT( myBaseImpl ); ASSERT( myBaseImpl );
@ -99,8 +99,8 @@ SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionExpr( const
} }
SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionTab( const SMESH::double_array& func, SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionTab( const SMESH::double_array& func,
CORBA::Long nbSeg, CORBA::Long nbSeg,
CORBA::Long conv ) CORBA::Long conv )
throw ( SALOME::SALOME_Exception ) throw ( SALOME::SALOME_Exception )
{ {
ASSERT( myBaseImpl ); ASSERT( myBaseImpl );
@ -141,7 +141,7 @@ void StdMeshers_NumberOfSegments_i::SetNumberOfSegments( CORBA::Long theSegments
} }
catch (SALOME_Exception& S_ex) { catch (SALOME_Exception& S_ex) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script
@ -183,7 +183,7 @@ void StdMeshers_NumberOfSegments_i::SetReversedEdges( const SMESH::long_array& t
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script
@ -274,7 +274,7 @@ void StdMeshers_NumberOfSegments_i::SetDistrType(CORBA::Long typ)
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
} }
@ -308,7 +308,7 @@ void StdMeshers_NumberOfSegments_i::SetScaleFactor( CORBA::Double theScaleFactor
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
} }
@ -330,7 +330,7 @@ CORBA::Double StdMeshers_NumberOfSegments_i::GetScaleFactor()
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
return scale; return scale;
} }
@ -354,7 +354,7 @@ void StdMeshers_NumberOfSegments_i::SetTableFunction(const SMESH::double_array&
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
} }
@ -373,7 +373,7 @@ SMESH::double_array* StdMeshers_NumberOfSegments_i::GetTableFunction()
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
SMESH::double_array_var aRes = new SMESH::double_array(); SMESH::double_array_var aRes = new SMESH::double_array();
aRes->length(tbl->size()); aRes->length(tbl->size());
@ -398,7 +398,7 @@ void StdMeshers_NumberOfSegments_i::SetExpressionFunction(const char* expr)
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
} }
@ -417,7 +417,7 @@ char* StdMeshers_NumberOfSegments_i::GetExpressionFunction()
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
return CORBA::string_dup(expr); return CORBA::string_dup(expr);
} }
@ -438,7 +438,7 @@ void StdMeshers_NumberOfSegments_i::SetConversionMode(CORBA::Long conv )
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
} }
@ -457,7 +457,7 @@ CORBA::Long StdMeshers_NumberOfSegments_i::ConversionMode()
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
return conv; return conv;
} }

View File

@ -49,7 +49,7 @@ public:
// Constructor // Constructor
StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA, StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ); ::SMESH_Gen* theGenImpl );
// Destructor // Destructor
virtual ~StdMeshers_NumberOfSegments_i(); virtual ~StdMeshers_NumberOfSegments_i();

View File

@ -41,8 +41,8 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA, StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ), SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA ), SMESH_Algo_i( thePOA ),
@ -75,8 +75,8 @@ StdMeshers_Prism_3D_i::~StdMeshers_Prism_3D_i()
//============================================================================= //=============================================================================
StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_ptr thePOA, StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ), SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA ), SMESH_Algo_i( thePOA ),
@ -84,8 +84,8 @@ StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_pt
{ {
MESSAGE( "StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i" ); MESSAGE( "StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i" );
myBaseImpl = new ::StdMeshers_RadialPrism_3D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_RadialPrism_3D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -53,8 +53,8 @@ StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i( PortableServer::POA_ptr
{ {
MESSAGE( "StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i" ); MESSAGE( "StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i" );
myBaseImpl = new ::StdMeshers_Projection_3D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_Projection_3D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -87,8 +87,8 @@ StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i( PortableServer::POA_ptr
{ {
MESSAGE( "StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i" ); MESSAGE( "StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i" );
myBaseImpl = new ::StdMeshers_Projection_2D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_Projection_2D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -121,8 +121,8 @@ StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i( PortableServer::POA_ptr
{ {
MESSAGE( "StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i" ); MESSAGE( "StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i" );
myBaseImpl = new ::StdMeshers_Projection_1D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_Projection_1D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -47,15 +47,15 @@ using namespace std;
StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i
(PortableServer::POA_ptr thePOA, (PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) SMESH_Hypothesis_i( thePOA )
{ {
MESSAGE( "StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i" ); MESSAGE( "StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i" );
myBaseImpl = new ::StdMeshers_QuadrangleParams(theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_QuadrangleParams(theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl); theGenImpl);
} }
//============================================================================= //=============================================================================
@ -88,7 +88,7 @@ void StdMeshers_QuadrangleParams_i::SetTriaVertex(CORBA::Long vertID)
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM ); SALOME::BAD_PARAM );
} }
// Update Python script // Update Python script

View File

@ -46,8 +46,8 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadrangleParams_i:
public: public:
// Constructor // Constructor
StdMeshers_QuadrangleParams_i( PortableServer::POA_ptr thePOA, StdMeshers_QuadrangleParams_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ); ::SMESH_Gen* theGenImpl );
// Destructor // Destructor
virtual ~StdMeshers_QuadrangleParams_i(); virtual ~StdMeshers_QuadrangleParams_i();

View File

@ -43,8 +43,8 @@ using namespace std;
//============================================================================= //=============================================================================
StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA, StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ), : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ), SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA ), SMESH_Algo_i( thePOA ),
@ -52,8 +52,8 @@ StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr
{ {
MESSAGE( "StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i" ); MESSAGE( "StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i" );
myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(),
theStudyId, theStudyId,
theGenImpl ); theGenImpl );
} }
//============================================================================= //=============================================================================

Some files were not shown because too many files have changed in this diff Show More