]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketcherPrs/SketcherPrs_Coincident.cpp
Salome HOME
#1404 Random crash with Shaper: correction for coincidence constraint.
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Coincident.cpp
index a2931fa51f26ffe664103ac88be206294f3ea7e7..c3264e79377ad53fdfe7a3443ae4e3dfd446848b 100644 (file)
@@ -59,8 +59,10 @@ bool SketcherPrs_Coincident::readyToDisplay(ModelAPI_Feature* theConstraint,
   if (aPnt.get()) {
     aPnt = SketcherPrs_Tools::getPoint(theConstraint, SketchPlugin_Constraint::ENTITY_B());
     aReadyToDisplay = aPnt.get() != NULL;
-    if (aReadyToDisplay)
-      thePoint = aPnt->impl<gp_Pnt>();
+    if (aReadyToDisplay) {
+      std::shared_ptr<GeomAPI_Pnt> aPoint = thePlane->to3D(aPnt->x(), aPnt->y());
+      thePoint = aPoint->impl<gp_Pnt>();
+    }
   }
   return aReadyToDisplay;
 }