Salome HOME
#1371 Using auxilliary Sketch elements in any Feature: construction default line...
authornds <nds@opencascade.com>
Tue, 5 Apr 2016 06:20:59 +0000 (09:20 +0300)
committerdbv <dbv@opencascade.com>
Wed, 6 Apr 2016 10:25:50 +0000 (13:25 +0300)
src/PartSet/PartSet_OperationPrs.cpp
src/PartSet/PartSet_ResultSketchPrs.cpp
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_Tools.h

index a231a9b98a41b20bb59c7b6a025eab3be90cbc0f..8b50a2ad57075d35fbd8993b4303882381964610 100755 (executable)
@@ -36,8 +36,6 @@
 
 #include <QList>
 
-static const int AIS_DEFAULT_WIDTH = 2;
-
 //#define DEBUG_EMPTY_SHAPE
 
 // multi-rotation/translation operation
@@ -108,7 +106,7 @@ void PartSet_OperationPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t
             /// workaround for zero width. Else, there will be a crash
             if (aWidth == 0) { // width returns of TSolid shape is zero
               bool isDisplayed = !anIO->GetContext().IsNull();
-              aWidth = AIS_DEFAULT_WIDTH;// default width value
+              aWidth = PartSet_Tools::getAISDefaultWidth();// default width value
             }
             setWidth(aDrawer, aWidth);
           }
index 64ba7b087ad8d27f8c9976c907fdeaaa77100388..ede7d144d93d8789e347d74cfc40f2f374ed4881 100755 (executable)
@@ -257,7 +257,7 @@ void PartSet_ResultSketchPrs::setAuxiliaryPresentationStyle(const bool isAuxilia
   if (!isAuxiliary) {
     aColor = Config_PropManager::color("Visualization", "result_construction_color",
                                         ModelAPI_ResultConstruction::DEFAULT_COLOR());
-    aWidth = SketchPlugin_SketchEntity::SKETCH_LINE_WIDTH();
+    aWidth = PartSet_Tools::getAISDefaultWidth();// default width value
     aLineStyle = SketchPlugin_SketchEntity::SKETCH_LINE_STYLE();
   }
   else {
index 0616192d954da2bda3cee9c7e30d38c7a6421079..2fdb1da74cfe562e41ac4de1edb64a936b73be95 100755 (executable)
 #endif
 
 const double PRECISION_TOLERANCE = 0.000001;
+const int AIS_DEFAULT_WIDTH = 2;
+
+int PartSet_Tools::getAISDefaultWidth()
+{
+  return AIS_DEFAULT_WIDTH;
+}
 
 gp_Pnt PartSet_Tools::convertClickToPoint(QPoint thePoint, Handle(V3d_View) theView)
 {
index fe133ede0ef8b6753ed0183fb2429de8705ab9a0..489fa661577b729d14f4d39151aef766377668ba 100755 (executable)
@@ -54,6 +54,10 @@ public:
   };
 
  public:
+  /// Returns default value of AIS presentation
+  /// \return integer value
+  static int getAISDefaultWidth();
+
   /// Converts the 2D screen point to the 3D point on the view according to the point of view
   /// \param thePoint a screen point
   /// \param theView a 3D view