Start » Filter Reference » Path » Path Metrics » PathToPathDistanceProfile

PathToPathDistanceProfile


Module: FoundationPro

Computes the profile of distances between two paths.

Name Type Range Description
Input value
inPath1 Path First input path
Input value
inPath2 Path Second input path
Input value
inPathDistanceMode PathDistanceMode Distance measuring method
Input value
inResolution Real 0.0 -
Output value
outDistanceProfile Profile Profile of distances between second path and consecutive points of first path
Output value
outDistances RealArray Distances between second path and consecutive points of first path
Output value
outConnectingSegments Segment2DArray Segments connecting second path and consecutive points of first path having minimal length

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

Description of usage of this filter can be found in examples and tutorial: Capsules, Rubber Ring.

Sample paths

The resulting outConnectingSegments drawn onto the input paths.

The resulting outDistanceProfile.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

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

Complexity Level

This filter is available on Basic Complexity Level.

See Also