]> SALOME platform Git repositories - modules/shaper.git/commitdiff
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)
committernds <nds@opencascade.com>
Tue, 5 Apr 2016 06:21:37 +0000 (09:21 +0300)
src/PartSet/PartSet_OperationPrs.cpp
src/PartSet/PartSet_ResultSketchPrs.cpp
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_Tools.h

index 1640f4137f7cc76a4c1f7902dc460feb7036456a..90fc18b80660c8c230e312dd09dc1299307b14a5 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 1801a4daf795965210b3c4ec4a4939002238be4e..8046c219950ec66a84b0af9d296566480a140b57 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 f0543d6935dfc242caeaace15732f3cc3551b096..9daa2702ae9b17f3433d44a4e90b1973c804869a 100755 (executable)
@@ -51,6 +51,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