Loading [MathJax]/extensions/tex2jax.js
LineMerger Class Reference

Public Member Functions

def __init__ (self, basePoints, minDistPoints, lineIdx, meanDist, dLength)
 
def orientate_lines_in_same_direction (self, line1, line2)
 Orientates two lines into the same direction using the lineIdx tuples. More...
 
def starting_line (self)
 
def secondLinewithinfirstLine (self)
 
def interpolate_lines (self, firstLineInterpolationPoints, secondLineInterpolationPoints, factory=None, interpolationMethod="linear")
 Function that performs the actual Interpolation (blended merging) between two lines. More...
 
def fetch_missing_firstLine_part (self, interpol_points)
 
def fetch_missing_secondLine_part (self, interpol_points)
 
def merge_lines (self, firstLine, secondLine, interpolationMethod="linear", firstLineStarts=None)
 
def merge_cirular_lines (self, firstLine, secondLine, interpolationMethod="linear", firstLineStarts=None)
 

Public Attributes

 basePoints
 
 minDistPoints
 
 lineIdx
 
 missing_piece_secondLine
 
 meanDist
 
 dLength
 
 invertInterpolationPoints
 
 firstLineStarts
 
 firstLineInterpolationPoints
 
 secondLineInterpolationPoints
 
 meanDistValue
 
 distanceInterpolationPoints
 
 secondLine
 
 flPoints
 
 slPoints
 
 interpolationRange
 
 flPointsPart
 
 slPointsPart
 
 dLengthValue
 
 missing_piece_firstLine
 
 trulyCircular
 
 interpolationRange1
 
 interpolationRange2
 
 interpol1FirstLinePoints
 
 interpol1SecondLinePoints
 
 interpol2FirstLinePoints
 
 interpol2SecondLinePoints
 
 interpol1Points
 
 interpol2Points
 

Member Function Documentation

◆ interpolate_lines()

def interpolate_lines (   self,
  firstLineInterpolationPoints,
  secondLineInterpolationPoints,
  factory = None,
  interpolationMethod = "linear" 
)

Function that performs the actual Interpolation (blended merging) between two lines.

Args: firstLineInterpolationPoints: list, containing the interpolation points of the first line secondLineInterpolationPoints: list, containting the interpolation points of the second line factory: polylineFactory to store the points, not necessary interpolationMethod: the method of interpolation, currently supported are "linear" and "rampedMean"

Returns: list of interpolated points

References LineMerger.basePoints, LineMerger.distanceInterpolationPoints, LineMerger.dLength, LineMerger.dLengthValue, LineMerger.fetch_missing_firstLine_part(), LineMerger.fetch_missing_secondLine_part(), LineMerger.firstLineInterpolationPoints, LineMerger.firstLineStarts, LineMerger.flPoints, LineMerger.flPointsPart, LineMerger.interpol1FirstLinePoints, LineMerger.interpol1Points, LineMerger.interpol1SecondLinePoints, LineMerger.interpol2FirstLinePoints, LineMerger.interpol2Points, LineMerger.interpol2SecondLinePoints, LineMerger.interpolate_lines(), LineMerger.interpolationRange, LineMerger.interpolationRange1, LineMerger.interpolationRange2, LineMerger.invertInterpolationPoints, LineMerger.lineIdx, LineMerger.meanDistValue, LineMerger.merge_lines(), LineMerger.minDistPoints, LineMerger.missing_piece_firstLine, LineMerger.missing_piece_secondLine, LineMerger.orientate_lines_in_same_direction(), LineMerger.secondLine, LineMerger.secondLineInterpolationPoints, LineMerger.secondLinewithinfirstLine(), LineMerger.slPoints, LineMerger.slPointsPart, LineMerger.starting_line(), and LineMerger.trulyCircular.

Referenced by LineMerger.interpolate_lines().

◆ orientate_lines_in_same_direction()

def orientate_lines_in_same_direction (   self,
  line1,
  line2 
)

Orientates two lines into the same direction using the lineIdx tuples.

Args: line1: pyDM.Polyline, first line, always remains unchanged line2: pyDM.Poyline, second line, may be flipped if orientated differently to line1

Returns: tuple containing line1 and line2, respectively. They are now orientated in the same way.

References LineMerger.basePoints, LineMerger.distanceInterpolationPoints, LineMerger.firstLineInterpolationPoints, LineMerger.firstLineStarts, LineMerger.invertInterpolationPoints, LineMerger.lineIdx, LineMerger.minDistPoints, LineMerger.secondLine, LineMerger.secondLineInterpolationPoints, and LineMerger.slPoints.

Referenced by LineMerger.interpolate_lines().