diff --git a/src/Mod/Draft/getSVG.py b/src/Mod/Draft/getSVG.py
index 5cfb80b04a..88f1fec91f 100644
--- a/src/Mod/Draft/getSVG.py
+++ b/src/Mod/Draft/getSVG.py
@@ -166,6 +166,50 @@ def getPattern(pat):
return get_pattern(pat)
+def get_circle(plane,
+ fill, stroke, linewidth, lstyle,
+ edge):
+ """Get the SVG representation from a circular edge."""
+ cen = get_proj(edge.Curve.Center, plane)
+ rad = edge.Curve.Radius
+
+ if hasattr(FreeCAD, "DraftWorkingPlane"):
+ drawing_plane_normal = FreeCAD.DraftWorkingPlane.axis
+ else:
+ drawing_plane_normal = FreeCAD.Vector(0, 0, 1)
+
+ if plane:
+ drawing_plane_normal = plane.axis
+
+ if round(edge.Curve.Axis.getAngle(drawing_plane_normal), 2) in [0, 3.14]:
+ # Perpendicular projection: circle
+ svg = '\n'
+ return svg
+
+
+def getCircle(plane,
+ fill, stroke, linewidth, lstyle,
+ edge):
+ """Get the SVG representation from a circular edge."""
+ utils.use_instead("get_circle")
+ return get_circle(plane, fill, stroke, linewidth, lstyle, edge)
+
+
def get_path(obj, plane,
fill, pathdata, stroke, linewidth, lstyle,
fill_opacity=None,
@@ -251,7 +295,9 @@ def get_path(obj, plane,
if not done:
if len(e.Vertexes) == 1 and iscircle:
# Complete circle not only arc
- svg = getCircle(e)
+ svg = get_circle(plane,
+ fill, stroke, linewidth, lstyle,
+ e)
return svg
elif len(e.Vertexes) == 1 and isellipse:
# Complete ellipse not only arc
@@ -500,33 +546,6 @@ def getSVG(obj,
if hasattr(obj, "ViewObject") and hasattr(obj.ViewObject, "DrawStyle"):
lstyle = get_line_style(obj.ViewObject.DrawStyle, scale)
- def getCircle(edge):
- cen = get_proj(edge.Curve.Center, plane)
- rad = edge.Curve.Radius
- if hasattr(FreeCAD,"DraftWorkingPlane"):
- drawing_plane_normal = FreeCAD.DraftWorkingPlane.axis
- else:
- drawing_plane_normal = FreeCAD.Vector(0,0,1)
- if plane: drawing_plane_normal = plane.axis
- if round(edge.Curve.Axis.getAngle(drawing_plane_normal),2) in [0, 3.14]:
- # perpendicular projection: circle
- svg = '\n'
- return svg
-
def getEllipse(edge):
cen = get_proj(edge.Curve.Center, plane)
mir = edge.Curve.MinorRadius
@@ -956,7 +975,9 @@ def getSVG(obj,
dv = p2.sub(p1)
dv.normalize()
center = p2.add(dv.scale(rad,rad,rad))
- svg += getCircle(Part.makeCircle(rad,center))
+ svg += get_circle(plane,
+ fill, stroke, linewidth, lstyle,
+ Part.makeCircle(rad, center))
if hasattr(vobj.Proxy,"bubbletexts"):
if len (vobj.Proxy.bubbletexts) >= n:
svg += '