Part: expose Geom2dCircle::getCircleCenter to Python and fix a regression
This commit is contained in:
@@ -932,7 +932,8 @@ Base::Vector2d Geom2dCircle::getCircleCenter (const Base::Vector2d &p1, const Ba
|
||||
double vv = v*v;
|
||||
double ww = w*w;
|
||||
|
||||
if (abs(uu * vv * ww) < Precision::Confusion())
|
||||
double eps2 = Precision::SquareConfusion();
|
||||
if (uu < eps2 || vv < eps2 || ww < eps2)
|
||||
THROWM(Base::ValueError,"Two points are coincident");
|
||||
|
||||
double uv = -(u*v);
|
||||
@@ -945,7 +946,7 @@ Base::Vector2d Geom2dCircle::getCircleCenter (const Base::Vector2d &p1, const Ba
|
||||
|
||||
double wx = w0 + w1 + w2;
|
||||
|
||||
if( abs(wx) < Precision::Confusion())
|
||||
if (abs(wx) < Precision::Confusion())
|
||||
THROWM(Base::ValueError,"Points are collinear");
|
||||
|
||||
double x = (w0*p1.x + w1*p2.x + w2*p3.x)/wx;
|
||||
|
||||
Reference in New Issue
Block a user