mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-12 23:54:34 +05:00
Added support for polygones and polyhedres
This commit is contained in:
parent
0190a6708d
commit
81a42f6507
@ -223,9 +223,12 @@ DriverMED_Family::GetFamilyInfo(const MED::PWrapper& theWrapper,
|
|||||||
|
|
||||||
aValue = aStr.str();
|
aValue = aStr.str();
|
||||||
|
|
||||||
MED::TStringVector anAttrDescs (1, ""); // 1 attribute with empty description,
|
MED::TStringVector anAttrDescs;
|
||||||
MED::TIntVector anAttrIds (1, myId); // Id=0,
|
MED::TIntVector anAttrIds;
|
||||||
MED::TIntVector anAttrVals (1, myId); // Value=0
|
MED::TIntVector anAttrVals;
|
||||||
|
//MED::TStringVector anAttrDescs (1, ""); // 1 attribute with empty description,
|
||||||
|
//MED::TIntVector anAttrIds (1, myId); // Id=0,
|
||||||
|
//MED::TIntVector anAttrVals (1, myId); // Value=0
|
||||||
|
|
||||||
MED::PFamilyInfo anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
|
MED::PFamilyInfo anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
|
||||||
aValue,
|
aValue,
|
||||||
|
@ -268,7 +268,160 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
|
|||||||
MED::TGeom::const_iterator anTGeomIter = aTGeom.begin();
|
MED::TGeom::const_iterator anTGeomIter = aTGeom.begin();
|
||||||
for(; anTGeomIter != aTGeom.end(); anTGeomIter++){
|
for(; anTGeomIter != aTGeom.end(); anTGeomIter++){
|
||||||
const EGeometrieElement& aGeom = anTGeomIter->first;
|
const EGeometrieElement& aGeom = anTGeomIter->first;
|
||||||
if(aGeom == ePOINT1) continue;
|
|
||||||
|
if (aGeom == ePOINT1) {
|
||||||
|
continue;
|
||||||
|
|
||||||
|
} else if (aGeom == ePOLYGONE) {
|
||||||
|
PPolygoneInfo aPolygoneInfo = aMed->GetPPolygoneInfo(aMeshInfo,anEntity,aGeom);
|
||||||
|
EBooleen anIsElemNum = takeNumbers ? aPolygoneInfo->IsElemNum() : eFAUX;
|
||||||
|
|
||||||
|
TElemNum aConn = aPolygoneInfo->GetConnectivite();
|
||||||
|
TElemNum aIndex = aPolygoneInfo->GetIndex();
|
||||||
|
|
||||||
|
TInt nbPolygons = aPolygoneInfo->GetNbElem();
|
||||||
|
for (TInt iPG = 0; iPG < nbPolygons; iPG++) {
|
||||||
|
// get nodes
|
||||||
|
TInt aCurrPG_FirstNodeIndex = aIndex[iPG] - 1;
|
||||||
|
int aNbNodes = aPolygoneInfo->GetNbConn(iPG);
|
||||||
|
std::vector<int> nodes_ids (aNbNodes);
|
||||||
|
for (TInt inode = 0; inode < aNbNodes; inode++) {
|
||||||
|
nodes_ids[inode] = aConn[aCurrPG_FirstNodeIndex + inode];
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isRenum = false;
|
||||||
|
SMDS_MeshElement* anElement = NULL;
|
||||||
|
TInt aFamNum = aPolygoneInfo->GetFamNum(iPG);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (anIsElemNum) {
|
||||||
|
anElement = myMesh->AddPolygonalFaceWithID
|
||||||
|
(nodes_ids, aPolygoneInfo->GetElemNum(iPG));
|
||||||
|
}
|
||||||
|
if (!anElement) {
|
||||||
|
std::vector<const SMDS_MeshNode*> nodes (aNbNodes);
|
||||||
|
for (int inode = 0; inode < aNbNodes; inode++) {
|
||||||
|
nodes[inode] = FindNode(myMesh, nodes_ids[inode]);
|
||||||
|
}
|
||||||
|
anElement = myMesh->AddPolygonalFace(nodes);
|
||||||
|
isRenum = anIsElemNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (const std::exception& exc) {
|
||||||
|
aResult = DRS_FAIL;
|
||||||
|
INFOS("Follow exception was cought:\n\t"<<exc.what());
|
||||||
|
} catch (...) {
|
||||||
|
aResult = DRS_FAIL;
|
||||||
|
INFOS("Follow unknown exception was cought!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!anElement) {
|
||||||
|
aResult = DRS_WARN_SKIP_ELEM;
|
||||||
|
} else {
|
||||||
|
if (isRenum) {
|
||||||
|
anIsElemNum = eFAUX;
|
||||||
|
takeNumbers = false;
|
||||||
|
if (aResult < DRS_WARN_RENUMBER)
|
||||||
|
aResult = DRS_WARN_RENUMBER;
|
||||||
|
}
|
||||||
|
if (myFamilies.find(aFamNum) != myFamilies.end()) {
|
||||||
|
// Save reference to this element from its family
|
||||||
|
if (MYDEBUG){
|
||||||
|
cout<<"myFamilies["<<aFamNum
|
||||||
|
<<"] IsPoly()="<<anElement->IsPoly()
|
||||||
|
<<"; GetType="<<anElement->GetType()
|
||||||
|
<<"; aNbNodes="<<aNbNodes<<endl;
|
||||||
|
}
|
||||||
|
myFamilies[aFamNum]->AddElement(anElement);
|
||||||
|
myFamilies[aFamNum]->SetType(anElement->GetType());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
|
||||||
|
} else if (aGeom == ePOLYEDRE) {
|
||||||
|
PPolyedreInfo aPolyedreInfo = aMed->GetPPolyedreInfo(aMeshInfo,anEntity,aGeom);
|
||||||
|
EBooleen anIsElemNum = takeNumbers ? aPolyedreInfo->IsElemNum() : eFAUX;
|
||||||
|
|
||||||
|
TElemNum aConn = aPolyedreInfo->GetConnectivite();
|
||||||
|
TElemNum aFacesIndex = aPolyedreInfo->GetFacesIndex();
|
||||||
|
TElemNum aIndex = aPolyedreInfo->GetIndex();
|
||||||
|
|
||||||
|
TInt nbPolyedres = aPolyedreInfo->GetNbElem();
|
||||||
|
|
||||||
|
for (int iPE = 0; iPE < nbPolyedres; iPE++) {
|
||||||
|
// get faces
|
||||||
|
int aCurrPE_FirstFaceIndex = aIndex[iPE] - 1;
|
||||||
|
int aNextPE_FirstFaceIndex = aIndex[iPE + 1] - 1;
|
||||||
|
int nbFaces = aNextPE_FirstFaceIndex - aCurrPE_FirstFaceIndex;
|
||||||
|
std::vector<int> quantities (nbFaces);
|
||||||
|
for (int iFa = 0; iFa < nbFaces; iFa++) {
|
||||||
|
int aCurrFace_FirstNodeIndex = aFacesIndex[aCurrPE_FirstFaceIndex + iFa] - 1;
|
||||||
|
int aNextFace_FirstNodeIndex = aFacesIndex[aCurrPE_FirstFaceIndex + iFa + 1] - 1;
|
||||||
|
|
||||||
|
int aNbNodes = aNextFace_FirstNodeIndex - aCurrFace_FirstNodeIndex;
|
||||||
|
quantities[iFa] = aNbNodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get nodes
|
||||||
|
int aCurrPE_FirstNodeIndex = aFacesIndex[aCurrPE_FirstFaceIndex] - 1;
|
||||||
|
int nbPENodes = aPolyedreInfo->GetNbConn(iPE);
|
||||||
|
std::vector<int> nodes_ids (nbPENodes);
|
||||||
|
for (int inode = 0; inode < nbPENodes; inode++) {
|
||||||
|
nodes_ids[inode] = aConn[aCurrPE_FirstNodeIndex + inode];
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isRenum = false;
|
||||||
|
SMDS_MeshElement* anElement = NULL;
|
||||||
|
TInt aFamNum = aPolyedreInfo->GetFamNum(iPE);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (anIsElemNum) {
|
||||||
|
anElement = myMesh->AddPolyhedralVolumeWithID
|
||||||
|
(nodes_ids, quantities, aPolyedreInfo->GetElemNum(iPE));
|
||||||
|
}
|
||||||
|
if (!anElement) {
|
||||||
|
std::vector<const SMDS_MeshNode*> nodes (nbPENodes);
|
||||||
|
for (int inode = 0; inode < nbPENodes; inode++) {
|
||||||
|
nodes[inode] = FindNode(myMesh, nodes_ids[inode]);
|
||||||
|
}
|
||||||
|
anElement = myMesh->AddPolyhedralVolume(nodes, quantities);
|
||||||
|
isRenum = anIsElemNum;
|
||||||
|
}
|
||||||
|
} catch (const std::exception& exc) {
|
||||||
|
aResult = DRS_FAIL;
|
||||||
|
INFOS("Follow exception was cought:\n\t"<<exc.what());
|
||||||
|
} catch (...) {
|
||||||
|
aResult = DRS_FAIL;
|
||||||
|
INFOS("Follow unknown exception was cought!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!anElement) {
|
||||||
|
aResult = DRS_WARN_SKIP_ELEM;
|
||||||
|
} else {
|
||||||
|
if (isRenum) {
|
||||||
|
anIsElemNum = eFAUX;
|
||||||
|
takeNumbers = false;
|
||||||
|
if (aResult < DRS_WARN_RENUMBER)
|
||||||
|
aResult = DRS_WARN_RENUMBER;
|
||||||
|
}
|
||||||
|
if (myFamilies.find(aFamNum) != myFamilies.end()) {
|
||||||
|
// Save reference to this element from its family
|
||||||
|
if (MYDEBUG){
|
||||||
|
cout<<"myFamilies["<<aFamNum
|
||||||
|
<<"] IsPoly()="<<anElement->IsPoly()
|
||||||
|
<<"; GetType="<<anElement->GetType()
|
||||||
|
<<"; aNbNodes="<<nbPENodes<<endl;
|
||||||
|
}
|
||||||
|
myFamilies[aFamNum]->AddElement(anElement);
|
||||||
|
myFamilies[aFamNum]->SetType(anElement->GetType());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
PCellInfo aCellInfo = aMed->GetPCellInfo(aMeshInfo,anEntity,aGeom);
|
PCellInfo aCellInfo = aMed->GetPCellInfo(aMeshInfo,anEntity,aGeom);
|
||||||
EBooleen anIsElemNum = takeNumbers ? aCellInfo->IsElemNum() : eFAUX;
|
EBooleen anIsElemNum = takeNumbers ? aCellInfo->IsElemNum() : eFAUX;
|
||||||
TInt aNbElems = aCellInfo->GetNbElem();
|
TInt aNbElems = aCellInfo->GetNbElem();
|
||||||
@ -586,7 +739,7 @@ void DriverMED_R_SMESHDS_Mesh::GetGroup(SMESHDS_Group* theGroup)
|
|||||||
for (; anElemsIter != anElements.end(); anElemsIter++)
|
for (; anElemsIter != anElements.end(); anElemsIter++)
|
||||||
{
|
{
|
||||||
element = *anElemsIter;
|
element = *anElemsIter;
|
||||||
theGroup->SMDSGroup().Add(element);
|
theGroup->SMDSGroup().Add(element);
|
||||||
}
|
}
|
||||||
if ( element )
|
if ( element )
|
||||||
theGroup->SetType( element->GetType() );
|
theGroup->SetType( element->GetType() );
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
#include "SMESHDS_Mesh.hxx"
|
#include "SMESHDS_Mesh.hxx"
|
||||||
#include "SMDS_MeshElement.hxx"
|
#include "SMDS_MeshElement.hxx"
|
||||||
#include "SMDS_MeshNode.hxx"
|
#include "SMDS_MeshNode.hxx"
|
||||||
|
#include "SMDS_PolyhedralVolumeOfNodes.hxx"
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
#include "MED_Utilities.hxx"
|
#include "MED_Utilities.hxx"
|
||||||
@ -440,6 +442,16 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
MED::TIntVector aQuadConn;
|
MED::TIntVector aQuadConn;
|
||||||
aQuadConn.reserve(aNbElems*aNbQuadConn);
|
aQuadConn.reserve(aNbElems*aNbQuadConn);
|
||||||
|
|
||||||
|
MED::TIntVector aPolygoneElemNums;
|
||||||
|
aPolygoneElemNums.reserve(aNbElems);
|
||||||
|
MED::TIntVector aPolygoneInds;
|
||||||
|
aPolygoneInds.reserve(aNbElems + 1);
|
||||||
|
aPolygoneInds.push_back(1); // reference on the first element in the connectivities
|
||||||
|
MED::TIntVector aPolygoneFamilyNums;
|
||||||
|
aPolygoneFamilyNums.reserve(aNbElems);
|
||||||
|
MED::TIntVector aPolygoneConn;
|
||||||
|
aPolygoneConn.reserve(aNbElems*aNbQuadConn);
|
||||||
|
|
||||||
for(TInt iElem = 0; iElem < aNbElems && anIter->more(); iElem++){
|
for(TInt iElem = 0; iElem < aNbElems && anIter->more(); iElem++){
|
||||||
const SMDS_MeshFace* anElem = anIter->next();
|
const SMDS_MeshFace* anElem = anIter->next();
|
||||||
TInt aNbNodes = anElem->NbNodes();
|
TInt aNbNodes = anElem->NbNodes();
|
||||||
@ -448,41 +460,42 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
MED::TIntVector* anElemNums;
|
MED::TIntVector* anElemNums;
|
||||||
MED::TIntVector* aFamilyNums;
|
MED::TIntVector* aFamilyNums;
|
||||||
MED::TIntVector* aConnectivity;
|
MED::TIntVector* aConnectivity;
|
||||||
switch(aNbNodes){
|
if (anElem->IsPoly()) {
|
||||||
case 3:
|
aNbConnectivity = aNbNodes;
|
||||||
aNbConnectivity = aNbTriaConn;
|
anElemNums = &aPolygoneElemNums;
|
||||||
anElemNums = &anTriaElemNums;
|
aFamilyNums = &aPolygoneFamilyNums;
|
||||||
aFamilyNums = &aTriaFamilyNums;
|
aConnectivity = &aPolygoneConn;
|
||||||
aConnectivity = &aTriaConn;
|
} else {
|
||||||
break;
|
switch(aNbNodes){
|
||||||
case 4:
|
case 3:
|
||||||
aNbConnectivity = aNbQuadConn;
|
aNbConnectivity = aNbTriaConn;
|
||||||
anElemNums = &aQuadElemNums;
|
anElemNums = &anTriaElemNums;
|
||||||
aFamilyNums = &aQuadFamilyNums;
|
aFamilyNums = &aTriaFamilyNums;
|
||||||
aConnectivity = &aQuadConn;
|
aConnectivity = &aTriaConn;
|
||||||
break;
|
break;
|
||||||
}
|
case 4:
|
||||||
|
aNbConnectivity = aNbQuadConn;
|
||||||
|
anElemNums = &aQuadElemNums;
|
||||||
|
aFamilyNums = &aQuadFamilyNums;
|
||||||
|
aConnectivity = &aQuadConn;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
MED::TIntVector aVector(aNbNodes);
|
MED::TIntVector aVector(aNbNodes);
|
||||||
for(TInt iNode = 0; aNodesIter->more(); iNode++){
|
for(TInt iNode = 0; aNodesIter->more(); iNode++){
|
||||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||||
|
#ifdef _EDF_NODE_IDS_
|
||||||
|
aVector[iNode] = aNodeIdMap[aNode->GetID()];
|
||||||
|
#else
|
||||||
aVector[iNode] = aNode->GetID();
|
aVector[iNode] = aNode->GetID();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TInt aSize = aConnectivity->size();
|
TInt aSize = aConnectivity->size();
|
||||||
aConnectivity->resize(aSize+aNbConnectivity);
|
aConnectivity->resize(aSize+aNbConnectivity);
|
||||||
// There is some differnce between SMDS and MED in cells mapping
|
// There is some differences between SMDS and MED in cells mapping
|
||||||
#ifdef _EDF_NODE_IDS_
|
|
||||||
switch(aNbNodes){
|
|
||||||
case 4:
|
|
||||||
(*aConnectivity)[aSize+0] = aNodeIdMap[aVector[0]];
|
|
||||||
(*aConnectivity)[aSize+1] = aNodeIdMap[aVector[1]];
|
|
||||||
(*aConnectivity)[aSize+2] = aNodeIdMap[aVector[3]];
|
|
||||||
(*aConnectivity)[aSize+3] = aNodeIdMap[aVector[2]];
|
|
||||||
default:
|
|
||||||
for(TInt iNode = 0; iNode < aNbNodes; iNode++)
|
|
||||||
(*aConnectivity)[aSize+iNode] = aNodeIdMap[aVector[iNode]];
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
switch(aNbNodes){
|
switch(aNbNodes){
|
||||||
case 4:
|
case 4:
|
||||||
(*aConnectivity)[aSize+0] = aVector[0];
|
(*aConnectivity)[aSize+0] = aVector[0];
|
||||||
@ -493,7 +506,13 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
for(TInt iNode = 0; iNode < aNbNodes; iNode++)
|
for(TInt iNode = 0; iNode < aNbNodes; iNode++)
|
||||||
(*aConnectivity)[aSize+iNode] = aVector[iNode];
|
(*aConnectivity)[aSize+iNode] = aVector[iNode];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
if (anElem->IsPoly()) {
|
||||||
|
// fill indices for polygonal element
|
||||||
|
TInt aPrevPos = aPolygoneInds.back();
|
||||||
|
aPolygoneInds.push_back(aPrevPos + aNbNodes);
|
||||||
|
}
|
||||||
|
|
||||||
anElemNums->push_back(anElem->GetID());
|
anElemNums->push_back(anElem->GetID());
|
||||||
|
|
||||||
if (anElemFamMap.find(anElem) != anElemFamMap.end())
|
if (anElemFamMap.find(anElem) != anElemFamMap.end())
|
||||||
@ -523,6 +542,22 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
MESSAGE("Perform - anEntity = "<<SMDS_MED_ENTITY<<"; aGeom = "<<eQUAD4<<"; aNbElems = "<<aNbElems);
|
MESSAGE("Perform - anEntity = "<<SMDS_MED_ENTITY<<"; aGeom = "<<eQUAD4<<"; aNbElems = "<<aNbElems);
|
||||||
myMed->SetCellInfo(aCellInfo);
|
myMed->SetCellInfo(aCellInfo);
|
||||||
}
|
}
|
||||||
|
if(TInt aNbElems = aPolygoneElemNums.size()){
|
||||||
|
// add one element in connectivities,
|
||||||
|
// referenced by the last element in indices
|
||||||
|
aPolygoneConn.push_back(0);
|
||||||
|
|
||||||
|
PPolygoneInfo aCellInfo = myMed->CrPolygoneInfo(aMeshInfo,
|
||||||
|
SMDS_MED_ENTITY,
|
||||||
|
ePOLYGONE,
|
||||||
|
SMDS_MED_CONNECTIVITY,
|
||||||
|
aPolygoneConn,
|
||||||
|
aPolygoneInds,
|
||||||
|
aPolygoneFamilyNums,
|
||||||
|
aPolygoneElemNums);
|
||||||
|
MESSAGE("Perform - anEntity = "<<SMDS_MED_ENTITY<<"; aGeom = "<<ePOLYGONE<<"; aNbElems = "<<aNbElems);
|
||||||
|
myMed->SetPolygoneInfo(aCellInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Storing SMDS Volumes
|
// Storing SMDS Volumes
|
||||||
@ -563,74 +598,111 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
MED::TIntVector aHexaConn;
|
MED::TIntVector aHexaConn;
|
||||||
aHexaConn.reserve(aNbElems*aNbHexaConn);
|
aHexaConn.reserve(aNbElems*aNbHexaConn);
|
||||||
|
|
||||||
|
MED::TIntVector aPolyedreElemNums;
|
||||||
|
aPolyedreElemNums.reserve(aNbElems);
|
||||||
|
MED::TIntVector aPolyedreInds;
|
||||||
|
aPolyedreInds.reserve(aNbElems + 1);
|
||||||
|
aPolyedreInds.push_back(1); // reference on the first element in the faces
|
||||||
|
MED::TIntVector aPolyedreFaces;
|
||||||
|
aPolyedreFaces.reserve(aNbElems + 1);
|
||||||
|
aPolyedreFaces.push_back(1); // reference on the first element in the connectivities
|
||||||
|
MED::TIntVector aPolyedreFamilyNums;
|
||||||
|
aPolyedreFamilyNums.reserve(aNbElems);
|
||||||
|
MED::TIntVector aPolyedreConn;
|
||||||
|
aPolyedreConn.reserve(aNbElems*aNbHexaConn);
|
||||||
|
|
||||||
for(TInt iElem = 0; iElem < aNbElems && anIter->more(); iElem++){
|
for(TInt iElem = 0; iElem < aNbElems && anIter->more(); iElem++){
|
||||||
const SMDS_MeshVolume* anElem = anIter->next();
|
const SMDS_MeshVolume* anElem = anIter->next();
|
||||||
TInt aNbNodes = anElem->NbNodes();
|
|
||||||
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
|
|
||||||
TInt aNbConnectivity;
|
|
||||||
MED::TIntVector* anElemNums;
|
|
||||||
MED::TIntVector* aFamilyNums;
|
|
||||||
MED::TIntVector* aConnectivity;
|
|
||||||
switch(aNbNodes){
|
|
||||||
case 4:
|
|
||||||
aNbConnectivity = aNbTetraConn;
|
|
||||||
anElemNums = &anTetraElemNums;
|
|
||||||
aFamilyNums = &aTetraFamilyNums;
|
|
||||||
aConnectivity = &aTetraConn;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
aNbConnectivity = aNbPyraConn;
|
|
||||||
anElemNums = &anPyraElemNums;
|
|
||||||
aFamilyNums = &aPyraFamilyNums;
|
|
||||||
aConnectivity = &aPyraConn;
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
aNbConnectivity = aNbPentaConn;
|
|
||||||
anElemNums = &anPentaElemNums;
|
|
||||||
aFamilyNums = &aPentaFamilyNums;
|
|
||||||
aConnectivity = &aPentaConn;
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
aNbConnectivity = aNbHexaConn;
|
|
||||||
anElemNums = &aHexaElemNums;
|
|
||||||
aFamilyNums = &aHexaFamilyNums;
|
|
||||||
aConnectivity = &aHexaConn;
|
|
||||||
}
|
|
||||||
|
|
||||||
MED::TIntVector aVector(aNbNodes);
|
MED::TIntVector* anElemNums;
|
||||||
for(TInt iNode = 0; aNodesIter->more(); iNode++){
|
MED::TIntVector* aFamilyNums;
|
||||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
|
||||||
aVector[iNode] = aNode->GetID();
|
if (anElem->IsPoly()) {
|
||||||
}
|
const SMDS_PolyhedralVolumeOfNodes* aPolyedre =
|
||||||
TInt aSize = aConnectivity->size();
|
(const SMDS_PolyhedralVolumeOfNodes*) anElem;
|
||||||
aConnectivity->resize(aSize+aNbConnectivity);
|
if (!anElem) {
|
||||||
// There is some difference between SMDS and MED in cells mapping
|
MESSAGE("Warning: bad volumic element");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
anElemNums = &aPolyedreElemNums;
|
||||||
|
aFamilyNums = &aPolyedreFamilyNums;
|
||||||
|
|
||||||
|
TInt aNodeId, aNbFaces = aPolyedre->NbFaces();
|
||||||
|
for (int iface = 1; iface <= aNbFaces; iface++) {
|
||||||
|
int aNbFaceNodes = aPolyedre->NbFaceNodes(iface);
|
||||||
|
for (int inode = 1; inode <= aNbFaceNodes; inode++) {
|
||||||
|
aNodeId = aPolyedre->GetFaceNode(iface, inode)->GetID();
|
||||||
#ifdef _EDF_NODE_IDS_
|
#ifdef _EDF_NODE_IDS_
|
||||||
switch(aNbNodes){
|
aPolyedreConn.push_back(aNodeIdMap[aNodeId]);
|
||||||
case 5:
|
|
||||||
(*aConnectivity)[aSize+0] = aNodeIdMap[aVector[0]];
|
|
||||||
(*aConnectivity)[aSize+1] = aNodeIdMap[aVector[3]];
|
|
||||||
(*aConnectivity)[aSize+2] = aNodeIdMap[aVector[2]];
|
|
||||||
(*aConnectivity)[aSize+3] = aNodeIdMap[aVector[1]];
|
|
||||||
(*aConnectivity)[aSize+4] = aNodeIdMap[aVector[4]];
|
|
||||||
default:
|
|
||||||
for(TInt iNode = 0; iNode < aNbNodes; iNode++)
|
|
||||||
(*aConnectivity)[aSize+iNode] = aNodeIdMap[aVector[iNode]];
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
switch(aNbNodes){
|
aPolyedreConn.push_back(aNodeId);
|
||||||
case 5:
|
|
||||||
(*aConnectivity)[aSize+0] = aVector[0];
|
|
||||||
(*aConnectivity)[aSize+1] = aVector[3];
|
|
||||||
(*aConnectivity)[aSize+2] = aVector[2];
|
|
||||||
(*aConnectivity)[aSize+3] = aVector[1];
|
|
||||||
(*aConnectivity)[aSize+4] = aVector[4];
|
|
||||||
default:
|
|
||||||
for(TInt iNode = 0; iNode < aNbNodes; iNode++)
|
|
||||||
(*aConnectivity)[aSize+iNode] = aVector[iNode];
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
anElemNums->push_back(anElem->GetID());
|
}
|
||||||
|
TInt aPrevPos = aPolyedreFaces.back();
|
||||||
|
aPolyedreFaces.push_back(aPrevPos + aNbFaceNodes);
|
||||||
|
}
|
||||||
|
TInt aPrevPos = aPolyedreInds.back();
|
||||||
|
aPolyedreInds.push_back(aPrevPos + aNbFaces);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
TInt aNbNodes = anElem->NbNodes();
|
||||||
|
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
|
||||||
|
TInt aNbConnectivity;
|
||||||
|
MED::TIntVector* aConnectivity;
|
||||||
|
switch(aNbNodes){
|
||||||
|
case 4:
|
||||||
|
aNbConnectivity = aNbTetraConn;
|
||||||
|
anElemNums = &anTetraElemNums;
|
||||||
|
aFamilyNums = &aTetraFamilyNums;
|
||||||
|
aConnectivity = &aTetraConn;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
aNbConnectivity = aNbPyraConn;
|
||||||
|
anElemNums = &anPyraElemNums;
|
||||||
|
aFamilyNums = &aPyraFamilyNums;
|
||||||
|
aConnectivity = &aPyraConn;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
aNbConnectivity = aNbPentaConn;
|
||||||
|
anElemNums = &anPentaElemNums;
|
||||||
|
aFamilyNums = &aPentaFamilyNums;
|
||||||
|
aConnectivity = &aPentaConn;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
aNbConnectivity = aNbHexaConn;
|
||||||
|
anElemNums = &aHexaElemNums;
|
||||||
|
aFamilyNums = &aHexaFamilyNums;
|
||||||
|
aConnectivity = &aHexaConn;
|
||||||
|
}
|
||||||
|
|
||||||
|
TInt aSize = aConnectivity->size();
|
||||||
|
aConnectivity->resize(aSize + aNbConnectivity);
|
||||||
|
|
||||||
|
MED::TIntVector aVector(aNbNodes);
|
||||||
|
for(TInt iNode = 0; aNodesIter->more(); iNode++){
|
||||||
|
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||||
|
#ifdef _EDF_NODE_IDS_
|
||||||
|
aVector[iNode] = aNodeIdMap[aNode->GetID()];
|
||||||
|
#else
|
||||||
|
aVector[iNode] = aNode->GetID();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
// There is some difference between SMDS and MED in cells mapping
|
||||||
|
switch(aNbNodes){
|
||||||
|
case 5:
|
||||||
|
(*aConnectivity)[aSize+0] = aVector[0];
|
||||||
|
(*aConnectivity)[aSize+1] = aVector[3];
|
||||||
|
(*aConnectivity)[aSize+2] = aVector[2];
|
||||||
|
(*aConnectivity)[aSize+3] = aVector[1];
|
||||||
|
(*aConnectivity)[aSize+4] = aVector[4];
|
||||||
|
default:
|
||||||
|
for(TInt iNode = 0; iNode < aNbNodes; iNode++)
|
||||||
|
(*aConnectivity)[aSize+iNode] = aVector[iNode];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
anElemNums->push_back(anElem->GetID());
|
||||||
|
|
||||||
if (anElemFamMap.find(anElem) != anElemFamMap.end())
|
if (anElemFamMap.find(anElem) != anElemFamMap.end())
|
||||||
aFamilyNums->push_back(anElemFamMap[anElem]);
|
aFamilyNums->push_back(anElemFamMap[anElem]);
|
||||||
@ -682,6 +754,23 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
MESSAGE("Perform - anEntity = "<<SMDS_MED_ENTITY<<"; aGeom = "<<eHEXA8<<"; aNbElems = "<<aNbElems);
|
MESSAGE("Perform - anEntity = "<<SMDS_MED_ENTITY<<"; aGeom = "<<eHEXA8<<"; aNbElems = "<<aNbElems);
|
||||||
myMed->SetCellInfo(aCellInfo);
|
myMed->SetCellInfo(aCellInfo);
|
||||||
}
|
}
|
||||||
|
if(TInt aNbElems = aPolyedreElemNums.size()){
|
||||||
|
// add one element in connectivities,
|
||||||
|
// referenced by the last element in faces
|
||||||
|
aPolyedreConn.push_back(0);
|
||||||
|
|
||||||
|
PPolyedreInfo aCellInfo = myMed->CrPolyedreInfo(aMeshInfo,
|
||||||
|
SMDS_MED_ENTITY,
|
||||||
|
ePOLYEDRE,
|
||||||
|
SMDS_MED_CONNECTIVITY,
|
||||||
|
aPolyedreConn,
|
||||||
|
aPolyedreFaces,
|
||||||
|
aPolyedreInds,
|
||||||
|
aPolyedreFamilyNums,
|
||||||
|
aPolyedreElemNums);
|
||||||
|
MESSAGE("Perform - anEntity = "<<SMDS_MED_ENTITY<<"; aGeom = "<<ePOLYEDRE<<"; aNbElems = "<<aNbElems);
|
||||||
|
myMed->SetPolyedreInfo(aCellInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}catch(const std::exception& exc){
|
}catch(const std::exception& exc){
|
||||||
INFOS("Follow exception was cought:\n\t"<<exc.what());
|
INFOS("Follow exception was cought:\n\t"<<exc.what());
|
||||||
|
@ -160,6 +160,7 @@ SMESH_ActorDef::SMESH_ActorDef(){
|
|||||||
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
||||||
aFilter->RegisterCellsWithType(VTK_WEDGE);
|
aFilter->RegisterCellsWithType(VTK_WEDGE);
|
||||||
aFilter->RegisterCellsWithType(VTK_PYRAMID);
|
aFilter->RegisterCellsWithType(VTK_PYRAMID);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
||||||
|
|
||||||
|
|
||||||
//Definition 1D divice of the actor
|
//Definition 1D divice of the actor
|
||||||
|
@ -160,6 +160,30 @@ namespace{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void AddPolygonsWithID(SMDS_Mesh* theMesh,
|
||||||
|
SMESH::log_array_var& theSeq,
|
||||||
|
CORBA::Long theId)
|
||||||
|
{
|
||||||
|
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||||
|
CORBA::Long anIndexId = 0, aNbElems = theSeq[theId].number;
|
||||||
|
|
||||||
|
for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) {
|
||||||
|
int aFaceId = anIndexes[anIndexId++];
|
||||||
|
|
||||||
|
int aNbNodes = anIndexes[anIndexId++];
|
||||||
|
std::vector<int> nodes_ids (aNbNodes);
|
||||||
|
for (int i = 0; i < aNbNodes; i++) {
|
||||||
|
nodes_ids[i] = anIndexes[anIndexId++];
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDS_MeshElement* anElem = theMesh->AddPolygonalFaceWithID(nodes_ids, aFaceId);
|
||||||
|
if (!anElem)
|
||||||
|
EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolygonalFaceWithID for ID = "
|
||||||
|
<< anElemId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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)
|
||||||
@ -175,7 +199,7 @@ namespace{
|
|||||||
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 AddVolumeWithID for ID = "<<anElemId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,7 +220,7 @@ namespace{
|
|||||||
anIndexes[anIndexId+5],
|
anIndexes[anIndexId+5],
|
||||||
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 AddVolumeWithID for ID = "<<anElemId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,7 +242,7 @@ namespace{
|
|||||||
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 AddVolumeWithID for ID = "<<anElemId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +266,69 @@ namespace{
|
|||||||
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 AddVolumeWithID for ID = "<<anElemId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void AddPolyhedronsWithID (SMDS_Mesh* theMesh,
|
||||||
|
SMESH::log_array_var& theSeq,
|
||||||
|
CORBA::Long theId)
|
||||||
|
{
|
||||||
|
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||||
|
CORBA::Long anIndexId = 0, aNbElems = theSeq[theId].number;
|
||||||
|
|
||||||
|
for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) {
|
||||||
|
int aFaceId = anIndexes[anIndexId++];
|
||||||
|
|
||||||
|
int aNbNodes = anIndexes[anIndexId++];
|
||||||
|
std::vector<int> nodes_ids (aNbNodes);
|
||||||
|
for (int i = 0; i < aNbNodes; i++) {
|
||||||
|
nodes_ids[i] = anIndexes[anIndexId++];
|
||||||
|
}
|
||||||
|
|
||||||
|
int aNbFaces = anIndexes[anIndexId++];
|
||||||
|
std::vector<int> quantities (aNbFaces);
|
||||||
|
for (int i = 0; i < aNbFaces; i++) {
|
||||||
|
quantities[i] = anIndexes[anIndexId++];
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDS_MeshElement* anElem =
|
||||||
|
theMesh->AddPolyhedralVolumeWithID(nodes_ids, quantities, aFaceId);
|
||||||
|
if (!anElem)
|
||||||
|
EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolyhedralVolumeWithID for ID = "
|
||||||
|
<< anElemId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void ChangePolyhedronNodes (SMDS_Mesh* theMesh,
|
||||||
|
SMESH::log_array_var& theSeq,
|
||||||
|
CORBA::Long theId)
|
||||||
|
{
|
||||||
|
const SMESH::long_array& anIndexes = theSeq[theId].indexes;
|
||||||
|
CORBA::Long iind = 0, aNbElems = theSeq[theId].number;
|
||||||
|
|
||||||
|
for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++)
|
||||||
|
{
|
||||||
|
// find element
|
||||||
|
const SMDS_MeshElement* elem = FindElement(theMesh, anIndexes[iind++]);
|
||||||
|
// nb nodes
|
||||||
|
int nbNodes = anIndexes[iind++];
|
||||||
|
// nodes
|
||||||
|
std::vector<const SMDS_MeshNode*> aNodes (nbNodes);
|
||||||
|
for (int iNode = 0; iNode < nbNodes; iNode++) {
|
||||||
|
aNodes[iNode] = FindNode(theMesh, anIndexes[iind++]);
|
||||||
|
}
|
||||||
|
// nb faces
|
||||||
|
int nbFaces = anIndexes[iind++];
|
||||||
|
// quantities
|
||||||
|
std::vector<int> quantities (nbFaces);
|
||||||
|
for (int iFace = 0; iFace < nbFaces; iFace++) {
|
||||||
|
quantities[iFace] = anIndexes[iind++];
|
||||||
|
}
|
||||||
|
// change
|
||||||
|
theMesh->ChangePolyhedronNodes(elem, aNodes, quantities);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,6 +344,7 @@ namespace{
|
|||||||
// purpose : Get type of VTK cell
|
// purpose : Get type of VTK cell
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
static inline vtkIdType getCellType( const SMDSAbs_ElementType theType,
|
static inline vtkIdType getCellType( const SMDSAbs_ElementType theType,
|
||||||
|
const bool thePoly,
|
||||||
const int theNbNodes )
|
const int theNbNodes )
|
||||||
{
|
{
|
||||||
switch( theType )
|
switch( theType )
|
||||||
@ -266,16 +353,18 @@ static inline vtkIdType getCellType( const SMDSAbs_ElementType theType,
|
|||||||
return theNbNodes == 2 ? VTK_LINE : VTK_EMPTY_CELL;
|
return theNbNodes == 2 ? VTK_LINE : VTK_EMPTY_CELL;
|
||||||
|
|
||||||
case SMDSAbs_Face :
|
case SMDSAbs_Face :
|
||||||
if ( theNbNodes == 3 ) return VTK_TRIANGLE;
|
if (thePoly && theNbNodes>2 ) return VTK_POLYGON;
|
||||||
else if ( theNbNodes == 4 ) return VTK_QUAD;
|
else if ( theNbNodes == 3 ) return VTK_TRIANGLE;
|
||||||
else return VTK_EMPTY_CELL;
|
else if ( theNbNodes == 4 ) return VTK_QUAD;
|
||||||
|
else return VTK_EMPTY_CELL;
|
||||||
|
|
||||||
case SMDSAbs_Volume:
|
case SMDSAbs_Volume:
|
||||||
if ( theNbNodes == 4 ) return VTK_TETRA;
|
if (thePoly && theNbNodes>3 ) return VTK_CONVEX_POINT_SET;
|
||||||
else if ( theNbNodes == 5 ) return VTK_PYRAMID;
|
else if ( theNbNodes == 4 ) return VTK_TETRA;
|
||||||
else if ( theNbNodes == 6 ) return VTK_WEDGE;
|
else if ( theNbNodes == 5 ) return VTK_PYRAMID;
|
||||||
else if ( theNbNodes == 8 ) return VTK_HEXAHEDRON;
|
else if ( theNbNodes == 6 ) return VTK_WEDGE;
|
||||||
else return VTK_EMPTY_CELL;
|
else if ( theNbNodes == 8 ) return VTK_HEXAHEDRON;
|
||||||
|
else return VTK_EMPTY_CELL;
|
||||||
|
|
||||||
default: return VTK_EMPTY_CELL;
|
default: return VTK_EMPTY_CELL;
|
||||||
}
|
}
|
||||||
@ -542,35 +631,38 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
|
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
|
||||||
switch(aType){
|
switch(aType){
|
||||||
case SMDSAbs_Volume:{
|
case SMDSAbs_Volume:{
|
||||||
int* aConnectivities = NULL;
|
std::vector<int> aConnectivities;
|
||||||
GetConnect(aNodesIter,aConnect);
|
GetConnect(aNodesIter,aConnect);
|
||||||
// Convertions connectivities from SMDS to VTK
|
// Convertions connectivities from SMDS to VTK
|
||||||
switch(aNbNodes){
|
if (anElem->IsPoly() && aNbNodes>3){ // POLYEDRE
|
||||||
case 4:{
|
if (MYDEBUG) cout << "SMESH:Polyedre IsPoly()="<<anElem->IsPoly()<<"; aType="<<aType<<"; aNbNodes="<<aNbNodes<<endl;
|
||||||
|
for (int k=0; k<aNbNodes ; k++){
|
||||||
|
aConnectivities.push_back(k);
|
||||||
|
if (MYDEBUG) cout << " "<<k;
|
||||||
|
}
|
||||||
|
if (MYDEBUG) cout << endl;
|
||||||
|
}
|
||||||
|
else if (aNbNodes == 4){
|
||||||
static int anIds[] = {0,2,1,3};
|
static int anIds[] = {0,2,1,3};
|
||||||
aConnectivities = anIds;
|
for (int k=0; k<aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 5:{
|
else if (aNbNodes == 5){
|
||||||
static int anIds[] = {0,3,2,1,4};
|
static int anIds[] = {0,3,2,1,4};
|
||||||
aConnectivities = anIds;
|
for (int k=0; k<aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 6:{
|
else if (aNbNodes == 6){
|
||||||
static int anIds[] = {0,1,2,3,4,5};
|
static int anIds[] = {0,1,2,3,4,5};
|
||||||
aConnectivities = anIds;
|
for (int k=0; k<aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 8:{
|
else if (aNbNodes == 8){
|
||||||
static int anIds[] = {0,3,2,1,4,7,6,5};
|
static int anIds[] = {0,3,2,1,4,7,6,5};
|
||||||
aConnectivities = anIds;
|
for (int k=0; k<aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
||||||
break;
|
}
|
||||||
}}
|
|
||||||
|
|
||||||
if(aConnectivities)
|
if(aConnectivities.size()>0){
|
||||||
for( vtkIdType aNodeId = 0; aNodeId < aNbNodes; aNodeId++ )
|
for( vtkIdType aNodeId = 0; aNodeId < aNbNodes; aNodeId++ )
|
||||||
SetId(anIdList,mySMDS2VTKNodes,aConnect,aNodeId,aConnectivities[aNodeId]);
|
SetId(anIdList,mySMDS2VTKNodes,aConnect,aNodeId,aConnectivities[aNodeId]);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -581,7 +673,7 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
aConnectivity->InsertNextCell( anIdList );
|
aConnectivity->InsertNextCell( anIdList );
|
||||||
aCellTypesArray->InsertNextValue( getCellType( aType, aNbNodes ) );
|
aCellTypesArray->InsertNextValue( getCellType( aType, anElem->IsPoly(),aNbNodes ) );
|
||||||
|
|
||||||
iElem++;
|
iElem++;
|
||||||
}
|
}
|
||||||
@ -704,14 +796,16 @@ void SMESH_MeshObj::Update( int theIsClear )
|
|||||||
|
|
||||||
switch(aCommand)
|
switch(aCommand)
|
||||||
{
|
{
|
||||||
case SMESH::ADD_NODE : AddNodesWithID ( myMesh, aSeq, anId ); break;
|
case SMESH::ADD_NODE : AddNodesWithID ( myMesh, aSeq, anId ); break;
|
||||||
case SMESH::ADD_EDGE : AddEdgesWithID ( myMesh, aSeq, anId ); break;
|
case SMESH::ADD_EDGE : AddEdgesWithID ( myMesh, aSeq, anId ); break;
|
||||||
case SMESH::ADD_TRIANGLE : AddTriasWithID ( myMesh, aSeq, anId ); break;
|
case SMESH::ADD_TRIANGLE : AddTriasWithID ( myMesh, aSeq, anId ); break;
|
||||||
case SMESH::ADD_QUADRANGLE : AddQuadsWithID ( myMesh, aSeq, anId ); break;
|
case SMESH::ADD_QUADRANGLE : AddQuadsWithID ( myMesh, aSeq, anId ); break;
|
||||||
case SMESH::ADD_TETRAHEDRON: AddTetrasWithID ( myMesh, aSeq, anId ); break;
|
case SMESH::ADD_POLYGON : AddPolygonsWithID ( myMesh, aSeq, anId ); break;
|
||||||
case SMESH::ADD_PYRAMID : AddPiramidsWithID( myMesh, aSeq, anId ); break;
|
case SMESH::ADD_TETRAHEDRON: AddTetrasWithID ( myMesh, aSeq, anId ); break;
|
||||||
case SMESH::ADD_PRISM : AddPrismsWithID ( myMesh, aSeq, anId ); break;
|
case SMESH::ADD_PYRAMID : AddPiramidsWithID ( myMesh, aSeq, anId ); break;
|
||||||
case SMESH::ADD_HEXAHEDRON : AddHexasWithID ( myMesh, aSeq, anId ); break;
|
case SMESH::ADD_PRISM : AddPrismsWithID ( myMesh, aSeq, anId ); break;
|
||||||
|
case SMESH::ADD_HEXAHEDRON : AddHexasWithID ( myMesh, aSeq, anId ); break;
|
||||||
|
case SMESH::ADD_POLYHEDRON : AddPolyhedronsWithID( myMesh, aSeq, anId ); break;
|
||||||
|
|
||||||
case SMESH::REMOVE_NODE:
|
case SMESH::REMOVE_NODE:
|
||||||
for( ; anElemId < aNbElems; anElemId++ )
|
for( ; anElemId < aNbElems; anElemId++ )
|
||||||
@ -749,6 +843,9 @@ void SMESH_MeshObj::Update( int theIsClear )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SMESH::CHANGE_POLYHEDRON_NODES:
|
||||||
|
ChangePolyhedronNodes(myMesh, aSeq, anId);
|
||||||
|
break;
|
||||||
case SMESH::RENUMBER:
|
case SMESH::RENUMBER:
|
||||||
for(CORBA::Long i=0; anElemId < aNbElems; anElemId++, i+=3)
|
for(CORBA::Long i=0; anElemId < aNbElems; anElemId++, i+=3)
|
||||||
{
|
{
|
||||||
|
@ -55,8 +55,10 @@ LIB_SRC = \
|
|||||||
SMDS_IteratorOfElements.cxx \
|
SMDS_IteratorOfElements.cxx \
|
||||||
SMDS_VolumeOfFaces.cxx \
|
SMDS_VolumeOfFaces.cxx \
|
||||||
SMDS_VolumeOfNodes.cxx \
|
SMDS_VolumeOfNodes.cxx \
|
||||||
|
SMDS_PolyhedralVolumeOfNodes.cxx \
|
||||||
SMDS_FaceOfEdges.cxx \
|
SMDS_FaceOfEdges.cxx \
|
||||||
SMDS_FaceOfNodes.cxx \
|
SMDS_FaceOfNodes.cxx \
|
||||||
|
SMDS_PolygonalFaceOfNodes.cxx \
|
||||||
SMDS_VolumeTool.cxx
|
SMDS_VolumeTool.cxx
|
||||||
# SMDS_Tria3OfNodes.cxx \
|
# SMDS_Tria3OfNodes.cxx \
|
||||||
# SMDS_HexahedronOfNodes.cxx
|
# SMDS_HexahedronOfNodes.cxx
|
||||||
@ -107,8 +109,10 @@ EXPORT_HEADERS= \
|
|||||||
SMDS_IteratorOfElements.hxx \
|
SMDS_IteratorOfElements.hxx \
|
||||||
SMDS_VolumeOfFaces.hxx \
|
SMDS_VolumeOfFaces.hxx \
|
||||||
SMDS_VolumeOfNodes.hxx \
|
SMDS_VolumeOfNodes.hxx \
|
||||||
|
SMDS_PolyhedralVolumeOfNodes.hxx \
|
||||||
SMDS_FaceOfEdges.hxx \
|
SMDS_FaceOfEdges.hxx \
|
||||||
SMDS_FaceOfNodes.hxx \
|
SMDS_FaceOfNodes.hxx \
|
||||||
|
SMDS_PolygonalFaceOfNodes.hxx \
|
||||||
SMDS_VolumeTool.hxx
|
SMDS_VolumeTool.hxx
|
||||||
# SMDS_Tria3OfNodes.hxx \
|
# SMDS_Tria3OfNodes.hxx \
|
||||||
# SMDS_HexahedronOfNodes.hxx
|
# SMDS_HexahedronOfNodes.hxx
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
#include "SMDS_VolumeOfFaces.hxx"
|
#include "SMDS_VolumeOfFaces.hxx"
|
||||||
#include "SMDS_FaceOfNodes.hxx"
|
#include "SMDS_FaceOfNodes.hxx"
|
||||||
#include "SMDS_FaceOfEdges.hxx"
|
#include "SMDS_FaceOfEdges.hxx"
|
||||||
|
#include "SMDS_PolyhedralVolumeOfNodes.hxx"
|
||||||
|
#include "SMDS_PolygonalFaceOfNodes.hxx"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -786,6 +788,126 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshFace * f1,
|
|||||||
return volume;
|
return volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Add a polygon defined by its nodes IDs
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID (std::vector<int> nodes_ids,
|
||||||
|
const int ID)
|
||||||
|
{
|
||||||
|
int nbNodes = nodes_ids.size();
|
||||||
|
std::vector<const SMDS_MeshNode*> nodes (nbNodes);
|
||||||
|
for (int i = 0; i < nbNodes; i++) {
|
||||||
|
nodes[i] = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(nodes_ids[i]);
|
||||||
|
if (!nodes[i]) return NULL;
|
||||||
|
}
|
||||||
|
return SMDS_Mesh::AddPolygonalFaceWithID(nodes, ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Add a polygon defined by its nodes
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
const int ID)
|
||||||
|
{
|
||||||
|
SMDS_MeshFace * face;
|
||||||
|
|
||||||
|
if (hasConstructionEdges())
|
||||||
|
{
|
||||||
|
MESSAGE("Error : Not implemented");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
face = new SMDS_PolygonalFaceOfNodes(nodes);
|
||||||
|
myFaces.Add(face);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!registerElement(ID, face)) {
|
||||||
|
RemoveElement(face, false);
|
||||||
|
face = NULL;
|
||||||
|
}
|
||||||
|
return face;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Add a polygon defined by its nodes.
|
||||||
|
/// An ID is automatically affected to the created face.
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
SMDS_MeshFace* SMDS_Mesh::AddPolygonalFace (std::vector<const SMDS_MeshNode*> nodes)
|
||||||
|
{
|
||||||
|
return SMDS_Mesh::AddPolygonalFaceWithID(nodes, myElementIDFactory->GetFreeID());
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Create a new polyhedral volume and add it to the mesh.
|
||||||
|
/// @param ID The ID of the new volume
|
||||||
|
/// @return The created volume or NULL if an element with this ID already exists
|
||||||
|
/// or if input nodes are not found.
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
SMDS_MeshVolume * SMDS_Mesh::AddPolyhedralVolumeWithID
|
||||||
|
(std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities,
|
||||||
|
const int ID)
|
||||||
|
{
|
||||||
|
int nbNodes = nodes_ids.size();
|
||||||
|
std::vector<const SMDS_MeshNode*> nodes (nbNodes);
|
||||||
|
for (int i = 0; i < nbNodes; i++) {
|
||||||
|
nodes[i] = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(nodes_ids[i]);
|
||||||
|
if (!nodes[i]) return NULL;
|
||||||
|
}
|
||||||
|
return SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Create a new polyhedral volume and add it to the mesh.
|
||||||
|
/// @param ID The ID of the new volume
|
||||||
|
/// @return The created volume
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolumeWithID
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities,
|
||||||
|
const int ID)
|
||||||
|
{
|
||||||
|
SMDS_MeshVolume* volume;
|
||||||
|
if (hasConstructionFaces()) {
|
||||||
|
MESSAGE("Error : Not implemented");
|
||||||
|
return NULL;
|
||||||
|
} else if (hasConstructionEdges()) {
|
||||||
|
MESSAGE("Error : Not implemented");
|
||||||
|
return NULL;
|
||||||
|
} else {
|
||||||
|
volume = new SMDS_PolyhedralVolumeOfNodes(nodes, quantities);
|
||||||
|
myVolumes.Add(volume);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!registerElement(ID, volume)) {
|
||||||
|
RemoveElement(volume, false);
|
||||||
|
volume = NULL;
|
||||||
|
}
|
||||||
|
return volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Create a new polyhedral volume and add it to the mesh.
|
||||||
|
/// @return The created volume
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolume
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
{
|
||||||
|
int ID = myElementIDFactory->GetFreeID();
|
||||||
|
SMDS_MeshVolume * v = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID);
|
||||||
|
if (v == NULL) myElementIDFactory->ReleaseID(ID);
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Registers element with the given ID, maintains inverse connections
|
/// Registers element with the given ID, maintains inverse connections
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
@ -966,10 +1088,25 @@ bool SMDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * elem,
|
|||||||
}
|
}
|
||||||
case SMDSAbs_Face: {
|
case SMDSAbs_Face: {
|
||||||
const SMDS_FaceOfNodes* face = dynamic_cast<const SMDS_FaceOfNodes*>( elem );
|
const SMDS_FaceOfNodes* face = dynamic_cast<const SMDS_FaceOfNodes*>( elem );
|
||||||
if ( face )
|
if ( face ) {
|
||||||
Ok = const_cast<SMDS_FaceOfNodes*>( face )->ChangeNodes( nodes, nbnodes );
|
Ok = const_cast<SMDS_FaceOfNodes*>( face )->ChangeNodes( nodes, nbnodes );
|
||||||
|
} else {
|
||||||
|
/// ??? begin
|
||||||
|
const SMDS_PolygonalFaceOfNodes* face = dynamic_cast<const SMDS_PolygonalFaceOfNodes*>(elem);
|
||||||
|
if (face) {
|
||||||
|
Ok = const_cast<SMDS_PolygonalFaceOfNodes*>(face)->ChangeNodes(nodes, nbnodes);
|
||||||
|
}
|
||||||
|
/// ??? end
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
//case SMDSAbs_PolygonalFace: {
|
||||||
|
// const SMDS_PolygonalFaceOfNodes* face = dynamic_cast<const SMDS_PolygonalFaceOfNodes*>(elem);
|
||||||
|
// if (face) {
|
||||||
|
// Ok = const_cast<SMDS_PolygonalFaceOfNodes*>(face)->ChangeNodes(nodes, nbnodes);
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
//}
|
||||||
case SMDSAbs_Volume: {
|
case SMDSAbs_Volume: {
|
||||||
const SMDS_VolumeOfNodes* vol = dynamic_cast<const SMDS_VolumeOfNodes*>( elem );
|
const SMDS_VolumeOfNodes* vol = dynamic_cast<const SMDS_VolumeOfNodes*>( elem );
|
||||||
if ( vol )
|
if ( vol )
|
||||||
@ -1007,6 +1144,62 @@ bool SMDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * elem,
|
|||||||
return Ok;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : ChangePolyhedronNodes
|
||||||
|
//purpose : to change nodes of polyhedral volume
|
||||||
|
//=======================================================================
|
||||||
|
bool SMDS_Mesh::ChangePolyhedronNodes (const SMDS_MeshElement * elem,
|
||||||
|
std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
{
|
||||||
|
if (elem->GetType() != SMDSAbs_Volume) {
|
||||||
|
MESSAGE("WRONG ELEM TYPE");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SMDS_PolyhedralVolumeOfNodes* vol = dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*>(elem);
|
||||||
|
if (!vol) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// keep current nodes of elem
|
||||||
|
set<const SMDS_MeshElement*> oldNodes;
|
||||||
|
SMDS_ElemIteratorPtr itn = elem->nodesIterator();
|
||||||
|
while (itn->more()) {
|
||||||
|
oldNodes.insert(itn->next());
|
||||||
|
}
|
||||||
|
|
||||||
|
// change nodes
|
||||||
|
bool Ok = const_cast<SMDS_PolyhedralVolumeOfNodes*>(vol)->ChangeNodes(nodes, quantities);
|
||||||
|
if (!Ok) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// update InverseElements
|
||||||
|
|
||||||
|
// AddInverseElement to new nodes
|
||||||
|
int nbnodes = nodes.size();
|
||||||
|
for (int i = 0; i < nbnodes; i++) {
|
||||||
|
if (oldNodes.find(nodes[i]) == oldNodes.end()) {
|
||||||
|
// new node
|
||||||
|
const_cast<SMDS_MeshNode*>(nodes[i])->AddInverseElement(elem);
|
||||||
|
} else {
|
||||||
|
// remove from oldNodes a node that remains in elem
|
||||||
|
oldNodes.erase(nodes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RemoveInverseElement from the nodes removed from elem
|
||||||
|
set<const SMDS_MeshElement*>::iterator it;
|
||||||
|
for (it = oldNodes.begin(); it != oldNodes.end(); it++) {
|
||||||
|
SMDS_MeshNode * n = static_cast<SMDS_MeshNode *>
|
||||||
|
(const_cast<SMDS_MeshElement *>( *it ));
|
||||||
|
n->RemoveInverseElement(elem);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FindEdge
|
//function : FindEdge
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -201,6 +201,28 @@ public:
|
|||||||
const SMDS_MeshFace * f5,
|
const SMDS_MeshFace * f5,
|
||||||
const SMDS_MeshFace * f6);
|
const SMDS_MeshFace * f6);
|
||||||
|
|
||||||
|
virtual SMDS_MeshFace* AddPolygonalFaceWithID (std::vector<int> nodes_ids,
|
||||||
|
const int ID);
|
||||||
|
|
||||||
|
virtual SMDS_MeshFace* AddPolygonalFaceWithID (std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
const int ID);
|
||||||
|
|
||||||
|
virtual SMDS_MeshFace* AddPolygonalFace (std::vector<const SMDS_MeshNode*> nodes);
|
||||||
|
|
||||||
|
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
|
||||||
|
(std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities,
|
||||||
|
const int ID);
|
||||||
|
|
||||||
|
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities,
|
||||||
|
const int ID);
|
||||||
|
|
||||||
|
virtual SMDS_MeshVolume* AddPolyhedralVolume
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities);
|
||||||
|
|
||||||
virtual void RemoveElement(const SMDS_MeshElement * elem,
|
virtual void RemoveElement(const SMDS_MeshElement * elem,
|
||||||
std::list<const SMDS_MeshElement *>& removedElems,
|
std::list<const SMDS_MeshElement *>& removedElems,
|
||||||
std::list<const SMDS_MeshElement *>& removedNodes,
|
std::list<const SMDS_MeshElement *>& removedNodes,
|
||||||
@ -217,6 +239,9 @@ public:
|
|||||||
static bool ChangeElementNodes(const SMDS_MeshElement * elem,
|
static bool ChangeElementNodes(const SMDS_MeshElement * elem,
|
||||||
const SMDS_MeshNode * nodes[],
|
const SMDS_MeshNode * nodes[],
|
||||||
const int nbnodes);
|
const int nbnodes);
|
||||||
|
static bool ChangePolyhedronNodes(const SMDS_MeshElement * elem,
|
||||||
|
std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities);
|
||||||
|
|
||||||
virtual void Renumber (const bool isNodes, const int startID = 1, const int deltaID = 1);
|
virtual void Renumber (const bool isNodes, const int startID = 1, const int deltaID = 1);
|
||||||
// Renumber all nodes or elements.
|
// Renumber all nodes or elements.
|
||||||
|
@ -59,6 +59,8 @@ class SMDS_MeshElement:public SMDS_MeshObject
|
|||||||
|
|
||||||
///Return the type of the current element
|
///Return the type of the current element
|
||||||
virtual SMDSAbs_ElementType GetType() const = 0;
|
virtual SMDSAbs_ElementType GetType() const = 0;
|
||||||
|
virtual bool IsPoly() const { return false; };
|
||||||
|
|
||||||
friend std::ostream & operator <<(std::ostream & OS, const SMDS_MeshElement *);
|
friend std::ostream & operator <<(std::ostream & OS, const SMDS_MeshElement *);
|
||||||
friend bool SMDS_MeshElementIDFactory::BindID(int ID,SMDS_MeshElement*elem);
|
friend bool SMDS_MeshElementIDFactory::BindID(int ID,SMDS_MeshElement*elem);
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ 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");
|
MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
|
||||||
|
|
||||||
myElements.insert(theElem);
|
myElements.insert(theElem);
|
||||||
}
|
}
|
||||||
|
174
src/SMDS/SMDS_PolygonalFaceOfNodes.cxx
Normal file
174
src/SMDS/SMDS_PolygonalFaceOfNodes.cxx
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
// SMESH SMDS : implementaion of Salome mesh data structure
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(disable:4786)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "SMDS_PolygonalFaceOfNodes.hxx"
|
||||||
|
|
||||||
|
#include "SMDS_IteratorOfElements.hxx"
|
||||||
|
//#include "SMDS_MeshNode.hxx"
|
||||||
|
#include "utilities.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Constructor
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
SMDS_PolygonalFaceOfNodes::SMDS_PolygonalFaceOfNodes
|
||||||
|
(std::vector<const SMDS_MeshNode *> nodes)
|
||||||
|
{
|
||||||
|
myNodes = nodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetType
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
SMDSAbs_ElementType SMDS_PolygonalFaceOfNodes::GetType() const
|
||||||
|
{
|
||||||
|
return SMDSAbs_Face;
|
||||||
|
//return SMDSAbs_PolygonalFace;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : ChangeNodes
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
bool SMDS_PolygonalFaceOfNodes::ChangeNodes (std::vector<const SMDS_MeshNode *> nodes)
|
||||||
|
{
|
||||||
|
if (nodes.size() < 3)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
myNodes = nodes;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : ChangeNodes
|
||||||
|
//purpose : to support the same interface, as SMDS_FaceOfNodes
|
||||||
|
//=======================================================================
|
||||||
|
bool SMDS_PolygonalFaceOfNodes::ChangeNodes (const SMDS_MeshNode* nodes[],
|
||||||
|
const int nbNodes)
|
||||||
|
{
|
||||||
|
if (nbNodes < 3)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
myNodes.resize(nbNodes);
|
||||||
|
int i = 0;
|
||||||
|
for (; i < nbNodes; i++) {
|
||||||
|
myNodes[i] = nodes[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : NbNodes
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
int SMDS_PolygonalFaceOfNodes::NbNodes() const
|
||||||
|
{
|
||||||
|
return myNodes.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : NbEdges
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
int SMDS_PolygonalFaceOfNodes::NbEdges() const
|
||||||
|
{
|
||||||
|
return NbNodes();
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : NbFaces
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
int SMDS_PolygonalFaceOfNodes::NbFaces() const
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Print
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SMDS_PolygonalFaceOfNodes::Print(ostream & OS) const
|
||||||
|
{
|
||||||
|
OS << "polygonal face <" << GetID() << " > : ";
|
||||||
|
int i, nbNodes = myNodes.size();
|
||||||
|
for (i = 0; i < nbNodes - 1; i++)
|
||||||
|
OS << myNodes[i] << ",";
|
||||||
|
OS << myNodes[i] << ") " << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : elementsIterator
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
class SMDS_PolygonalFaceOfNodes_MyIterator:public SMDS_ElemIterator
|
||||||
|
{
|
||||||
|
//const SMDS_MeshNode* const *mySet;
|
||||||
|
const std::vector<const SMDS_MeshNode *> mySet;
|
||||||
|
//int myLength;
|
||||||
|
int index;
|
||||||
|
public:
|
||||||
|
//SMDS_PolygonalFaceOfNodes_MyIterator(const SMDS_MeshNode* const *s, int l):
|
||||||
|
// mySet(s),myLength(l),index(0) {}
|
||||||
|
SMDS_PolygonalFaceOfNodes_MyIterator(const std::vector<const SMDS_MeshNode *> s):
|
||||||
|
mySet(s),index(0) {}
|
||||||
|
|
||||||
|
bool more()
|
||||||
|
{
|
||||||
|
return index < mySet.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
const SMDS_MeshElement* next()
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
return mySet[index-1];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SMDS_ElemIteratorPtr SMDS_PolygonalFaceOfNodes::elementsIterator
|
||||||
|
(SMDSAbs_ElementType type) const
|
||||||
|
{
|
||||||
|
switch(type)
|
||||||
|
{
|
||||||
|
case SMDSAbs_Face:
|
||||||
|
return SMDS_MeshElement::elementsIterator(SMDSAbs_Face);
|
||||||
|
case SMDSAbs_Node:
|
||||||
|
return SMDS_ElemIteratorPtr(new SMDS_PolygonalFaceOfNodes_MyIterator(myNodes));
|
||||||
|
case SMDSAbs_Edge:
|
||||||
|
MESSAGE("Error : edge iterator for SMDS_PolygonalFaceOfNodes not implemented");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return SMDS_ElemIteratorPtr
|
||||||
|
(new SMDS_IteratorOfElements
|
||||||
|
(this,type,SMDS_ElemIteratorPtr
|
||||||
|
(new SMDS_PolygonalFaceOfNodes_MyIterator(myNodes))));
|
||||||
|
}
|
||||||
|
return SMDS_ElemIteratorPtr();
|
||||||
|
}
|
60
src/SMDS/SMDS_PolygonalFaceOfNodes.hxx
Normal file
60
src/SMDS/SMDS_PolygonalFaceOfNodes.hxx
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// SMESH SMDS : implementaion of Salome mesh data structure
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
|
||||||
|
#ifndef _SMDS_PolygonalFaceOfNodes_HeaderFile
|
||||||
|
#define _SMDS_PolygonalFaceOfNodes_HeaderFile
|
||||||
|
|
||||||
|
#include "SMDS_MeshFace.hxx"
|
||||||
|
//#include "SMDS_FaceOfNodes.hxx"
|
||||||
|
#include "SMDS_MeshNode.hxx"
|
||||||
|
#include "SMDS_Iterator.hxx"
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
//class SMDS_PolygonalFaceOfNodes:public SMDS_FaceOfNodes
|
||||||
|
class SMDS_PolygonalFaceOfNodes:public SMDS_MeshFace
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SMDS_PolygonalFaceOfNodes (std::vector<const SMDS_MeshNode *> nodes);
|
||||||
|
|
||||||
|
virtual SMDSAbs_ElementType GetType() const;
|
||||||
|
virtual bool IsPoly() const { return true; };
|
||||||
|
|
||||||
|
bool ChangeNodes (std::vector<const SMDS_MeshNode *> nodes);
|
||||||
|
|
||||||
|
bool ChangeNodes (const SMDS_MeshNode* nodes[],
|
||||||
|
const int nbNodes);
|
||||||
|
// to support the same interface, as SMDS_FaceOfNodes
|
||||||
|
|
||||||
|
virtual int NbNodes() const;
|
||||||
|
virtual int NbEdges() const;
|
||||||
|
virtual int NbFaces() const;
|
||||||
|
|
||||||
|
virtual void Print (std::ostream & OS) const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual SMDS_ElemIteratorPtr elementsIterator (SMDSAbs_ElementType type) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<const SMDS_MeshNode *> myNodes;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
180
src/SMDS/SMDS_PolyhedralVolumeOfNodes.cxx
Normal file
180
src/SMDS/SMDS_PolyhedralVolumeOfNodes.cxx
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
// SMESH SMDS : implementaion of Salome mesh data structure
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(disable:4786)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "SMDS_PolyhedralVolumeOfNodes.hxx"
|
||||||
|
#include "SMDS_MeshNode.hxx"
|
||||||
|
#include "utilities.h"
|
||||||
|
|
||||||
|
#include <set>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Constructor
|
||||||
|
//purpose : Create a volume of many faces
|
||||||
|
//=======================================================================
|
||||||
|
SMDS_PolyhedralVolumeOfNodes::SMDS_PolyhedralVolumeOfNodes
|
||||||
|
(std::vector<const SMDS_MeshNode *> nodes,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
: SMDS_VolumeOfNodes(NULL, NULL, NULL, NULL)
|
||||||
|
{
|
||||||
|
ChangeNodes(nodes, quantities);
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetType
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
SMDSAbs_ElementType SMDS_PolyhedralVolumeOfNodes::GetType() const
|
||||||
|
{
|
||||||
|
// return SMDSAbs_PolyhedralVolume;
|
||||||
|
return SMDSAbs_Volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : ChangeNodes
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
bool SMDS_PolyhedralVolumeOfNodes::ChangeNodes (std::vector<const SMDS_MeshNode *> nodes,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
{
|
||||||
|
myNodesByFaces = nodes;
|
||||||
|
myQuantities = quantities;
|
||||||
|
|
||||||
|
// Init fields of parent class
|
||||||
|
int aNbNodes = 0;
|
||||||
|
std::set<const SMDS_MeshNode *> aSet;
|
||||||
|
int nodes_len = nodes.size();
|
||||||
|
for (int j = 0; j < nodes_len; j++) {
|
||||||
|
if (aSet.find(nodes[j]) == aSet.end()) {
|
||||||
|
aSet.insert(nodes[j]);
|
||||||
|
aNbNodes++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int k = 0;
|
||||||
|
const SMDS_MeshNode* aNodes [aNbNodes];
|
||||||
|
std::set<const SMDS_MeshNode *>::iterator anIter = aSet.begin();
|
||||||
|
for (; anIter != aSet.end(); anIter++, k++) {
|
||||||
|
aNodes[k] = *anIter;
|
||||||
|
}
|
||||||
|
|
||||||
|
//SMDS_VolumeOfNodes::ChangeNodes(aNodes, aNbNodes);
|
||||||
|
delete [] myNodes;
|
||||||
|
myNbNodes = aNbNodes;
|
||||||
|
myNodes = new const SMDS_MeshNode* [myNbNodes];
|
||||||
|
for (int i = 0; i < myNbNodes; i++) {
|
||||||
|
myNodes[i] = aNodes[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : NbEdges
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
int SMDS_PolyhedralVolumeOfNodes::NbEdges() const
|
||||||
|
{
|
||||||
|
int nbEdges = 0;
|
||||||
|
|
||||||
|
for (int ifa = 0; ifa < myQuantities.size(); ifa++) {
|
||||||
|
nbEdges += myQuantities[ifa];
|
||||||
|
}
|
||||||
|
nbEdges /= 2;
|
||||||
|
|
||||||
|
return nbEdges;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : NbFaces
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
int SMDS_PolyhedralVolumeOfNodes::NbFaces() const
|
||||||
|
{
|
||||||
|
return myQuantities.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : NbFaceNodes
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
int SMDS_PolyhedralVolumeOfNodes::NbFaceNodes (const int face_ind) const
|
||||||
|
{
|
||||||
|
if (face_ind < 1 || myQuantities.size() < face_ind)
|
||||||
|
return 0;
|
||||||
|
return myQuantities[face_ind - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetFaceNode
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
const SMDS_MeshNode* SMDS_PolyhedralVolumeOfNodes::GetFaceNode (const int face_ind,
|
||||||
|
const int node_ind) const
|
||||||
|
{
|
||||||
|
if (node_ind < 1 || NbFaceNodes(face_ind) < node_ind)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
int i, first_node = 0;
|
||||||
|
for (i = 0; i < face_ind - 1; i++) {
|
||||||
|
first_node += myQuantities[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return myNodesByFaces[first_node + node_ind - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Print
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SMDS_PolyhedralVolumeOfNodes::Print (ostream & OS) const
|
||||||
|
{
|
||||||
|
OS << "polyhedral volume <" << GetID() << "> : ";
|
||||||
|
|
||||||
|
int faces_len = myQuantities.size();
|
||||||
|
//int nodes_len = myNodesByFaces.size();
|
||||||
|
int cur_first_node = 0;
|
||||||
|
|
||||||
|
int i, j;
|
||||||
|
for (i = 0; i < faces_len; i++) {
|
||||||
|
OS << "face_" << i << " (";
|
||||||
|
for (j = 0; j < myQuantities[i] - 1; j++) {
|
||||||
|
OS << myNodesByFaces[cur_first_node + j] << ",";
|
||||||
|
}
|
||||||
|
OS << myNodesByFaces[cur_first_node + j] << ") ";
|
||||||
|
cur_first_node += myQuantities[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : ChangeNodes
|
||||||
|
//purpose : usage disabled
|
||||||
|
//=======================================================================
|
||||||
|
bool SMDS_PolyhedralVolumeOfNodes::ChangeNodes (const SMDS_MeshNode* nodes[],
|
||||||
|
const int nbNodes)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
72
src/SMDS/SMDS_PolyhedralVolumeOfNodes.hxx
Normal file
72
src/SMDS/SMDS_PolyhedralVolumeOfNodes.hxx
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
// SMESH SMDS : implementaion of Salome mesh data structure
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SMDS_PolyhedralVolumeOfNodes.hxx
|
||||||
|
// Module : SMESH
|
||||||
|
|
||||||
|
#ifndef _SMDS_PolyhedralVolumeOfNodes_HeaderFile
|
||||||
|
#define _SMDS_PolyhedralVolumeOfNodes_HeaderFile
|
||||||
|
|
||||||
|
#include "SMDS_VolumeOfNodes.hxx"
|
||||||
|
|
||||||
|
class SMDS_PolyhedralVolumeOfNodes:public SMDS_VolumeOfNodes
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SMDS_PolyhedralVolumeOfNodes (std::vector<const SMDS_MeshNode *> nodes,
|
||||||
|
std::vector<int> quantities);
|
||||||
|
|
||||||
|
//virtual ~SMDS_PolyhedralVolumeOfNodes();
|
||||||
|
|
||||||
|
virtual SMDSAbs_ElementType GetType() const;
|
||||||
|
virtual bool IsPoly() const { return true; };
|
||||||
|
|
||||||
|
bool ChangeNodes (std::vector<const SMDS_MeshNode *> nodes,
|
||||||
|
std::vector<int> quantities);
|
||||||
|
|
||||||
|
//virtual int NbNodes() const;
|
||||||
|
virtual int NbEdges() const;
|
||||||
|
virtual int NbFaces() const;
|
||||||
|
|
||||||
|
int NbFaceNodes (const int face_ind) const;
|
||||||
|
// 1 <= face_ind <= NbFaces()
|
||||||
|
|
||||||
|
const SMDS_MeshNode* GetFaceNode (const int face_ind, const int node_ind) const;
|
||||||
|
// 1 <= face_ind <= NbFaces()
|
||||||
|
// 1 <= node_ind <= NbFaceNodes()
|
||||||
|
|
||||||
|
virtual void Print (std::ostream & OS) const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
//virtual SMDS_ElemIteratorPtr elementsIterator (SMDSAbs_ElementType type) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
// usage disabled
|
||||||
|
bool ChangeNodes (const SMDS_MeshNode* nodes[],
|
||||||
|
const int nbNodes);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<const SMDS_MeshNode *> myNodesByFaces;
|
||||||
|
std::vector<int> myQuantities;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -224,6 +224,57 @@ void SMESHDS_Command::AddVolume(int NewVolID,
|
|||||||
myNumber++;
|
myNumber++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : AddPolygonalFace
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SMESHDS_Command::AddPolygonalFace (const int ElementID,
|
||||||
|
std::vector<int> nodes_ids)
|
||||||
|
{
|
||||||
|
if (!myType == SMESHDS_AddPolygon) {
|
||||||
|
MESSAGE("SMESHDS_Command::AddPolygonalFace : Bad Type");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
myIntegers.push_back(ElementID);
|
||||||
|
|
||||||
|
int i, nbNodes = nodes_ids.size();
|
||||||
|
myIntegers.push_back(nbNodes);
|
||||||
|
for (i = 0; i < nbNodes; i++) {
|
||||||
|
myIntegers.push_back(nodes_ids[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
myNumber++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : AddPolyhedralVolume
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
|
||||||
|
std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
{
|
||||||
|
if (!myType == SMESHDS_AddPolyhedron) {
|
||||||
|
MESSAGE("SMESHDS_Command::AddPolyhedralVolume : Bad Type");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
myIntegers.push_back(ElementID);
|
||||||
|
|
||||||
|
int i, nbNodes = nodes_ids.size();
|
||||||
|
myIntegers.push_back(nbNodes);
|
||||||
|
for (i = 0; i < nbNodes; i++) {
|
||||||
|
myIntegers.push_back(nodes_ids[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
int nbFaces = quantities.size();
|
||||||
|
myIntegers.push_back(nbFaces);
|
||||||
|
for (i = 0; i < nbFaces; i++) {
|
||||||
|
myIntegers.push_back(quantities[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
myNumber++;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -263,7 +314,7 @@ void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes
|
|||||||
{
|
{
|
||||||
if (!myType == SMESHDS_ChangeElementNodes)
|
if (!myType == SMESHDS_ChangeElementNodes)
|
||||||
{
|
{
|
||||||
MESSAGE("SMESHDS_Command::RemoveElement : Bad Type");
|
MESSAGE("SMESHDS_Command::ChangeElementNodes : Bad Type");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
myIntegers.push_back(ElementID);
|
myIntegers.push_back(ElementID);
|
||||||
@ -274,6 +325,36 @@ void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes
|
|||||||
myNumber++;
|
myNumber++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : ChangePolyhedronNodes
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID,
|
||||||
|
std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
{
|
||||||
|
if (myType != SMESHDS_ChangePolyhedronNodes)
|
||||||
|
{
|
||||||
|
MESSAGE("SMESHDS_Command::ChangePolyhedronNodes : Bad Type");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
myIntegers.push_back(ElementID);
|
||||||
|
|
||||||
|
int i, nbNodes = nodes_ids.size();
|
||||||
|
myIntegers.push_back(nbNodes);
|
||||||
|
for (i = 0; i < nbNodes; i++) {
|
||||||
|
myIntegers.push_back(nodes_ids[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
int nbFaces = quantities.size();
|
||||||
|
myIntegers.push_back(nbFaces);
|
||||||
|
for (i = 0; i < nbFaces; i++) {
|
||||||
|
myIntegers.push_back(quantities[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
myNumber++;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Renumber
|
//function : Renumber
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "SMESHDS_CommandType.hxx"
|
#include "SMESHDS_CommandType.hxx"
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
class SMESHDS_Command
|
class SMESHDS_Command
|
||||||
{
|
{
|
||||||
@ -48,10 +49,18 @@ class SMESHDS_Command
|
|||||||
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,
|
||||||
|
std::vector<int> nodes_ids);
|
||||||
|
void AddPolyhedralVolume (const int ElementID,
|
||||||
|
std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities);
|
||||||
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,
|
||||||
|
std::vector<int> nodes_ids,
|
||||||
|
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();
|
||||||
|
@ -34,14 +34,17 @@ enum SMESHDS_CommandType {
|
|||||||
SMESHDS_AddEdge,
|
SMESHDS_AddEdge,
|
||||||
SMESHDS_AddTriangle,
|
SMESHDS_AddTriangle,
|
||||||
SMESHDS_AddQuadrangle,
|
SMESHDS_AddQuadrangle,
|
||||||
|
SMESHDS_AddPolygon,
|
||||||
SMESHDS_AddTetrahedron,
|
SMESHDS_AddTetrahedron,
|
||||||
SMESHDS_AddPyramid,
|
SMESHDS_AddPyramid,
|
||||||
SMESHDS_AddPrism,
|
SMESHDS_AddPrism,
|
||||||
SMESHDS_AddHexahedron,
|
SMESHDS_AddHexahedron,
|
||||||
|
SMESHDS_AddPolyhedron,
|
||||||
SMESHDS_RemoveNode,
|
SMESHDS_RemoveNode,
|
||||||
SMESHDS_RemoveElement,
|
SMESHDS_RemoveElement,
|
||||||
SMESHDS_MoveNode,
|
SMESHDS_MoveNode,
|
||||||
SMESHDS_ChangeElementNodes,
|
SMESHDS_ChangeElementNodes,
|
||||||
|
SMESHDS_ChangePolyhedronNodes,
|
||||||
SMESHDS_Renumber
|
SMESHDS_Renumber
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -171,8 +171,9 @@ bool SMESHDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * elem,
|
|||||||
if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, nbnodes ))
|
if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, nbnodes ))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ASSERT( nbnodes < 9 );
|
//ASSERT( nbnodes < 9 );
|
||||||
int i, IDs[ 8 ];
|
//int i, IDs[ 8 ];
|
||||||
|
int i, IDs[ nbnodes ];
|
||||||
for ( i = 0; i < nbnodes; i++ )
|
for ( i = 0; i < nbnodes; i++ )
|
||||||
IDs [ i ] = nodes[ i ]->GetID();
|
IDs [ i ] = nodes[ i ]->GetID();
|
||||||
myScript->ChangeElementNodes( elem->GetID(), IDs, nbnodes);
|
myScript->ChangeElementNodes( elem->GetID(), IDs, nbnodes);
|
||||||
@ -180,6 +181,30 @@ bool SMESHDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * elem,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : ChangePolyhedronNodes
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
bool SMESHDS_Mesh::ChangePolyhedronNodes
|
||||||
|
(const SMDS_MeshElement * elem,
|
||||||
|
std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
{
|
||||||
|
ASSERT(nodes.size() > 3);
|
||||||
|
|
||||||
|
if (!SMDS_Mesh::ChangePolyhedronNodes(elem, nodes, quantities))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
int i, len = nodes.size();
|
||||||
|
std::vector<int> nodes_ids (len);
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
nodes_ids[i] = nodes[i]->GetID();
|
||||||
|
}
|
||||||
|
myScript->ChangePolyhedronNodes(elem->GetID(), nodes_ids, quantities);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Renumber
|
//function : Renumber
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -472,6 +497,100 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
|
|||||||
n8->GetID());
|
n8->GetID());
|
||||||
return anElem;
|
return anElem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : AddPolygonalFace
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
SMDS_MeshFace* SMESHDS_Mesh::AddPolygonalFaceWithID (std::vector<int> nodes_ids,
|
||||||
|
const int ID)
|
||||||
|
{
|
||||||
|
SMDS_MeshFace *anElem = SMDS_Mesh::AddPolygonalFaceWithID(nodes_ids, ID);
|
||||||
|
if (anElem) {
|
||||||
|
myScript->AddPolygonalFace(ID, nodes_ids);
|
||||||
|
}
|
||||||
|
return anElem;
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDS_MeshFace* SMESHDS_Mesh::AddPolygonalFaceWithID
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
const int ID)
|
||||||
|
{
|
||||||
|
SMDS_MeshFace *anElem = SMDS_Mesh::AddPolygonalFaceWithID(nodes, ID);
|
||||||
|
if (anElem) {
|
||||||
|
int i, len = nodes.size();
|
||||||
|
std::vector<int> nodes_ids (len);
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
nodes_ids[i] = nodes[i]->GetID();
|
||||||
|
}
|
||||||
|
myScript->AddPolygonalFace(ID, nodes_ids);
|
||||||
|
}
|
||||||
|
return anElem;
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDS_MeshFace* SMESHDS_Mesh::AddPolygonalFace
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes)
|
||||||
|
{
|
||||||
|
SMDS_MeshFace *anElem = SMDS_Mesh::AddPolygonalFace(nodes);
|
||||||
|
if (anElem) {
|
||||||
|
int i, len = nodes.size();
|
||||||
|
std::vector<int> nodes_ids (len);
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
nodes_ids[i] = nodes[i]->GetID();
|
||||||
|
}
|
||||||
|
myScript->AddPolygonalFace(anElem->GetID(), nodes_ids);
|
||||||
|
}
|
||||||
|
return anElem;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : AddPolyhedralVolume
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID (std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities,
|
||||||
|
const int ID)
|
||||||
|
{
|
||||||
|
SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes_ids, quantities, ID);
|
||||||
|
if (anElem) {
|
||||||
|
myScript->AddPolyhedralVolume(ID, nodes_ids, quantities);
|
||||||
|
}
|
||||||
|
return anElem;
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities,
|
||||||
|
const int ID)
|
||||||
|
{
|
||||||
|
SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID);
|
||||||
|
if (anElem) {
|
||||||
|
int i, len = nodes.size();
|
||||||
|
std::vector<int> nodes_ids (len);
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
nodes_ids[i] = nodes[i]->GetID();
|
||||||
|
}
|
||||||
|
myScript->AddPolyhedralVolume(ID, nodes_ids, quantities);
|
||||||
|
}
|
||||||
|
return anElem;
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolume
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
{
|
||||||
|
SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolume(nodes, quantities);
|
||||||
|
if (anElem) {
|
||||||
|
int i, len = nodes.size();
|
||||||
|
std::vector<int> nodes_ids (len);
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
nodes_ids[i] = nodes[i]->GetID();
|
||||||
|
}
|
||||||
|
myScript->AddPolyhedralVolume(anElem->GetID(), nodes_ids, quantities);
|
||||||
|
}
|
||||||
|
return anElem;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : removeFromContainers
|
//function : removeFromContainers
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -158,12 +158,37 @@ public:
|
|||||||
const SMDS_MeshNode * n7,
|
const SMDS_MeshNode * n7,
|
||||||
const SMDS_MeshNode * n8);
|
const SMDS_MeshNode * n8);
|
||||||
|
|
||||||
|
virtual SMDS_MeshFace* AddPolygonalFaceWithID (std::vector<int> nodes_ids,
|
||||||
|
const int ID);
|
||||||
|
|
||||||
|
virtual SMDS_MeshFace* AddPolygonalFaceWithID (std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
const int ID);
|
||||||
|
|
||||||
|
virtual SMDS_MeshFace* AddPolygonalFace (std::vector<const SMDS_MeshNode*> nodes);
|
||||||
|
|
||||||
|
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
|
||||||
|
(std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities,
|
||||||
|
const int ID);
|
||||||
|
|
||||||
|
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities,
|
||||||
|
const int ID);
|
||||||
|
|
||||||
|
virtual SMDS_MeshVolume* AddPolyhedralVolume
|
||||||
|
(std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities);
|
||||||
|
|
||||||
void MoveNode(const SMDS_MeshNode *, double x, double y, double z);
|
void MoveNode(const SMDS_MeshNode *, double x, double y, double z);
|
||||||
virtual void RemoveNode(const SMDS_MeshNode *);
|
virtual void RemoveNode(const SMDS_MeshNode *);
|
||||||
void RemoveElement(const SMDS_MeshElement *);
|
void RemoveElement(const SMDS_MeshElement *);
|
||||||
bool ChangeElementNodes(const SMDS_MeshElement * elem,
|
bool ChangeElementNodes(const SMDS_MeshElement * elem,
|
||||||
const SMDS_MeshNode * nodes[],
|
const SMDS_MeshNode * nodes[],
|
||||||
const int nbnodes);
|
const int nbnodes);
|
||||||
|
bool ChangePolyhedronNodes(const SMDS_MeshElement * elem,
|
||||||
|
std::vector<const SMDS_MeshNode*> nodes,
|
||||||
|
std::vector<int> quantities);
|
||||||
void Renumber (const bool isNodes, const int startID=1, const int deltaID=1);
|
void Renumber (const bool isNodes, const int startID=1, const int deltaID=1);
|
||||||
|
|
||||||
void SetNodeInVolume(SMDS_MeshNode * aNode, const TopoDS_Shell & S);
|
void SetNodeInVolume(SMDS_MeshNode * aNode, const TopoDS_Shell & S);
|
||||||
|
@ -148,6 +148,27 @@ void SMESHDS_Script::AddVolume(int NewID,
|
|||||||
idnode5, idnode6, idnode7, idnode8);
|
idnode5, idnode6, idnode7, idnode8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : AddPolygonalFace
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SMESHDS_Script::AddPolygonalFace (int NewFaceID, std::vector<int> nodes_ids)
|
||||||
|
{
|
||||||
|
getCommand(SMESHDS_AddPolygon)->AddPolygonalFace(NewFaceID, nodes_ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : AddPolyhedralVolume
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SMESHDS_Script::AddPolyhedralVolume (int NewID,
|
||||||
|
std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
{
|
||||||
|
getCommand(SMESHDS_AddPolyhedron)->AddPolyhedralVolume
|
||||||
|
(NewID, nodes_ids, quantities);
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -185,6 +206,18 @@ void SMESHDS_Script::ChangeElementNodes(int ElementID, int nodes[], int nbnodes)
|
|||||||
getCommand(SMESHDS_ChangeElementNodes)->ChangeElementNodes( ElementID, nodes, nbnodes );
|
getCommand(SMESHDS_ChangeElementNodes)->ChangeElementNodes( ElementID, nodes, nbnodes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : ChangePolyhedronNodes
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void SMESHDS_Script::ChangePolyhedronNodes (const int ElementID,
|
||||||
|
std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities)
|
||||||
|
{
|
||||||
|
getCommand(SMESHDS_ChangePolyhedronNodes)->ChangePolyhedronNodes
|
||||||
|
(ElementID, nodes_ids, quantities);
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Renumber
|
//function : Renumber
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "SMESHDS_Command.hxx"
|
#include "SMESHDS_Command.hxx"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
class SMESHDS_Script
|
class SMESHDS_Script
|
||||||
@ -48,10 +49,20 @@ class SMESHDS_Script
|
|||||||
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 MoveNode(int NewNodeID, double x, double y, double z);
|
|
||||||
|
void AddPolygonalFace (const int NewFaceID,
|
||||||
|
std::vector<int> nodes_ids);
|
||||||
|
void AddPolyhedralVolume (const int NewVolID,
|
||||||
|
std::vector<int> nodes_ids,
|
||||||
|
std::vector<int> quantities);
|
||||||
|
|
||||||
|
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,
|
||||||
|
std::vector<int> nodes_ids,
|
||||||
|
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 Clear();
|
void Clear();
|
||||||
const std::list<SMESHDS_Command*> & GetCommands();
|
const std::list<SMESHDS_Command*> & GetCommands();
|
||||||
|
@ -1915,8 +1915,10 @@ bool SMESHGUI::OnGUIEvent(int theCommandID, QAD_Desktop * parent)
|
|||||||
case 401: // GEOM::EDGE
|
case 401: // GEOM::EDGE
|
||||||
case 4021: // TRIANGLE
|
case 4021: // TRIANGLE
|
||||||
case 4022: // QUAD
|
case 4022: // QUAD
|
||||||
|
case 4023: // POLYGON
|
||||||
case 4031: // TETRA
|
case 4031: // TETRA
|
||||||
case 4032: // HEXA
|
case 4032: // HEXA
|
||||||
|
case 4033: // POLYHEDRON
|
||||||
{
|
{
|
||||||
if(checkLock(aStudy)) break;
|
if(checkLock(aStudy)) break;
|
||||||
if (myActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
|
if (myActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
|
||||||
@ -1929,10 +1931,14 @@ bool SMESHGUI::OnGUIEvent(int theCommandID, QAD_Desktop * parent)
|
|||||||
type = SMDSAbs_Face; nbNodes = 3; break;
|
type = SMDSAbs_Face; nbNodes = 3; break;
|
||||||
case 4022: // QUAD
|
case 4022: // QUAD
|
||||||
type = SMDSAbs_Face; nbNodes = 4; break;
|
type = SMDSAbs_Face; nbNodes = 4; break;
|
||||||
|
case 4023: // POLYGON
|
||||||
|
type = SMDSAbs_Face; nbNodes = 5; break; // 5 - identificator for POLYGON
|
||||||
case 4031: // TETRA
|
case 4031: // TETRA
|
||||||
type = SMDSAbs_Volume; nbNodes = 4; break;
|
type = SMDSAbs_Volume; nbNodes = 4; break;
|
||||||
case 4032: // HEXA
|
case 4032: // HEXA
|
||||||
type = SMDSAbs_Volume; nbNodes = 8; break;
|
type = SMDSAbs_Volume; nbNodes = 8; break;
|
||||||
|
case 4033: // POLYHEDRE
|
||||||
|
type = SMDSAbs_Volume; nbNodes = 9; break; // 9 - identificator for POLYHEDRE
|
||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
new SMESHGUI_AddMeshElementDlg(parent, "", Sel, type, nbNodes);
|
new SMESHGUI_AddMeshElementDlg(parent, "", Sel, type, nbNodes);
|
||||||
|
@ -203,6 +203,7 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( QWidget* parent, const c
|
|||||||
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu |
|
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu |
|
||||||
Qt::WDestructiveClose)
|
Qt::WDestructiveClose)
|
||||||
{
|
{
|
||||||
|
myIsPoly = false;
|
||||||
mySimulation = new SMESH::TElementSimulation(SMESH::GetActiveStudy());
|
mySimulation = new SMESH::TElementSimulation(SMESH::GetActiveStudy());
|
||||||
|
|
||||||
// verify nb nodes and type
|
// verify nb nodes and type
|
||||||
@ -210,12 +211,7 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( QWidget* parent, const c
|
|||||||
myElementType = ElementType;
|
myElementType = ElementType;
|
||||||
switch ( ElementType ) {
|
switch ( ElementType ) {
|
||||||
case SMDSAbs_Face:
|
case SMDSAbs_Face:
|
||||||
if ( myNbNodes != 3 && myNbNodes != 4 )
|
|
||||||
myNbNodes = 3;
|
|
||||||
break;
|
|
||||||
case SMDSAbs_Volume:
|
case SMDSAbs_Volume:
|
||||||
if ( myNbNodes != 4 && myNbNodes != 8 ) //(nbNodes < 4 || nbNodes > 8 || nbNodes == 7)
|
|
||||||
myNbNodes = 4;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
myElementType = SMDSAbs_Edge;
|
myElementType = SMDSAbs_Edge;
|
||||||
@ -223,16 +219,26 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( QWidget* parent, const c
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString elemName;
|
QString elemName;
|
||||||
switch ( myNbNodes ) {
|
if (myNbNodes == 2)
|
||||||
case 2: elemName = "EDGE"; break;
|
elemName = "EDGE";
|
||||||
case 3: elemName = "TRIANGLE"; break;
|
else if (myNbNodes == 3)
|
||||||
case 4: elemName =
|
elemName = "TRIANGLE";
|
||||||
myElementType == SMDSAbs_Face ? elemName = "QUADRANGLE" : elemName = "TETRAS"; break;
|
else if (myNbNodes == 4)
|
||||||
// case 5:
|
if (myElementType == SMDSAbs_Face)
|
||||||
// case 6:
|
elemName = "QUADRANGLE";
|
||||||
default: // 8
|
else
|
||||||
|
elemName = "TETRAS";
|
||||||
|
else if (myNbNodes == 8)
|
||||||
elemName = "HEXAS";
|
elemName = "HEXAS";
|
||||||
|
else if (myElementType == SMDSAbs_Face){
|
||||||
|
elemName = "POLYGON";
|
||||||
|
myIsPoly = true;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
elemName = "POLYHEDRON";
|
||||||
|
myIsPoly = true;
|
||||||
|
}
|
||||||
|
|
||||||
QString iconName = tr( QString("ICON_DLG_%1").arg(elemName) );
|
QString iconName = tr( QString("ICON_DLG_%1").arg(elemName) );
|
||||||
QString buttonGrTitle = tr( QString("SMESH_%1").arg(elemName) );
|
QString buttonGrTitle = tr( QString("SMESH_%1").arg(elemName) );
|
||||||
QString caption = tr( QString("SMESH_ADD_%1_TITLE").arg(elemName) );
|
QString caption = tr( QString("SMESH_ADD_%1_TITLE").arg(elemName) );
|
||||||
@ -329,7 +335,8 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( QWidget* parent, const c
|
|||||||
GroupC1Layout->addWidget( SelectButtonC1A1, 0, 1 );
|
GroupC1Layout->addWidget( SelectButtonC1A1, 0, 1 );
|
||||||
LineEditC1A1 = new QLineEdit( GroupC1, "LineEditC1A1" );
|
LineEditC1A1 = new QLineEdit( GroupC1, "LineEditC1A1" );
|
||||||
// LineEditC1A1->setReadOnly( TRUE );
|
// LineEditC1A1->setReadOnly( TRUE );
|
||||||
LineEditC1A1->setValidator( new SMESHGUI_IdValidator( this, "validator", myNbNodes ));
|
if (elemName != "POLYGON" && elemName != "POLYHEDRON")
|
||||||
|
LineEditC1A1->setValidator( new SMESHGUI_IdValidator( this, "validator", myNbNodes));
|
||||||
GroupC1Layout->addWidget( LineEditC1A1, 0, 2 );
|
GroupC1Layout->addWidget( LineEditC1A1, 0, 2 );
|
||||||
|
|
||||||
if ( myElementType == SMDSAbs_Face ) {
|
if ( myElementType == SMDSAbs_Face ) {
|
||||||
@ -514,7 +521,20 @@ void SMESHGUI_AddMeshElementDlg::onTextChange(const QString& theNewText)
|
|||||||
else
|
else
|
||||||
allOk = false;
|
allOk = false;
|
||||||
}
|
}
|
||||||
myOkNodes = (allOk && myNbNodes == aListId.count() );
|
|
||||||
|
bool aNodesOK = false;
|
||||||
|
if (myIsPoly && myElementType == SMDSAbs_Face && aListId.count() >=3 ){
|
||||||
|
myNbNodes = aListId.count();
|
||||||
|
cout << __LINE__<<": ENK::DEBUG myNbNodes" << myNbNodes << endl;
|
||||||
|
aNodesOK = true;
|
||||||
|
} else if (myIsPoly && myElementType == SMDSAbs_Volume && aListId.count() >=4 ){
|
||||||
|
myNbNodes = aListId.count();
|
||||||
|
cout << __LINE__<<": ENK::DEBUG myNbNodes" << myNbNodes << endl;
|
||||||
|
aNodesOK = true;
|
||||||
|
} else if (!myIsPoly){
|
||||||
|
aNodesOK = (myNbNodes == aListId.count());
|
||||||
|
}
|
||||||
|
myOkNodes = (allOk && aNodesOK);//myNbNodes == aListId.count() );
|
||||||
|
|
||||||
if ( myOkNodes ) {
|
if ( myOkNodes ) {
|
||||||
buttonOk->setEnabled( true );
|
buttonOk->setEnabled( true );
|
||||||
@ -573,7 +593,9 @@ void SMESHGUI_AddMeshElementDlg::SelectionIntoArgument()
|
|||||||
myBusy = true;
|
myBusy = true;
|
||||||
myEditCurrentArgument->setText( aString );
|
myEditCurrentArgument->setText( aString );
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
if ( myNbNodes != nbNodes )
|
if (myIsPoly && myElementType == SMDSAbs_Face && nbNodes>=3 ) {
|
||||||
|
} else if (myIsPoly && myElementType == SMDSAbs_Volume && nbNodes>=4){
|
||||||
|
} else if (myNbNodes != nbNodes)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// OK
|
// OK
|
||||||
@ -604,12 +626,20 @@ void SMESHGUI_AddMeshElementDlg::displaySimulation()
|
|||||||
reverse(anIds.begin(),anIds.end());
|
reverse(anIds.begin(),anIds.end());
|
||||||
|
|
||||||
vtkIdType aType = 0;
|
vtkIdType aType = 0;
|
||||||
switch ( myNbNodes ) {
|
if (myIsPoly)
|
||||||
case 2: aType = VTK_LINE; break;
|
switch ( myElementType ) {
|
||||||
case 3: aType = VTK_TRIANGLE; break;
|
case SMDSAbs_Face : aType = VTK_POLYGON; break;
|
||||||
case 4: aType = myElementType == SMDSAbs_Face ? VTK_QUAD : VTK_TETRA; break;
|
case SMDSAbs_Volume: aType = VTK_CONVEX_POINT_SET; break;
|
||||||
case 8: aType = VTK_HEXAHEDRON; break;
|
default: return;
|
||||||
default: return;
|
}
|
||||||
|
else {
|
||||||
|
switch ( myNbNodes ) {
|
||||||
|
case 2: aType = VTK_LINE; break;
|
||||||
|
case 3: aType = VTK_TRIANGLE; break;
|
||||||
|
case 4: aType = myElementType == SMDSAbs_Face ? VTK_QUAD : VTK_TETRA; break;
|
||||||
|
case 8: aType = VTK_HEXAHEDRON; break;
|
||||||
|
default: return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mySimulation->SetPosition(myActor,aType,anIds);
|
mySimulation->SetPosition(myActor,aType,anIds);
|
||||||
|
@ -92,6 +92,7 @@ private:
|
|||||||
|
|
||||||
int myElementType ;
|
int myElementType ;
|
||||||
int myNbNodes;
|
int myNbNodes;
|
||||||
|
bool myIsPoly;
|
||||||
|
|
||||||
SMESH::SMESH_Mesh_var myMesh;
|
SMESH::SMESH_Mesh_var myMesh;
|
||||||
SMESH_Actor* myActor;
|
SMESH_Actor* myActor;
|
||||||
|
@ -151,12 +151,19 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg( QWidget* parent, const char* name
|
|||||||
myMeshNbQuadrangles = new QLabel( myMeshFacesGroup, "myMeshNbQuadrangles" );
|
myMeshNbQuadrangles = new QLabel( myMeshFacesGroup, "myMeshNbQuadrangles" );
|
||||||
myMeshNbQuadrangles->setMinimumWidth( 100 );
|
myMeshNbQuadrangles->setMinimumWidth( 100 );
|
||||||
|
|
||||||
|
// --> faces --> quadrangles
|
||||||
|
QLabel* myMeshNbPolygonesLab = new QLabel( COLONIZE( tr( "SMESH_MESHINFO_POLYGONES" ) ), myMeshFacesGroup, "myMeshNbPolygonesLab" );
|
||||||
|
myMeshNbPolygones = new QLabel( myMeshFacesGroup, "myMeshNbPolygones" );
|
||||||
|
myMeshNbPolygones->setMinimumWidth( 100 );
|
||||||
|
|
||||||
myMeshFacesGroupLayout->addWidget( myMeshNbFacesLab, 0, 0 );
|
myMeshFacesGroupLayout->addWidget( myMeshNbFacesLab, 0, 0 );
|
||||||
myMeshFacesGroupLayout->addWidget( myMeshNbFaces, 0, 1 );
|
myMeshFacesGroupLayout->addWidget( myMeshNbFaces, 0, 1 );
|
||||||
myMeshFacesGroupLayout->addWidget( myMeshNbTrianglesLab, 1, 0 );
|
myMeshFacesGroupLayout->addWidget( myMeshNbTrianglesLab, 1, 0 );
|
||||||
myMeshFacesGroupLayout->addWidget( myMeshNbTriangles, 1, 1 );
|
myMeshFacesGroupLayout->addWidget( myMeshNbTriangles, 1, 1 );
|
||||||
myMeshFacesGroupLayout->addWidget( myMeshNbQuadranglesLab, 2, 0 );
|
myMeshFacesGroupLayout->addWidget( myMeshNbQuadranglesLab, 2, 0 );
|
||||||
myMeshFacesGroupLayout->addWidget( myMeshNbQuadrangles, 2, 1 );
|
myMeshFacesGroupLayout->addWidget( myMeshNbQuadrangles, 2, 1 );
|
||||||
|
myMeshFacesGroupLayout->addWidget( myMeshNbPolygonesLab, 3, 0 );
|
||||||
|
myMeshFacesGroupLayout->addWidget( myMeshNbPolygones, 3, 1 );
|
||||||
|
|
||||||
// --> volumes
|
// --> volumes
|
||||||
myMeshVolumesGroup = new QGroupBox( tr( "SMESH_MESHINFO_VOLUMES" ), myMeshWidget, "myMeshVolumesGroup" );
|
myMeshVolumesGroup = new QGroupBox( tr( "SMESH_MESHINFO_VOLUMES" ), myMeshWidget, "myMeshVolumesGroup" );
|
||||||
@ -193,6 +200,11 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg( QWidget* parent, const char* name
|
|||||||
myMeshNbPyra = new QLabel( myMeshVolumesGroup, "myMeshNbPyra" );
|
myMeshNbPyra = new QLabel( myMeshVolumesGroup, "myMeshNbPyra" );
|
||||||
myMeshNbPyra->setMinimumWidth( 100 );
|
myMeshNbPyra->setMinimumWidth( 100 );
|
||||||
|
|
||||||
|
// --> volumes --> polyherones
|
||||||
|
QLabel* myMeshNbPolyhedronesLab = new QLabel( COLONIZE( tr( "SMESH_MESHINFO_POLYEDRES" ) ), myMeshVolumesGroup, "myMeshNbPolyhedronLab" );
|
||||||
|
myMeshNbPolyhedrones = new QLabel( myMeshVolumesGroup, "myMeshNbPolyhedrones" );
|
||||||
|
myMeshNbPolyhedrones->setMinimumWidth( 100 );
|
||||||
|
|
||||||
myMeshVolumesGroupLayout->addWidget( myMeshNbVolumesLab, 0, 0 );
|
myMeshVolumesGroupLayout->addWidget( myMeshNbVolumesLab, 0, 0 );
|
||||||
myMeshVolumesGroupLayout->addWidget( myMeshNbVolumes, 0, 1 );
|
myMeshVolumesGroupLayout->addWidget( myMeshNbVolumes, 0, 1 );
|
||||||
myMeshVolumesGroupLayout->addWidget( myMeshNbTetraLab, 1, 0 );
|
myMeshVolumesGroupLayout->addWidget( myMeshNbTetraLab, 1, 0 );
|
||||||
@ -203,6 +215,8 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg( QWidget* parent, const char* name
|
|||||||
myMeshVolumesGroupLayout->addWidget( myMeshNbPrism, 3, 1 );
|
myMeshVolumesGroupLayout->addWidget( myMeshNbPrism, 3, 1 );
|
||||||
myMeshVolumesGroupLayout->addWidget( myMeshNbPyraLab, 4, 0 );
|
myMeshVolumesGroupLayout->addWidget( myMeshNbPyraLab, 4, 0 );
|
||||||
myMeshVolumesGroupLayout->addWidget( myMeshNbPyra, 4, 1 );
|
myMeshVolumesGroupLayout->addWidget( myMeshNbPyra, 4, 1 );
|
||||||
|
myMeshVolumesGroupLayout->addWidget( myMeshNbPolyhedronesLab, 5, 0 );
|
||||||
|
myMeshVolumesGroupLayout->addWidget( myMeshNbPolyhedrones, 5, 1 );
|
||||||
|
|
||||||
aMeshLayout->addWidget( myMeshNameLab, 0, 0 );
|
aMeshLayout->addWidget( myMeshNameLab, 0, 0 );
|
||||||
aMeshLayout->addWidget( myMeshName, 0, 1 );
|
aMeshLayout->addWidget( myMeshName, 0, 1 );
|
||||||
@ -391,11 +405,13 @@ void SMESHGUI_MeshInfosDlg::DumpMeshInfos()
|
|||||||
myMeshNbFaces->setNum( (int)aMesh->NbFaces() );
|
myMeshNbFaces->setNum( (int)aMesh->NbFaces() );
|
||||||
myMeshNbTriangles->setNum( (int)aMesh->NbTriangles() );
|
myMeshNbTriangles->setNum( (int)aMesh->NbTriangles() );
|
||||||
myMeshNbQuadrangles->setNum( (int)aMesh->NbQuadrangles() );
|
myMeshNbQuadrangles->setNum( (int)aMesh->NbQuadrangles() );
|
||||||
|
myMeshNbPolygones->setNum( (int)aMesh->NbPolygones() );
|
||||||
myMeshNbVolumes->setNum( (int)aMesh->NbVolumes() );
|
myMeshNbVolumes->setNum( (int)aMesh->NbVolumes() );
|
||||||
myMeshNbTetra->setNum( (int)aMesh->NbTetras() );
|
myMeshNbTetra->setNum( (int)aMesh->NbTetras() );
|
||||||
myMeshNbHexa->setNum( (int)aMesh->NbHexas() );
|
myMeshNbHexa->setNum( (int)aMesh->NbHexas() );
|
||||||
myMeshNbPrism->setNum( (int)aMesh->NbPrisms() );
|
myMeshNbPrism->setNum( (int)aMesh->NbPrisms() );
|
||||||
myMeshNbPyra->setNum( (int)aMesh->NbPyramids() );
|
myMeshNbPyra->setNum( (int)aMesh->NbPyramids() );
|
||||||
|
myMeshNbPolyhedrones->setNum( (int)aMesh->NbPolyhedrones() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( anObject );
|
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( anObject );
|
||||||
|
@ -75,12 +75,14 @@ private:
|
|||||||
QLabel* myMeshNbFaces;
|
QLabel* myMeshNbFaces;
|
||||||
QLabel* myMeshNbTriangles;
|
QLabel* myMeshNbTriangles;
|
||||||
QLabel* myMeshNbQuadrangles;
|
QLabel* myMeshNbQuadrangles;
|
||||||
|
QLabel* myMeshNbPolygones;
|
||||||
QGroupBox* myMeshVolumesGroup;
|
QGroupBox* myMeshVolumesGroup;
|
||||||
QLabel* myMeshNbVolumes;
|
QLabel* myMeshNbVolumes;
|
||||||
QLabel* myMeshNbTetra;
|
QLabel* myMeshNbTetra;
|
||||||
QLabel* myMeshNbHexa;
|
QLabel* myMeshNbHexa;
|
||||||
QLabel* myMeshNbPyra;
|
QLabel* myMeshNbPyra;
|
||||||
QLabel* myMeshNbPrism;
|
QLabel* myMeshNbPrism;
|
||||||
|
QLabel* myMeshNbPolyhedrones;
|
||||||
|
|
||||||
QWidget* mySubMeshWidget;
|
QWidget* mySubMeshWidget;
|
||||||
QLabel* mySubMeshName;
|
QLabel* mySubMeshName;
|
||||||
|
@ -147,6 +147,10 @@ msgstr "mesh_triangle.png"
|
|||||||
msgid "ICON_DLG_QUADRANGLE"
|
msgid "ICON_DLG_QUADRANGLE"
|
||||||
msgstr "mesh_quad.png"
|
msgstr "mesh_quad.png"
|
||||||
|
|
||||||
|
#Polygone
|
||||||
|
msgid "ICON_DLG_POLYGON"
|
||||||
|
msgstr "mesh_polygon.png"
|
||||||
|
|
||||||
#triangle
|
#triangle
|
||||||
msgid "ICON_DLG_TETRAS"
|
msgid "ICON_DLG_TETRAS"
|
||||||
msgstr "mesh_tetra.png"
|
msgstr "mesh_tetra.png"
|
||||||
@ -155,6 +159,10 @@ msgstr "mesh_tetra.png"
|
|||||||
msgid "ICON_DLG_HEXAS"
|
msgid "ICON_DLG_HEXAS"
|
||||||
msgstr "mesh_hexa.png"
|
msgstr "mesh_hexa.png"
|
||||||
|
|
||||||
|
#Polyhedre
|
||||||
|
msgid "ICON_DLG_POLYHEDRON"
|
||||||
|
msgstr "mesh_polyhedron.png"
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
# ObjectBrowser
|
# ObjectBrowser
|
||||||
|
@ -444,6 +444,14 @@ msgstr "Add Edge"
|
|||||||
msgid "SMESH_ADD_TETRAS"
|
msgid "SMESH_ADD_TETRAS"
|
||||||
msgstr "Add Tetrahedron"
|
msgstr "Add Tetrahedron"
|
||||||
|
|
||||||
|
#Add Polygone
|
||||||
|
msgid "SMESH_ADD_POLYGONE"
|
||||||
|
msgstr "Add Polygone"
|
||||||
|
|
||||||
|
#Add Polyedre
|
||||||
|
msgid "SMESH_ADD_POLYEDRE"
|
||||||
|
msgstr "Add Polyedre"
|
||||||
|
|
||||||
#Add Hexahedron
|
#Add Hexahedron
|
||||||
msgid "SMESH_ADD_HEXAS"
|
msgid "SMESH_ADD_HEXAS"
|
||||||
msgstr "Add Hexahedron"
|
msgstr "Add Hexahedron"
|
||||||
@ -774,6 +782,14 @@ msgstr "Hexahedrons"
|
|||||||
msgid "SMESH_MESHINFO_PYRAS"
|
msgid "SMESH_MESHINFO_PYRAS"
|
||||||
msgstr "Pyramids"
|
msgstr "Pyramids"
|
||||||
|
|
||||||
|
#Polygones :
|
||||||
|
msgid "SMESH_MESHINFO_POLYGONES"
|
||||||
|
msgstr "Polygones"
|
||||||
|
|
||||||
|
#Polyedres :
|
||||||
|
msgid "SMESH_MESHINFO_POLYEDRES"
|
||||||
|
msgstr "Polyedres"
|
||||||
|
|
||||||
#Prisms :
|
#Prisms :
|
||||||
msgid "SMESH_MESHINFO_PRISMS"
|
msgid "SMESH_MESHINFO_PRISMS"
|
||||||
msgstr "Prisms"
|
msgstr "Prisms"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user