- fixed a double application of milling offset when having geometries with multiple tools

- finished the mill-excellon feature in the Milling Tool; milling will be done progressively from the hole center toward the edge
This commit is contained in:
Marius Stanciu
2021-12-23 22:04:41 +02:00
committed by Marius
parent da154a865c
commit 03f096a1cd
6 changed files with 217 additions and 65 deletions

View File

@@ -3702,14 +3702,15 @@ class CNCjob(Geometry):
p = self.pp_geometry
# Offset the Geometry if it is the case
if tool_dict['tools_mill_offset_type'] == 1: # 'in'
tool_offset = -float(tool_dict['tools_mill_tooldia']) / 2.0
elif tool_dict['tools_mill_offset_type'] == 2: # 'out'
tool_offset = float(tool_dict['tools_mill_tooldia']) / 2.0
elif tool_dict['tools_mill_offset_type'] == 3: # 'custom'
tool_offset = tool_dict['tools_mill_offset_value']
else:
tool_offset = 0.0
# if tool_dict['tools_mill_offset_type'] == 1: # 'in'
# tool_offset = -float(tool_dict['tools_mill_tooldia']) / 2.0
# elif tool_dict['tools_mill_offset_type'] == 2: # 'out'
# tool_offset = float(tool_dict['tools_mill_tooldia']) / 2.0
# elif tool_dict['tools_mill_offset_type'] == 3: # 'custom'
# tool_offset = tool_dict['tools_mill_offset_value']
# else:
# tool_offset = 0.0
tool_offset = tool_dict['tools_mill_offset_value']
# #############################################################################################################
# ## Flatten the geometry. Only linear elements (no polygons) remain.