Salome HOME
Optimization of SketchPrs objects parameters
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Coincident.cpp
index fc2f3e36aa163cd5b35d2dc28d8efb8f4d74b447..9e4c24723e807bbf9b21121ce6285ceaa251e2d9 100644 (file)
@@ -46,8 +46,8 @@
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Coincident, AIS_InteractiveObject);
 
 SketcherPrs_Coincident::SketcherPrs_Coincident(ModelAPI_Feature* theConstraint,
-                                               const std::shared_ptr<GeomAPI_Ax3>& thePlane)
-: AIS_InteractiveObject(), myConstraint(theConstraint), mySketcherPlane(thePlane),
+  SketchPlugin_Sketch* theSketch)
+: AIS_InteractiveObject(), myConstraint(theConstraint), mySketch(theSketch),
   myPoint(gp_Pnt(0.0, 0.0, 0.0)), myIsCustomColor(false)
 {
 }
@@ -85,7 +85,7 @@ void SketcherPrs_Coincident::Compute(
   const Standard_Integer theMode)
 {
   gp_Pnt aPoint;
-  bool aReadyToDisplay = readyToDisplay(myConstraint, mySketcherPlane, aPoint);
+  bool aReadyToDisplay = readyToDisplay(myConstraint, mySketch->coordinatePlane(), aPoint);
   if (aReadyToDisplay)
     myPoint = aPoint;