Make it possible to set the probe calibration position
issue: MatterHackers/MCCentral#4079 [Probe Calibration] Allow custom calibration position
This commit is contained in:
parent
6503a4933b
commit
85452b7c95
6 changed files with 25 additions and 2 deletions
|
|
@ -49,6 +49,16 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
this.printer = printer;
|
||||
}
|
||||
|
||||
public static Vector2 ProbeOffsetSamplePosition(PrinterConfig printer)
|
||||
{
|
||||
if (printer.Settings.GetValue<LevelingSystem>(SettingsKey.print_leveling_solution) == LevelingSystem.ProbeCustom)
|
||||
{
|
||||
return printer.Settings.GetValue<Vector2>(SettingsKey.probe_offset_sample_point);
|
||||
}
|
||||
|
||||
return printer.Settings.GetValue<Vector2>(SettingsKey.print_center);
|
||||
}
|
||||
|
||||
public IEnumerable<Vector2> GetSampleRing(int numberOfSamples, double ratio, double phase)
|
||||
{
|
||||
double bedRadius = Math.Min(printer.Settings.GetValue<Vector2>(SettingsKey.bed_size).X, printer.Settings.GetValue<Vector2>(SettingsKey.bed_size).Y) / 2;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
targetHotendTemp);
|
||||
|
||||
double startProbeHeight = printer.Settings.GetValue<double>(SettingsKey.print_leveling_probe_start);
|
||||
Vector2 probePosition = printer.Settings.GetValue<Vector2>(SettingsKey.print_center);
|
||||
Vector2 probePosition = LevelingPlan.ProbeOffsetSamplePosition(printer);
|
||||
|
||||
int i = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
public const string print_leveling_required_to_print = nameof(print_leveling_required_to_print);
|
||||
public const string print_leveling_solution = nameof(print_leveling_solution);
|
||||
public const string leveling_sample_points = nameof(leveling_sample_points);
|
||||
public const string probe_offset_sample_point = nameof(probe_offset_sample_point);
|
||||
public const string printer_name = nameof(printer_name);
|
||||
public const string progress_reporting = nameof(progress_reporting);
|
||||
public const string publish_bed_image = nameof(publish_bed_image);
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
SettingsKey.print_leveling_required_to_print,
|
||||
SettingsKey.print_leveling_solution,
|
||||
SettingsKey.leveling_sample_points,
|
||||
SettingsKey.probe_offset_sample_point,
|
||||
SettingsKey.recover_first_layer_speed,
|
||||
SettingsKey.number_of_first_layers,
|
||||
SettingsKey.recover_is_enabled,
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ Printer
|
|||
Print Leveling
|
||||
print_leveling_solution
|
||||
leveling_sample_points
|
||||
probe_offset_sample_point
|
||||
print_leveling_required_to_print
|
||||
Leveling Probe
|
||||
print_leveling_probe_start
|
||||
|
|
|
|||
|
|
@ -730,12 +730,22 @@
|
|||
{
|
||||
"SlicerConfigName": "leveling_sample_points",
|
||||
"PresentationName": "Sample Points",
|
||||
"HelpText": "A comma separated list of sample points to probje the bed at. You must specify an x and y position for each point. For example: '20,20,100,180,180,20' will saple the bad at 3 points.",
|
||||
"HelpText": "A comma separated list of sample points to probe the bed at. You must specify an x and y position for each point. For example: '20,20,100,180,180,20' will saple the bad at 3 points.",
|
||||
"DataEditType": "MULTI_LINE_TEXT",
|
||||
"DefaultValue": "20,20,100,180,180,20",
|
||||
"ShowIfSet": "!sla_printer&!has_hardware_leveling&print_leveling_solution=Custom Points",
|
||||
"RebuildGCodeOnChange": false
|
||||
},
|
||||
{
|
||||
"SlicerConfigName": "probe_offset_sample_point",
|
||||
"PresentationName": "Probe Offset Sample Point",
|
||||
"HelpText": "The position to measure the probe offset.",
|
||||
"Units": "mm",
|
||||
"DataEditType": "VECTOR2",
|
||||
"DefaultValue": "100,100",
|
||||
"ShowIfSet": "!sla_printer&!has_hardware_leveling&print_leveling_solution=Custom Points&use_z_probe",
|
||||
"RebuildGCodeOnChange": false
|
||||
},
|
||||
{
|
||||
"SlicerConfigName": "print_leveling_required_to_print",
|
||||
"PresentationName": "Require Leveling To Print",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue