627 {
629 this->extractBoundaries(mesh, &innerMesh, c);
635 if (
result == SimplifyResult::kFailed) {
636 return { nullptr, false };
637 }
638 was_complex = (SimplifyResult::kFoundSelfIntersection ==
result) || was_complex;
640 if (
result == SimplifyResult::kFailed) {
641 return { nullptr, false };
642 }
643 was_complex = (SimplifyResult::kFoundSelfIntersection ==
result) || was_complex;
650 was_complex = this->collapseOverlapRegions(&innerMesh, c, eventLT) || was_complex;
651 was_complex = this->collapseOverlapRegions(&fOuterMesh, c, eventGT) || was_complex;
652 if (was_complex) {
653 TESS_LOG(
"found complex mesh; taking slow path\n");
659 this->connectPartners(&fOuterMesh, c);
660 this->connectPartners(&innerMesh, c);
666 if (
result == SimplifyResult::kFailed) {
667 return { nullptr, false };
668 }
669 TESS_LOG(
"combined and simplified mesh:\n");
671 fOuterMesh.
fHead = fOuterMesh.
fTail =
nullptr;
673 } else {
674 TESS_LOG(
"no complex polygons; taking fast path\n");
676 }
677}
static void SortMesh(VertexList *vertices, const Comparator &)
SimplifyResult simplify(VertexList *mesh, const Comparator &)
virtual std::tuple< Poly *, bool > tessellate(const VertexList &vertices, const Comparator &)
static void SortedMerge(VertexList *front, VertexList *back, VertexList *result, const Comparator &)
bool mergeCoincidentVertices(VertexList *mesh, const Comparator &) const