diff --git a/utils/kicad2step/pcb/base.h b/utils/kicad2step/pcb/base.h index 058b9354d9..1a926e757e 100644 --- a/utils/kicad2step/pcb/base.h +++ b/utils/kicad2step/pcb/base.h @@ -31,7 +31,7 @@ #define KICADBASE_H ///> Minimum distance between points to treat them as separate ones (mm) -static constexpr double MIN_DISTANCE = 0.01; +static constexpr double MIN_DISTANCE = 0.001; namespace SEXPR { diff --git a/utils/kicad2step/pcb/oce_utils.cpp b/utils/kicad2step/pcb/oce_utils.cpp index 6f38709239..d19a2873d7 100644 --- a/utils/kicad2step/pcb/oce_utils.cpp +++ b/utils/kicad2step/pcb/oce_utils.cpp @@ -1464,33 +1464,6 @@ bool OUTLINE::addEdge( BRepBuilderAPI_MakeWire* aWire, KICADCURVE& aCurve, DOUBL case CURVE_ARC: { - // Arcs are particularly tricky to be used in contiguous outlines. - // If an arc is not precisely aligned with the previous segment end point - // (aLastPoint != aCurve.m_end), then it might be impossible to request an arc - // passing through aLastPoint and the other arc end. To fix this, a small segment - // is added, joining aLastPoint and aCurve.m_end, but only if the distance - // is small. - double dx = aLastPoint.x - aCurve.m_end.x; - double dy = aLastPoint.y - aCurve.m_end.y; - double distance = dx * dx + dy * dy; - - if( distance > 0 && distance < m_minDistance2 ) - { - std::ostringstream ostr; - -#ifdef __WXDEBUG__ - ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; -#endif /* __WXDEBUG */ - ostr << " * added an auxiliary segment from " - << aLastPoint << " to " << aCurve.m_end << "\n"; - wxLogMessage( "%s", ostr.str().c_str() ); - - edge = BRepBuilderAPI_MakeEdge( gp_Pnt( aLastPoint.x, aLastPoint.y, 0.0 ), - gp_Pnt( aCurve.m_end.x, aCurve.m_end.y, 0.0 ) ); - aWire->Add( edge ); - aLastPoint = aCurve.m_end; - } - gp_Circ arc( gp_Ax2( gp_Pnt( aCurve.m_start.x, aCurve.m_start.y, 0.0 ), gp_Dir( 0.0, 0.0, 1.0 ) ), aCurve.m_radius );