From: rnc Date: Mon, 10 Sep 2012 12:51:34 +0000 (+0000) Subject: Added a check on proximity between last point and current point in 3D sketch construc... X-Git-Tag: V6_6_0a1~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7e54ff39169ba76a80122e49a3d3cc74482661d7;p=modules%2Fgeom.git Added a check on proximity between last point and current point in 3D sketch construction for construction by angle like it was done for construction by coordinates. It fixes a bug in preview of the 3D sketcher. --- diff --git a/src/GEOMImpl/GEOMImpl_3DSketcherDriver.cxx b/src/GEOMImpl/GEOMImpl_3DSketcherDriver.cxx index 0dbdc320b..d50aec791 100755 --- a/src/GEOMImpl/GEOMImpl_3DSketcherDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_3DSketcherDriver.cxx @@ -242,15 +242,17 @@ Standard_Integer GEOMImpl_3DSketcherDriver::Execute(TFunction_Logbook& log) cons } else Standard_ConstructionError::Raise("3D Sketcher error: Bad format of command."); - - BRepBuilderAPI_MakeVertex MV (vp); - TopoDS_Vertex VV = TopoDS::Vertex(MV.Shape()); - BRepBuilderAPI_MakeEdge ME (V, VV); - MW.Add(ME); - nbEdges++; - - p = vp; - V = VV; + + if ((vp - p).SquareModulus() > Precision::Confusion()) { + BRepBuilderAPI_MakeVertex MV (vp); + TopoDS_Vertex VV = TopoDS::Vertex(MV.Shape()); + BRepBuilderAPI_MakeEdge ME (V, VV); + MW.Add(ME); + nbEdges++; + + p = vp; + V = VV; + } } break; case 'W':