Skip to content

Commit 7ebba48

Browse files
committed
Got the distances upside down
1 parent 69ad8c7 commit 7ebba48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

AutoCursiveAttachment - Add Anchors.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def doTrial(anchor, x):
139139
# tt = - tt
140140
score = (distance - targetDistance)**2
141141
print("Square distance diff", score)
142-
tangentScore = 10
142+
tangentScore = 5
143143
print("Top tangent was: ", tt)
144144
print("Expected top tangent was: ", Layer.master.customParameters["autocursiveattachment_topTangent"])
145145
print("Bottom tangent was: ", bt)
@@ -152,7 +152,7 @@ def doTrial(anchor, x):
152152
# score = score + x**2
153153
# else:
154154
# score = score + (Layer.width-x)**2
155-
placement = NSMakePoint(x, prop * result[0].y + (1-prop) * (result[1].y))
155+
placement = NSMakePoint(x, prop * result[1].y + (1-prop) * (result[0].y))
156156
return score, placement
157157

158158

0 commit comments

Comments
 (0)