CreatePointGraph


Creates a graph of points that lie close to each other.

Syntax

C++
C#
Python
 
def CreatePointGraph(
	inPoints: list[Point2D],
	/,
	*,
	inMaxRank: int = 8,
	inMinDistance: float = 0.0,
	inMaxDistance: float | None = 10.0,
	inMaxRelativeDistance: float | None = None
)
-> (
	outGraph: list[ list[int] ],
	outDistances: list[ list[float] ],
	diagSegments: list[Segment2D]
)

Parameters

Name Type Range Default Description
Input value inPoints list[Point2D] Input points
Input value inMaxRank int 1 - 8 Maximum connections going out of one point
Input value inMinDistance float 0.0 - 0.0 Minimum distance between adjacent point in the graph
Input value inMaxDistance float | None 0.0 - 10.0 Maximum distance between adjacent point in the graph
Input value inMaxRelativeDistance float | None 1.0 - None Maximum distance in relation to the shortest distance for a point
Output value outGraph list[ list[int] ] Graph of points (adjacency list)
Output value outDistances list[ list[float] ] Distances between adjacent points in the graph
Diagnostic input diagSegments list[Segment2D] Graph edges, useful for visualization