#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 <StdSelect_BRepSelectionTool.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Prs3d_LineAspect.hxx>
+#include <Graphic3d_AspectMarker3d.hxx>
#define DEBUG_WIRE
// 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,
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()) {
}
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);
}
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)
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
AIS_Shape::ComputeSelection(aSelection, aMode);
- if (aShapeIsChanged)
+ if (aShapeIsChanged) {
+ Attributes()->SetDeviationCoefficient(aPrevDeviation);
Set(myOriginalShape);
+ }
}
void PartSet_ResultSketchPrs::appendShapeSelection(const Handle(SelectMgr_Selection)& theSelection,