Methode stub for retriving surface nodes (todo)

This commit is contained in:
jriegel 2013-03-22 12:34:27 +01:00
parent ce0e6e5cef
commit fd8fb253d4
3 changed files with 31 additions and 0 deletions

View File

@ -381,6 +381,18 @@ void FemMesh::compute()
myGen->Compute(*myMesh, myMesh->GetShapeToMesh());
}
std::set<long> FemMesh::getSurfaceNodes(long ElemId,short FaceId, float Angle) const
{
std::set<long> result;
const SMESHDS_Mesh* data = myMesh->GetMeshDS();
const SMDS_MeshElement * element = data->FindElement(ElemId);
int fNbr = element->NbFaces();
//element->
return result;
}
void FemMesh::readNastran(const std::string &Filename)
{

View File

@ -79,6 +79,11 @@ public:
virtual Data::Segment* getSubElement(const char* Type, unsigned long) const;
//@}
/** @name search and retraivel */
//@{
std::set<long> getSurfaceNodes(long ElemId,short FaceId, float Angle=360)const;
//@}
/** @name Placement control */
//@{
/// set the transformation

View File

@ -193,9 +193,23 @@ void TaskCreateNodeSet::onSelectionChanged(const Gui::SelectionChanges& msg)
int elem = atoi(subName.substr(4).c_str());
int face = atoi(subName.substr(i+1).c_str() );
tempSet.clear();
Base::Console().Message("Picked Element:%i Face:%i\n",elem,face);
if(! ui->checkBox_Add->isChecked()){
std::set<long> tmp = pcObject->FemMesh.getValue<Fem::FemMeshObject*>()->FemMesh.getValue().getSurfaceNodes(elem,face);
tempSet.insert(tmp.begin(),tmp.end());
}else
tempSet = pcObject->FemMesh.getValue<Fem::FemMeshObject*>()->FemMesh.getValue().getSurfaceNodes(elem,face);
selectionMode = none;
Gui::Selection().rmvSelectionGate();
MeshViewProvider->setHighlightNodes(tempSet);
}
}