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

Commit

Permalink
Build Triangulation even with intersecting constraint edges
Browse files Browse the repository at this point in the history
  • Loading branch information
Komzpa authored Apr 17, 2019
1 parent 3b8204c commit 2ed2d3d
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 2ed2d3d

Please sign in to comment.