You are here: Start » AVL.NET » AVL.PathToPathDistanceProfile(AvlNet.Path, AvlNet.Path, AvlNet.PathDistanceMode, float, AvlNet.Profile, float[], AvlNet.Segment2D[])

AVL.PathToPathDistanceProfile(AvlNet.Path, AvlNet.Path, AvlNet.PathDistanceMode, float, AvlNet.Profile, float[], AvlNet.Segment2D[])

Computes the profile of distances between two paths.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void PathToPathDistanceProfile(
	AvlNet.Path inPath1,
	AvlNet.Path inPath2,
	AvlNet.PathDistanceMode inPathDistanceMode,
	float inResolution,
	out AvlNet.Profile outDistanceProfile,
	out float[] outDistances,
	out AvlNet.Segment2D[] outConnectingSegments
)

Parameters

inPath1
Type: AvlNet.Path
First input path
inPath2
Type: AvlNet.Path
Second input path
inPathDistanceMode
Type: AvlNet.PathDistanceMode
Distance measuring method
inResolution
Type: System.Single
outDistanceProfile
Type: AvlNet.Profile
Profile of distances between second path and consecutive points of first path
outDistances
Type: System.Single
outConnectingSegments
Type: AvlNet.Segment2D

Description

The operation iterates over characteristic points of inPath1 and at each point computes the distance from this point to inPath2. The distance is computed as follows, depending on the value of inPathDistanceMode:

  • The distance to nearest characteristic point of inPath2, if inPathDistanceMode is set to PointToPoint.
  • The minimal distance to inPath2 segments adjacent to the nearest characteristic point of inPath2 (which is much more precise), if inPathDistanceMode is set to PointToSegment.

The operation computes outDistanceProfile profile of consecutive distances and, additionally, outConnectingSegments array of corresponding line segments.

Examples

Sample paths

The resulting outConnectingSegments drawn onto the input paths.

The resulting outDistanceProfile.

Errors

Error type Description
DomainError Second input path is empty and first input path is not empty in PathToPathDistanceProfile.

See also