MeshLib C++ Docs
Loading...
Searching...
No Matches
Surface Paths

Topics

 Planar Path
 Surface Distance
 Group Surface Distance Builder
 Surface Path
 Tunnel Detector

Classes

struct  MR::VertPathInfo
 information associated with each vertex by the paths builder More...
EdgeMetric MR::identityMetric ()
 metric returning 1 for every edge
EdgeMetric MR::edgeLengthMetric (const Mesh &mesh)
EdgeMetric MR::edgeLengthMetric (const MeshTopology &topology, const VertCoords &points)
EdgeMetric MR::discreteAbsMeanCurvatureMetric (const Mesh &mesh)
EdgeMetric MR::discreteAbsMeanCurvatureMetric (const MeshTopology &topology, const VertCoords &points)
EdgeMetric MR::discreteMinusAbsMeanCurvatureMetric (const Mesh &mesh)
EdgeMetric MR::discreteMinusAbsMeanCurvatureMetric (const MeshTopology &topology, const VertCoords &points)
EdgeMetric MR::edgeCurvMetric (const Mesh &mesh, float angleSinFactor=2, float angleSinForBoundary=0)
EdgeMetric MR::edgeCurvMetric (const MeshTopology &topology, const VertCoords &points, float angleSinFactor=2, float angleSinForBoundary=0)
EdgeMetric MR::edgeAbsCurvMetric (const Mesh &mesh, float angleSinFactor=2, float angleSinForBoundary=0)
EdgeMetric MR::edgeAbsCurvMetric (const MeshTopology &topology, const VertCoords &points, float angleSinFactor=2, float angleSinForBoundary=0)
EdgeMetric MR::edgeTableSymMetric (const MeshTopology &topology, const EdgeMetric &metric)
bool MR::isEdgePath (const MeshTopology &topology, const std::vector< EdgeId > &edges)
 returns true if every next edge starts where previous edge ends
bool MR::isEdgeLoop (const MeshTopology &topology, const std::vector< EdgeId > &edges)
 returns true if every next edge starts where previous edge ends, and start vertex coincides with finish vertex
std::vector< EdgeLoopMR::splitOnSimpleLoops (const MeshTopology &topology, std::vector< EdgeLoop > &&loops)
 given a number of edge loops, splits every loop that passes via a vertex more than once on smaller loops without self-intersections
void MR::reverse (EdgePath &path)
void MR::reverse (std::vector< EdgePath > &paths)
 reverse every path in the vector
double MR::calcPathMetric (const EdgePath &path, EdgeMetric metric)
 computes summed metric of all edges in the path
double MR::calcPathLength (const EdgePath &path, const Mesh &mesh)
Vector3d MR::calcOrientedArea (const EdgeLoop &loop, const Mesh &mesh)
void MR::sortPathsByMetric (std::vector< EdgePath > &paths, EdgeMetric metric)
 sorts given paths in ascending order of their metrics
void MR::sortPathsByLength (std::vector< EdgePath > &paths, const Mesh &mesh)
void MR::addLeftBand (const MeshTopology &topology, const EdgeLoop &loop, FaceBitSet &addHere)
 adds all faces incident to loop vertices and located to the left from the loop to given FaceBitSet
EdgePath MR::buildShortestPath (const Mesh &mesh, VertId start, VertId finish, float maxPathLen=FLT_MAX)
EdgePath MR::buildShortestPathBiDir (const Mesh &mesh, VertId start, VertId finish, float maxPathLen=FLT_MAX)
EdgePath MR::buildShortestPathBiDir (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &finish, VertId *outPathStart=nullptr, VertId *outPathFinish=nullptr, float maxPathLen=FLT_MAX)
EdgePath MR::buildShortestPathAStar (const Mesh &mesh, VertId start, VertId finish, float maxPathLen=FLT_MAX)
EdgePath MR::buildShortestPathAStar (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &finish, VertId *outPathStart=nullptr, VertId *outPathFinish=nullptr, float maxPathLen=FLT_MAX)
EdgePath MR::buildShortestPath (const Mesh &mesh, VertId start, const VertBitSet &finish, float maxPathLen=FLT_MAX)
 builds shortest path in euclidean metric from start to finish vertices; if no path can be found then empty path is returned
EdgePath MR::buildSmallestMetricPath (const MeshTopology &topology, const EdgeMetric &metric, VertId start, VertId finish, float maxPathMetric=FLT_MAX)
 builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned
EdgePath MR::buildSmallestMetricPathBiDir (const MeshTopology &topology, const EdgeMetric &metric, VertId start, VertId finish, float maxPathMetric=FLT_MAX)
EdgePath MR::buildSmallestMetricPathBiDir (const MeshTopology &topology, const EdgeMetric &metric, const TerminalVertex *starts, int numStarts, const TerminalVertex *finishes, int numFinishes, VertId *outPathStart=nullptr, VertId *outPathFinish=nullptr, float maxPathMetric=FLT_MAX)
EdgePath MR::buildSmallestMetricPath (const MeshTopology &topology, const EdgeMetric &metric, VertId start, const VertBitSet &finish, float maxPathMetric=FLT_MAX)
 builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned
std::vector< VertId > MR::getVertexOrdering (const MeshTopology &topology, VertBitSet region)
 returns all vertices from given region ordered in each connected component in breadth-first way
std::vector< EdgeLoopMR::extractClosedLoops (const MeshTopology &topology, EdgeBitSet &edges)
 finds all closed loops from given edges and removes them from edges
std::vector< EdgeLoopMR::extractClosedLoops (const MeshTopology &topology, const std::vector< EdgeId > &inEdges, EdgeBitSet *outNotLoopEdges=nullptr)
EdgeLoop MR::extractLongestClosedLoop (const Mesh &mesh, const std::vector< EdgeId > &inEdges)
bool MR::dilateRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, FaceBitSet &region, float dilation, ProgressCallback callback={})
 expands the region (of faces or vertices) on given metric value. returns false if callback also returns false
bool MR::dilateRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, VertBitSet &region, float dilation, ProgressCallback callback={})
bool MR::dilateRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
bool MR::erodeRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, FaceBitSet &region, float dilation, ProgressCallback callback={})
 shrinks the region (of faces or vertices) on given metric value. returns false if callback also returns false
bool MR::erodeRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, VertBitSet &region, float dilation, ProgressCallback callback={})
bool MR::erodeRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
bool MR::dilateRegion (const Mesh &mesh, FaceBitSet &region, float dilation, ProgressCallback callback={})
 expands the region (of faces or vertices) on given value (in meters). returns false if callback also returns false
bool MR::dilateRegion (const Mesh &mesh, VertBitSet &region, float dilation, ProgressCallback callback={})
bool MR::dilateRegion (const Mesh &mesh, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
bool MR::dilateRegion (const MeshTopology &topology, const VertCoords &points, FaceBitSet &region, float dilation, ProgressCallback callback={})
bool MR::dilateRegion (const MeshTopology &topology, const VertCoords &points, VertBitSet &region, float dilation, ProgressCallback callback={})
bool MR::dilateRegion (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
bool MR::erodeRegion (const Mesh &mesh, FaceBitSet &region, float dilation, ProgressCallback callback={})
 shrinks the region (of faces or vertices) on given value (in meters). returns false if callback also returns false
bool MR::erodeRegion (const Mesh &mesh, VertBitSet &region, float dilation, ProgressCallback callback={})
bool MR::erodeRegion (const Mesh &mesh, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
bool MR::erodeRegion (const MeshTopology &topology, const VertCoords &points, FaceBitSet &region, float dilation, ProgressCallback callback={})
bool MR::erodeRegion (const MeshTopology &topology, const VertCoords &points, VertBitSet &region, float dilation, ProgressCallback callback={})
bool MR::erodeRegion (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
int MR::getPathPlaneIntersections (const Mesh &mesh, const EdgePath &path, const Plane3f &plane, std::vector< MeshEdgePoint > *outIntersections=nullptr)
 finds all intersection points between given path and plane, adds them in outIntersections and returns their number
int MR::getContourPlaneIntersections (const Contour3f &path, const Plane3f &plane, std::vector< Vector3f > *outIntersections=nullptr)
 finds all intersection points between given contour and plane, adds them in outIntersections and returns their number
int MR::getPathEdgesInPlane (const Mesh &mesh, const EdgePath &path, const Plane3f &plane, float tolerance=0.0f, std::vector< EdgeId > *outInPlaneEdges=nullptr)
 finds all path edges located in given plane with given tolerance, adds them in outInPlaneEdges and returns their number

Detailed Description

Function Documentation

◆ addLeftBand()

void MR::addLeftBand ( const MeshTopology & topology,
const EdgeLoop & loop,
FaceBitSet & addHere )

#include <MRMesh/MREdgePaths.h>

adds all faces incident to loop vertices and located to the left from the loop to given FaceBitSet

◆ buildShortestPath() [1/2]

EdgePath MR::buildShortestPath ( const Mesh & mesh,
VertId start,
const VertBitSet & finish,
float maxPathLen = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

builds shortest path in euclidean metric from start to finish vertices; if no path can be found then empty path is returned

◆ buildShortestPath() [2/2]

EdgePath MR::buildShortestPath ( const Mesh & mesh,
VertId start,
VertId finish,
float maxPathLen = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

finds the shortest path in euclidean metric from start to finish vertices using Dijkstra algorithm; if no path can be found then empty path is returned

◆ buildShortestPathAStar() [1/2]

EdgePath MR::buildShortestPathAStar ( const Mesh & mesh,
const MeshTriPoint & start,
const MeshTriPoint & finish,
VertId * outPathStart = nullptr,
VertId * outPathFinish = nullptr,
float maxPathLen = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

finds the path from a vertex in start-triangle to a vertex in finish-triangle, so that the length start-first_vertex-...-last_vertex-finish is shortest in euclidean metric; using A* modification of Dijkstra algorithm, which is faster for near linear path; if no path can be found then empty path is returned

Parameters
outPathFinishif the path is found then its start vertex will be written here (even if start vertex is the same as finish vertex and the path is empty)
maxPathLenif the path is found then its finish vertex will be written here (even if start vertex is the same as finish vertex and the path is empty)

◆ buildShortestPathAStar() [2/2]

EdgePath MR::buildShortestPathAStar ( const Mesh & mesh,
VertId start,
VertId finish,
float maxPathLen = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

finds the shortest path in euclidean metric from start to finish vertices using A* modification of Dijkstra algorithm, which is faster for near linear path; if no path can be found then empty path is returned

◆ buildShortestPathBiDir() [1/2]

EdgePath MR::buildShortestPathBiDir ( const Mesh & mesh,
const MeshTriPoint & start,
const MeshTriPoint & finish,
VertId * outPathStart = nullptr,
VertId * outPathFinish = nullptr,
float maxPathLen = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

finds the path from a vertex in start-triangle to a vertex in finish-triangle, so that the length start-first_vertex-...-last_vertex-finish is shortest in euclidean metric; using bidirectional modification of Dijkstra algorithm, constructing the path simultaneously from both start and finish, which is faster for long paths; if no path can be found then empty path is returned

Parameters
outPathFinishif the path is found then its start vertex will be written here (even if start vertex is the same as finish vertex and the path is empty)
maxPathLenif the path is found then its finish vertex will be written here (even if start vertex is the same as finish vertex and the path is empty)

◆ buildShortestPathBiDir() [2/2]

EdgePath MR::buildShortestPathBiDir ( const Mesh & mesh,
VertId start,
VertId finish,
float maxPathLen = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

finds the shortest path in euclidean metric from start to finish vertices using bidirectional modification of Dijkstra algorithm, constructing the path simultaneously from both start and finish, which is faster for long paths; if no path can be found then empty path is returned

◆ buildSmallestMetricPath() [1/2]

EdgePath MR::buildSmallestMetricPath ( const MeshTopology & topology,
const EdgeMetric & metric,
VertId start,
const VertBitSet & finish,
float maxPathMetric = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned

◆ buildSmallestMetricPath() [2/2]

EdgePath MR::buildSmallestMetricPath ( const MeshTopology & topology,
const EdgeMetric & metric,
VertId start,
VertId finish,
float maxPathMetric = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned

◆ buildSmallestMetricPathBiDir() [1/2]

EdgePath MR::buildSmallestMetricPathBiDir ( const MeshTopology & topology,
const EdgeMetric & metric,
const TerminalVertex * starts,
int numStarts,
const TerminalVertex * finishes,
int numFinishes,
VertId * outPathStart = nullptr,
VertId * outPathFinish = nullptr,
float maxPathMetric = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

finds the smallest metric path from one of start vertices to one of the finish vertices, using bidirectional modification of Dijkstra algorithm, constructing the path simultaneously from both starts and finishes, which is faster for long paths; if no path can be found then empty path is returned

Parameters
outPathFinishif the path is found then its start vertex will be written here (even if start vertex is the same as finish vertex and the path is empty)
maxPathMetricif the path is found then its finish vertex will be written here (even if start vertex is the same as finish vertex and the path is empty)

◆ buildSmallestMetricPathBiDir() [2/2]

EdgePath MR::buildSmallestMetricPathBiDir ( const MeshTopology & topology,
const EdgeMetric & metric,
VertId start,
VertId finish,
float maxPathMetric = FLT_MAX )
nodiscard

#include <MRMesh/MREdgePaths.h>

finds the smallest metric path from start vertex to finish vertex, using bidirectional modification of Dijkstra algorithm, constructing the path simultaneously from both start and finish, which is faster for long paths; if no path can be found then empty path is returned

◆ calcOrientedArea()

Vector3d MR::calcOrientedArea ( const EdgeLoop & loop,
const Mesh & mesh )
nodiscard

#include <MRMesh/MREdgePaths.h>

returns the vector with the magnitude equal to the area surrounded by the loop (if the loop is planar), and directed to see the loop in ccw order from the vector tip

◆ calcPathLength()

double MR::calcPathLength ( const EdgePath & path,
const Mesh & mesh )
inlinenodiscard

◆ calcPathMetric()

double MR::calcPathMetric ( const EdgePath & path,
EdgeMetric metric )
nodiscard

#include <MRMesh/MREdgePaths.h>

computes summed metric of all edges in the path

◆ dilateRegion() [1/6]

bool MR::dilateRegion ( const Mesh & mesh,
FaceBitSet & region,
float dilation,
ProgressCallback callback = {} )

#include <MRMesh/MREdgePaths.h>

expands the region (of faces or vertices) on given value (in meters). returns false if callback also returns false

◆ dilateRegion() [2/6]

bool MR::dilateRegion ( const Mesh & mesh,
UndirectedEdgeBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ dilateRegion() [3/6]

bool MR::dilateRegion ( const Mesh & mesh,
VertBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ dilateRegion() [4/6]

bool MR::dilateRegion ( const MeshTopology & topology,
const VertCoords & points,
FaceBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ dilateRegion() [5/6]

bool MR::dilateRegion ( const MeshTopology & topology,
const VertCoords & points,
UndirectedEdgeBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ dilateRegion() [6/6]

bool MR::dilateRegion ( const MeshTopology & topology,
const VertCoords & points,
VertBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ dilateRegionByMetric() [1/3]

bool MR::dilateRegionByMetric ( const MeshTopology & topology,
const EdgeMetric & metric,
FaceBitSet & region,
float dilation,
ProgressCallback callback = {} )

#include <MRMesh/MREdgePaths.h>

expands the region (of faces or vertices) on given metric value. returns false if callback also returns false

◆ dilateRegionByMetric() [2/3]

bool MR::dilateRegionByMetric ( const MeshTopology & topology,
const EdgeMetric & metric,
UndirectedEdgeBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ dilateRegionByMetric() [3/3]

bool MR::dilateRegionByMetric ( const MeshTopology & topology,
const EdgeMetric & metric,
VertBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ discreteAbsMeanCurvatureMetric() [1/2]

EdgeMetric MR::discreteAbsMeanCurvatureMetric ( const Mesh & mesh)
nodiscard

#include <MRMesh/MREdgeMetric.h>

returns edge's absolute discrete mean curvature as a metric; the metric is minimal in the planar regions of mesh; this metric is symmetric: m(e) == m(e.sym())

◆ discreteAbsMeanCurvatureMetric() [2/2]

EdgeMetric MR::discreteAbsMeanCurvatureMetric ( const MeshTopology & topology,
const VertCoords & points )
nodiscard

◆ discreteMinusAbsMeanCurvatureMetric() [1/2]

EdgeMetric MR::discreteMinusAbsMeanCurvatureMetric ( const Mesh & mesh)
nodiscard

#include <MRMesh/MREdgeMetric.h>

returns minus of edge's absolute discrete mean curvature as a metric; the metric is minimal in the most curved regions of mesh; this metric is symmetric: m(e) == m(e.sym())

◆ discreteMinusAbsMeanCurvatureMetric() [2/2]

EdgeMetric MR::discreteMinusAbsMeanCurvatureMetric ( const MeshTopology & topology,
const VertCoords & points )
nodiscard

◆ edgeAbsCurvMetric() [1/2]

EdgeMetric MR::edgeAbsCurvMetric ( const Mesh & mesh,
float angleSinFactor = 2,
float angleSinForBoundary = 0 )
nodiscard

#include <MRMesh/MREdgeMetric.h>

not-negative metric that depends both on edge's length and on the angle between its left and right faces (ignoring the different between convex and concave)

Parameters
angleSinFactormultiplier before absolute value of dihedral angle sine in edge metric calculation: zero - planar case, larger values of (PI - dihedral angle)
angleSinForBoundaryconsider this dihedral angle sine for boundary edges; this metric is symmetric: m(e) == m(e.sym())

◆ edgeAbsCurvMetric() [2/2]

EdgeMetric MR::edgeAbsCurvMetric ( const MeshTopology & topology,
const VertCoords & points,
float angleSinFactor = 2,
float angleSinForBoundary = 0 )
nodiscard

◆ edgeCurvMetric() [1/2]

EdgeMetric MR::edgeCurvMetric ( const Mesh & mesh,
float angleSinFactor = 2,
float angleSinForBoundary = 0 )
nodiscard

#include <MRMesh/MREdgeMetric.h>

not-negative metric that depends both on edge's length and on the angle between its left and right faces

Parameters
angleSinFactormultiplier before dihedral angle sine in edge metric calculation (positive to prefer concave angles, negative - convex)
angleSinForBoundaryconsider this dihedral angle sine for boundary edges; this metric is symmetric: m(e) == m(e.sym())

◆ edgeCurvMetric() [2/2]

EdgeMetric MR::edgeCurvMetric ( const MeshTopology & topology,
const VertCoords & points,
float angleSinFactor = 2,
float angleSinForBoundary = 0 )
nodiscard

◆ edgeLengthMetric() [1/2]

EdgeMetric MR::edgeLengthMetric ( const Mesh & mesh)
nodiscard

#include <MRMesh/MREdgeMetric.h>

returns edge's length as a metric; this metric is symmetric: m(e) == m(e.sym())

◆ edgeLengthMetric() [2/2]

EdgeMetric MR::edgeLengthMetric ( const MeshTopology & topology,
const VertCoords & points )
nodiscard

◆ edgeTableSymMetric()

EdgeMetric MR::edgeTableSymMetric ( const MeshTopology & topology,
const EdgeMetric & metric )
nodiscard

#include <MRMesh/MREdgeMetric.h>

pre-computes the metric for all mesh edges to quickly return it later for any edge; input metric must be symmetric: metric(e) == metric(e.sym())

◆ erodeRegion() [1/6]

bool MR::erodeRegion ( const Mesh & mesh,
FaceBitSet & region,
float dilation,
ProgressCallback callback = {} )

#include <MRMesh/MREdgePaths.h>

shrinks the region (of faces or vertices) on given value (in meters). returns false if callback also returns false

◆ erodeRegion() [2/6]

bool MR::erodeRegion ( const Mesh & mesh,
UndirectedEdgeBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ erodeRegion() [3/6]

bool MR::erodeRegion ( const Mesh & mesh,
VertBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ erodeRegion() [4/6]

bool MR::erodeRegion ( const MeshTopology & topology,
const VertCoords & points,
FaceBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ erodeRegion() [5/6]

bool MR::erodeRegion ( const MeshTopology & topology,
const VertCoords & points,
UndirectedEdgeBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ erodeRegion() [6/6]

bool MR::erodeRegion ( const MeshTopology & topology,
const VertCoords & points,
VertBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ erodeRegionByMetric() [1/3]

bool MR::erodeRegionByMetric ( const MeshTopology & topology,
const EdgeMetric & metric,
FaceBitSet & region,
float dilation,
ProgressCallback callback = {} )

#include <MRMesh/MREdgePaths.h>

shrinks the region (of faces or vertices) on given metric value. returns false if callback also returns false

◆ erodeRegionByMetric() [2/3]

bool MR::erodeRegionByMetric ( const MeshTopology & topology,
const EdgeMetric & metric,
UndirectedEdgeBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ erodeRegionByMetric() [3/3]

bool MR::erodeRegionByMetric ( const MeshTopology & topology,
const EdgeMetric & metric,
VertBitSet & region,
float dilation,
ProgressCallback callback = {} )

◆ extractClosedLoops() [1/2]

std::vector< EdgeLoop > MR::extractClosedLoops ( const MeshTopology & topology,
const std::vector< EdgeId > & inEdges,
EdgeBitSet * outNotLoopEdges = nullptr )
nodiscard

◆ extractClosedLoops() [2/2]

std::vector< EdgeLoop > MR::extractClosedLoops ( const MeshTopology & topology,
EdgeBitSet & edges )
nodiscard

#include <MRMesh/MREdgePaths.h>

finds all closed loops from given edges and removes them from edges

◆ extractLongestClosedLoop()

EdgeLoop MR::extractLongestClosedLoop ( const Mesh & mesh,
const std::vector< EdgeId > & inEdges )
nodiscard

◆ getContourPlaneIntersections()

int MR::getContourPlaneIntersections ( const Contour3f & path,
const Plane3f & plane,
std::vector< Vector3f > * outIntersections = nullptr )

#include <MRMesh/MREdgePaths.h>

finds all intersection points between given contour and plane, adds them in outIntersections and returns their number

◆ getPathEdgesInPlane()

int MR::getPathEdgesInPlane ( const Mesh & mesh,
const EdgePath & path,
const Plane3f & plane,
float tolerance = 0.0f,
std::vector< EdgeId > * outInPlaneEdges = nullptr )

#include <MRMesh/MREdgePaths.h>

finds all path edges located in given plane with given tolerance, adds them in outInPlaneEdges and returns their number

◆ getPathPlaneIntersections()

int MR::getPathPlaneIntersections ( const Mesh & mesh,
const EdgePath & path,
const Plane3f & plane,
std::vector< MeshEdgePoint > * outIntersections = nullptr )

#include <MRMesh/MREdgePaths.h>

finds all intersection points between given path and plane, adds them in outIntersections and returns their number

◆ getVertexOrdering()

std::vector< VertId > MR::getVertexOrdering ( const MeshTopology & topology,
VertBitSet region )
nodiscard

#include <MRMesh/MREdgePaths.h>

returns all vertices from given region ordered in each connected component in breadth-first way

◆ identityMetric()

EdgeMetric MR::identityMetric ( )
nodiscard

#include <MRMesh/MREdgeMetric.h>

metric returning 1 for every edge

◆ isEdgeLoop()

bool MR::isEdgeLoop ( const MeshTopology & topology,
const std::vector< EdgeId > & edges )
nodiscard

#include <MRMesh/MREdgePaths.h>

returns true if every next edge starts where previous edge ends, and start vertex coincides with finish vertex

◆ isEdgePath()

bool MR::isEdgePath ( const MeshTopology & topology,
const std::vector< EdgeId > & edges )
nodiscard

#include <MRMesh/MREdgePaths.h>

returns true if every next edge starts where previous edge ends

◆ reverse() [1/2]

void MR::reverse ( EdgePath & path)

#include <MRMesh/MREdgePaths.h>

reverses the order of edges and flips each edge orientation, thus making the opposite directed edge path

◆ reverse() [2/2]

void MR::reverse ( std::vector< EdgePath > & paths)

#include <MRMesh/MREdgePaths.h>

reverse every path in the vector

◆ sortPathsByLength()

void MR::sortPathsByLength ( std::vector< EdgePath > & paths,
const Mesh & mesh )
inline

◆ sortPathsByMetric()

void MR::sortPathsByMetric ( std::vector< EdgePath > & paths,
EdgeMetric metric )

#include <MRMesh/MREdgePaths.h>

sorts given paths in ascending order of their metrics

◆ splitOnSimpleLoops()

std::vector< EdgeLoop > MR::splitOnSimpleLoops ( const MeshTopology & topology,
std::vector< EdgeLoop > && loops )
nodiscard

#include <MRMesh/MREdgePaths.h>

given a number of edge loops, splits every loop that passes via a vertex more than once on smaller loops without self-intersections