]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#1404 Random crash with Shaper: correction for coincidence constraint.
authornds <nds@opencascade.com>
Thu, 21 Apr 2016 13:12:32 +0000 (16:12 +0300)
committernds <nds@opencascade.com>
Thu, 21 Apr 2016 13:12:32 +0000 (16:12 +0300)
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;
 }