#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>
#include <Quantity_NameOfColor.hxx>
#include <BRepBndLib.hxx>
+#include <AIS_Dimension.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_LengthDimension.hxx>
#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
//*******************************************************************************************
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.
#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);
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,
#include <gp_Pnt.hxx>
#include <gp_Dir.hxx>
#include <AIS_Shape.hxx>
-#include <AIS_DimensionSelectionMode.hxx>
#include <Bnd_Box.hxx>
#include <Config_WidgetAPI.h>
#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
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();
#include <AIS_Dimension.hxx>
#include <TCollection_ExtendedString.hxx>
+#include <Standard_Version.hxx>
//#ifndef WNT
// #define COMPILATION_CORRECTION
/// 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) {
//#include <Events_Listener.h>
#include <ModelAPI_AttributeDouble.h>
+#include <AIS_Dimension.hxx>
#include "SketcherPrs_Tools.h"
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeInteger.h>
-#include <AIS_DisplaySpecialSymbol.hxx>
#define OCCT_28850_FIXED
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;
}
#include <SelectBasics_EntityOwner.hxx>
#include <Select3D_SensitiveEntity.hxx>
#include <Standard_DefineHandle.hxx>
+#include <Standard_Version.hxx>
DEFINE_STANDARD_HANDLE(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)
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;
#include <Events_Message.h>
class GeomDataAPI_Point2D;
-class AIS_Dimension;
namespace SketcherPrs_Tools {
#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>