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
Issue #2998: Add help description for automatic creation of constraints
[modules/shaper.git]
/
src
/
SketcherPrs
/
SketcherPrs_HVDirection.cpp
diff --git
a/src/SketcherPrs/SketcherPrs_HVDirection.cpp
b/src/SketcherPrs/SketcherPrs_HVDirection.cpp
index e9d1d14130b27935e295db091cbebeedbb1a15ee..336f298b28b7305853dd04d79779435c143da702 100644
(file)
--- a/
src/SketcherPrs/SketcherPrs_HVDirection.cpp
+++ b/
src/SketcherPrs/SketcherPrs_HVDirection.cpp
@@
-1,4
+1,4
@@
-// Copyright (C) 2014-201
7
CEA/DEN, EDF R&D
+// Copyright (C) 2014-201
9
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
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-12,10
+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
//
// 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_HVDirection.h"
//
#include "SketcherPrs_HVDirection.h"
@@
-40,19
+39,20
@@
SketcherPrs_HVDirection::SketcherPrs_HVDirection(ModelAPI_Feature* theConstraint
}
bool SketcherPrs_HVDirection::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
}
bool SketcherPrs_HVDirection::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
- const std::shared_ptr<GeomAPI_Ax3>&
/* thePlane*/
)
+ const std::shared_ptr<GeomAPI_Ax3>&
thePlane
)
{
bool aReadyToDisplay = false;
{
bool aReadyToDisplay = false;
- ObjectPtr aObj =
- SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-
- aReadyToDisplay = SketcherPrs_Tools::getShape(aObj).get() != NULL;
+ if (thePlane.get()) {
+ ObjectPtr aObj =
+ SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
+ aReadyToDisplay = SketcherPrs_Tools::getShape(aObj).get() != NULL;
+ }
return aReadyToDisplay;
}
bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep, bool withColor) const
{
return aReadyToDisplay;
}
bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep, bool withColor) const
{
- if (!IsReadyToDisplay(myConstraint,
myPlane
))
+ if (!IsReadyToDisplay(myConstraint,
plane()
))
return false;
// Set point of the symbol
return false;
// Set point of the symbol