From: Sergey POKHODENKO Date: Fri, 8 May 2015 09:00:13 +0000 (+0300) Subject: Fix: Dev_1.2.0 for linux X-Git-Tag: V_1.2.0~165 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=463aa38d48844108e1af72c3c41be86648f38a24;p=modules%2Fshaper.git Fix: Dev_1.2.0 for linux --- diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp index 6aa383688..c9416f4a2 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -24,7 +24,6 @@ #include #include -#include #ifndef DBL_MAX #define DBL_MAX 1.7976931348623158e+308 diff --git a/src/SketchPlugin/SketchPlugin_MultiRotation.cpp b/src/SketchPlugin/SketchPlugin_MultiRotation.cpp index 866867051..f0ad011d0 100644 --- a/src/SketchPlugin/SketchPlugin_MultiRotation.cpp +++ b/src/SketchPlugin/SketchPlugin_MultiRotation.cpp @@ -22,6 +22,8 @@ #include +#include + #define PI 3.1415926535897932 SketchPlugin_MultiRotation::SketchPlugin_MultiRotation() @@ -234,8 +236,8 @@ void SketchPlugin_MultiRotation::rotateFeature( double theCenterX, double theCenterY, double theAngle) { std::shared_ptr aCenter(new GeomAPI_Pnt2d(theCenterX, theCenterY)); - double cosA = cos(theAngle); - double sinA = sin(theAngle); + double cosA = std::cos(theAngle); + double sinA = std::sin(theAngle); FeaturePtr anInitialFeature = ModelAPI_Feature::feature(theInitial); FeaturePtr aTargetFeature = ModelAPI_Feature::feature(theTarget); diff --git a/src/SketchSolver/SketchSolver_ConstraintMirror.cpp b/src/SketchSolver/SketchSolver_ConstraintMirror.cpp index e76afd2ca..591fa555e 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMirror.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintMirror.cpp @@ -10,6 +10,7 @@ #include #include +#include void SketchSolver_ConstraintMirror::getAttributes( Slvs_Entity& theMirrorLine, @@ -342,11 +343,11 @@ void SketchSolver_ConstraintMirror::adjustArcPoints(const Slvs_Entity& theArc) c } double aRad2 = anArcParams[1][0] * anArcParams[1][0] + anArcParams[1][1] * anArcParams[1][1]; double aDist2 = anArcParams[2][0] * anArcParams[2][0] + anArcParams[2][1] * anArcParams[2][1]; - if (fabs(aRad2 - aDist2) < tolerance) + if (std::fabs(aRad2 - aDist2) < tolerance) return; // nothing to update (last point already on the arc) if (aDist2 < tolerance) return; // unable to update - double aCoeff = sqrt(aRad2 / aDist2); + double aCoeff = std::sqrt(aRad2 / aDist2); anArcParams[2][0] *= aCoeff; anArcParams[2][1] *= aCoeff;