Finds the chain of mesh edges that covers a straight source segment.
More...
#include </home/runner/work/Meshkit/Meshkit/src/native/sourcechains.hpp>
|
| | 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.
|
| |
Finds the chain of mesh edges that covers a straight source segment.
Holds references to the mesh and work budget, which must outlive it.
◆ SourceChains()
| meshkit::native_detail::SourceChains::SourceChains |
( |
const Mesh & | m, |
|
|
std::vector< Edge > | edges, |
|
|
Work & | w ) |
|
inline |
Index the distinct non-degenerate edges.
- Parameters
-
| [in] | m | Borrowed mesh whose vertices the edges index (unchecked); must outlive this. |
| [in] | edges | Candidate edges, taken by value; self-loops and repeated undirected edges are dropped. |
| [in,out] | w | Borrowed budget charged while building and querying; must outlive this. |
- Exceptions
-
| Stop | workspace_limit from the workspace estimate, or other failures from w. |
◆ 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] | from | Start vertex index (unchecked). |
| [in] | to | End 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
-
| Stop | from the work budget. |
The documentation for this class was generated from the following file: