- in Align Plugin treated a possible exception DivideByZero
This commit is contained in:
committed by
Marius Stanciu
parent
239cf88a48
commit
9777255117
@@ -14,6 +14,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- remade the CNC Job Object Properties UI
|
- remade the CNC Job Object Properties UI
|
||||||
- in Etch Compensation Plugin updated the GUI
|
- in Etch Compensation Plugin updated the GUI
|
||||||
- small UI updates in other Plugins
|
- small UI updates in other Plugins
|
||||||
|
- in Align Plugin treated a possible exception DivideByZero
|
||||||
|
|
||||||
5.09.2021
|
5.09.2021
|
||||||
|
|
||||||
|
|||||||
@@ -346,10 +346,13 @@ class AlignObjects(AppTool):
|
|||||||
(abs(new_start[1] - new_dest[1]) <= (10 ** -self.decimals))
|
(abs(new_start[1] - new_dest[1]) <= (10 ** -self.decimals))
|
||||||
if rotation_not_needed is False:
|
if rotation_not_needed is False:
|
||||||
# calculate rotation angle
|
# calculate rotation angle
|
||||||
angle_dest = math.degrees(math.atan(dyd / dxd))
|
try:
|
||||||
angle_start = math.degrees(math.atan(dys / dxs))
|
angle_dest = math.degrees(math.atan(dyd / dxd))
|
||||||
angle = angle_dest - angle_start
|
angle_start = math.degrees(math.atan(dys / dxs))
|
||||||
self.aligned_obj.rotate(angle=angle, point=origin_pt)
|
angle = angle_dest - angle_start
|
||||||
|
self.aligned_obj.rotate(angle=angle, point=origin_pt)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
def disconnect_cal_events(self):
|
def disconnect_cal_events(self):
|
||||||
# restore the Grid snapping if it was active before
|
# restore the Grid snapping if it was active before
|
||||||
|
|||||||
Reference in New Issue
Block a user