libarea: disable max arc points parameter
It is soly used to limit excessive arc accuracy used by ClipperLib, and seems to have some negative effect. We disabled it here, and simply rely on user to choose a sensible arc 'accuracy' parameter.
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
((double,accuracy,Accuracy,0.01,"Arc fitting accuracy",App::PropertyPrecision))\
|
||||
((double,units,Unit,1.0,"Scaling factor for conversion to inch",App::PropertyFloat))\
|
||||
((short,min_arc_points,MinArcPoints,4,"Minimum segments for arc discretization"))\
|
||||
((short,max_arc_points,MaxArcPoints,100,"Maximum segments for arc discretization"))\
|
||||
((short,max_arc_points,MaxArcPoints,100,"Maximum segments for arc discretization (ignored currently)"))\
|
||||
((double,clipper_scale,ClipperScale,1e7,\
|
||||
"ClipperLib operate on intergers. This is the scale factor to convert\n"\
|
||||
"floating points.",App::PropertyFloat))
|
||||
|
||||
@@ -83,8 +83,8 @@ static void AddVertex(const CVertex& vertex, const CVertex* prev_vertex)
|
||||
|
||||
if (Segments < CArea::m_min_arc_points)
|
||||
Segments = CArea::m_min_arc_points;
|
||||
if (Segments > CArea::m_max_arc_points)
|
||||
Segments=CArea::m_max_arc_points;
|
||||
// if (Segments > CArea::m_max_arc_points)
|
||||
// Segments=CArea::m_max_arc_points;
|
||||
|
||||
dphi=phit/(Segments);
|
||||
|
||||
@@ -521,8 +521,8 @@ void CArea::OffsetWithClipper(double offset,
|
||||
int Segments=(int)ceil(PI/dphi);
|
||||
if (Segments < 2*CArea::m_min_arc_points)
|
||||
Segments = 2*CArea::m_min_arc_points;
|
||||
if (Segments > CArea::m_max_arc_points)
|
||||
Segments=CArea::m_max_arc_points;
|
||||
// if (Segments > CArea::m_max_arc_points)
|
||||
// Segments=CArea::m_max_arc_points;
|
||||
dphi = PI/Segments;
|
||||
roundPrecision = (1.0-cos(dphi))*fabs(offset);
|
||||
}else
|
||||
|
||||
Reference in New Issue
Block a user