Salome HOME
Issue #2069: Provide custom color for symbol based constraint
authorvsv <vsv@opencascade.com>
Thu, 30 Mar 2017 15:40:08 +0000 (18:40 +0300)
committervsv <vsv@opencascade.com>
Thu, 30 Mar 2017 15:40:29 +0000 (18:40 +0300)
22 files changed:
src/SketcherPrs/SketcherPrs_Collinear.cpp
src/SketcherPrs/SketcherPrs_Collinear.h
src/SketcherPrs/SketcherPrs_Equal.cpp
src/SketcherPrs/SketcherPrs_Equal.h
src/SketcherPrs/SketcherPrs_HVDirection.cpp
src/SketcherPrs/SketcherPrs_HVDirection.h
src/SketcherPrs/SketcherPrs_Middle.cpp
src/SketcherPrs/SketcherPrs_Middle.h
src/SketcherPrs/SketcherPrs_Mirror.cpp
src/SketcherPrs/SketcherPrs_Mirror.h
src/SketcherPrs/SketcherPrs_Parallel.cpp
src/SketcherPrs/SketcherPrs_Parallel.h
src/SketcherPrs/SketcherPrs_Perpendicular.cpp
src/SketcherPrs/SketcherPrs_Perpendicular.h
src/SketcherPrs/SketcherPrs_Rigid.cpp
src/SketcherPrs/SketcherPrs_Rigid.h
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp
src/SketcherPrs/SketcherPrs_SymbolPrs.h
src/SketcherPrs/SketcherPrs_Tangent.cpp
src/SketcherPrs/SketcherPrs_Tangent.h
src/SketcherPrs/SketcherPrs_Transformation.cpp
src/SketcherPrs/SketcherPrs_Transformation.h

index e485076aa307bbb4dbffd8dd538e32476b8e145b..ac28d6436ef90ef1ecd9648a0b786972775466d5 100755 (executable)
@@ -22,9 +22,6 @@ SketcherPrs_Collinear::SketcherPrs_Collinear(ModelAPI_Feature* theConstraint,
                                      const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
-  myPntArray = new Graphic3d_ArrayOfPoints(2);
-  myPntArray->AddVertex(0., 0., 0.);
-  myPntArray->AddVertex(0., 0., 0.);
 }
 
 bool SketcherPrs_Collinear::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
@@ -43,7 +40,7 @@ bool SketcherPrs_Collinear::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Collinear::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_Collinear::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -57,8 +54,9 @@ bool SketcherPrs_Collinear::updateIfReadyToDisplay(double theStep) const
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
   gp_Pnt aP1 = aMgr->getPosition(aObj1, this, theStep);
   gp_Pnt aP2 = aMgr->getPosition(aObj2, this, theStep);
-  myPntArray->SetVertice(1, aP1);
-  myPntArray->SetVertice(2, aP2);
+  myPntArray = new Graphic3d_ArrayOfPoints(2, withColor);
+  myPntArray->AddVertex(aP1);
+  myPntArray->AddVertex(aP2);
   return true;
 }
 
index 99c3ac2897aed9bcc0cb3810f568b71846428cc6..67a7a7aca6404894465cd7bbab012292de5781bf 100755 (executable)
@@ -41,7 +41,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 };
 
 #endif
\ No newline at end of file
index b070c171de3e86f2f4c212fb6cb23f25319c7f66..fde1496877a21b9e4cdde21ec53dedb28510e3e0 100644 (file)
@@ -22,9 +22,6 @@ SketcherPrs_Equal::SketcherPrs_Equal(ModelAPI_Feature* theConstraint,
                                      const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
-  myPntArray = new Graphic3d_ArrayOfPoints(2);
-  myPntArray->AddVertex(0., 0., 0.);
-  myPntArray->AddVertex(0., 0., 0.);
 }
 
 bool SketcherPrs_Equal::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
@@ -43,7 +40,7 @@ bool SketcherPrs_Equal::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Equal::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_Equal::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -57,8 +54,10 @@ bool SketcherPrs_Equal::updateIfReadyToDisplay(double theStep) const
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
   gp_Pnt aP1 = aMgr->getPosition(aObj1, this, theStep);
   gp_Pnt aP2 = aMgr->getPosition(aObj2, this, theStep);
-  myPntArray->SetVertice(1, aP1);
-  myPntArray->SetVertice(2, aP2);
+
+  myPntArray = new Graphic3d_ArrayOfPoints(2, withColor);
+  myPntArray->AddVertex(aP1);
+  myPntArray->AddVertex(aP2);
   return true;
 }
 
index 5fd1c55198b4ebc5dd95921983f23e39ecf4980e..07d77bd34525c156fac91c146562a2fe1ade867b 100644 (file)
@@ -41,7 +41,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 };
 
 #endif
\ No newline at end of file
index e1a7ed60118de059498e437db6e8b0d0eb855c28..552da1a6c63bc7c1d20af471218b5df4033ebbd8 100644 (file)
@@ -36,7 +36,7 @@ bool SketcherPrs_HVDirection::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -45,7 +45,8 @@ bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep) const
   ObjectPtr aObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
   gp_Pnt aP1 = aMgr->getPosition(aObj, this, theStep);
-  myPntArray->SetVertice(1, aP1);
+  myPntArray = new Graphic3d_ArrayOfPoints(1, withColor);
+  myPntArray->AddVertex(aP1);
   return true;
 }
 
index ffe5415706593c1afda0dcc02bd9efb4d04a2d06..d304031fe09647fafe1a4ae4ad28b62e017c0ce7 100644 (file)
@@ -48,7 +48,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 
 private:
   bool myIsHorisontal;
index af78d67e810e4454db868f2fd4f1e1ac59ec3b56..df7590a1c37e377752ab42cedbdca0f1cce5ebf5 100755 (executable)
@@ -42,13 +42,14 @@ bool SketcherPrs_Middle::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Middle::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_Middle::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
   ObjectPtr aPointObject;
 
   // find a line result to set middle symbol near it
+  myPntArray = new Graphic3d_ArrayOfPoints(1, withColor);
   AttributePtr anAttribute =
     SketcherPrs_Tools::getAttribute(myConstraint, SketchPlugin_Constraint::ENTITY_A());
   if (!anAttribute.get()) {
index 25c97b43035af50f289692087a0fede2aa5dfbc2..e01aa66c1877264d41602b98b542c3b0232b46fb 100755 (executable)
@@ -41,7 +41,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 
   /// Draw shape of the object. Find shape result if the object is feature
   void drawLine(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor,
index 28ecf09cdd6e43896b122158c9fa54b53117a45c..e78dc668e7762624396a25f19ce83f943bf4f1a8 100644 (file)
@@ -59,7 +59,7 @@ bool SketcherPrs_Mirror::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Mirror::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_Mirror::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -79,7 +79,7 @@ bool SketcherPrs_Mirror::updateIfReadyToDisplay(double theStep) const
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
   int aNb = anAttrB->size();
 
-  myPntArray = new Graphic3d_ArrayOfPoints(2 * aNb);
+  myPntArray = new Graphic3d_ArrayOfPoints(2 * aNb, withColor);
   int i;
   ObjectPtr aObj;
   gp_Pnt aP1;
index 3c57b95b0b61c953a7a2fd7620c784f314bb8414..4d7f7335e4910e80eea3ccd5a58f184cd436d597 100644 (file)
@@ -40,7 +40,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 };
 
 #endif
\ No newline at end of file
index 430d8818abc7512385441eed813be9049d4e12d1..770df4e2a7f54d8422dee9c893594995c2ac2625 100644 (file)
@@ -23,10 +23,6 @@ SketcherPrs_Parallel::SketcherPrs_Parallel(ModelAPI_Feature* theConstraint,
                                            const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
-  // Create default array
-  myPntArray = new Graphic3d_ArrayOfPoints(2);
-  myPntArray->AddVertex(0., 0., 0.);
-  myPntArray->AddVertex(0., 0., 0.);
 }
 
 bool SketcherPrs_Parallel::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
@@ -44,7 +40,7 @@ bool SketcherPrs_Parallel::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -58,8 +54,9 @@ bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep) const
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
   gp_Pnt aP1 = aMgr->getPosition(aObj1, this, theStep);
   gp_Pnt aP2 = aMgr->getPosition(aObj2, this, theStep);
-  myPntArray->SetVertice(1, aP1);
-  myPntArray->SetVertice(2, aP2);
+  myPntArray = new Graphic3d_ArrayOfPoints(2, withColor);
+  myPntArray->AddVertex(aP1);
+  myPntArray->AddVertex(aP2);
   return true;
 }
 
index 83ff20bb85e3683d0c480dde1b37e22dda256e85..2b2f7128fa45fc803179ed24edc01e3dd77c5af1 100644 (file)
@@ -41,7 +41,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 };
 
 #endif
\ No newline at end of file
index a0bda9731d6080b0783260789dc6e6a722bc60b2..54d263498796490e505be32fc3da848f28c60c83 100644 (file)
@@ -23,10 +23,6 @@ SketcherPrs_Perpendicular::SketcherPrs_Perpendicular(ModelAPI_Feature* theConstr
                                                      const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
-  // Create default array
-  myPntArray = new Graphic3d_ArrayOfPoints(2);
-  myPntArray->AddVertex(0., 0., 0.);
-  myPntArray->AddVertex(0., 0., 0.);
 }
 
 bool SketcherPrs_Perpendicular::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
@@ -44,7 +40,7 @@ bool SketcherPrs_Perpendicular::IsReadyToDisplay(ModelAPI_Feature* theConstraint
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -58,8 +54,9 @@ bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep) const
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
   gp_Pnt aP1 = aMgr->getPosition(aObj1, this, theStep);
   gp_Pnt aP2 = aMgr->getPosition(aObj2, this, theStep);
-  myPntArray->SetVertice(1, aP1);
-  myPntArray->SetVertice(2, aP2);
+  myPntArray = new Graphic3d_ArrayOfPoints(2, withColor);
+  myPntArray->AddVertex(aP1);
+  myPntArray->AddVertex(aP2);
   return true;
 }
 
index 3b07a25e8d544583e092c668b29baed368547e1c..337f996bef14649dcb41f3d8203b6d7784b6d548 100644 (file)
@@ -46,7 +46,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 };
 
 #endif
\ No newline at end of file
index a430ef2c1728c28672fbe1e22a79d94481cbd5a5..8b0ccb425fa0ed3ceab85c80a590278be7c55e97 100644 (file)
@@ -65,11 +65,12 @@ bool SketcherPrs_Rigid::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
+  myPntArray = new Graphic3d_ArrayOfPoints(1, withColor);
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
   std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr =
     aData->refattr(SketchPlugin_Constraint::ENTITY_A());
@@ -80,13 +81,13 @@ bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep) const
 
     SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
     gp_Pnt aP1 = aMgr->getPosition(aObj, this, theStep);
-    myPntArray->SetVertice(1, aP1);
+    myPntArray->AddVertex(aP1);
   } else {
     // The constraint attached to a point
     std::shared_ptr<GeomAPI_Pnt2d> aPnt = SketcherPrs_Tools::getPoint(myConstraint,
                                                   SketchPlugin_Constraint::ENTITY_A());
     std::shared_ptr<GeomAPI_Pnt> aPoint = myPlane->to3D(aPnt->x(), aPnt->y() + theStep);
-    myPntArray->SetVertice(1, aPoint->impl<gp_Pnt>());
+    myPntArray->AddVertex(aPoint->impl<gp_Pnt>());
   }
   return true;
 }
index d430148553443edf5fb608f395adbd96bab3d6b6..c944297a143fc855e1a9a5fadc42f868fc3dbdce 100644 (file)
@@ -47,7 +47,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 
 };
 
index cc56dd55d9902ca6f2a5c93752fc83e3285bff7e..ac03445a047a2015d089ae26d087bc84f16b8db2 100644 (file)
@@ -63,7 +63,7 @@ public:
       Handle(OpenGl_View) aView = theWorkspace->View();
       double aScale = aView->Camera()->Scale();
       // Update points coordinate taking the viewer scale into account
-      myObj->updateIfReadyToDisplay(MyDist * aScale);
+      myObj->updateIfReadyToDisplay(MyDist * aScale, myObj->myIsCustomColor);
       if (myIsVboInit) {
         if (myVboAttribs) {
           const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext();
@@ -106,8 +106,6 @@ SketcherPrs_SymbolPrs::SketcherPrs_SymbolPrs(ModelAPI_Feature* theConstraint,
  : AIS_InteractiveObject(), myConstraint(theConstraint), myPlane(thePlane), myIsCustomColor(false)
 {
   SetAutoHilight(Standard_False);
-  myPntArray = new Graphic3d_ArrayOfPoints(1);
-  myPntArray->AddVertex(0., 0., 0.);
 }
 
 //*********************************************************************************
@@ -242,7 +240,7 @@ void SketcherPrs_SymbolPrs::Compute(
   // it updates array of points if the presentation is ready to display, or the array of points
   // contains the previous values
 
-  bool aReadyToDisplay = updateIfReadyToDisplay(20);
+  bool aReadyToDisplay = updateIfReadyToDisplay(20, myIsCustomColor);
 
   int aNbVertex = myPntArray->VertexNumber();
   if (myOwner.IsNull()) {
@@ -254,9 +252,11 @@ void SketcherPrs_SymbolPrs::Compute(
   for (int i = 1; i <= aNbVertex; i++) {
     Handle(SketcherPrs_SensitivePoint) aSP = new SketcherPrs_SensitivePoint(myOwner, i);
     mySPoints.Append(aSP);
+    if (myIsCustomColor)
+      myPntArray->SetVertexColor(i, myCustomColor);
   }
 
-  Handle(OpenGl_Group) aGroup = Handle(OpenGl_Group)::DownCast(thePresentation->NewGroup());
+  Handle(OpenGl_Group) aGroup = Handle(OpenGl_Group)::DownCast(Prs3d_Root::CurrentGroup (thePresentation));
   aGroup->SetPrimitivesAspect(myAspect);
 
   // Recompute boundary box of the group
index 8bbae4ddadaaa4f504b1ba86a783cb81910e2c16..c672b4ea7a3e3a67a7484f3d5badb3aefface604 100644 (file)
@@ -111,7 +111,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const { return true; }
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const { return true; }
 
   /// Draw a shape into the given presentation scene
   /// \param theShape the shape to draw
@@ -150,7 +150,6 @@ private:
   bool myIsCustomColor; /// state if the presentation is visualized in custom color
   Quantity_Color myCustomColor; /// the color of mid ring if there is a conflict
 
-  //Quantity_Color myIsCustomColor;
   //bool myIsConflicting; /// state if the presentation is visualized in error state
   Handle(Image_AlienPixMap) myErrorIcon;
   Handle(Graphic3d_MarkerImage) myErrorImage;
index 5f657b8aacf660a4f364f405ba28ff5b3624eff2..7704d95cffa51766b87b7326797ded96457b92a4 100644 (file)
@@ -26,10 +26,6 @@ SketcherPrs_Tangent::SketcherPrs_Tangent(ModelAPI_Feature* theConstraint,
                                            const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
-  // Init default points
-  myPntArray = new Graphic3d_ArrayOfPoints(2);
-  myPntArray->AddVertex(0., 0., 0.);
-  myPntArray->AddVertex(0., 0., 0.);
 }
 
 bool SketcherPrs_Tangent::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
@@ -48,7 +44,7 @@ bool SketcherPrs_Tangent::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Tangent::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_Tangent::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -62,8 +58,9 @@ bool SketcherPrs_Tangent::updateIfReadyToDisplay(double theStep) const
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
   gp_Pnt aP1 = aMgr->getPosition(aObj1, this, theStep);
   gp_Pnt aP2 = aMgr->getPosition(aObj2, this, theStep);
-  myPntArray->SetVertice(1, aP1);
-  myPntArray->SetVertice(2, aP2);
+  myPntArray = new Graphic3d_ArrayOfPoints(2, withColor);
+  myPntArray->AddVertex(aP1);
+  myPntArray->AddVertex(aP2);
   return true;
 }
 
index a3bdf4a44862b917864b47231ae3c3c0b94382e2..00c3e9c2ed998c5592783e92ceb344c54346e261 100644 (file)
@@ -43,7 +43,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 };
 
 #endif
\ No newline at end of file
index 285133c84bbe670ef7ae4bae6d9736c643cbccc0..9d6061e2618716ae575a26353fe8597cd4945736 100644 (file)
@@ -71,7 +71,7 @@ bool SketcherPrs_Transformation::IsReadyToDisplay(ModelAPI_Feature* theConstrain
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Transformation::updateIfReadyToDisplay(double theStep) const
+bool SketcherPrs_Transformation::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -91,7 +91,7 @@ bool SketcherPrs_Transformation::updateIfReadyToDisplay(double theStep) const
   }
 
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
-  myPntArray = new Graphic3d_ArrayOfPoints(aNbB);
+  myPntArray = new Graphic3d_ArrayOfPoints(aNbB, withColor);
 
   int i;
   ObjectPtr aObj;
index 7ac6360f7ada81f83994746e673549fdee4bd5ce..e8cb4ab774ea556446ae45e1467e31dd2292e46c 100644 (file)
@@ -47,7 +47,7 @@ protected:
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep) const;
+  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const;
 
 private:
   bool myIsTranslation;