0000820: Draft dimension dots

This commit is contained in:
Yorik van Havre
2012-08-31 11:00:40 -03:00
parent 36ffbc3637
commit 5b86feb8d3
2 changed files with 5 additions and 3 deletions

View File

@@ -420,7 +420,8 @@ def getShape(obj):
m[1], m[4], m[7], m[10],
m[2], m[5], m[8], m[11],
0, 0, 0, 1)
sh.Placement = FreeCAD.Placement(mat)
sh.Placement = FreeCAD.Placement(mat)
if DEBUG: print "getting Shape from ",obj
return sh
def getWire(entity,placement=None):

View File

@@ -1245,6 +1245,7 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct
svg = ""
linewidth = linewidth/scale
fontsize = (fontsize/scale)/2
pointratio = 4 # the number of times the dots are smaller than the font size
plane = None
if direction:
if isinstance(direction,FreeCAD.Vector):
@@ -1388,13 +1389,13 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct
svg += 'freecad:dimpoint="'+str(p2.x)+' '+str(p2.y)+'"'
svg += '/>\n'
svg += '<circle cx="'+str(p2.x)+'" cy="'+str(p2.y)
svg += '" r="'+str(fontsize)+'" '
svg += '" r="'+str(fontsize/pointratio)+'" '
svg += 'fill="'+ getrgb(obj.ViewObject.LineColor) +'" stroke="none" '
svg += 'style="stroke-miterlimit:4;stroke-dasharray:none" '
svg += 'freecad:skip="1"'
svg += '/>\n'
svg += '<circle cx="'+str(p3.x)+'" cy="'+str(p3.y)
svg += '" r="'+str(fontsize)+'" '
svg += '" r="'+str(fontsize/pointratio)+'" '
svg += 'fill="#000000" stroke="none" '
svg += 'style="stroke-miterlimit:4;stroke-dasharray:none" '
svg += 'freecad:skip="1"'