Fix programming error in DatumCS

This commit is contained in:
DeepSOIC 2015-06-23 22:02:39 +03:00 committed by Stefan Tröger
parent 7653d2d48f
commit 578f038cf9

View File

@ -542,7 +542,7 @@ void CoordinateSystem::onChanged(const App::Property *prop)
else if(line1) {
if(line2) {
if(! ((lin1.Angle(lin2) - M_PI<2) < Precision::Angular()) )
if(! (fabs(lin1.Angle(lin2) - M_PI/2.0) < Precision::Angular()) )
throw Base::Exception("Lines must be perpendicular");
ax = gp_Ax3(lin1.Location(), lin1.Direction(), lin2.Direction());
}
@ -608,4 +608,4 @@ Base::Vector3d CoordinateSystem::getZAxis()
Base::Vector3d normal;
rot.multVec(Base::Vector3d(0,0,1), normal);
return normal;
}
}