def updatelock_pts(self, ref_pts):
global curr_meas_stor
set_lock_pts(ref_pts)
if ref_pts.lp_ls == []:
self.report({'ERROR'}, ref_pts.ax_lock+' axis lock creates identical points')
ref_pts.lp_ls = ref_pts.rp_ls
ref_pts.ax_lock = ''
# update Measurement in curr_meas_stor
lk_pts = ref_pts.lp_ls
if ref_pts.cnt < 2:
curr_meas_stor = 0.0
elif ref_pts.cnt == 2:
curr_meas_stor = get_dist(lk_pts[0].co3D, lk_pts[1].co3D)
elif ref_pts.cnt == 3:
line_ang_r = get_line_ang_3D(lk_pts[0].co3D, lk_pts[1].co3D, lk_pts[2].co3D)
curr_meas_stor = degrees(line_ang_r)
# See if key was pressed that would require updating the axis lock info.
# If one was, update the lock points to use new info.
评论列表
文章目录