FEM: replace tabs at line start by spaces
This commit is contained in:
parent
b58e37b950
commit
bdbefdc52a
|
@ -152,7 +152,7 @@ SET(FemBase_SRCS
|
|||
FemConstraint.h
|
||||
FemMeshProperty.cpp
|
||||
FemMeshProperty.h
|
||||
)
|
||||
)
|
||||
SOURCE_GROUP("Base types" FILES ${FemBase_SRCS})
|
||||
|
||||
|
||||
|
@ -167,7 +167,7 @@ SET(FemSet_SRCS
|
|||
FemSetFacesObject.h
|
||||
FemSetGeometryObject.cpp
|
||||
FemSetGeometryObject.h
|
||||
)
|
||||
)
|
||||
SOURCE_GROUP("Set objects" FILES ${FemSet_SRCS})
|
||||
|
||||
SET(FemConstraints_SRCS
|
||||
|
@ -185,18 +185,18 @@ SET(FemConstraints_SRCS
|
|||
FemConstraintPulley.h
|
||||
FemConstraintDisplacement.h
|
||||
FemConstraintDisplacement.cpp
|
||||
)
|
||||
)
|
||||
SOURCE_GROUP("Constraints" FILES ${FemConstraints_SRCS})
|
||||
|
||||
SET(FemResult_SRCS
|
||||
)
|
||||
)
|
||||
SOURCE_GROUP("ResultObjects" FILES ${FemResult_SRCS})
|
||||
|
||||
SET(Fem_SRCS
|
||||
${FemBase_SRCS}
|
||||
${FemSet_SRCS}
|
||||
${FemConstraints_SRCS}
|
||||
${FemResult_SRCS}
|
||||
${FemBase_SRCS}
|
||||
${FemSet_SRCS}
|
||||
${FemConstraints_SRCS}
|
||||
${FemResult_SRCS}
|
||||
${Mod_SRCS}
|
||||
${Python_SRCS}
|
||||
)
|
||||
|
@ -208,7 +208,7 @@ target_link_libraries(Fem ${Fem_LIBS})
|
|||
fc_target_copy_resource(Fem
|
||||
${CMAKE_SOURCE_DIR}/src/Mod/Fem
|
||||
${CMAKE_BINARY_DIR}/Mod/Fem
|
||||
Init.py
|
||||
Init.py
|
||||
${FemScripts_SRCS}
|
||||
${FemTests_SRCS}
|
||||
)
|
||||
|
|
|
@ -78,7 +78,7 @@ App::DocumentObjectExecReturn *ConstraintDisplacement::execute(void)
|
|||
|
||||
const char* ConstraintDisplacement::getViewProviderName(void) const
|
||||
{
|
||||
return "FemGui::ViewProviderFemConstraintDisplacement";
|
||||
return "FemGui::ViewProviderFemConstraintDisplacement";
|
||||
}
|
||||
|
||||
void ConstraintDisplacement::onChanged(const App::Property* prop)
|
||||
|
|
|
@ -683,53 +683,53 @@ void FemMesh::readNastran(const std::string &Filename)
|
|||
|
||||
_Mtrx = Base::Matrix4D();
|
||||
|
||||
std::ifstream inputfile;
|
||||
inputfile.open(Filename.c_str());
|
||||
inputfile.seekg(std::ifstream::beg);
|
||||
std::string line1,line2,temp;
|
||||
std::vector<string> token_results;
|
||||
token_results.clear();
|
||||
Base::Vector3d current_node;
|
||||
std::vector<Base::Vector3d> vertices;
|
||||
vertices.clear();
|
||||
std::vector<unsigned int> nodal_id;
|
||||
nodal_id.clear();
|
||||
std::vector<unsigned int> tetra_element;
|
||||
std::vector<std::vector<unsigned int> > all_elements;
|
||||
std::vector<unsigned int> element_id;
|
||||
element_id.clear();
|
||||
bool nastran_free_format = false;
|
||||
do
|
||||
{
|
||||
std::getline(inputfile,line1);
|
||||
if (line1.size() == 0) continue;
|
||||
if (!nastran_free_format && line1.find(",")!= std::string::npos)
|
||||
nastran_free_format = true;
|
||||
if (!nastran_free_format && line1.find("GRID*")!= std::string::npos ) //We found a Grid line
|
||||
{
|
||||
//Now lets extract the GRID Points = Nodes
|
||||
//As each GRID Line consists of two subsequent lines we have to
|
||||
//take care of that as well
|
||||
std::getline(inputfile,line2);
|
||||
//Get the Nodal ID
|
||||
nodal_id.push_back(atoi(line1.substr(8,24).c_str()));
|
||||
//Extract X Value
|
||||
current_node.x = atof(line1.substr(40,56).c_str());
|
||||
//Extract Y Value
|
||||
current_node.y = atof(line1.substr(56,72).c_str());
|
||||
//Extract Z Value
|
||||
current_node.z = atof(line2.substr(8,24).c_str());
|
||||
std::ifstream inputfile;
|
||||
inputfile.open(Filename.c_str());
|
||||
inputfile.seekg(std::ifstream::beg);
|
||||
std::string line1,line2,temp;
|
||||
std::vector<string> token_results;
|
||||
token_results.clear();
|
||||
Base::Vector3d current_node;
|
||||
std::vector<Base::Vector3d> vertices;
|
||||
vertices.clear();
|
||||
std::vector<unsigned int> nodal_id;
|
||||
nodal_id.clear();
|
||||
std::vector<unsigned int> tetra_element;
|
||||
std::vector<std::vector<unsigned int> > all_elements;
|
||||
std::vector<unsigned int> element_id;
|
||||
element_id.clear();
|
||||
bool nastran_free_format = false;
|
||||
do
|
||||
{
|
||||
std::getline(inputfile,line1);
|
||||
if (line1.size() == 0) continue;
|
||||
if (!nastran_free_format && line1.find(",")!= std::string::npos)
|
||||
nastran_free_format = true;
|
||||
if (!nastran_free_format && line1.find("GRID*")!= std::string::npos ) //We found a Grid line
|
||||
{
|
||||
//Now lets extract the GRID Points = Nodes
|
||||
//As each GRID Line consists of two subsequent lines we have to
|
||||
//take care of that as well
|
||||
std::getline(inputfile,line2);
|
||||
//Get the Nodal ID
|
||||
nodal_id.push_back(atoi(line1.substr(8,24).c_str()));
|
||||
//Extract X Value
|
||||
current_node.x = atof(line1.substr(40,56).c_str());
|
||||
//Extract Y Value
|
||||
current_node.y = atof(line1.substr(56,72).c_str());
|
||||
//Extract Z Value
|
||||
current_node.z = atof(line2.substr(8,24).c_str());
|
||||
|
||||
vertices.push_back(current_node);
|
||||
}
|
||||
else if (!nastran_free_format && line1.find("CTETRA")!= std::string::npos)
|
||||
{
|
||||
tetra_element.clear();
|
||||
//Lets extract the elements
|
||||
//As each Element Line consists of two subsequent lines as well
|
||||
//we have to take care of that
|
||||
//At a first step we only extract Quadratic Tetrahedral Elements
|
||||
std::getline(inputfile,line2);
|
||||
vertices.push_back(current_node);
|
||||
}
|
||||
else if (!nastran_free_format && line1.find("CTETRA")!= std::string::npos)
|
||||
{
|
||||
tetra_element.clear();
|
||||
//Lets extract the elements
|
||||
//As each Element Line consists of two subsequent lines as well
|
||||
//we have to take care of that
|
||||
//At a first step we only extract Quadratic Tetrahedral Elements
|
||||
std::getline(inputfile,line2);
|
||||
unsigned int id = atoi(line1.substr(8,16).c_str());
|
||||
int offset = 0;
|
||||
|
||||
|
@ -741,111 +741,111 @@ void FemMesh::readNastran(const std::string &Filename)
|
|||
offset = 2;
|
||||
|
||||
|
||||
element_id.push_back(id);
|
||||
tetra_element.push_back(atoi(line1.substr(24,32).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(32,40).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(40,48).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(48,56).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(56,64).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(64,72).c_str()));
|
||||
tetra_element.push_back(atoi(line2.substr(8+offset,16+offset).c_str()));
|
||||
tetra_element.push_back(atoi(line2.substr(16+offset,24+offset).c_str()));
|
||||
tetra_element.push_back(atoi(line2.substr(24+offset,32+offset).c_str()));
|
||||
tetra_element.push_back(atoi(line2.substr(32+offset,40+offset).c_str()));
|
||||
element_id.push_back(id);
|
||||
tetra_element.push_back(atoi(line1.substr(24,32).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(32,40).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(40,48).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(48,56).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(56,64).c_str()));
|
||||
tetra_element.push_back(atoi(line1.substr(64,72).c_str()));
|
||||
tetra_element.push_back(atoi(line2.substr(8+offset,16+offset).c_str()));
|
||||
tetra_element.push_back(atoi(line2.substr(16+offset,24+offset).c_str()));
|
||||
tetra_element.push_back(atoi(line2.substr(24+offset,32+offset).c_str()));
|
||||
tetra_element.push_back(atoi(line2.substr(32+offset,40+offset).c_str()));
|
||||
|
||||
all_elements.push_back(tetra_element);
|
||||
}
|
||||
else if (nastran_free_format && line1.find("GRID")!= std::string::npos ) //We found a Grid line
|
||||
{
|
||||
char_separator<char> sep(",");
|
||||
tokenizer<char_separator<char> > tokens(line1, sep);
|
||||
token_results.assign(tokens.begin(),tokens.end());
|
||||
if (token_results.size() < 3)
|
||||
continue;//Line does not include Nodal coordinates
|
||||
nodal_id.push_back(atoi(token_results[1].c_str()));
|
||||
current_node.x = atof(token_results[3].c_str());
|
||||
current_node.y = atof(token_results[4].c_str());
|
||||
current_node.z = atof(token_results[5].c_str());
|
||||
vertices.push_back(current_node);
|
||||
}
|
||||
else if (nastran_free_format && line1.find("CTETRA")!= std::string::npos)
|
||||
{
|
||||
tetra_element.clear();
|
||||
//Lets extract the elements
|
||||
//As each Element Line consists of two subsequent lines as well
|
||||
//we have to take care of that
|
||||
//At a first step we only extract Quadratic Tetrahedral Elements
|
||||
std::getline(inputfile,line2);
|
||||
char_separator<char> sep(",");
|
||||
tokenizer<char_separator<char> > tokens(line1.append(line2), sep);
|
||||
token_results.assign(tokens.begin(),tokens.end());
|
||||
if (token_results.size() < 11)
|
||||
continue;//Line does not include enough nodal IDs
|
||||
element_id.push_back(atoi(token_results[1].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[3].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[4].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[5].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[6].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[7].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[8].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[10].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[11].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[12].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[13].c_str()));
|
||||
all_elements.push_back(tetra_element);
|
||||
}
|
||||
else if (nastran_free_format && line1.find("GRID")!= std::string::npos ) //We found a Grid line
|
||||
{
|
||||
char_separator<char> sep(",");
|
||||
tokenizer<char_separator<char> > tokens(line1, sep);
|
||||
token_results.assign(tokens.begin(),tokens.end());
|
||||
if (token_results.size() < 3)
|
||||
continue;//Line does not include Nodal coordinates
|
||||
nodal_id.push_back(atoi(token_results[1].c_str()));
|
||||
current_node.x = atof(token_results[3].c_str());
|
||||
current_node.y = atof(token_results[4].c_str());
|
||||
current_node.z = atof(token_results[5].c_str());
|
||||
vertices.push_back(current_node);
|
||||
}
|
||||
else if (nastran_free_format && line1.find("CTETRA")!= std::string::npos)
|
||||
{
|
||||
tetra_element.clear();
|
||||
//Lets extract the elements
|
||||
//As each Element Line consists of two subsequent lines as well
|
||||
//we have to take care of that
|
||||
//At a first step we only extract Quadratic Tetrahedral Elements
|
||||
std::getline(inputfile,line2);
|
||||
char_separator<char> sep(",");
|
||||
tokenizer<char_separator<char> > tokens(line1.append(line2), sep);
|
||||
token_results.assign(tokens.begin(),tokens.end());
|
||||
if (token_results.size() < 11)
|
||||
continue;//Line does not include enough nodal IDs
|
||||
element_id.push_back(atoi(token_results[1].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[3].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[4].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[5].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[6].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[7].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[8].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[10].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[11].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[12].c_str()));
|
||||
tetra_element.push_back(atoi(token_results[13].c_str()));
|
||||
|
||||
all_elements.push_back(tetra_element);
|
||||
}
|
||||
all_elements.push_back(tetra_element);
|
||||
}
|
||||
|
||||
}
|
||||
while (inputfile.good());
|
||||
inputfile.close();
|
||||
}
|
||||
while (inputfile.good());
|
||||
inputfile.close();
|
||||
|
||||
Base::Console().Log(" %f: File read, start building mesh\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo()));
|
||||
|
||||
//Now fill the SMESH datastructure
|
||||
std::vector<Base::Vector3d>::const_iterator anodeiterator;
|
||||
SMESHDS_Mesh* meshds = this->myMesh->GetMeshDS();
|
||||
meshds->ClearMesh();
|
||||
unsigned int j=0;
|
||||
for(anodeiterator=vertices.begin(); anodeiterator!=vertices.end(); anodeiterator++)
|
||||
{
|
||||
meshds->AddNodeWithID((*anodeiterator).x,(*anodeiterator).y,(*anodeiterator).z,nodal_id[j]);
|
||||
j++;
|
||||
}
|
||||
//Now fill the SMESH datastructure
|
||||
std::vector<Base::Vector3d>::const_iterator anodeiterator;
|
||||
SMESHDS_Mesh* meshds = this->myMesh->GetMeshDS();
|
||||
meshds->ClearMesh();
|
||||
unsigned int j=0;
|
||||
for(anodeiterator=vertices.begin(); anodeiterator!=vertices.end(); anodeiterator++)
|
||||
{
|
||||
meshds->AddNodeWithID((*anodeiterator).x,(*anodeiterator).y,(*anodeiterator).z,nodal_id[j]);
|
||||
j++;
|
||||
}
|
||||
|
||||
for(unsigned int i=0;i<all_elements.size();i++)
|
||||
{
|
||||
//Die Reihenfolge wie hier die Elemente hinzugefügt werden ist sehr wichtig.
|
||||
//Ansonsten ist eine konsistente Datenstruktur nicht möglich
|
||||
//meshds->AddVolumeWithID
|
||||
//(
|
||||
// meshds->FindNode(all_elements[i][0]),
|
||||
// meshds->FindNode(all_elements[i][2]),
|
||||
// meshds->FindNode(all_elements[i][1]),
|
||||
// meshds->FindNode(all_elements[i][3]),
|
||||
// meshds->FindNode(all_elements[i][6]),
|
||||
// meshds->FindNode(all_elements[i][5]),
|
||||
// meshds->FindNode(all_elements[i][4]),
|
||||
// meshds->FindNode(all_elements[i][9]),
|
||||
// meshds->FindNode(all_elements[i][7]),
|
||||
// meshds->FindNode(all_elements[i][8]),
|
||||
// element_id[i]
|
||||
//);
|
||||
meshds->AddVolumeWithID
|
||||
(
|
||||
meshds->FindNode(all_elements[i][1]),
|
||||
meshds->FindNode(all_elements[i][0]),
|
||||
meshds->FindNode(all_elements[i][2]),
|
||||
meshds->FindNode(all_elements[i][3]),
|
||||
meshds->FindNode(all_elements[i][4]),
|
||||
meshds->FindNode(all_elements[i][6]),
|
||||
meshds->FindNode(all_elements[i][5]),
|
||||
meshds->FindNode(all_elements[i][8]),
|
||||
meshds->FindNode(all_elements[i][7]),
|
||||
meshds->FindNode(all_elements[i][9]),
|
||||
element_id[i]
|
||||
);
|
||||
}
|
||||
for(unsigned int i=0;i<all_elements.size();i++)
|
||||
{
|
||||
//Die Reihenfolge wie hier die Elemente hinzugefügt werden ist sehr wichtig.
|
||||
//Ansonsten ist eine konsistente Datenstruktur nicht möglich
|
||||
//meshds->AddVolumeWithID
|
||||
//(
|
||||
// meshds->FindNode(all_elements[i][0]),
|
||||
// meshds->FindNode(all_elements[i][2]),
|
||||
// meshds->FindNode(all_elements[i][1]),
|
||||
// meshds->FindNode(all_elements[i][3]),
|
||||
// meshds->FindNode(all_elements[i][6]),
|
||||
// meshds->FindNode(all_elements[i][5]),
|
||||
// meshds->FindNode(all_elements[i][4]),
|
||||
// meshds->FindNode(all_elements[i][9]),
|
||||
// meshds->FindNode(all_elements[i][7]),
|
||||
// meshds->FindNode(all_elements[i][8]),
|
||||
// element_id[i]
|
||||
//);
|
||||
meshds->AddVolumeWithID
|
||||
(
|
||||
meshds->FindNode(all_elements[i][1]),
|
||||
meshds->FindNode(all_elements[i][0]),
|
||||
meshds->FindNode(all_elements[i][2]),
|
||||
meshds->FindNode(all_elements[i][3]),
|
||||
meshds->FindNode(all_elements[i][4]),
|
||||
meshds->FindNode(all_elements[i][6]),
|
||||
meshds->FindNode(all_elements[i][5]),
|
||||
meshds->FindNode(all_elements[i][8]),
|
||||
meshds->FindNode(all_elements[i][7]),
|
||||
meshds->FindNode(all_elements[i][9]),
|
||||
element_id[i]
|
||||
);
|
||||
}
|
||||
Base::Console().Log(" %f: Done \n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo()));
|
||||
|
||||
}
|
||||
|
@ -922,8 +922,8 @@ void FemMesh::writeABAQUS(const std::string &Filename) const
|
|||
|
||||
// dimension 3
|
||||
//
|
||||
//std::vector<int> c3d4 = boost::assign::list_of(0)(3)(1)(2);
|
||||
//std::vector<int> c3d10 = boost::assign::list_of(0)(2)(1)(3)(6)(5)(4)(7)(9)(8);
|
||||
//std::vector<int> c3d4 = boost::assign::list_of(0)(3)(1)(2);
|
||||
//std::vector<int> c3d10 = boost::assign::list_of(0)(2)(1)(3)(6)(5)(4)(7)(9)(8);
|
||||
std::vector<int> c3d4 = boost::assign::list_of(1)(0)(2)(3);
|
||||
std::vector<int> c3d10 = boost::assign::list_of(1)(0)(2)(3)(4)(6)(5)(8)(7)(9);
|
||||
// FIXME: get the right order
|
||||
|
@ -1222,16 +1222,16 @@ void FemMesh::RestoreDocFile(Base::Reader &reader)
|
|||
|
||||
void FemMesh::transformGeometry(const Base::Matrix4D& rclTrf)
|
||||
{
|
||||
//We perform a translation and rotation of the current active Mesh object
|
||||
Base::Matrix4D clMatrix(rclTrf);
|
||||
SMDS_NodeIteratorPtr aNodeIter = myMesh->GetMeshDS()->nodesIterator();
|
||||
Base::Vector3d current_node;
|
||||
for (;aNodeIter->more();) {
|
||||
const SMDS_MeshNode* aNode = aNodeIter->next();
|
||||
current_node.Set(aNode->X(),aNode->Y(),aNode->Z());
|
||||
current_node = clMatrix * current_node;
|
||||
myMesh->GetMeshDS()->MoveNode(aNode,current_node.x,current_node.y,current_node.z);
|
||||
}
|
||||
//We perform a translation and rotation of the current active Mesh object
|
||||
Base::Matrix4D clMatrix(rclTrf);
|
||||
SMDS_NodeIteratorPtr aNodeIter = myMesh->GetMeshDS()->nodesIterator();
|
||||
Base::Vector3d current_node;
|
||||
for (;aNodeIter->more();) {
|
||||
const SMDS_MeshNode* aNode = aNodeIter->next();
|
||||
current_node.Set(aNode->X(),aNode->Y(),aNode->Z());
|
||||
current_node = clMatrix * current_node;
|
||||
myMesh->GetMeshDS()->MoveNode(aNode,current_node.x,current_node.y,current_node.z);
|
||||
}
|
||||
}
|
||||
|
||||
void FemMesh::setTransform(const Base::Matrix4D& rclTrf)
|
||||
|
@ -1251,14 +1251,14 @@ Base::BoundBox3d FemMesh::getBoundBox(void) const
|
|||
|
||||
SMESHDS_Mesh* data = const_cast<SMESH_Mesh*>(getSMesh())->GetMeshDS();
|
||||
|
||||
SMDS_NodeIteratorPtr aNodeIter = data->nodesIterator();
|
||||
for (;aNodeIter->more();) {
|
||||
const SMDS_MeshNode* aNode = aNodeIter->next();
|
||||
SMDS_NodeIteratorPtr aNodeIter = data->nodesIterator();
|
||||
for (;aNodeIter->more();) {
|
||||
const SMDS_MeshNode* aNode = aNodeIter->next();
|
||||
Base::Vector3d vec(aNode->X(),aNode->Y(),aNode->Z());
|
||||
// Apply the matrix to hold the BoundBox in absolute space.
|
||||
vec = _Mtrx * vec;
|
||||
box.Add(vec);
|
||||
}
|
||||
}
|
||||
|
||||
return box;
|
||||
}
|
||||
|
@ -1294,8 +1294,8 @@ struct Fem::FemMesh::FemMeshInfo FemMesh::getInfo(void) const{
|
|||
struct FemMeshInfo rtrn;
|
||||
|
||||
SMESHDS_Mesh* data = const_cast<SMESH_Mesh*>(getSMesh())->GetMeshDS();
|
||||
const SMDS_MeshInfo& info = data->GetMeshInfo();
|
||||
rtrn.numFaces = data->NbFaces();
|
||||
const SMDS_MeshInfo& info = data->GetMeshInfo();
|
||||
rtrn.numFaces = data->NbFaces();
|
||||
rtrn.numNode = info.NbNodes();
|
||||
rtrn.numTria = info.NbTriangles();
|
||||
rtrn.numQuad = info.NbQuadrangles();
|
||||
|
@ -1310,37 +1310,37 @@ struct Fem::FemMesh::FemMeshInfo FemMesh::getInfo(void) const{
|
|||
return rtrn;
|
||||
|
||||
}
|
||||
// for(unsigned int i=0;i<all_elements.size();i++)
|
||||
// {
|
||||
// //Die Reihenfolge wie hier die Elemente hinzugefügt werden ist sehr wichtig.
|
||||
// //Ansonsten ist eine konsistente Datenstruktur nicht möglich
|
||||
// meshds->AddVolumeWithID(
|
||||
// meshds->FindNode(all_elements[i][0]),
|
||||
// meshds->FindNode(all_elements[i][2]),
|
||||
// meshds->FindNode(all_elements[i][1]),
|
||||
// meshds->FindNode(all_elements[i][3]),
|
||||
// meshds->FindNode(all_elements[i][6]),
|
||||
// meshds->FindNode(all_elements[i][5]),
|
||||
// meshds->FindNode(all_elements[i][4]),
|
||||
// meshds->FindNode(all_elements[i][9]),
|
||||
// meshds->FindNode(all_elements[i][7]),
|
||||
// meshds->FindNode(all_elements[i][8]),
|
||||
// element_id[i]
|
||||
// );
|
||||
// }
|
||||
// for(unsigned int i=0;i<all_elements.size();i++)
|
||||
// {
|
||||
// //Die Reihenfolge wie hier die Elemente hinzugefügt werden ist sehr wichtig.
|
||||
// //Ansonsten ist eine konsistente Datenstruktur nicht möglich
|
||||
// meshds->AddVolumeWithID(
|
||||
// meshds->FindNode(all_elements[i][0]),
|
||||
// meshds->FindNode(all_elements[i][2]),
|
||||
// meshds->FindNode(all_elements[i][1]),
|
||||
// meshds->FindNode(all_elements[i][3]),
|
||||
// meshds->FindNode(all_elements[i][6]),
|
||||
// meshds->FindNode(all_elements[i][5]),
|
||||
// meshds->FindNode(all_elements[i][4]),
|
||||
// meshds->FindNode(all_elements[i][9]),
|
||||
// meshds->FindNode(all_elements[i][7]),
|
||||
// meshds->FindNode(all_elements[i][8]),
|
||||
// element_id[i]
|
||||
// );
|
||||
// }
|
||||
|
||||
Base::Quantity FemMesh::getVolume(void)const
|
||||
{
|
||||
SMDS_VolumeIteratorPtr aVolIter = myMesh->GetMeshDS()->volumesIterator();
|
||||
SMDS_VolumeIteratorPtr aVolIter = myMesh->GetMeshDS()->volumesIterator();
|
||||
|
||||
//Calculate Mesh Volume
|
||||
//For an accurate Volume Calculation of a quadratic Tetrahedron
|
||||
//we have to calculate the Volume of 8 Sub-Tetrahedrons
|
||||
Base::Vector3d a,b,c,a_b_product;
|
||||
double volume = 0.0;
|
||||
//Calculate Mesh Volume
|
||||
//For an accurate Volume Calculation of a quadratic Tetrahedron
|
||||
//we have to calculate the Volume of 8 Sub-Tetrahedrons
|
||||
Base::Vector3d a,b,c,a_b_product;
|
||||
double volume = 0.0;
|
||||
|
||||
for (;aVolIter->more();)
|
||||
{
|
||||
for (;aVolIter->more();)
|
||||
{
|
||||
const SMDS_MeshVolume* aVol = aVolIter->next();
|
||||
|
||||
if ( aVol->NbNodes() != 10 ) continue;
|
||||
|
@ -1357,56 +1357,56 @@ Base::Quantity FemMesh::getVolume(void)const
|
|||
Base::Vector3d v9(aVol->GetNode(9)->X(),aVol->GetNode(9)->Y(),aVol->GetNode(9)->Z());
|
||||
|
||||
|
||||
//1,5,8,7
|
||||
a = v4 -v0 ;
|
||||
b = v7 -v0 ;
|
||||
c = v6 -v0 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//5,9,8,7
|
||||
a = v8 -v4 ;
|
||||
b = v7 -v4 ;
|
||||
c = v6 -v4 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//5,2,9,7
|
||||
a = v1 -v4 ;
|
||||
b = v8 -v4 ;
|
||||
c = v6 -v4 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//2,6,9,7
|
||||
a = v5 -v1 ;
|
||||
b = v8 -v1 ;
|
||||
c = v6 -v1 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//9,6,10,7
|
||||
a = v5 -v8 ;
|
||||
b = v9 -v8 ;
|
||||
c = v6 -v8 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//6,3,10,7
|
||||
a = v2 -v5 ;
|
||||
b = v9 -v5 ;
|
||||
c = v6 -v5 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//8,9,10,7
|
||||
a = v8 -v7 ;
|
||||
b = v9 -v7 ;
|
||||
c = v6 -v7 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//8,9,10,4
|
||||
a = v8 -v7 ;
|
||||
b = v9 -v7 ;
|
||||
c = v3 -v7 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//1,5,8,7
|
||||
a = v4 -v0 ;
|
||||
b = v7 -v0 ;
|
||||
c = v6 -v0 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//5,9,8,7
|
||||
a = v8 -v4 ;
|
||||
b = v7 -v4 ;
|
||||
c = v6 -v4 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//5,2,9,7
|
||||
a = v1 -v4 ;
|
||||
b = v8 -v4 ;
|
||||
c = v6 -v4 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//2,6,9,7
|
||||
a = v5 -v1 ;
|
||||
b = v8 -v1 ;
|
||||
c = v6 -v1 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//9,6,10,7
|
||||
a = v5 -v8 ;
|
||||
b = v9 -v8 ;
|
||||
c = v6 -v8 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//6,3,10,7
|
||||
a = v2 -v5 ;
|
||||
b = v9 -v5 ;
|
||||
c = v6 -v5 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//8,9,10,7
|
||||
a = v8 -v7 ;
|
||||
b = v9 -v7 ;
|
||||
c = v6 -v7 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
//8,9,10,4
|
||||
a = v8 -v7 ;
|
||||
b = v9 -v7 ;
|
||||
c = v3 -v7 ;
|
||||
a_b_product.x = a.y*b.z-b.y*a.z;a_b_product.y = a.z*b.x-b.z*a.x;a_b_product.z = a.x*b.y-b.x*a.y;
|
||||
volume += 1.0/6.0 * fabs((a_b_product.x * c.x)+ (a_b_product.y * c.y)+(a_b_product.z * c.z));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return Base::Quantity(volume,Unit::Volume);
|
||||
|
||||
|
|
|
@ -1,242 +1,242 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="ComplexGeoDataPy"
|
||||
Name="FemMeshPy"
|
||||
Twin="FemMesh"
|
||||
TwinPointer="FemMesh"
|
||||
Include="Mod/Fem/App/FemMesh.h"
|
||||
Namespace="Fem"
|
||||
FatherInclude="App/ComplexGeoDataPy.h"
|
||||
FatherNamespace="Data"
|
||||
Constructor="true">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
|
||||
<UserDocu>FemMesh class</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="setShape">
|
||||
<Documentation>
|
||||
<UserDocu>set the Part shape to mesh</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="compute">
|
||||
<Documentation>
|
||||
<UserDocu>Update the internal mesh structure</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addHypothesis">
|
||||
<Documentation>
|
||||
<UserDocu>Add hypothesis</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setStanardHypotheses">
|
||||
<Documentation>
|
||||
<UserDocu>Set some standard hypotheses for the whole shape</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addNode">
|
||||
<Documentation>
|
||||
<UserDocu>Add a node by setting (x,y,z).</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addEdge">
|
||||
<Documentation>
|
||||
<UserDocu>Add an edge by setting two node indices.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addFace">
|
||||
<Documentation>
|
||||
<UserDocu>Add a face by setting three node indices.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addQuad">
|
||||
<Documentation>
|
||||
<UserDocu>Add a quad by setting four node indices.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addVolume">
|
||||
<Documentation>
|
||||
<UserDocu>Add a volume by setting an arbitrary number of node indices.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="read">
|
||||
<Documentation>
|
||||
<UserDocu>Read in an DAT, UNV, MED or STL file.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="write" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>write out an DAT, UNV, MED or STL file.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="writeABAQUS" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>write out as ABAQUS.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setTransform">
|
||||
<Documentation>
|
||||
<UserDocu>Use a Placement object to perform a translation or rotation</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="copy" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Make a copy of this FEM mesh.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getVolumesByFace" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a dict of volume IDs and face IDs which belong to a TopoFace</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getccxVolumesByFace" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a dict of volume IDs and ccx face numbers which belong to a TopoFace</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodeById" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Get the node position vector by an Node-ID</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodesBySolid" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a list of node IDs which belong to a TopoSolid</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodesByFace" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a list of node IDs which belong to a TopoFace</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodesByEdge" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a list of node IDs which belong to a TopoEdge</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodesByVertex" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a list of node IDs which belong to a TopoVertex</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getElementNodes" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a tuple of node IDs to a given element ID</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="Nodes" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Dictionary of Nodes by ID (int ID:Vector())</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Nodes" Type="Dict"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NodeCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of nodes in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NodeCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Edges" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Tuple of edge IDs</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Edges" Type="Tuple"/>
|
||||
</Attribute>
|
||||
<Attribute Name="EdgeCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of edges in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="EdgeCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Faces" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Tuple of face IDs</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Faces" Type="Tuple"/>
|
||||
</Attribute>
|
||||
<Attribute Name="FaceCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Faces in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="FaceCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="TriangleCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Triangles in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="TriangleCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="QuadrangleCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Quadrangles in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="QuadrangleCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="PolygonCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Quadrangles in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="PolygonCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Volumes" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Tuple of volume IDs</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Volumes" Type="Tuple"/>
|
||||
</Attribute>
|
||||
<Attribute Name="VolumeCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Volumes in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="VolumeCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="TetraCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Tetras in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="TetraCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="HexaCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Hexas in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="HexaCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="PyramidCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Pyramids in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="PyramidCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="PrismCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Prisms in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="PrismCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="PolyhedronCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Polyhedrons in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="PolyhedronCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="SubMeshCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of SubMeshs in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="SubMeshCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="GroupCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Groups in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="GroupCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Volume" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Volume of the mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Volume" Type="Object"/>
|
||||
</Attribute>
|
||||
</PythonExport>
|
||||
<PythonExport
|
||||
Father="ComplexGeoDataPy"
|
||||
Name="FemMeshPy"
|
||||
Twin="FemMesh"
|
||||
TwinPointer="FemMesh"
|
||||
Include="Mod/Fem/App/FemMesh.h"
|
||||
Namespace="Fem"
|
||||
FatherInclude="App/ComplexGeoDataPy.h"
|
||||
FatherNamespace="Data"
|
||||
Constructor="true">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
|
||||
<UserDocu>FemMesh class</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="setShape">
|
||||
<Documentation>
|
||||
<UserDocu>set the Part shape to mesh</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="compute">
|
||||
<Documentation>
|
||||
<UserDocu>Update the internal mesh structure</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addHypothesis">
|
||||
<Documentation>
|
||||
<UserDocu>Add hypothesis</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setStanardHypotheses">
|
||||
<Documentation>
|
||||
<UserDocu>Set some standard hypotheses for the whole shape</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addNode">
|
||||
<Documentation>
|
||||
<UserDocu>Add a node by setting (x,y,z).</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addEdge">
|
||||
<Documentation>
|
||||
<UserDocu>Add an edge by setting two node indices.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addFace">
|
||||
<Documentation>
|
||||
<UserDocu>Add a face by setting three node indices.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addQuad">
|
||||
<Documentation>
|
||||
<UserDocu>Add a quad by setting four node indices.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="addVolume">
|
||||
<Documentation>
|
||||
<UserDocu>Add a volume by setting an arbitrary number of node indices.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="read">
|
||||
<Documentation>
|
||||
<UserDocu>Read in an DAT, UNV, MED or STL file.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="write" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>write out an DAT, UNV, MED or STL file.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="writeABAQUS" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>write out as ABAQUS.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setTransform">
|
||||
<Documentation>
|
||||
<UserDocu>Use a Placement object to perform a translation or rotation</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="copy" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Make a copy of this FEM mesh.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getVolumesByFace" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a dict of volume IDs and face IDs which belong to a TopoFace</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getccxVolumesByFace" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a dict of volume IDs and ccx face numbers which belong to a TopoFace</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodeById" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Get the node position vector by an Node-ID</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodesBySolid" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a list of node IDs which belong to a TopoSolid</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodesByFace" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a list of node IDs which belong to a TopoFace</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodesByEdge" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a list of node IDs which belong to a TopoEdge</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getNodesByVertex" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a list of node IDs which belong to a TopoVertex</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getElementNodes" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return a tuple of node IDs to a given element ID</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="Nodes" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Dictionary of Nodes by ID (int ID:Vector())</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Nodes" Type="Dict"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NodeCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of nodes in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NodeCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Edges" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Tuple of edge IDs</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Edges" Type="Tuple"/>
|
||||
</Attribute>
|
||||
<Attribute Name="EdgeCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of edges in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="EdgeCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Faces" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Tuple of face IDs</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Faces" Type="Tuple"/>
|
||||
</Attribute>
|
||||
<Attribute Name="FaceCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Faces in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="FaceCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="TriangleCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Triangles in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="TriangleCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="QuadrangleCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Quadrangles in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="QuadrangleCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="PolygonCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Quadrangles in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="PolygonCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Volumes" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Tuple of volume IDs</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Volumes" Type="Tuple"/>
|
||||
</Attribute>
|
||||
<Attribute Name="VolumeCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Volumes in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="VolumeCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="TetraCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Tetras in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="TetraCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="HexaCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Hexas in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="HexaCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="PyramidCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Pyramids in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="PyramidCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="PrismCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Prisms in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="PrismCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="PolyhedronCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Polyhedrons in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="PolyhedronCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="SubMeshCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of SubMeshs in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="SubMeshCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="GroupCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of Groups in the Mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="GroupCount" Type="Int"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Volume" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Volume of the mesh.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Volume" Type="Object"/>
|
||||
</Attribute>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
|
|
|
@ -203,94 +203,94 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop
|
|||
//OvG: Translation indication
|
||||
if(!xFree)
|
||||
{
|
||||
SbMatrix mx;
|
||||
mx.setTransform(base, rotx, SbVec3f(1,1,1));
|
||||
matricesx[idx] = mx;
|
||||
idx++;
|
||||
}
|
||||
if(!yFree)
|
||||
SbMatrix mx;
|
||||
mx.setTransform(base, rotx, SbVec3f(1,1,1));
|
||||
matricesx[idx] = mx;
|
||||
idx++;
|
||||
}
|
||||
if(!yFree)
|
||||
{
|
||||
SbMatrix my;
|
||||
my.setTransform(base, roty, SbVec3f(1,1,1));
|
||||
matricesy[idy] = my;
|
||||
idy++;
|
||||
}
|
||||
if(!zFree)
|
||||
SbMatrix my;
|
||||
my.setTransform(base, roty, SbVec3f(1,1,1));
|
||||
matricesy[idy] = my;
|
||||
idy++;
|
||||
}
|
||||
if(!zFree)
|
||||
{
|
||||
SbMatrix mz;
|
||||
mz.setTransform(base, rotz, SbVec3f(1,1,1));
|
||||
matricesz[idz] = mz;
|
||||
idz++;
|
||||
}
|
||||
SbMatrix mz;
|
||||
mz.setTransform(base, rotz, SbVec3f(1,1,1));
|
||||
matricesz[idz] = mz;
|
||||
idz++;
|
||||
}
|
||||
|
||||
//OvG: Rotation indication
|
||||
if(!rotxFree)
|
||||
//OvG: Rotation indication
|
||||
if(!rotxFree)
|
||||
{
|
||||
SbMatrix mrotx;
|
||||
mrotx.setTransform(base, rotx, SbVec3f(1,1,1));
|
||||
matricesrotx[idrotx] = mrotx;
|
||||
idrotx++;
|
||||
}
|
||||
if(!rotyFree)
|
||||
SbMatrix mrotx;
|
||||
mrotx.setTransform(base, rotx, SbVec3f(1,1,1));
|
||||
matricesrotx[idrotx] = mrotx;
|
||||
idrotx++;
|
||||
}
|
||||
if(!rotyFree)
|
||||
{
|
||||
SbMatrix mroty;
|
||||
mroty.setTransform(base, roty, SbVec3f(1,1,1));
|
||||
matricesroty[idroty] = mroty;
|
||||
idroty++;
|
||||
}
|
||||
if(!rotzFree)
|
||||
SbMatrix mroty;
|
||||
mroty.setTransform(base, roty, SbVec3f(1,1,1));
|
||||
matricesroty[idroty] = mroty;
|
||||
idroty++;
|
||||
}
|
||||
if(!rotzFree)
|
||||
{
|
||||
SbMatrix mrotz;
|
||||
mrotz.setTransform(base, rotz, SbVec3f(1,1,1));
|
||||
matricesrotz[idrotz] = mrotz;
|
||||
idrotz++;
|
||||
}
|
||||
SbMatrix mrotz;
|
||||
mrotz.setTransform(base, rotz, SbVec3f(1,1,1));
|
||||
matricesrotz[idrotz] = mrotz;
|
||||
idrotz++;
|
||||
}
|
||||
#else
|
||||
//OvG: Translation indication
|
||||
if(!xFree)
|
||||
//OvG: Translation indication
|
||||
if(!xFree)
|
||||
{
|
||||
SoSeparator* sepx = new SoSeparator();
|
||||
createPlacement(sepx, base, rotx);
|
||||
createDisplacement(sepx, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepx);
|
||||
}
|
||||
if(!yFree)
|
||||
SoSeparator* sepx = new SoSeparator();
|
||||
createPlacement(sepx, base, rotx);
|
||||
createDisplacement(sepx, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepx);
|
||||
}
|
||||
if(!yFree)
|
||||
{
|
||||
SoSeparator* sepy = new SoSeparator();
|
||||
createPlacement(sepy, base, roty);
|
||||
createDisplacement(sepy, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepy);
|
||||
}
|
||||
if(!zFree)
|
||||
SoSeparator* sepy = new SoSeparator();
|
||||
createPlacement(sepy, base, roty);
|
||||
createDisplacement(sepy, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepy);
|
||||
}
|
||||
if(!zFree)
|
||||
{
|
||||
SoSeparator* sepz = new SoSeparator();
|
||||
createPlacement(sepz, base, rotz);
|
||||
createDisplacement(sepz, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepz);
|
||||
}
|
||||
SoSeparator* sepz = new SoSeparator();
|
||||
createPlacement(sepz, base, rotz);
|
||||
createDisplacement(sepz, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepz);
|
||||
}
|
||||
|
||||
//OvG: Rotation indication
|
||||
if(!rotxFree)
|
||||
//OvG: Rotation indication
|
||||
if(!rotxFree)
|
||||
{
|
||||
SoSeparator* sepx = new SoSeparator();
|
||||
createPlacement(sepx, base, rotx);
|
||||
createRotation(sepx, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepx);
|
||||
}
|
||||
if(!rotyFree)
|
||||
SoSeparator* sepx = new SoSeparator();
|
||||
createPlacement(sepx, base, rotx);
|
||||
createRotation(sepx, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepx);
|
||||
}
|
||||
if(!rotyFree)
|
||||
{
|
||||
SoSeparator* sepy = new SoSeparator();
|
||||
createPlacement(sepy, base, roty);
|
||||
createRotation(sepy, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepy);
|
||||
}
|
||||
if(!rotzFree)
|
||||
SoSeparator* sepy = new SoSeparator();
|
||||
createPlacement(sepy, base, roty);
|
||||
createRotation(sepy, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepy);
|
||||
}
|
||||
if(!rotzFree)
|
||||
{
|
||||
SoSeparator* sepz = new SoSeparator();
|
||||
createPlacement(sepz, base, rotz);
|
||||
createRotation(sepz, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepz);
|
||||
}
|
||||
SoSeparator* sepz = new SoSeparator();
|
||||
createPlacement(sepz, base, rotz);
|
||||
createRotation(sepz, scaledheight, scaledwidth); //OvG: Scaling
|
||||
pShapeSep->addChild(sepz);
|
||||
}
|
||||
#endif
|
||||
n++;
|
||||
}
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="ViewProviderPy"
|
||||
Name="ViewProviderFemMeshPy"
|
||||
Twin="ViewProviderFemMesh"
|
||||
TwinPointer="ViewProviderFemMesh"
|
||||
Include="Mod/Fem/Gui/ViewProviderFemMesh.h"
|
||||
Namespace="FemGui"
|
||||
FatherInclude="Gui/ViewProviderPy.h"
|
||||
FatherNamespace="Gui"
|
||||
Constructor="false"
|
||||
Delete="false">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
|
||||
<UserDocu>ViewProviderFemMesh class</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="applyDisplacement">
|
||||
<Documentation>
|
||||
<UserDocu></UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setNodeColorByScalars">
|
||||
<Documentation>
|
||||
<UserDocu>Sets mesh node colors using element list and value list.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setNodeDisplacementByVectors">
|
||||
<Documentation>
|
||||
<UserDocu></UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="NodeColor" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>Postprocessing color of the nodes. The faces between the nodes gets interpolated. </UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NodeColor" Type="Dict"/>
|
||||
</Attribute>
|
||||
<Attribute Name="ElementColor" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>Postprocessing color of the elements. All faces of the element get the same color. </UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="ElementColor" Type="Dict"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NodeDisplacement" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>Postprocessing color of the the nodes. The faces between the nodes gets interpolated. </UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NodeDisplacement" Type="Dict"/>
|
||||
</Attribute>
|
||||
<Attribute Name="HighlightedNodes" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>List of nodes which gets highlighted</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="HighlightedNodes" Type="List"/>
|
||||
</Attribute>
|
||||
<Attribute Name="VisibleElementFaces" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>A List of elements and faces which are actually shown. This are all surface faces of the mesh</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="VisibleElementFaces" Type="List"/>
|
||||
</Attribute>
|
||||
</PythonExport>
|
||||
<PythonExport
|
||||
Father="ViewProviderPy"
|
||||
Name="ViewProviderFemMeshPy"
|
||||
Twin="ViewProviderFemMesh"
|
||||
TwinPointer="ViewProviderFemMesh"
|
||||
Include="Mod/Fem/Gui/ViewProviderFemMesh.h"
|
||||
Namespace="FemGui"
|
||||
FatherInclude="Gui/ViewProviderPy.h"
|
||||
FatherNamespace="Gui"
|
||||
Constructor="false"
|
||||
Delete="false">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
|
||||
<UserDocu>ViewProviderFemMesh class</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="applyDisplacement">
|
||||
<Documentation>
|
||||
<UserDocu></UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setNodeColorByScalars">
|
||||
<Documentation>
|
||||
<UserDocu>Sets mesh node colors using element list and value list.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setNodeDisplacementByVectors">
|
||||
<Documentation>
|
||||
<UserDocu></UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="NodeColor" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>Postprocessing color of the nodes. The faces between the nodes gets interpolated. </UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NodeColor" Type="Dict"/>
|
||||
</Attribute>
|
||||
<Attribute Name="ElementColor" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>Postprocessing color of the elements. All faces of the element get the same color. </UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="ElementColor" Type="Dict"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NodeDisplacement" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>Postprocessing color of the the nodes. The faces between the nodes gets interpolated. </UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NodeDisplacement" Type="Dict"/>
|
||||
</Attribute>
|
||||
<Attribute Name="HighlightedNodes" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>List of nodes which gets highlighted</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="HighlightedNodes" Type="List"/>
|
||||
</Attribute>
|
||||
<Attribute Name="VisibleElementFaces" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>A List of elements and faces which are actually shown. This are all surface faces of the mesh</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="VisibleElementFaces" Type="List"/>
|
||||
</Attribute>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
|
|
Loading…
Reference in New Issue
Block a user