From: vsv Date: Tue, 17 Nov 2015 14:27:34 +0000 (+0300) Subject: Correct deflection coefficient for sketch editing mode X-Git-Tag: V_2.0.0~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=916e490d426411d505d856b4510952c78de0d593;p=modules%2Fshaper.git Correct deflection coefficient for sketch editing mode --- diff --git a/src/ModuleBase/ModuleBase_Tools.cpp b/src/ModuleBase/ModuleBase_Tools.cpp index 889da3e0e..7c9fced2b 100755 --- a/src/ModuleBase/ModuleBase_Tools.cpp +++ b/src/ModuleBase/ModuleBase_Tools.cpp @@ -258,7 +258,10 @@ void checkObjects(const QObjectPtrList& theObjects, bool& hasResult, bool& hasFe void setDefaultDeviationCoefficient(const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer) { - if (!theShape.IsNull() && theShape.ShapeType() == TopAbs_EDGE) + if (theShape.IsNull()) + return; + TopAbs_ShapeEnum aType = theShape.ShapeType(); + if ((aType == TopAbs_EDGE) || (aType == TopAbs_WIRE)) theDrawer->SetDeviationCoefficient(1.e-4); } diff --git a/src/ModuleBase/ModuleBase_Tools.h b/src/ModuleBase/ModuleBase_Tools.h index f78e9b755..8c2a00db1 100755 --- a/src/ModuleBase/ModuleBase_Tools.h +++ b/src/ModuleBase/ModuleBase_Tools.h @@ -108,7 +108,7 @@ MODULEBASE_EXPORT void checkObjects(const QObjectPtrList& theObjects, bool& hasR /*! 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, -\return double value +\param theDrawer a drawer */ MODULEBASE_EXPORT void setDefaultDeviationCoefficient(const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer);