diff --git a/libs/kimath/include/geometry/shape_line_chain.h b/libs/kimath/include/geometry/shape_line_chain.h index ddabc5fcfc..776d1dbf47 100644 --- a/libs/kimath/include/geometry/shape_line_chain.h +++ b/libs/kimath/include/geometry/shape_line_chain.h @@ -529,6 +529,7 @@ public: void Append( const SHAPE_LINE_CHAIN& aOtherLine ); void Append( const SHAPE_ARC& aArc ); + void Append( const SHAPE_ARC& aArc, double aAccuracy ); void Insert( size_t aVertex, const VECTOR2I& aP ); diff --git a/libs/kimath/src/geometry/shape_line_chain.cpp b/libs/kimath/src/geometry/shape_line_chain.cpp index 082ff367ae..2a2e2d6d03 100644 --- a/libs/kimath/src/geometry/shape_line_chain.cpp +++ b/libs/kimath/src/geometry/shape_line_chain.cpp @@ -1324,6 +1324,12 @@ void SHAPE_LINE_CHAIN::Append( const SHAPE_LINE_CHAIN& aOtherLine ) void SHAPE_LINE_CHAIN::Append( const SHAPE_ARC& aArc ) +{ + Append( aArc, SHAPE_ARC::DefaultAccuracyForPCB() ); +} + + +void SHAPE_LINE_CHAIN::Append( const SHAPE_ARC& aArc, double aAccuracy ) { SEG startToEnd( aArc.GetP0(), aArc.GetP1() ); @@ -1335,7 +1341,7 @@ void SHAPE_LINE_CHAIN::Append( const SHAPE_ARC& aArc ) } else { - SHAPE_LINE_CHAIN chain = aArc.ConvertToPolyline(); + SHAPE_LINE_CHAIN chain = aArc.ConvertToPolyline( aAccuracy ); // @todo should the below 4 LOC be moved to SHAPE_ARC::ConvertToPolyline ? chain.m_arcs.push_back( aArc );