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
updated copyright message
[modules/shaper.git]
/
src
/
SketcherPrs
/
SketcherPrs_Radius.cpp
diff --git
a/src/SketcherPrs/SketcherPrs_Radius.cpp
b/src/SketcherPrs/SketcherPrs_Radius.cpp
index 0219e2f37f9b9b2c0ec3d2c26f8c30056f4dbc87..e656da498df4a10476eafd90a2a4f0b6305352fc 100644
(file)
--- a/
src/SketcherPrs/SketcherPrs_Radius.cpp
+++ b/
src/SketcherPrs/SketcherPrs_Radius.cpp
@@
-1,4
+1,4
@@
-// Copyright (C) 2014-20
17 CEA/DEN, EDF R&D
+// Copyright (C) 2014-20
23 CEA, EDF
//
// 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,15
+12,14
@@
//
// 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_Radius.h"
#include "SketcherPrs_Tools.h"
//
#include "SketcherPrs_Radius.h"
#include "SketcherPrs_Tools.h"
-#include "SketcherPrs_DimensionStyle
Listener
.h"
+#include "SketcherPrs_DimensionStyle.h"
#include <SketchPlugin_ConstraintRadius.h>
#include <SketchPlugin_Constraint.h>
#include <SketchPlugin_ConstraintRadius.h>
#include <SketchPlugin_Constraint.h>
@@
-50,17
+49,17
@@
extern void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect,
static const gp_Circ MyDefCirc(gp_Ax2(gp_Pnt(0,0,0), gp_Dir(0,0,1)), 1);
static const gp_Circ MyDefCirc(gp_Ax2(gp_Pnt(0,0,0), gp_Dir(0,0,1)), 1);
-IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Radius,
AIS
_RadiusDimension);
+IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Radius,
PrsDim
_RadiusDimension);
SketcherPrs_Radius::SketcherPrs_Radius(ModelAPI_Feature* theConstraint,
SketcherPrs_Radius::SketcherPrs_Radius(ModelAPI_Feature* theConstraint,
-
const std::shared_ptr<GeomAPI_Ax3>& thePlane
)
-:
AIS_RadiusDimension(MyDefCirc), myConstraint(theConstraint), mySketcherPlane(thePlane
),
+
SketchPlugin_Sketch* theSketcher
)
+:
PrsDim_RadiusDimension(MyDefCirc), myConstraint(theConstraint), mySketcher(theSketcher
),
myCircle(MyDefCirc),
myAnchorPoint(gp_Pnt(0, 0, 2)),
myValue(1, false, "")
{
SetDimensionAspect(createDimensionAspect());
myCircle(MyDefCirc),
myAnchorPoint(gp_Pnt(0, 0, 2)),
myValue(1, false, "")
{
SetDimensionAspect(createDimensionAspect());
- myStyleListener = new SketcherPrs_DimensionStyle
Listener
();
+ myStyleListener = new SketcherPrs_DimensionStyle();
}
SketcherPrs_Radius::~SketcherPrs_Radius()
}
SketcherPrs_Radius::~SketcherPrs_Radius()
@@
-146,9
+145,11
@@
void SketcherPrs_Radius::Compute(
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode)
{
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode)
{
+ if (!plane().get())
+ return;
gp_Circ aCircle;
gp_Pnt anAnchorPoint;
gp_Circ aCircle;
gp_Pnt anAnchorPoint;
- bool aReadyToDisplay = readyToDisplay(myConstraint,
mySketcherPlane
, aCircle, anAnchorPoint);
+ bool aReadyToDisplay = readyToDisplay(myConstraint,
plane()
, aCircle, anAnchorPoint);
if (aReadyToDisplay) {
myCircle = aCircle;
myAnchorPoint = anAnchorPoint;
if (aReadyToDisplay) {
myCircle = aCircle;
myAnchorPoint = anAnchorPoint;
@@
-171,7
+172,7
@@
void SketcherPrs_Radius::Compute(
(SketcherPrs_Tools::LocationType)(aLocAttr->value()) : SketcherPrs_Tools::LOCATION_AUTOMATIC;
updateArrows(DimensionAspect(), GetValue(), aTextSize, aLocationType);
(SketcherPrs_Tools::LocationType)(aLocAttr->value()) : SketcherPrs_Tools::LOCATION_AUTOMATIC;
updateArrows(DimensionAspect(), GetValue(), aTextSize, aLocationType);
-
AIS
_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode);
+
PrsDim
_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode);
if (!aReadyToDisplay)
SketcherPrs_Tools::sendEmptyPresentationError(myConstraint,
if (!aReadyToDisplay)
SketcherPrs_Tools::sendEmptyPresentationError(myConstraint,
@@
-203,5
+204,5
@@
void SketcherPrs_Radius::ComputeSelection(const Handle(SelectMgr_Selection)& aSe
}
}
SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
}
}
SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
-
AIS
_RadiusDimension::ComputeSelection(aSelection, aMode);
+
PrsDim
_RadiusDimension::ComputeSelection(aSelection, aMode);
}
}