@@ -1803,8 +1803,6 @@ def _pprint_styles(_styles):
18031803 (stylename : styleclass), return a formatted string listing all the
18041804 styles. Used to update the documentation.
18051805 """
1806- names , attrss , clss = [], [], []
1807-
18081806 import inspect
18091807
18101808 _table = [["Class" , "Name" , "Attrs" ]]
@@ -3057,8 +3055,6 @@ def connect(self, posA, posB):
30573055 x1 , y1 = posA
30583056 x20 , y20 = x2 , y2 = posB
30593057
3060- x12 , y12 = (x1 + x2 ) / 2. , (y1 + y2 ) / 2.
3061-
30623058 theta1 = math .atan2 (y2 - y1 , x2 - x1 )
30633059 dx , dy = x2 - x1 , y2 - y1
30643060 dd = (dx * dx + dy * dy ) ** .5
@@ -3067,18 +3063,12 @@ def connect(self, posA, posB):
30673063 armA , armB = self .armA , self .armB
30683064
30693065 if self .angle is not None :
3070- #angle = self.angle % 180.
3071- #if angle < 0. or angle > 180.:
3072- # angle
3073- #theta0 = (self.angle%180.)/180.*math.pi
30743066 theta0 = self .angle / 180. * math .pi
3075- #theta0 = (((self.angle+90)%180.) - 90.)/180.*math.pi
30763067 dtheta = theta1 - theta0
3077- dl = dd * math .sin (dtheta )
30783068
3069+ dl = dd * math .sin (dtheta )
30793070 dL = dd * math .cos (dtheta )
30803071
3081- #x2, y2 = x2 + dl*ddy, y2 - dl*ddx
30823072 x2 , y2 = x1 + dL * math .cos (theta0 ), y1 + dL * math .sin (theta0 )
30833073
30843074 armB = armB - dl
@@ -3091,14 +3081,8 @@ def connect(self, posA, posB):
30913081 else :
30923082 dl = 0.
30933083
3094- #if armA > armB:
3095- # armB = armA + dl
3096- #else:
3097- # armA = armB - dl
3098-
30993084 arm = max (armA , armB )
31003085 f = self .fraction * dd + arm
3101- #fB = self.fraction*dd + armB
31023086
31033087 cx1 , cy1 = x1 + f * ddy , y1 - f * ddx
31043088 cx2 , cy2 = x2 + f * ddy , y2 - f * ddx
0 commit comments