Salome HOME
msvc compile patch
[modules/shaper.git] / src / PartSet / PartSet_ResultSketchPrs.cpp
index 6f07b0f225bb39268a7288c791ae3ec67fc4d6b5..c6e5585a941067e4b702bd230f20afda9b77dc60 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #include <Prs3d_LineAspect.hxx>
 #include <Graphic3d_AspectMarker3d.hxx>
 
-#define DEBUG_WIRE
+//#define DEBUG_WIRE
 
 #ifdef DEBUG_WIRE
 #include <TopTools_IndexedMapOfShape.hxx>
 #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,