Set(myOriginalShape);
}
// change deviation coefficient to provide more precise circle
- ModuleBase_Tools::setDefaultDeviationCoefficient(Shape(), Attributes());
+ ModuleBase_Tools::setDefaultDeviationCoefficient(myResult, Attributes());
AIS_Shape::Compute(thePresentationManager, thePresentation, theMode);
if (!aReadyToDisplay) {
#include <ModelAPI_AttributeRefList.h>
#include <ModelAPI_AttributeRefAttrList.h>
#include <ModelAPI_ResultPart.h>
+#include <ModelAPI_ResultConstruction.h>
#include <Events_Loop.h>
#include <ModelAPI_Data.h>
}
}
+void setDefaultDeviationCoefficient(const std::shared_ptr<ModelAPI_Result>& theResult,
+ const Handle(Prs3d_Drawer)& theDrawer)
+{
+ if (!theResult.get())
+ return;
+
+ if (theResult->groupName() == ModelAPI_ResultConstruction::group())
+ theDrawer->SetDeviationCoefficient(1.e-4);
+}
+
void setDefaultDeviationCoefficient(const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer)
{
MODULEBASE_EXPORT void checkObjects(const QObjectPtrList& theObjects, bool& hasResult,
bool& hasFeature, bool& hasParameter, bool& hasCompositeOwner);
+/*! Sets the default coeffient into the driver calculated accordingly the shape type.
+It provides 1.e-4 for results of construction type
+\param theResult a result object to define the deviation coeffient
+\param theDrawer a drawer
+*/
+MODULEBASE_EXPORT void setDefaultDeviationCoefficient(
+ const std::shared_ptr<ModelAPI_Result>& theResult,
+ const Handle(Prs3d_Drawer)& theDrawer);
+
/*! Sets the default coeffient into the driver calculated accordingly the shape type.
It provides 1.e-4 for a shape withe Edge shape type
\param theShape a shape to define the deviation coeffient,
const TopoDS_Shape& aShape = anIter.Key();
aBuilder.Add(aComp, aShape);
// change deviation coefficient to provide more precise circle
+ // as there is no result, the shape is processed to correct deviation. To be unified
ModuleBase_Tools::setDefaultDeviationCoefficient(aShape, aDrawer);
if (myUseAISWidth) {
setAuxiliaryPresentationStyle(false);
// change deviation coefficient to provide more precise circle
- ModuleBase_Tools::setDefaultDeviationCoefficient(Shape(), Attributes());
+ ModuleBase_Tools::setDefaultDeviationCoefficient(myResult, Attributes());
AIS_Shape::Compute(thePresentationManager, thePresentation, theMode);
if (!myAuxiliaryCompound.IsNull()) {