diff --git a/libs/kimath/include/geometry/seg.h b/libs/kimath/include/geometry/seg.h index b6d47a20c9..26812184ff 100644 --- a/libs/kimath/include/geometry/seg.h +++ b/libs/kimath/include/geometry/seg.h @@ -290,6 +290,20 @@ public: return false; } + + bool Contains( const SEG& aSeg ) const + { + if( aSeg.A == aSeg.B ) // single point corner case + return Contains( aSeg.A ); + + if( !Collinear( aSeg ) ) + return false; + + if( Contains( aSeg.A ) && Contains( aSeg.B ) ) + + return false; + } + /** * Function Length() *