(self, title)
| 63 | dc.DrawText('%.2f'%(i*unit), f(*j)) |
| 64 | |
| 65 | def report(self, title): |
| 66 | rst, titles = [], ['K'] |
| 67 | for line in self.body: |
| 68 | pts = np.array(line) |
| 69 | mid = (pts[:-1]+pts[1:])/2 |
| 70 | |
| 71 | dxy = (pts[:-1]-pts[1:]) |
| 72 | dxy[:,1][dxy[:,1]==0] = 1 |
| 73 | l = norm(dxy, axis=1)*-np.sign(dxy[:,1]) |
| 74 | rst.append(np.round(np.arccos(dxy[:,0]/l)/np.pi*180,1)) |
| 75 | IPy.show_table(pd.DataFrame(rst, columns=titles), title) |
| 76 | |
| 77 | class Plugin(Tool): |
| 78 | """Define the profile class plugin with the event callback functions""" |