You are here: Start » FIL.NET » Function Reference » Path » Path Metrics » FIL.PathToPathDistanceProfile
Computes the profile of distances between two paths.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void PathToPathDistanceProfile ( FilNet.Path inPath1, FilNet.Path inPath2, FilNet.PathDistanceMode inPathDistanceMode, float inResolution, FilNet.Profile outDistanceProfile, NullableRef<List<float>> outDistances, NullableRef<List<FilNet.Segment2D>> outConnectingSegments )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inPath1 | FilNet.Path | First input path. | ||
![]() | inPath2 | FilNet.Path | Second input path. | ||
![]() | inPathDistanceMode | FilNet.PathDistanceMode | Distance measuring method. | ||
![]() | inResolution | float | <0.0f, INF> | 1.0f | Default value: 1.0f. |
![]() | outDistanceProfile | FilNet.Profile | Profile of distances between second path and consecutive points of first path. | ||
![]() | outDistances | FilNet.NullableRef<System.Collections.Generic.List<float>> | Distances between second path and consecutive points of first path. Can be null to skip this parameter calculation. | ||
![]() | outConnectingSegments | FilNet.NullableRef<System.Collections.Generic.List<FilNet.Segment2D>> | Segments connecting second path and consecutive points of first path having minimal length. Can be null to skip this parameter calculation. |
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
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Second input path is empty and first input path is not empty in PathToPathDistanceProfile. |