Add convenience methods to query selection of a mesh

This commit is contained in:
wmayer
2013-04-26 17:20:24 +02:00
parent cffc53f8ea
commit 2aabac71a7
2 changed files with 20 additions and 0 deletions

View File

@@ -587,6 +587,23 @@ void MeshObject::getPointsFromSelection(std::vector<unsigned long>& inds) const
MeshCore::MeshAlgorithm(this->_kernel).GetPointsFlag(inds, MeshCore::MeshPoint::SELECTED);
}
bool MeshObject::hasSelectedFacets() const
{
unsigned long ct = MeshCore::MeshAlgorithm(this->_kernel).CountFacetFlag(MeshCore::MeshFacet::SELECTED);
return ct > 0;
}
bool MeshObject::hasSelectedPoints() const
{
unsigned long ct = MeshCore::MeshAlgorithm(this->_kernel).CountPointFlag(MeshCore::MeshPoint::SELECTED);
return ct > 0;
}
std::vector<unsigned long> MeshObject::getPointsFromFacets(const std::vector<unsigned long>& facets) const
{
return _kernel.GetFacetPoints(facets);
}
void MeshObject::updateMesh(const std::vector<unsigned long>& facets)
{
std::vector<unsigned long> points;