MCPcopy Create free account
hub / github.com/Image-Py/imagepy / report

Method report

imagepy/tools/Measure/profile_tol.py:65–75  ·  view source on GitHub ↗
(self, title)

Source from the content-addressed store, hash-verified

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
77class Plugin(Tool):
78 """Define the profile class plugin with the event callback functions"""

Callers 1

mouse_downMethod · 0.45

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected