Loading...
Searching...
No Matches
meshkit::native_detail::SourceChains Class Reference

Finds the chain of mesh edges that covers a straight source segment. More...

#include </home/runner/work/Meshkit/Meshkit/src/native/sourcechains.hpp>

Collaboration diagram for meshkit::native_detail::SourceChains:

Public Member Functions

 SourceChains (const Mesh &m, std::vector< Edge > edges, Work &w)
 Index the distinct non-degenerate edges.
 
std::vector< Index > chain (Index from, Index to) const
 Shortest (fewest-edge) chain of indexed edges from one vertex to another along their straight segment.
 

Detailed Description

Finds the chain of mesh edges that covers a straight source segment.

Holds references to the mesh and work budget, which must outlive it.

Constructor & Destructor Documentation

◆ SourceChains()

meshkit::native_detail::SourceChains::SourceChains ( const Mesh & m,
std::vector< Edge > edges,
Work & w )
inline

Index the distinct non-degenerate edges.

Parameters
[in]mBorrowed mesh whose vertices the edges index (unchecked); must outlive this.
[in]edgesCandidate edges, taken by value; self-loops and repeated undirected edges are dropped.
[in,out]wBorrowed budget charged while building and querying; must outlive this.
Exceptions
Stopworkspace_limit from the workspace estimate, or other failures from w.
Here is the call graph for this function:

Member Function Documentation

◆ chain()

std::vector< Index > meshkit::native_detail::SourceChains::chain ( Index from,
Index to ) const
inline

Shortest (fewest-edge) chain of indexed edges from one vertex to another along their straight segment.

An edge qualifies when both endpoints lie within eps of the segment and between its ends, with eps = 32 * DBL_EPSILON * max(1, length, |endpoint coordinates|) in XY units; edges are never followed toward decreasing position along the segment. Only x and y are used.

Parameters
[in]fromStart vertex index (unchecked).
[in]toEnd vertex index (unchecked).
Returns
Vertex indices from from to to, both included; empty when the two vertices share XY coordinates or no chain exists.
Exceptions
Stopfrom the work budget.
Here is the call graph for this function:

The documentation for this class was generated from the following file: