diff --git a/libs/kimath/include/geometry/shape_poly_set.h b/libs/kimath/include/geometry/shape_poly_set.h index df0f713503..2192837918 100644 --- a/libs/kimath/include/geometry/shape_poly_set.h +++ b/libs/kimath/include/geometry/shape_poly_set.h @@ -1128,7 +1128,7 @@ public: * @param aP is the point to check. * @return true if the point lies on the edge of any polygon. */ - bool PointOnEdge( const VECTOR2I& aP ) const; + bool PointOnEdge( const VECTOR2I& aP, int aAccuracy = 0 ) const; /** * Check if the boundary of shape (this) lies closer to the shape \a aShape than \a aClearance, diff --git a/libs/kimath/src/geometry/shape_poly_set.cpp b/libs/kimath/src/geometry/shape_poly_set.cpp index c480a52be7..a99b01356c 100644 --- a/libs/kimath/src/geometry/shape_poly_set.cpp +++ b/libs/kimath/src/geometry/shape_poly_set.cpp @@ -2031,7 +2031,7 @@ const BOX2I SHAPE_POLY_SET::BBoxFromCaches() const } -bool SHAPE_POLY_SET::PointOnEdge( const VECTOR2I& aP ) const +bool SHAPE_POLY_SET::PointOnEdge( const VECTOR2I& aP, int aAccuracy ) const { // Iterate through all the polygons in the set for( const POLYGON& polygon : m_polys ) @@ -2039,7 +2039,7 @@ bool SHAPE_POLY_SET::PointOnEdge( const VECTOR2I& aP ) const // Iterate through all the line chains in the polygon for( const SHAPE_LINE_CHAIN& lineChain : polygon ) { - if( lineChain.PointOnEdge( aP ) ) + if( lineChain.PointOnEdge( aP, aAccuracy ) ) return true; } }