Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #187 from Komzpa/patch-1
Browse files Browse the repository at this point in the history
Build Triangulation even with intersecting constraint edges
  • Loading branch information
Hugo Mercier authored Apr 18, 2019
2 parents 3b8204c + 2ed2d3d commit 3195451
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/detail/triangulate/ConstraintDelaunayTriangulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,9 @@ void ConstraintDelaunayTriangulation::getTriangles( TriangulatedSurface& triangu

const Coordinate& c = it->vertex( 2 )->info().original ;

// check that vertex has an original vertex
if ( a.isEmpty() || b.isEmpty() || c.isEmpty() ) {
BOOST_THROW_EXCEPTION( Exception(
( boost::format( "Can't convert Triangulation to TriangulatedSurface (constraint intersection found)" ) ).str()
) ) ;
if ( !a.isEmpty() && !b.isEmpty() && !c.isEmpty() ) {
triangulatedSurface.addTriangle( new Triangle( Point( a ), Point( b ), Point( c ) ) );
}

triangulatedSurface.addTriangle( new Triangle( Point( a ), Point( b ), Point( c ) ) );
}
}

Expand Down

0 comments on commit 3195451

Please sign in to comment.