It fixes a bug in preview of the 3D sketcher.
}
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':