Salome HOME
Build SHAPER with dev version of OCCT (IR-2020-07-10)
authorrnv <rnv@opencascade.com>
Mon, 27 Jul 2020 09:32:17 +0000 (12:32 +0300)
committerrnv <rnv@opencascade.com>
Wed, 12 Aug 2020 13:25:19 +0000 (16:25 +0300)
13 files changed:
src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp
src/GeomAPI/GeomAPI_AISObject.cpp
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/PartSet/PartSet_ResultSketchPrs.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/SketcherPrs/SketcherPrs_Angle.cpp
src/SketcherPrs/SketcherPrs_DimensionStyle.cpp
src/SketcherPrs/SketcherPrs_DimensionStyle.h
src/SketcherPrs/SketcherPrs_LengthDimension.cpp
src/SketcherPrs/SketcherPrs_SensitivePoint.cpp
src/SketcherPrs/SketcherPrs_SensitivePoint.h
src/SketcherPrs/SketcherPrs_Tools.h
src/XGUI/XGUI_Displayer.cpp

index 2a6119eb447847b1c65e68d858442ec9e9327e2b..dfde5d61071ac7d24fba80d99278196bf1c1551d 100644 (file)
@@ -41,6 +41,7 @@
 #include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Shape.hxx>
+#include <AIS_Dimension.hxx>
 #include <AIS_LengthDimension.hxx>
 #include <AIS_RadiusDimension.hxx>
 #include <AIS_AngleDimension.hxx>
index b150bffca1345bb50a393a42901721ee072c9ebe..cf078f6ca6bdfb809479721c6b65effbe7442cf5 100644 (file)
@@ -32,6 +32,7 @@
 #include <Quantity_NameOfColor.hxx>
 #include <BRepBndLib.hxx>
 
+#include <AIS_Dimension.hxx>
 #include <AIS_InteractiveObject.hxx>
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_LengthDimension.hxx>
index 9d3a5c616c0662116967b4c7d7057910804bef7e..10f3d798b25145243c6853cb21a2df92a9c2d29d 100644 (file)
 #include <TopoDS_Builder.hxx>
 #include <TopoDS_Edge.hxx>
 #include <BRepMesh_IncrementalMesh.hxx>
+#include <Standard_Version.hxx>
+
+#if OCC_VERSION_HEX > 0x070400
+#include <StdPrs_ToolTriangulatedShape.hxx>
+#endif
 
 //*******************************************************************************************
 
@@ -427,8 +432,11 @@ bool ModuleBase_ResultPrs::appendVertexSelection(const Handle(SelectMgr_Selectio
     const TopoDS_Shape& aShape = Shape();
 
     int aPriority = StdSelect_BRepSelectionTool::GetStandardPriority(aShape, TopAbs_VERTEX);
+#if OCC_VERSION_HEX > 0x070400
+    double aDeflection = StdPrs_ToolTriangulatedShape::GetDeflection(aShape, myDrawer);
+#else
     double aDeflection = Prs3d::GetDeflection(aShape, myDrawer);
-
+#endif
     /// The cause of this method is the last parameter of BRep owner setting into True.
     /// That means that owner should behave like it comes from decomposition. (In this case, OCCT
     /// visualizes it in Ring style) OCCT version is 7.0.0 with path for SHAPER module.
index a40d0f20806b1031454bdf431aaf23239614d4eb..c6e5585a941067e4b702bd230f20afda9b77dc60 100644 (file)
 #include <TopExp.hxx>
 #endif
 
+#include <Standard_Version.hxx>
+
+#if OCC_VERSION_HEX > 0x070400
+#include <StdPrs_ToolTriangulatedShape.hxx>
+#endif
+
 //*******************************************************************************************
 
 IMPLEMENT_STANDARD_RTTIEXT(PartSet_ResultSketchPrs, ViewerData_AISShape);
@@ -215,7 +221,11 @@ void PartSet_ResultSketchPrs::appendShapeSelection(const Handle(SelectMgr_Select
                                                    const TopAbs_ShapeEnum& theTypeOfSelection)
 {
   // POP protection against crash in low layers
+#if OCC_VERSION_HEX > 0x070400
+  Standard_Real aDeflection = StdPrs_ToolTriangulatedShape::GetDeflection(theShape, myDrawer);
+#else
   Standard_Real aDeflection = Prs3d::GetDeflection(theShape, myDrawer);
+#endif
   try {
     StdSelect_BRepSelectionTool::Load(theSelection,
                                       this,
index 4a2a5154f0f0a6cfee6b7afcdbbd52565c2dcb71..2f41d3ed99f6c57230f040a92e241ff46ef4b89d 100644 (file)
@@ -63,7 +63,6 @@
 #include <gp_Pnt.hxx>
 #include <gp_Dir.hxx>
 #include <AIS_Shape.hxx>
-#include <AIS_DimensionSelectionMode.hxx>
 #include <Bnd_Box.hxx>
 
 #include <Config_WidgetAPI.h>
index 5d626ed8c54f72847fd3b32d6cf3e38cef13dbba..58def1833dbf6f7b5de31e919af37586864041f0 100644 (file)
 #include <TopExp.hxx>
 #include <BRep_Tool.hxx>
 
+#include <Standard_Version.hxx>
+
+#if OCC_VERSION_HEX > 0x070400
+#include <PrsDim_TypeOfAngleArrowVisibility.hxx>
+#endif
+
 /// Update variable aspect parameters (depending on viewer scale)
 /// \param theDimAspect an aspect to be changed
 /// \param theDimValue an arrow value
@@ -221,12 +227,20 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP
 
   double aDist = -1;
 #ifndef COMPILATION_CORRECTION
+#if OCC_VERSION_HEX > 0x070400
+  SetArrowsVisibility(PrsDim_TypeOfAngleArrowVisibility_Both);
+#else
   SetArrowsVisibility(AIS_TOAV_Both);
+#endif
 #endif
   SetMeasuredGeometry(myFirstPoint, myCenterPoint, mySecondPoint);
 #ifndef COMPILATION_CORRECTION
   bool isReversedPlanes = isAnglePlaneReversedToSketchPlane();
+#if OCC_VERSION_HEX > 0x070400
+  SetType(!isReversedPlanes ? PrsDim_TypeOfAngle_Exterior : PrsDim_TypeOfAngle_Interior);
+#else
   SetType(!isReversedPlanes ? AIS_TOA_Exterior : AIS_TOA_Interior);
+#endif
 #endif
   if (aDist < 0) /// it was not calculated yet
     aDist = calculateDistanceToFlyoutPoint();
index 90444ba5d96f6d601d9a3a427a408859d6216068..d535569f7a663c474f6ba3db52790820ce0a33ae 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <AIS_Dimension.hxx>
 #include <TCollection_ExtendedString.hxx>
+#include <Standard_Version.hxx>
 
 //#ifndef WNT
 //  #define COMPILATION_CORRECTION
@@ -82,7 +83,11 @@ void SketcherPrs_DimensionStyle::updateDimensions(AIS_Dimension* theDimension,
   /// do not show special symbols of dimension:
   ///   previous implementation did not allow to unite them
   theDimension->SetSpecialSymbol(MyEmptySymbol);
+#if OCC_VERSION_HEX > 0x070400
+  theDimension->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
+#else
   theDimension->SetDisplaySpecialSymbol(AIS_DSS_No);
+#endif
 
   TCollection_ExtendedString aCustomValue;
   if (theHasParameters) {
index 4e2f96882f1e144175313bcf1549f0eb44477507..96c8b9c27a51bb325a0e8b5d78e69e0e5de0a53c 100644 (file)
@@ -23,6 +23,7 @@
 //#include <Events_Listener.h>
 
 #include <ModelAPI_AttributeDouble.h>
+#include <AIS_Dimension.hxx>
 
 #include "SketcherPrs_Tools.h"
 
index b2cabccc3af7a23f293ae7b5443d47dec5bbf619..495f3d0690cc7d2d0ed2e81cefb6132588d08db1 100644 (file)
@@ -40,7 +40,6 @@
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeInteger.h>
 
-#include <AIS_DisplaySpecialSymbol.hxx>
 
 #define OCCT_28850_FIXED
 
index 1d19616fb486242a2b9450c086ca5eb3a76ad0cd..24b90a1fae4e290b72a6244d4721fa914c4f32cb 100644 (file)
@@ -98,7 +98,11 @@ Select3D_BndBox3d SketcherPrs_SensitivePoint::BoundingBox()
                             SelectMgr_Vec3 (aPnt.X(), aPnt.Y(), aPnt.Z()));
 }
 
+#if OCC_VERSION_HEX > 0x070400
+Standard_Integer SketcherPrs_SensitivePoint::NbSubElements() const
+#else
 Standard_Integer SketcherPrs_SensitivePoint::NbSubElements()
+#endif
 {
   return 1;
 }
index e3ef209548761adddf90be08147c9d09879274b9..68aeeda1fbcffab9517f2682b8ab274f5cecec9b 100644 (file)
@@ -23,6 +23,7 @@
 #include <SelectBasics_EntityOwner.hxx>
 #include <Select3D_SensitiveEntity.hxx>
 #include <Standard_DefineHandle.hxx>
+#include <Standard_Version.hxx>
 
 
 DEFINE_STANDARD_HANDLE(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)
@@ -42,8 +43,11 @@ public:
                                              int theId);
 
   /// Returns number of sub-elements
+#if OCC_VERSION_HEX > 0x070400
+  Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
+#else
   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
-
+#endif
   //! Update location of the point
   Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
 
index 35c836814f3019c5088afeb07cf478d3d1afb8c3..33254fd1804c8587cea1560cae52f16147dd5c7d 100644 (file)
@@ -35,7 +35,6 @@
 #include <Events_Message.h>
 
 class GeomDataAPI_Point2D;
-class AIS_Dimension;
 
 namespace SketcherPrs_Tools {
 
index 096749adb72ec4a89e3729695329a17e895a349e..d34ec9da4ad89d898b489a9db2725f8cc6bb9550 100644 (file)
@@ -56,7 +56,6 @@
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_ListOfInteractive.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
-#include <AIS_DimensionSelectionMode.hxx>
 #include <AIS_Shape.hxx>
 #include <AIS_Dimension.hxx>
 #include <AIS_Trihedron.hxx>