FEM: Make FEM compatible with SMESH7
This commit is contained in:
committed by
wmayer
parent
088f1e4719
commit
f7c77a446a
@@ -68,6 +68,8 @@
|
||||
#include <StdMeshers_QuadraticMesh.hxx>
|
||||
|
||||
# include <TopoDS_Face.hxx>
|
||||
# include <TopoDS_Solid.hxx>
|
||||
# include <TopoDS_Shape.hxx>
|
||||
|
||||
//to simplify parsing input files we use the boost lib
|
||||
#include <boost/tokenizer.hpp>
|
||||
@@ -115,6 +117,8 @@ FemMesh::~FemMesh()
|
||||
FemMesh &FemMesh::operator=(const FemMesh& mesh)
|
||||
{
|
||||
if (this != &mesh) {
|
||||
myGen = new SMESH_Gen();
|
||||
myMesh = myGen->CreateMesh(0,true);
|
||||
copyMeshData(mesh);
|
||||
}
|
||||
return *this;
|
||||
@@ -122,26 +126,18 @@ FemMesh &FemMesh::operator=(const FemMesh& mesh)
|
||||
|
||||
void FemMesh::copyMeshData(const FemMesh& mesh)
|
||||
{
|
||||
//const SMDS_MeshInfo& info = mesh.myMesh->GetMeshDS()->GetMeshInfo();
|
||||
//int numPoly = info.NbPolygons();
|
||||
//int numVolu = info.NbVolumes();
|
||||
//int numTetr = info.NbTetras();
|
||||
//int numHexa = info.NbHexas();
|
||||
//int numPyrd = info.NbPyramids();
|
||||
//int numPris = info.NbPrisms();
|
||||
//int numHedr = info.NbPolyhedrons();
|
||||
|
||||
SMESH_Mesh *test;
|
||||
_Mtrx = mesh._Mtrx;
|
||||
|
||||
SMESHDS_Mesh* meshds = this->myMesh->GetMeshDS();
|
||||
meshds->ClearMesh();
|
||||
|
||||
|
||||
SMDS_NodeIteratorPtr aNodeIter = mesh.myMesh->GetMeshDS()->nodesIterator();
|
||||
for (;aNodeIter->more();) {
|
||||
const SMDS_MeshNode* aNode = aNodeIter->next();
|
||||
meshds->AddNodeWithID(aNode->X(),aNode->Y(),aNode->Z(), aNode->GetID());
|
||||
double temp[3];
|
||||
aNode->GetXYZ(temp);
|
||||
meshds->AddNodeWithID(temp[0],temp[1],temp[2], aNode->GetID());
|
||||
}
|
||||
|
||||
SMDS_EdgeIteratorPtr aEdgeIter = mesh.myMesh->GetMeshDS()->edgesIterator();
|
||||
for (;aEdgeIter->more();) {
|
||||
const SMDS_MeshEdge* aEdge = aEdgeIter->next();
|
||||
@@ -559,7 +555,6 @@ std::set<int> FemMesh::getNodesBySolid(const TopoDS_Solid &solid) const
|
||||
result.insert(aNode->GetID());
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -873,6 +868,7 @@ void FemMesh::read(const char *FileName)
|
||||
}
|
||||
else if (File.hasExtension("dat") ) {
|
||||
// read brep-file
|
||||
// vejmarie disable
|
||||
myMesh->DATToMesh(File.filePath().c_str());
|
||||
}
|
||||
else if (File.hasExtension("bdf") ) {
|
||||
|
||||
Reference in New Issue
Block a user