diff --git a/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp b/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp index f630584d64..600322b28d 100644 --- a/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp +++ b/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp @@ -1221,7 +1221,7 @@ SCH_SHAPE* SCH_EAGLE_PLUGIN::loadPolyLine( wxXmlNode* aPolygonNode ) { SHAPE_ARC arc; arc.ConstructFromStartEndAngle( prev_pt, pt, -EDA_ANGLE( *prev_curve, DEGREES_T ) ); - poly->GetPolyShape().Append( arc ); + poly->GetPolyShape().Append( arc, -1, -1, ARC_ACCURACY ); } else { @@ -2052,7 +2052,7 @@ LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolPolyLine( std::unique_ptr& aS { SHAPE_ARC arc; arc.ConstructFromStartEndAngle( prev_pt, pt, -EDA_ANGLE( *prev_curve, DEGREES_T ) ); - poly->GetPolyShape().Append( arc ); + poly->GetPolyShape().Append( arc, -1, -1, ARC_ACCURACY ); } else { diff --git a/eeschema/sch_plugins/eagle/sch_eagle_plugin.h b/eeschema/sch_plugins/eagle/sch_eagle_plugin.h index 3cc4cf817e..3300cf9bbd 100644 --- a/eeschema/sch_plugins/eagle/sch_eagle_plugin.h +++ b/eeschema/sch_plugins/eagle/sch_eagle_plugin.h @@ -81,6 +81,8 @@ typedef boost::ptr_map EPART_LIST; class SCH_EAGLE_PLUGIN : public SCH_PLUGIN { public: + const double ARC_ACCURACY = SCH_IU_PER_MM * 0.01; // 0.01mm + SCH_EAGLE_PLUGIN(); ~SCH_EAGLE_PLUGIN(); diff --git a/libs/kimath/include/geometry/shape_poly_set.h b/libs/kimath/include/geometry/shape_poly_set.h index 3b7a428cc1..962be5fb91 100644 --- a/libs/kimath/include/geometry/shape_poly_set.h +++ b/libs/kimath/include/geometry/shape_poly_set.h @@ -601,9 +601,11 @@ public: * @param aArc The arc to be inserted * @param aOutline Index of the polygon * @param aHole Index of the hole (-1 for the main outline) + * @param aAccuracy Accuracy of the arc representation in IU * @return the number of points in the arc (including the interpolated points from the arc) */ - int Append( SHAPE_ARC& aArc, int aOutline = -1, int aHole = -1 ); + int Append( SHAPE_ARC& aArc, int aOutline = -1, int aHole = -1, + double aAccuracy = SHAPE_ARC::DefaultAccuracyForPCB() ); /** * Adds a vertex in the globally indexed position \a aGlobalIndex. diff --git a/libs/kimath/src/geometry/shape_poly_set.cpp b/libs/kimath/src/geometry/shape_poly_set.cpp index 7e4ce5c8cb..3b2e8eac34 100644 --- a/libs/kimath/src/geometry/shape_poly_set.cpp +++ b/libs/kimath/src/geometry/shape_poly_set.cpp @@ -273,7 +273,7 @@ int SHAPE_POLY_SET::Append( int x, int y, int aOutline, int aHole, bool aAllowDu } -int SHAPE_POLY_SET::Append( SHAPE_ARC& aArc, int aOutline, int aHole ) +int SHAPE_POLY_SET::Append( SHAPE_ARC& aArc, int aOutline, int aHole, double aAccuracy ) { assert( m_polys.size() ); @@ -290,7 +290,7 @@ int SHAPE_POLY_SET::Append( SHAPE_ARC& aArc, int aOutline, int aHole ) assert( aOutline < (int) m_polys.size() ); assert( idx < (int) m_polys[aOutline].size() ); - m_polys[aOutline][idx].Append( aArc ); + m_polys[aOutline][idx].Append( aArc, aAccuracy ); return m_polys[aOutline][idx].PointCount(); }