sortAndCollectClusters Method

Sort the edges, and collect up to four categories of edges: manifold pairs, singletons, null edges, and everything else.

  • Caller should allocate arrays of interest.
  • Any combination of the arrays may be undefined, indicating that category is to be ignored.
  • Any combination of the arrays may be aliased as the same target, in which case the aliased categories are merged into the target.
  • For instance, to ignore manifold pairs and collect all other edges in a single array: const foo = []; matcher.sortAndCollectClusters(undefined, foo, foo, foo);

sortAndCollectClusters(manifoldPairs?: SortableEdgeCluster[], singletons?: SortableEdgeCluster[], nullEdges?: SortableEdgeCluster[], allOtherClusters?: SortableEdgeCluster[]): void

Parameter Type Description
manifoldPairs SortableEdgeCluster[] array to receive pairs of properly mated edges, i.e. mesh interior edges.
singletons SortableEdgeCluster[] array to receive edges that have no partner, i.e., mesh boundary edges.
nullEdges SortableEdgeCluster[] array to receive arrays of matched null edges, for which start === end vertex index.
allOtherClusters SortableEdgeCluster[] array to receive arrays of edges that are partners in an undirected, non-manifold sense.

Returns - void

Defined in

Last Updated: 07 June, 2025