Add method to find segment of a facet index
This commit is contained in:
parent
93e0c6688d
commit
1cc9993954
|
@ -46,6 +46,16 @@ void MeshSurfaceSegment::AddSegment(const std::vector<unsigned long>& segm)
|
|||
}
|
||||
}
|
||||
|
||||
MeshSegment MeshSurfaceSegment::FindSegment(unsigned long index) const
|
||||
{
|
||||
for (std::vector<MeshSegment>::const_iterator it = segments.begin(); it != segments.end(); ++it) {
|
||||
if (std::find(it->begin(), it->end(), index) != it->end())
|
||||
return *it;
|
||||
}
|
||||
|
||||
return MeshSegment();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
MeshDistancePlanarSegment::MeshDistancePlanarSegment(const MeshKernel& mesh, unsigned long minFacets, float tol)
|
||||
|
|
|
@ -46,6 +46,7 @@ public:
|
|||
virtual void AddFacet(const MeshFacet& rclFacet);
|
||||
void AddSegment(const std::vector<unsigned long>&);
|
||||
const std::vector<MeshSegment>& GetSegments() const { return segments; }
|
||||
MeshSegment FindSegment(unsigned long) const;
|
||||
|
||||
protected:
|
||||
std::vector<MeshSegment> segments;
|
||||
|
|
Loading…
Reference in New Issue
Block a user