]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix: Dev_1.2.0 for linux
authorSergey POKHODENKO <sergey.pokhodenko@opencascade.com>
Fri, 8 May 2015 09:00:13 +0000 (12:00 +0300)
committerSergey POKHODENKO <sergey.pokhodenko@opencascade.com>
Fri, 8 May 2015 12:55:52 +0000 (15:55 +0300)
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/SketchPlugin/SketchPlugin_MultiRotation.cpp
src/SketchSolver/SketchSolver_ConstraintMirror.cpp

index 6aa383688e69272c252472f1fcbfb9075fb0a418..c9416f4a24c2454bfb3018130ad61ee6c3fab8ee 100644 (file)
@@ -24,7 +24,6 @@
 #include <QString>
 
 #include <cfloat>
-#include <xstring>
 
 #ifndef DBL_MAX
 #define DBL_MAX 1.7976931348623158e+308 
index 866867051cff52d1de566fd1b74987cec1a01538..f0ad011d0d2f2aba2ae53a143c68dfe672db8439 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <SketcherPrs_Factory.h>
 
+#include <cmath>
+
 #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<GeomAPI_Pnt2d> 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);
index e76afd2ca40f34495c189481a0bf463e4b769343..591fa555e4e3d47b7ab0478934939f264baf9306 100644 (file)
@@ -10,6 +10,7 @@
 #include <GeomAPI_Dir2d.h>
 #include <GeomAPI_XY.h>
 
+#include <cmath>
 
 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;