Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compilation on Linux
[modules/shaper.git]
/
src
/
SketcherPrs
/
SketcherPrs_Coincident.cpp
diff --git
a/src/SketcherPrs/SketcherPrs_Coincident.cpp
b/src/SketcherPrs/SketcherPrs_Coincident.cpp
index d8cb88cb21b3d905873a5a68d87a12172459faf8..2b6c57b846dbeaa146caa129e13a9ba5d27dac8c 100644
(file)
--- a/
src/SketcherPrs/SketcherPrs_Coincident.cpp
+++ b/
src/SketcherPrs/SketcherPrs_Coincident.cpp
@@
-36,10
+36,10
@@
IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Coincident, AIS_InteractiveObject);
SketcherPrs_Coincident::SketcherPrs_Coincident(ModelAPI_Feature* theConstraint,
const std::shared_ptr<GeomAPI_Ax3>& thePlane)
SketcherPrs_Coincident::SketcherPrs_Coincident(ModelAPI_Feature* theConstraint,
const std::shared_ptr<GeomAPI_Ax3>& thePlane)
- : AIS_InteractiveObject(), myConstraint(theConstraint), mySketcherPlane(thePlane)
+: AIS_InteractiveObject(), myConstraint(theConstraint), mySketcherPlane(thePlane),
+ myPoint(gp_Pnt(0.0, 0.0, 0.0))
{
{
-
-}
+}
bool SketcherPrs_Coincident::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
const std::shared_ptr<GeomAPI_Ax3>& thePlane)
bool SketcherPrs_Coincident::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
const std::shared_ptr<GeomAPI_Ax3>& thePlane)
@@
-56,11
+56,13
@@
bool SketcherPrs_Coincident::readyToDisplay(ModelAPI_Feature* theConstraint,
// Get point of the presentation
std::shared_ptr<GeomAPI_Pnt2d> aPnt = SketcherPrs_Tools::getPoint(theConstraint,
SketchPlugin_Constraint::ENTITY_A());
// Get point of the presentation
std::shared_ptr<GeomAPI_Pnt2d> aPnt = SketcherPrs_Tools::getPoint(theConstraint,
SketchPlugin_Constraint::ENTITY_A());
- if (aPnt.get() == NULL)
{
+ if (aPnt.get() == NULL)
aPnt = SketcherPrs_Tools::getPoint(theConstraint, SketchPlugin_Constraint::ENTITY_B());
aPnt = SketcherPrs_Tools::getPoint(theConstraint, SketchPlugin_Constraint::ENTITY_B());
- aReadyToDisplay = aPnt.get() != NULL;
- if (aReadyToDisplay)
- thePoint = aPnt->impl<gp_Pnt>();
+
+ aReadyToDisplay = aPnt.get() != NULL;
+ if (aReadyToDisplay) {
+ std::shared_ptr<GeomAPI_Pnt> aPoint = thePlane->to3D(aPnt->x(), aPnt->y());
+ thePoint = aPoint->impl<gp_Pnt>();
}
return aReadyToDisplay;
}
}
return aReadyToDisplay;
}