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.
This commit is contained in:
rnc 2012-09-10 12:51:34 +00:00
parent 5d7219e826
commit 7e54ff3916

View File

@ -243,14 +243,16 @@ 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++;
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;
p = vp;
V = VV;
}
}
break;
case 'W':