From: vsv Date: Fri, 10 Jan 2020 12:34:31 +0000 (+0300) Subject: Porting on OCCT 7.4.0 X-Git-Tag: V9_5_0a1~71 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=50af7d0baf127fbe212160d099de5b8ccc07724a;p=modules%2Fshaper.git Porting on OCCT 7.4.0 --- diff --git a/salomeRun_deb.bat b/salomeRun_deb.bat index 14b69a6ba..17e988d55 100644 --- a/salomeRun_deb.bat +++ b/salomeRun_deb.bat @@ -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 diff --git a/salomeRun_rel.bat b/salomeRun_rel.bat index 2cfabdae9..82717fdb4 100644 --- a/salomeRun_rel.bat +++ b/salomeRun_rel.bat @@ -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 diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp index cfed1f199..496ec9079 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -31,6 +30,7 @@ #include #include #include +#include //================================================================================================== GeomAlgoAPI_UnifySameDomain::GeomAlgoAPI_UnifySameDomain(const ListOfShape& theShapes) diff --git a/src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp b/src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp index 7565c5913..509377003 100644 --- a/src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp +++ b/src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp @@ -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& aResult<<"Volume: "; // volumes of too huge shapes write in the scientific format if (aVolume >= 1.e5) - aResult< aCenter = GeomAlgoAPI_ShapeTools::centreOfMass(theShape); diff --git a/src/SHAPERGUI/SHAPERGUI.cpp b/src/SHAPERGUI/SHAPERGUI.cpp index 8577d8da1..c9fffc916 100644 --- a/src/SHAPERGUI/SHAPERGUI.cpp +++ b/src/SHAPERGUI/SHAPERGUI.cpp @@ -74,7 +74,9 @@ #include #include -#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() diff --git a/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp b/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp index 1f0d054f4..2ccfd3422 100644 --- a/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp +++ b/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp @@ -33,7 +33,9 @@ #include #include -#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) diff --git a/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp b/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp index 753cff52d..ee6838a35 100644 --- a/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp +++ b/src/SketcherPrs/SketcherPrs_SensitivePoint.cpp @@ -18,9 +18,10 @@ // #include "SketcherPrs_SensitivePoint.h" +#include "SketcherPrs_SymbolPrs.h" #include -#include "SketcherPrs_SymbolPrs.h" +#include #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 diff --git a/src/SketcherPrs/SketcherPrs_SensitivePoint.h b/src/SketcherPrs/SketcherPrs_SensitivePoint.h index e4e0a8bcd..f7edd6d98 100644 --- a/src/SketcherPrs/SketcherPrs_SensitivePoint.h +++ b/src/SketcherPrs/SketcherPrs_SensitivePoint.h @@ -20,6 +20,7 @@ #ifndef SketcherPrs_SensitivePoint_H #define SketcherPrs_SensitivePoint_H +#include #include #include diff --git a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp index e10434cf9..f52a48c5d 100644 --- a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp +++ b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp @@ -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<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(", "))