Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Path Combinators » JoinAdjacentPaths

JoinAdjacentPaths


Joins those paths of an array which endpoints lie near enough.

Name Type Range Description
inPaths PathArray
inMaxJoiningDistance Real 0.0 - Maximal distance between edges that can be joined
inMaxJoiningAngle Real 0.0 - 180.0 Maximal allowed angle between edges being joined
inJoiningDistanceBalance Real 0.0 - 1.0 Determines how important distance between paths is according to their angle difference
inJoiningEndingLength Real* 0.0 - Determines the length of the path end used for path angle computing
inMinPathLength Real 0.0 - Minimal length of a path
outPaths PathArray

Description

The operation repeatedly connects the least distant pair of endpoints of open paths of an array until no such pair can be connected. An endpoint can be joined with another one in its vicinity only if the distance between them is not greater than inMaxJoiningDistance and neither of them forms an angle greater than inMaxJoiningAngle with the segment connecting them. The inJoiningEndingLength parameter determines what part of the path ending is used to determine above mentioned turn angle. If it is set to Nil, the whole path is decisive. Sometimes two or more path endings can be joined with an ending. Because only one of them can be, each of the candidates is evaluated based on the distance from the fixed path's ending and the turn angle associated with their connection. The greater inJoiningDistanceBalance is, the less influence on the evaluation score the latter value has. After the joining phase, paths that are shorter than inMinPathLength are removed from the final results.

Examples

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

JoinAdjacentPaths run on the sample path array with inMaxJoiningDistance = 25.

JoinAdjacentPaths run on the sample path array with inMaxJoiningDistance = 1000.

Complexity Level

This filter is available on Advanced Complexity Level.

See Also

  • ClosePath – Adds the segment connecting last point to the first one to a path.