From 916e490d426411d505d856b4510952c78de0d593 Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 17 Nov 2015 17:27:34 +0300 Subject: [PATCH] Correct deflection coefficient for sketch editing mode --- src/ModuleBase/ModuleBase_Tools.cpp | 5 ++++- src/ModuleBase/ModuleBase_Tools.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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); -- 2.30.2