diff --git a/GCodeProcess/FlatCam/FlatCam.cs b/GCodeProcess/FlatCam/FlatCam.cs index c76eab3..152e7d9 100644 --- a/GCodeProcess/FlatCam/FlatCam.cs +++ b/GCodeProcess/FlatCam/FlatCam.cs @@ -75,7 +75,7 @@ public void Run() openTop = $"open_gerber {dir}/Gerber_TopLayer.GTL -outname top_layer"; processTop = $@" ncc top_layer -method Seed -tooldia {_settingsFlatCam.PcbDiameter} -overlap 25 -connect 1 -contour 1 -all -outname ncc_top -cncjob ncc_top -dia {_settingsFlatCam.PcbDiameter} -z_cut -0.1 -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate {_settingsFlatCam.XyFetchRate} -feedrate_z {_settingsFlatCam.ZFetchCopperClear} -pp default -outname top_nc +cncjob ncc_top -dia {_settingsFlatCam.PcbDiameter} -z_cut -0.1 -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate {_settingsFlatCam.XyFetchRateCopperClear} -feedrate_z {_settingsFlatCam.ZFetchCopperClear} -pp default -outname top_nc write_gcode top_nc {dir}/gb_top_layer.nc "; } @@ -83,7 +83,7 @@ write_gcode top_nc {dir}/gb_top_layer.nc var cleanPcb = _settingsFlatCam.CleanPcb ? $@" ncc mg_geo -method Seed -tooldia {_settingsFlatCam.PcbDiameter} -overlap 25 -connect 1 -contour 1 -all -outname geo_bottom_layer -cncjob geo_bottom_layer -dia {_settingsFlatCam.PcbDiameter} -z_cut -0.1 -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate {_settingsFlatCam.XyFetchRate} -feedrate_z {_settingsFlatCam.ZFetchCopperClear} -pp default -outname ncc_bottom_layer +cncjob geo_bottom_layer -dia {_settingsFlatCam.PcbDiameter} -z_cut -0.1 -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate {_settingsFlatCam.XyFetchRateCopperClear} -feedrate_z {_settingsFlatCam.ZFetchCopperClear} -pp default -outname ncc_bottom_layer write_gcode ncc_bottom_layer {dir}/gb_bottom_layer.nc " : ""; @@ -108,7 +108,7 @@ join_geometry mg_geo cutout bottom_layer #cutout geocutout cutout -dia {_settingsFlatCam.CutOutDiameter} -gapsize 0.3 -gaps lr -outname cutout_geo -cncjob cutout_geo -dia {_settingsFlatCam.CutOutDiameter} -dpp 0.3 -z_cut {_settingsFlatCam.DrillDepth} -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate {_settingsFlatCam.XyFetchRate} -feedrate_z {_settingsFlatCam.ZFetchRate} -pp default -outname cutout_nc +cncjob cutout_geo -dia {_settingsFlatCam.CutOutDiameter} -dpp 0.3 -z_cut {_settingsFlatCam.DrillDepth} -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate {_settingsFlatCam.XyFetchRateCopperClear} -feedrate_z {_settingsFlatCam.ZFetchRate} -pp default -outname cutout_nc write_gcode cutout_nc {dir}/gb_cutout_nc.nc #drill diff --git a/GCodeProcess/FlatCam/FlatCamSettings.cs b/GCodeProcess/FlatCam/FlatCamSettings.cs index 3cd3855..29b3129 100644 --- a/GCodeProcess/FlatCam/FlatCamSettings.cs +++ b/GCodeProcess/FlatCam/FlatCamSettings.cs @@ -11,8 +11,9 @@ public class FlatCamSettings public double DrillDepth { get; set; } public double ZClearance { get; set; } public double ZFetchRate { get; set; } - public double XyFetchRate { get; set; } + public double XyFetchRateCopperClear { get; set; } public int ZProbeFetchRate { get; set; } public int XyProbeFetchRate { get; set; } public int ZFetchCopperClear { get; set; } + public int XyFetchRateMillDrill { get; set; } } \ No newline at end of file diff --git a/GCodeProcess/Gerber/DrillFileParser.cs b/GCodeProcess/Gerber/DrillFileParser.cs index e7ed91c..16972e1 100644 --- a/GCodeProcess/Gerber/DrillFileParser.cs +++ b/GCodeProcess/Gerber/DrillFileParser.cs @@ -23,10 +23,11 @@ string GetDrillingByTool(List tl,string key) if (key == "08") { var toolsGt1=string.Join(",", tl.Where(o=>o.Size>1).Select(o => o.Size)); + var toolDrillDia = 0.8; if (!string.IsNullOrEmpty(toolsGt1)) { - milldrill = $@"milldrills drill -milled_dias {toolsDias} -tooldia 0.8 -outname geo_milldrill{key} -cncjob geo_milldrill{key} -dia {_settingsFlatCam.PcbDiameter} -z_cut -2 -dpp 0.1 -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate 50 -feedrate_z {_settingsFlatCam.ZFetchRate} -pp default -outname milldrill{key}_nc + milldrill = $@"milldrills drill -milled_dias {toolsDias} -tooldia {toolDrillDia} -outname geo_milldrill{key} +cncjob geo_milldrill{key} -dia {toolDrillDia} -z_cut {_settingsFlatCam.DrillDepth} -dpp 0.1 -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate {_settingsFlatCam.XyFetchRateMillDrill} -feedrate_z {_settingsFlatCam.ZFetchRate} -pp default -outname milldrill{key}_nc write_gcode milldrill{key}_nc {Dir}/gb_milldrill{key}.nc "; //] [-use_thread ] [-diatol ] @@ -62,7 +63,7 @@ string GetMillingByTool(List tl, string key) // { return $@" millslots drill -milled_dias ""{toolsDias}"" -tooldia {toolMill} -diatol 0 -outname milled_slots{key} -cncjob milled_slots{key} -dia {_settingsFlatCam.PcbDiameter} -z_cut -2 -dpp {dpp} -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate 50 -feedrate_z {_settingsFlatCam.ZFetchRate} -pp default -outname milled_slots{key}_nc +cncjob milled_slots{key} -dia {toolMill} -z_cut {_settingsFlatCam.DrillDepth} -dpp {dpp} -z_move {_settingsFlatCam.ZClearance} -spindlespeed {_settingsFlatCam.SpindleSpeed} -feedrate {_settingsFlatCam.XyFetchRateMillDrill} -feedrate_z {_settingsFlatCam.ZFetchRate} -pp default -outname milled_slots{key}_nc write_gcode milled_slots{key}_nc {Dir}/gb_milled_slots{key}.nc "; // }); diff --git a/GCodeProcess/appSettings.json b/GCodeProcess/appSettings.json index dbc80e3..cf39b0e 100644 --- a/GCodeProcess/appSettings.json +++ b/GCodeProcess/appSettings.json @@ -9,9 +9,10 @@ "DrillDepth": "-2", "ZClearance": "2", "CleanPCB": "true", - "ZFetchCopperClear": 50, - "XYFetchRate": "300", + "ZFetchCopperClear": "50", + "XYFetchRateCopperClear": "300", "ZFetchRate": "25", + "XYFetchRateMillDrill": "50", "ZProbeFetchRate": "50", "XYProbeFetchRate": "600" },