Changed default values for tags and disabled old popup menu.

This commit is contained in:
Markus Lampert 2017-01-02 17:32:48 -08:00
parent 556e25e47f
commit e92f315379
2 changed files with 4 additions and 4 deletions

View File

@ -136,7 +136,7 @@ class PathWorkbench (Workbench):
if FreeCADGui.Selection.getSelection()[0].isDerivedFrom("Path::Feature"):
self.appendContextMenu("", ["Path_Inspect"])
if "Profile" or "Contour" in FreeCADGui.Selection.getSelection()[0].Name:
self.appendContextMenu("", ["Add_Tag"])
#self.appendContextMenu("", ["Add_Tag"])
self.appendContextMenu("", ["Set_StartPoint"])
self.appendContextMenu("", ["Set_EndPoint"])
if "Remote" in FreeCADGui.Selection.getSelection()[0].Name:

View File

@ -542,14 +542,14 @@ class PathData:
def defaultTagHeight(self):
if hasattr(self.obj, 'Base') and hasattr(self.obj.Base, 'StartDepth') and hasattr(self.obj.Base, 'FinalDepth'):
return (self.obj.Base.StartDepth - self.obj.Base.FinalDepth).Value
return self.maxZ - self.minZ
return (self.obj.Base.StartDepth - self.obj.Base.FinalDepth).Value / 2
return (self.maxZ - self.minZ) / 2
def defaultTagWidth(self):
return self.shortestAndLongestPathEdge()[1].Length / 10
def defaultTagAngle(self):
return 90
return 45
def sortedTags(self, tags):
ordered = []