Просмотр исходного кода

- more fixes (didn't get it right before)

Marius Stanciu 7 лет назад
Родитель
Сommit
60614e4b45

+ 1 - 1
FlatCAMObj.py

@@ -1665,6 +1665,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
             job_obj.dwell = self.options["dwell"]
             job_obj.dwell = self.options["dwell"]
             job_obj.dwelltime = self.options["dwelltime"]
             job_obj.dwelltime = self.options["dwelltime"]
             job_obj.pp_excellon_name = pp_excellon_name
             job_obj.pp_excellon_name = pp_excellon_name
+            job_obj.toolchange_xy = self.app.defaults["excellon_toolchangexy"]
             job_obj.toolchange_xy_type = "excellon"
             job_obj.toolchange_xy_type = "excellon"
             job_obj.coords_decimals = int(self.app.defaults["cncjob_coords_decimals"])
             job_obj.coords_decimals = int(self.app.defaults["cncjob_coords_decimals"])
             job_obj.fr_decimals = int(self.app.defaults["cncjob_fr_decimals"])
             job_obj.fr_decimals = int(self.app.defaults["cncjob_fr_decimals"])
@@ -1678,7 +1679,6 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
                                                    drillz=self.options['drillz'],
                                                    drillz=self.options['drillz'],
                                                    toolchange=self.options["toolchange"],
                                                    toolchange=self.options["toolchange"],
                                                    toolchangez=self.options["toolchangez"],
                                                    toolchangez=self.options["toolchangez"],
-                                                   toolchangexy=self.options["toolchangexy"],
                                                    startz=self.options["startz"],
                                                    startz=self.options["startz"],
                                                    endz=self.options["endz"],
                                                    endz=self.options["endz"],
                                                    excellon_optimization_type=self.options["optimization_type"])
                                                    excellon_optimization_type=self.options["optimization_type"])

+ 2 - 2
postprocessors/default.py

@@ -94,7 +94,7 @@ G00 X{toolchangex} Y{toolchangey}
 T{tool}
 T{tool}
 M5
 M5
 M6
 M6
-(MSG, Change to Tool Dia = {toolC}, Total drills for tool T{tool} = {t_drills})
+(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
 M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
 M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
              toolchangey=self.coordinate_format % (p.coords_decimals, toolchangey),
              toolchangey=self.coordinate_format % (p.coords_decimals, toolchangey),
              toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
              toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
@@ -106,7 +106,7 @@ M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchange
 T{tool}
 T{tool}
 M5
 M5
 M6
 M6
-(MSG, Change to Tool Dia = {toolC}, Total drills for tool T{tool} = {t_drills})
+(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
 M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
 M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
              tool=int(p.tool),
              tool=int(p.tool),
              t_drills=no_drills,
              t_drills=no_drills,

+ 2 - 2
postprocessors/grbl_11.py

@@ -93,7 +93,7 @@ G00 X{toolchangex} Y{toolchangey}
 T{tool}
 T{tool}
 M5
 M5
 M6
 M6
-(MSG, Change to Tool Dia = {toolC}, Total drills for tool T{tool} = {t_drills})
+(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
 M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
 M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
              toolchangey=self.coordinate_format % (p.coords_decimals, toolchangey),
              toolchangey=self.coordinate_format % (p.coords_decimals, toolchangey),
              toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
              toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
@@ -105,7 +105,7 @@ M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchange
 T{tool}
 T{tool}
 M5
 M5
 M6
 M6
-(MSG, Change to Tool Dia = {toolC}, Total drills for tool T{tool} = {t_drills})
+(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
 M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
 M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
              tool=int(p.tool),
              tool=int(p.tool),
              t_drills=no_drills,
              t_drills=no_drills,

+ 1 - 1
postprocessors/line_xyz.py

@@ -105,7 +105,7 @@ class line_xyz(FlatCAMPostProc):
 T{tool}
 T{tool}
 M5
 M5
 M6
 M6
-(MSG, Change to Tool Dia = {toolC}, Total drills for current tool = {t_drills})
+(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
 M0""".format(toolchangex=self.coordinate_format%(p.coords_decimals, toolchangex),
 M0""".format(toolchangex=self.coordinate_format%(p.coords_decimals, toolchangex),
              toolchangey=self.coordinate_format % (p.coords_decimals, toolchangey),
              toolchangey=self.coordinate_format % (p.coords_decimals, toolchangey),
              toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
              toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),

+ 2 - 2
postprocessors/manual_toolchange.py

@@ -94,7 +94,7 @@ class manual_toolchange(FlatCAMPostProc):
 T{tool}
 T{tool}
 M5   
 M5   
 G00 X{toolchangex} Y{toolchangey} 
 G00 X{toolchangex} Y{toolchangey} 
-(MSG, Change to Tool Dia = {toolC}, Total drills for current tool = {t_drills})
+(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
 M0
 M0
 G01 Z0
 G01 Z0
 M0
 M0
@@ -111,7 +111,7 @@ M0
                 gcode =  """G00 Z{toolchangez}
                 gcode =  """G00 Z{toolchangez}
 T{tool}
 T{tool}
 M5  
 M5  
-(MSG, Change to Tool Dia = {toolC}, Total drills for current tool = {t_drills})
+(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
 M0
 M0
 G01 Z0
 G01 Z0
 M0
 M0

+ 3 - 3
tclCommands/TclCommandDrillcncjob.py

@@ -86,7 +86,8 @@ class TclCommandDrillcncjob(TclCommandSignaled):
             drillz = args["drillz"] if "drillz" in args else obj.options["drillz"]
             drillz = args["drillz"] if "drillz" in args else obj.options["drillz"]
             job_obj.z_move = args["travelz"] if "travelz" in args else obj.options["travelz"]
             job_obj.z_move = args["travelz"] if "travelz" in args else obj.options["travelz"]
             job_obj.feedrate = args["feedrate"] if "feedrate" in args else obj.options["feedrate"]
             job_obj.feedrate = args["feedrate"] if "feedrate" in args else obj.options["feedrate"]
-            job_obj.feedrate_rapid = args["feedrate_rapid"] if "feedrate_rapid" in args else obj.options["feedrate_rapid"]
+            job_obj.feedrate_rapid = args["feedrate_rapid"] \
+                if "feedrate_rapid" in args else obj.options["feedrate_rapid"]
 
 
             job_obj.spindlespeed = args["spindlespeed"] if "spindlespeed" in args else None
             job_obj.spindlespeed = args["spindlespeed"] if "spindlespeed" in args else None
             job_obj.pp_excellon_name = args["ppname_e"] if "ppname_e" in args \
             job_obj.pp_excellon_name = args["ppname_e"] if "ppname_e" in args \
@@ -94,7 +95,7 @@ class TclCommandDrillcncjob(TclCommandSignaled):
 
 
             toolchange = True if "toolchange" in args and args["toolchange"] == 1 else False
             toolchange = True if "toolchange" in args and args["toolchange"] == 1 else False
             toolchangez = args["toolchangez"] if "toolchangez" in args else obj.options["toolchangez"]
             toolchangez = args["toolchangez"] if "toolchangez" in args else obj.options["toolchangez"]
-            toolchangexy = args["toolchangexy"] if "toolchangexy" in args else obj.options["toolchangexy"]
+            job_obj.toolchangexy = args["toolchangexy"] if "toolchangexy" in args else obj.options["toolchangexy"]
 
 
             endz = args["endz"] if "endz" in args else obj.options["endz"]
             endz = args["endz"] if "endz" in args else obj.options["endz"]
 
 
@@ -102,7 +103,6 @@ class TclCommandDrillcncjob(TclCommandSignaled):
             opt_type = args["opt_type"] if "opt_type" in args else 'B'
             opt_type = args["opt_type"] if "opt_type" in args else 'B'
 
 
             job_obj.generate_from_excellon_by_tool(obj, tools, drillz=drillz, toolchangez=toolchangez,
             job_obj.generate_from_excellon_by_tool(obj, tools, drillz=drillz, toolchangez=toolchangez,
-                                                   toolchangexy=toolchangexy,
                                                    endz=endz,
                                                    endz=endz,
                                                    toolchange=toolchange, excellon_optimization_type=opt_type)
                                                    toolchange=toolchange, excellon_optimization_type=opt_type)
             job_obj.gcode_parse()
             job_obj.gcode_parse()