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

Commit

Permalink
Issue #138: Corrected error message and updated documentation for str…
Browse files Browse the repository at this point in the history
…aightskeleton regarding throwing notimplemented exception for polygon with touching rings.
  • Loading branch information
danielcu888 authored and Hugo Mercier committed Apr 24, 2020
1 parent aa3553e commit 2f42d2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithm/straightSkeleton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ checkNoTouchingHoles( const Polygon& g )
// still dangerous. @todo find out !
if ( ! inter->isEmpty() && inter->is< Point >() ) {
BOOST_THROW_EXCEPTION( NotImplementedException(
"straight skeleton of Polygon with touching interior rings is not implemented"
"straight skeleton of Polygon with point touching rings is not implemented."
) );
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/algorithm/straightSkeleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct NoValidityCheck;
* @param g input geometry
* @ingroup public_api
* @pre g is a valid geometry
* @throws NotImplementedException If g is a Polygon with point touching rings.
*/
SFCGAL_API std::unique_ptr< MultiLineString > approximateMedialAxis( const Geometry& g );

Expand All @@ -52,6 +53,7 @@ SFCGAL_API std::unique_ptr< MultiLineString > approximateMedialAxis( const Geome
* @param outputM whether to output the distance to border as M
* @ingroup public_api
* @pre g is a valid geometry
* @throws NotImplementedException If g is a Polygon with point touching rings.
*/
SFCGAL_API std::unique_ptr< MultiLineString > straightSkeleton( const Geometry& g, bool autoOrientation = true, bool innerOnly = false, bool outputDistanceInM = false ) ;

Expand All @@ -63,17 +65,21 @@ SFCGAL_API std::unique_ptr< MultiLineString > straightSkeleton( const Geometry&
* @ingroup public_api
* @pre g is a valid geometry
* @warning No actual validity check is done
* @throws NotImplementedException If g is a Polygon with point touching rings.
*/
SFCGAL_API std::unique_ptr< MultiLineString > straightSkeleton( const Geometry& g, bool autoOrientation, NoValidityCheck, bool innerOnly = false, bool outputDistanceInM = false ) ;

/**
* @brief build a 2D straight skeleton for a Polygon
* @ingroup detail
* @throws NotImplementedException If g is a Polygon with point touching rings.
*/
SFCGAL_API std::unique_ptr< MultiLineString > straightSkeleton( const Polygon& g, bool autoOrientation = true, bool innerOnly = false, bool outputDistanceInM = false ) ;

/**
* @brief build a 2D straight skeleton for a Polygon
* @ingroup detail
* @throws NotImplementedException If g is a Polygon with point touching rings.
*/
SFCGAL_API std::unique_ptr< MultiLineString > straightSkeleton( const MultiPolygon& g, bool autoOrientation = true, bool innerOnly = false, bool outputDistanceInM = false ) ;

Expand Down

0 comments on commit 2f42d2f

Please # to comment.