Salome HOME
Update documentation (image for the perpendicular arc mode)
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Rigid.cpp
index 8344ec35e33f623ec8e10fd45bb7e23747bafadf..d552f06f16fee4b4a679068319ff6b5e1b4b6d63 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  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
@@ -12,9 +12,9 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include "SketcherPrs_Rigid.h"
@@ -50,8 +50,8 @@ static Handle(Image_AlienPixMap) MyPixMap;
 
 
 SketcherPrs_Rigid::SketcherPrs_Rigid(ModelAPI_Feature* theConstraint,
-                                           const std::shared_ptr<GeomAPI_Ax3>& thePlane)
- : SketcherPrs_SymbolPrs(theConstraint, thePlane)
+  SketchPlugin_Sketch* theSketcher)
+ : SketcherPrs_SymbolPrs(theConstraint, theSketcher)
 {
 }
 
@@ -80,7 +80,7 @@ bool SketcherPrs_Rigid::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
 
 bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep, bool withColor) const
 {
-  if (!IsReadyToDisplay(myConstraint, myPlane))
+  if (!IsReadyToDisplay(myConstraint, plane()))
     return false;
 
   myPntArray = new Graphic3d_ArrayOfPoints(1, withColor);
@@ -99,7 +99,7 @@ bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep, bool withColor) c
     // 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);
+    std::shared_ptr<GeomAPI_Pnt> aPoint = plane()->to3D(aPnt->x(), aPnt->y() + theStep);
     myPntArray->AddVertex(aPoint->impl<gp_Pnt>());
   }
   return true;