hasBadInputIntersection method

bool hasBadInputIntersection(
  1. TaggedLineString parentLine,
  2. List<int> sectionIndex,
  3. LineSegment candidateSeg
)

Implementation

bool hasBadInputIntersection(TaggedLineString parentLine,
    List<int> sectionIndex, LineSegment candidateSeg) {
  List<dynamic> querySegs = inputIndex.query(candidateSeg);
  for (var segment in querySegs) {
    TaggedLineSegment querySeg = segment;
    if (hasInvalidIntersection(querySeg, candidateSeg)) {
      //-- don't fail if the segment is part of parent line
      if (isInLineSection(parentLine, sectionIndex, querySeg)) continue;
      return true;
    }
  }
  return false;
}