You are here: Start » FIL.NET » Function Reference » Path » Path Combinators » FIL.JoinAdjacentPaths
Joins those paths of an array which endpoints lie near enough.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void JoinAdjacentPaths ( IList<FilNet.Path> inPaths, float inMaxDistance, float inMaxAngle, float? inMaxDeviation, float inExcessTrim, float? inEndingLength, FilNet.PathJoiningMethod inJoiningMethod, FilNet.PathJoiningAngleMeasure inAngleMeasure, bool inIgnorePathEndsOrder, bool inAllowCycles, float inMinPathLength, IList<FilNet.Path> outPaths, NullableRef<SafeList<FilNet.Path>> outMatchedPieces )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inPaths | System.Collections.Generic.IList<FilNet.Path> | |||
![]() | inMaxDistance | float | <0.0f, INF> | 10.0f | Maximal distance between paths that can be joined. Default value: 10.0f. |
![]() | inMaxAngle | float | <0.0f, 180.0f> | 30.0f | Maximal allowed angle between paths being joined. Default value: 30.0f. |
![]() | inMaxDeviation | float? | <0.0f, INF> | Maximal allowed thickness of a minimal stripe containing both paths being joined. Default value: ftl::NIL. | |
![]() | inExcessTrim | float | <0.0f, INF> | Length of the part of each path to be removed from its both sides. | |
![]() | inEndingLength | float? | <0.0f, INF> | 0.0f | Determines the length of the path end used for path angle computing. Default value: 0.0f. |
![]() | inJoiningMethod | FilNet.PathJoiningMethod | AddBridge | Determines a method to join two paths in one. Default value: AddBridge. | |
![]() | inAngleMeasure | FilNet.PathJoiningAngleMeasure | InputPathOrientation | Determines a method to measure the angle between two input paths. Default value: InputPathOrientation. | |
![]() | inIgnorePathEndsOrder | bool | True | If set to false, only the end of a path can be joined with the begin of another path. Default value: True. | |
![]() | inAllowCycles | bool | True | Determines if cycles can be created during joining process. Default value: True. | |
![]() | inMinPathLength | float | <0.0f, INF> | 0.0f | Minimal length of a path. Default value: 0.0f. |
![]() | outPaths | System.Collections.Generic.IList<FilNet.Path> | |||
![]() | outMatchedPieces | FilNet.NullableRef<FilNet.SafeList<FilNet.Path>> | Input paths that have been joined with another path. Can be null to skip this parameter calculation. |
Description
The operation repeatedly connects the pair of endpoints of open paths of an array until no such pair can be connected. If an endpoint can be joined with more than one another, the endpoint which generates smallest joining value is chosen. The joining value is computed by combining distance between endpoints being joined, their angle difference and their deviation value. An endpoint can be joined with another one in its vicinity only if the distance between them is not greater than inMaxDistance. Their angle difference, which is computed in one of available ways depending on inAngleMeasure value, cannot be greater than inMaxAngle. Their deviation value, which is the thickness of a minimal stripe containing both path endings being joined, cannot exceed inMaxDeviation.
![]() |
The deviation value for two orange segments is the distance between two parallel blue lines. |
![]() |
Only orange part of the path takes part in joining process. The curly blue path ending is removed by inExcessTrim parameter. |
![]() |
The last orange segment is taken into account while determining angle between two paths. The omitted blue path ending has length inEndingLength. |
Examples
![]() |
![]() |
![]() |
JoinAdjacentPaths run on the sample path array with inMaxDistance = 25. |
JoinAdjacentPaths run on the sample path array with inMaxDistance = 1000. |
Function Overrides
- JoinAdjacentPaths(IList<Path>, Single, Single, Single, PathJoiningMethod, PathJoiningAngleMeasure, Boolean, Boolean, Single, IList<Path>)
- JoinAdjacentPaths(IList<Path>, Single, Single, Nullable<Single>, Single, Nullable<Single>, PathJoiningMethod, PathJoiningAngleMeasure, Boolean, Boolean, Single, IList<Path>)