From 4bf665a6fd44978a86c6b584047ab85a5c4c6dc7 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Wed, 8 Jul 2020 19:42:35 -0500 Subject: [PATCH] Draft: move format_point out of getSVG function --- src/Mod/Draft/getSVG.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mod/Draft/getSVG.py b/src/Mod/Draft/getSVG.py index e6d37dafed..17609bbe4b 100644 --- a/src/Mod/Draft/getSVG.py +++ b/src/Mod/Draft/getSVG.py @@ -478,6 +478,11 @@ def getText(plane, techdraw, linespacing, align, flip) +def format_point(coords, action='L'): + """Return a string with a formatted point.""" + return "{action}{x},{y}".format(x=coords.x, y=coords.y, action=action) + + def get_path(obj, plane, fill, pathdata, stroke, linewidth, lstyle, fill_opacity=None, @@ -1010,11 +1015,6 @@ def getSVG(obj, elif utils.get_type(obj) == "Label": if getattr(obj.ViewObject, "Line", True): # some Labels may have no Line property - def format_point(coords, action='L'): - return "{action}{x},{y}".format( - x=coords.x, y=coords.y, action=action - ) - # Draw multisegment line proj_points = list(map(lambda x: get_proj(x, plane), obj.Points)) path_dir_list = [format_point(proj_points[0], action='M')]