From 3ee613f79bd20fcd605172f273689f45e0cc44f1 Mon Sep 17 00:00:00 2001 From: ml Date: Thu, 26 Jan 2017 22:03:33 -0800 Subject: [PATCH] Fixed merge issues and re-enabled tests. --- src/Mod/Path/PathScripts/PathDressupHoldingTags.py | 12 +++++------- src/Mod/Path/TestPathApp.py | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py index 857acf8c2e..8284cd8d2c 100644 --- a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py +++ b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py @@ -25,7 +25,6 @@ import FreeCAD import FreeCADGui import Draft import DraftGeomUtils -import DraftGui import Path import PathScripts.PathLog as PathLog import PathScripts.PathPreferencesPathDressup as PathPreferencesPathDressup @@ -33,7 +32,6 @@ import Part import copy import math -from DraftGui import todo from PathScripts import PathUtils from PathScripts.PathGeom import PathGeom from PathScripts.PathPreferences import PathPreferences @@ -52,8 +50,8 @@ LOG_MODULE = 'PathDressupHoldingTags' def debugEdge(edge, prefix, force = False): if force or PathLog.getLevel(LOG_MODULE) == PathLog.Level.DEBUG: - pf = edge.valueAt(edge.FirstParameter) - pl = edge.valueAt(edge.LastParameter) + pf = edge.valueAt(edge.FirstParameter) + pl = edge.valueAt(edge.LastParameter) if type(edge.Curve) == Part.Line or type(edge.Curve) == Part.LineSegment: print("%s %s((%.2f, %.2f, %.2f) - (%.2f, %.2f, %.2f))" % (prefix, type(edge.Curve), pf.x, pf.y, pf.z, pl.x, pl.y, pl.z)) else: @@ -131,7 +129,7 @@ class HoldingTagsPreferences: @classmethod def defaultRadius(cls, ifNotSet = 0.0): return PathPreferences.preferences().GetFloat(cls.DefaultHoldingTagRadius, ifNotSet) - + def __init__(self): self.form = FreeCADGui.PySideUic.loadUi(":/preferences/PathDressupHoldingTags.ui") @@ -222,8 +220,8 @@ class Tag: PathLog.debug("solid.rotate(%f)" % angle) self.solid.rotate(FreeCAD.Vector(0,0,0), FreeCAD.Vector(0,0,1), angle) orig = self.originAt(z - 0.01 * self.actualHeight) - PathLog.debug("solid.translate(%s)" % oric) - self.solid.translate(oric) + PathLog.debug("solid.translate(%s)" % orig) + self.solid.translate(orig) radius = min(self.radius, radius) self.realRadius = radius if radius != 0: diff --git a/src/Mod/Path/TestPathApp.py b/src/Mod/Path/TestPathApp.py index f5e3abf0c2..f2e9611a00 100644 --- a/src/Mod/Path/TestPathApp.py +++ b/src/Mod/Path/TestPathApp.py @@ -31,4 +31,4 @@ from PathTests.TestPathPost import PathPostTestCases from PathTests.TestPathGeom import TestPathGeom from PathTests.TestPathDepthParams import depthTestCases -#from PathTests.TestPathDressupHoldingTags import TestHoldingTags +from PathTests.TestPathDressupHoldingTags import TestHoldingTags