From 7b8fe9c1af0760360cb7ac3a4304135e41e76768 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Wed, 19 Feb 2020 18:11:07 +0100 Subject: [PATCH] geometry: allow constructing SHAPE_LINE_CHAINs from a flat vector of ints --- libs/kimath/include/geometry/shape_line_chain.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/kimath/include/geometry/shape_line_chain.h b/libs/kimath/include/geometry/shape_line_chain.h index d4bdb31288..9e65bb42bc 100644 --- a/libs/kimath/include/geometry/shape_line_chain.h +++ b/libs/kimath/include/geometry/shape_line_chain.h @@ -97,6 +97,8 @@ public: m_bbox( aShape.m_bbox ) {} + SHAPE_LINE_CHAIN( const std::vector& aV); + SHAPE_LINE_CHAIN( const std::vector& aV, bool aClosed = false ) : SHAPE( SH_LINE_CHAIN ), m_closed( aClosed ), m_width( 0 ) { @@ -583,6 +585,9 @@ public: */ bool PointInside( const VECTOR2I& aPt, int aAccuracy = 0, bool aUseBBoxCache = false ) const; + + bool SegmentInside( const SEG& aSeg ) const; + /** * Function PointOnEdge() *