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 #1664: In the Sketcher, add the function Split a segment: split of arc, move...
[modules/shaper.git]
/
src
/
PartSet
/
PartSet_ResultSketchPrs.cpp
diff --git
a/src/PartSet/PartSet_ResultSketchPrs.cpp
b/src/PartSet/PartSet_ResultSketchPrs.cpp
index a8617af00033efd3fde6a65d86e338b352372dcc..dba8a45ac9ef23deff754767627875e1e5be26cb 100755
(executable)
--- a/
src/PartSet/PartSet_ResultSketchPrs.cpp
+++ b/
src/PartSet/PartSet_ResultSketchPrs.cpp
@@
-13,7
+13,7
@@
#include <ModelAPI_ResultConstruction.h>
#include <GeomAPI_PlanarEdges.h>
#include <ModelAPI_ResultConstruction.h>
#include <GeomAPI_PlanarEdges.h>
-#include <Events_
Error
.h>
+#include <Events_
InfoMessage
.h>
#include <Events_Loop.h>
#include <SketchPlugin_SketchEntity.h>
#include <Events_Loop.h>
#include <SketchPlugin_SketchEntity.h>
@@
-32,6
+32,7
@@
#include <StdSelect_BRepSelectionTool.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Prs3d_LineAspect.hxx>
#include <StdSelect_BRepSelectionTool.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Prs3d_LineAspect.hxx>
+#include <Graphic3d_AspectMarker3d.hxx>
#define DEBUG_WIRE
#define DEBUG_WIRE
@@
-61,6
+62,8
@@
PartSet_ResultSketchPrs::PartSet_ResultSketchPrs(ResultPtr theResult)
// Activate individual repaintng if this is a part of compsolid
ResultCompSolidPtr aCompSolid = ModelAPI_Tools::compSolidOwner(myResult);
SetAutoHilight(aCompSolid.get() == NULL);
// Activate individual repaintng if this is a part of compsolid
ResultCompSolidPtr aCompSolid = ModelAPI_Tools::compSolidOwner(myResult);
SetAutoHilight(aCompSolid.get() == NULL);
+
+ ModuleBase_Tools::setPointBallHighlighting(this);
}
void PartSet_ResultSketchPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
}
void PartSet_ResultSketchPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
@@
-88,7
+91,7
@@
void PartSet_ResultSketchPrs::Compute(const Handle(PrsMgr_PresentationManager3d)
setAuxiliaryPresentationStyle(false);
// change deviation coefficient to provide more precise circle
setAuxiliaryPresentationStyle(false);
// change deviation coefficient to provide more precise circle
- ModuleBase_Tools::setDefaultDeviationCoefficient(myResult, Attributes());
+
//
ModuleBase_Tools::setDefaultDeviationCoefficient(myResult, Attributes());
AIS_Shape::Compute(thePresentationManager, thePresentation, theMode);
if (!myAuxiliaryCompound.IsNull()) {
AIS_Shape::Compute(thePresentationManager, thePresentation, theMode);
if (!myAuxiliaryCompound.IsNull()) {
@@
-99,7
+102,7
@@
void PartSet_ResultSketchPrs::Compute(const Handle(PrsMgr_PresentationManager3d)
}
if (!aReadyToDisplay) {
}
if (!aReadyToDisplay) {
- Events_
Error::throwException("An empty AIS presentation: PartSet_ResultSketchPrs"
);
+ Events_
InfoMessage("PartSet_ResultSketchPrs", "An empty AIS presentation: PartSet_ResultSketchPrs").send(
);
static const Events_ID anEvent = Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION);
ModelAPI_EventCreator::get()->sendUpdated(myResult, anEvent);
}
static const Events_ID anEvent = Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION);
ModelAPI_EventCreator::get()->sendUpdated(myResult, anEvent);
}
@@
-133,6
+136,7
@@
void PartSet_ResultSketchPrs::ComputeSelection(const Handle(SelectMgr_Selection)
return;
bool aShapeIsChanged = false;
return;
bool aShapeIsChanged = false;
+ double aPrevDeviation = Attributes()->DeviationCoefficient();
if (aMode == SketcherPrs_Tools::Sel_Sketch_Face ||
aMode == SketcherPrs_Tools::Sel_Sketch_Wire) {
aMode = (aMode == SketcherPrs_Tools::Sel_Sketch_Face) ? AIS_Shape::SelectionMode(TopAbs_FACE)
if (aMode == SketcherPrs_Tools::Sel_Sketch_Face ||
aMode == SketcherPrs_Tools::Sel_Sketch_Wire) {
aMode = (aMode == SketcherPrs_Tools::Sel_Sketch_Face) ? AIS_Shape::SelectionMode(TopAbs_FACE)
@@
-160,6
+164,9
@@
void PartSet_ResultSketchPrs::ComputeSelection(const Handle(SelectMgr_Selection)
debugInfo(aComp, TopAbs_FACE); // 2
#endif
Set(aComp);
debugInfo(aComp, TopAbs_FACE); // 2
#endif
Set(aComp);
+ double aBodyDefDeflection = Config_PropManager::real("Visualization", "body_deflection",
+ ModelAPI_ResultBody::DEFAULT_DEFLECTION());
+ Attributes()->SetDeviationCoefficient(aBodyDefDeflection);
aShapeIsChanged = true;
}
else
aShapeIsChanged = true;
}
else
@@
-175,8
+182,10
@@
void PartSet_ResultSketchPrs::ComputeSelection(const Handle(SelectMgr_Selection)
AIS_Shape::ComputeSelection(aSelection, aMode);
AIS_Shape::ComputeSelection(aSelection, aMode);
- if (aShapeIsChanged)
+ if (aShapeIsChanged) {
+ Attributes()->SetDeviationCoefficient(aPrevDeviation);
Set(myOriginalShape);
Set(myOriginalShape);
+ }
}
void PartSet_ResultSketchPrs::appendShapeSelection(const Handle(SelectMgr_Selection)& theSelection,
}
void PartSet_ResultSketchPrs::appendShapeSelection(const Handle(SelectMgr_Selection)& theSelection,