Changeset 456
- Timestamp:
- Wed Jun 18 11:42:06 2008
- Files:
-
- ganttpv/trunk/ORM.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ganttpv/trunk/ORM.py
r455 r456 162 162 parallel = dist(pointA, junction) / dist(pointA, pointB) 163 163 orthagonal = dist(junction, pointC) 164 if ((pointB[1] > 0 and pointC[0] < junction[0]) or 165 (pointB[1] == 0 and pointC[1] < junction[1]) or 166 (pointB[1] < 0 and pointC[0] > junction[0])): 164 if ((pointB[1] > pointA[1] and pointC[0] < junction[0]) or 165 (pointB[1] == pointA[1] and pointC[1] < junction[1]) or 166 (pointB[1] < pointA[1] and pointC[0] > junction[0])): 167 167 orthagonal = -orthagonal 168 168 # if follower is clockwise from the line, make orthagonal negative … … 4948 4948 width, height = x1 - x0, y1 - y0 4949 4949 for f in line.GetFollowers(): 4950 x2 = x0 + width * f.parallel - height * f.orthagonal / length 4951 y2 = y0 + height * f.parallel + width * f.orthagonal / length 4950 x2 = x0 + width * f.parallel + height * f.orthagonal / length 4951 y2 = y0 + height * f.parallel - width * f.orthagonal / length 4952 4952 4953 4953 # # draw the lines used to position the follower
