Fixed tag marker display for path's not on z=0
This commit is contained in:
@@ -651,7 +651,7 @@ class PathData:
|
||||
return ordered
|
||||
|
||||
def pointIsOnPath(self, p):
|
||||
v = Part.Vertex(FreeCAD.Vector(p.x, p.y, self.minZ))
|
||||
v = Part.Vertex(self.pointAtBottom(p))
|
||||
PathLog.debug("pt = (%f, %f, %f)" % (v.X, v.Y, v.Z))
|
||||
for e in self.bottomEdges:
|
||||
indent = "{} ".format(e.distToShape(v)[0])
|
||||
@@ -660,6 +660,8 @@ class PathData:
|
||||
return True
|
||||
return False
|
||||
|
||||
def pointAtBottom(self, p):
|
||||
return FreeCAD.Vector(p.x, p.y, self.minZ)
|
||||
|
||||
class ObjectTagDressup:
|
||||
|
||||
@@ -958,6 +960,10 @@ class ObjectTagDressup:
|
||||
self.setup(obj)
|
||||
return self.pathData.pointIsOnPath(point)
|
||||
|
||||
def pointAtBottom(self, obj, point):
|
||||
if not hasattr(self, 'pathData'):
|
||||
self.setup(obj)
|
||||
return self.pathData.pointAtBottom(point)
|
||||
|
||||
|
||||
def Create(baseObject, name = 'DressupTag'):
|
||||
|
||||
@@ -419,7 +419,7 @@ class PathDressupTagViewProvider:
|
||||
self.switch.removeChild(tag.sep)
|
||||
tags = []
|
||||
for i, p in enumerate(positions):
|
||||
tag = HoldingTagMarker(p, self.colors)
|
||||
tag = HoldingTagMarker(self.obj.Proxy.pointAtBottom(self.obj, p), self.colors)
|
||||
tag.setEnabled(not i in disabled)
|
||||
tags.append(tag)
|
||||
self.switch.addChild(tag.sep)
|
||||
|
||||
Reference in New Issue
Block a user