]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Porting on OCCT 7.4.0
authorvsv <vsv@opencascade.com>
Fri, 10 Jan 2020 12:34:31 +0000 (15:34 +0300)
committervsv <vsv@opencascade.com>
Fri, 10 Jan 2020 12:34:51 +0000 (15:34 +0300)
salomeRun_deb.bat
salomeRun_rel.bat
src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp
src/SHAPERGUI/SHAPERGUI.cpp
src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp
src/SketcherPrs/SketcherPrs_SensitivePoint.cpp
src/SketcherPrs/SketcherPrs_SensitivePoint.h
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp
src/XGUI/XGUI_Displayer.cpp

index 14b69a6bae69db906e26ff02fb6585e92c742ced..17e988d5561f14898566f99b13c4ea519d4ab4fa 100644 (file)
@@ -10,6 +10,9 @@ popd
 @SET OCC_LIB_PREFIX=d
 call env_Salome.bat d
 
+rem Variable which is necessary for launching SALOME
+SET SALOME_PLEASE_SETUP_ENVIRONMENT_AS_BEFORE=1
+
 @SET SHAPER_ROOT_DIR=%ROOT_DIR%\install
 @SET SalomeAppConfig=%SHAPER_ROOT_DIR%\share\salome\resources\shaper;%GUI_ROOT_DIR%\share\salome\resources\gui
 
index 2cfabdae9b283e2d0da722f4532eb33ff314cb79..82717fdb44e9a7bb029e15bba760e2c64d15713a 100644 (file)
@@ -9,6 +9,9 @@ popd
 
 call env_Salome.bat
 
+rem Variable which is necessary for launching SALOME
+SET SALOME_PLEASE_SETUP_ENVIRONMENT_AS_BEFORE=1
+
 @SET SHAPER_ROOT_DIR=%ROOT_DIR%\install
 @SET SalomeAppConfig=%SHAPER_ROOT_DIR%\share\salome\resources\shaper;%GUI_ROOT_DIR%\share\salome\resources\gui
 
index cfed1f1992a766cb871a625e2ffa467da73ddaed..496ec907949479afe454c09898d307042a47e32c 100644 (file)
@@ -23,7 +23,6 @@
 #include <GeomAlgoAPI_DFLoader.h>
 #include <GeomAlgoAPI_ShapeTools.h>
 
-#include <ShapeUpgrade_UnifySameDomain.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopoDS_Shape.hxx>
 #include <Precision.hxx>
@@ -31,6 +30,7 @@
 #include <TopoDS_Edge.hxx>
 #include <Bnd_Box.hxx>
 #include <BRepBndLib.hxx>
+#include <ShapeUpgrade_UnifySameDomain.hxx>
 
 //==================================================================================================
 GeomAlgoAPI_UnifySameDomain::GeomAlgoAPI_UnifySameDomain(const ListOfShape& theShapes)
index 7565c59132f87a31e6b619f65b3215a768f58e4e..509377003ce149c98d535a0ca4ae84d77741f61e 100644 (file)
@@ -148,7 +148,7 @@ static void dumpArray(std::ostringstream& theOutput, const double theArray[],
   for (int i = 0; i < theSize; ++i) {
     if (i > 0)
       theOutput << " ";
-    theOutput << std::fixed << setprecision(thePrecision)
+    theOutput << std::fixed << std::setprecision(thePrecision)
               << (fabs(theArray[i]) < TOLERANCE ? 0.0 : theArray[i]);
   }
 }
@@ -409,9 +409,9 @@ std::string ModelHighAPI_FeatureStore::dumpShape(std::shared_ptr<GeomAPI_Shape>&
     aResult<<"Volume: ";
     // volumes of too huge shapes write in the scientific format
     if (aVolume >= 1.e5)
-      aResult<<std::scientific<<setprecision(7);
+      aResult<<std::scientific<<std::setprecision(7);
     else
-      aResult<<std::fixed<<setprecision(3);
+      aResult<<std::fixed<<std::setprecision(3);
     aResult<<aVolume<<std::endl;
   }
   std::shared_ptr<GeomAPI_Pnt> aCenter = GeomAlgoAPI_ShapeTools::centreOfMass(theShape);
index 8577d8da136970b014b0e89103155d4cb52cc702..c9fffc916452dd9f1c75b2e122f8db374968198a 100644 (file)
@@ -74,7 +74,9 @@
 #include <QMenu>
 #include <QToolBar>
 
-#define SALOME_PATCH_FOR_CTRL_WHEEL
+#if OCC_VERSION_HEX < 0x070400
+  #define SALOME_PATCH_FOR_CTRL_WHEEL
+#endif
 
 extern "C" {
 SHAPERGUI_EXPORT CAM_Module* createModule()
index 1f0d054f491c861650d04b4d833b68c8a6739529..2ccfd34227122563d91a9b953f77388193f12547 100644 (file)
@@ -33,7 +33,9 @@
 #include <QMouseEvent>
 #include <QContextMenuEvent>
 
-#define SALOME_PATCH_FOR_CTRL_WHEEL
+#if OCC_VERSION_HEX < 0x070400
+  #define SALOME_PATCH_FOR_CTRL_WHEEL
+#endif
 
 SHAPERGUI_SalomeView::SHAPERGUI_SalomeView(OCCViewer_Viewer* theViewer)
 : ModuleBase_IViewWindow(), myCurrentView(0)
index 753cff52ddb87012102ed44529acf4b593bfc0fe..ee6838a357470bbad2c9aca6f51ea16427764469 100644 (file)
 //
 
 #include "SketcherPrs_SensitivePoint.h"
+#include "SketcherPrs_SymbolPrs.h"
 
 #include <Graphic3d_ArrayOfPoints.hxx>
-#include "SketcherPrs_SymbolPrs.h"
+#include <Standard_Version.hxx>
 
 #define DEBUG_SENSITIVE_TO_BE_CORRECTED
 
@@ -36,18 +37,25 @@ SketcherPrs_SensitivePoint::SketcherPrs_SensitivePoint(
 Standard_Boolean SketcherPrs_SensitivePoint::Matches(SelectBasics_SelectingVolumeManager& theMgr,
                                                    SelectBasics_PickResult& thePickResult)
 {
-  Standard_Real aDepth      = RealLast();
-  Standard_Real aDistToCOG  = RealLast();
-  gp_Pnt aPnt = Point();
-  if (!theMgr.Overlaps (aPnt, aDepth))
-  {
-    thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
-    return Standard_False;
-  }
+#if OCC_VERSION_HEX < 0x070400
+       Standard_Real aDepth = RealLast();
+       Standard_Real aDistToCOG = RealLast();
+       gp_Pnt aPnt = Point();
+       if (!theMgr.Overlaps(aPnt, aDepth))
+       {
+               thePickResult = SelectBasics_PickResult(aDepth, aDistToCOG);
+               return Standard_False;
+       }
 
-  aDistToCOG = aDepth;
-  thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
-  return Standard_True;
+       aDistToCOG = aDepth;
+       thePickResult = SelectBasics_PickResult(aDepth, aDistToCOG);
+       return Standard_True;
+#else
+  gp_Pnt aPnt = Point();
+  if (theMgr.Overlaps (aPnt, thePickResult))
+       return Standard_True;
+  return Standard_False;
+#endif
 }
 
 gp_Pnt SketcherPrs_SensitivePoint::Point() const
index e4e0a8bcd1979b1a909902bb30cfc9dba67ea0a9..f7edd6d982cfd9475eb7786a6855f4dc29a63c36 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef SketcherPrs_SensitivePoint_H
 #define SketcherPrs_SensitivePoint_H
 
+#include <SelectBasics_EntityOwner.hxx>
 #include <Select3D_SensitiveEntity.hxx>
 #include <Standard_DefineHandle.hxx>
 
index e10434cf9e3f024f5ee28610480786d44dc8e377..f52a48c5dff67ffdeebcad64edd8d918ddd73637 100644 (file)
@@ -195,7 +195,7 @@ Handle(Image_AlienPixMap) SketcherPrs_SymbolPrs::icon()
   }
   // The icon for constraint is not found
   static const char aMsg[] = "Error! constraint images are not found";
-  cout<<aMsg<<endl;
+  std::cout<<aMsg<<std::endl;
   Events_InfoMessage("SketcherPrs_SymbolPrs", aMsg).send();
   myIconsMap[iconName()] = Handle(Image_AlienPixMap)();
   return Handle(Image_AlienPixMap)();
index a84c76a0868c9d8729ffc11d2acb07552c053c09..ae806ab7a6f6345706081ce742a799204cd3dd2c 100644 (file)
@@ -105,7 +105,11 @@ const int MOUSE_SENSITIVITY_IN_PIXEL = 10;
 void displayedObjects(const Handle(AIS_InteractiveContext)& theAIS, AIS_ListOfInteractive& theList)
 {
   // Get from null point
-  theAIS->DisplayedObjects(theList, true);
+#if OCC_VERSION_HEX < 0x070400
+       theAIS->DisplayedObjects(theList, true);
+#else
+       theAIS->DisplayedObjects(theList);
+#endif
 }
 
 QString qIntListInfo(const QIntList& theValues, const QString& theSeparator = QString(", "))