From 4de028bc46928dca010d625645b051c65f5a6949 Mon Sep 17 00:00:00 2001 From: SurajDadral Date: Sun, 26 Jul 2020 14:58:52 +0530 Subject: [PATCH] Fix placement of rebar wires in Draft.getSVG.py --- src/Mod/Draft/getSVG.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Mod/Draft/getSVG.py b/src/Mod/Draft/getSVG.py index eb963a9298..a7d728c142 100644 --- a/src/Mod/Draft/getSVG.py +++ b/src/Mod/Draft/getSVG.py @@ -759,11 +759,18 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct elif getType(obj) == "Rebar": fill = "none" - if obj.Proxy: - if not hasattr(obj.Proxy,"wires"): - obj.Proxy.execute(obj) - if hasattr(obj.Proxy,"wires"): - svg += getPath(wires=obj.Proxy.wires) + basewire = obj.Base.Shape.Wires[0].copy() + # Not applying rounding because the results are not correct + # if hasattr(obj, "Rounding") and obj.Rounding: + # basewire = DraftGeomUtils.filletWire( + # basewire, obj.Rounding * obj.Diameter.Value + # ) + wires = [] + for placement in obj.PlacementList: + wire = basewire.copy() + wire.Placement = placement.multiply(basewire.Placement) + wires.append(wire) + svg += getPath(wires=wires) elif getType(obj) == "PipeConnector": pass