diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-01-07 08:02:13 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-01-07 08:02:13 +0300 |
commit | 703960a0603cbcca88c570877850569abd955eba (patch) | |
tree | 977432c034457e632fb077cedbc4532acff2b409 | |
parent | b36dce28a66472f5f1a4538b36de5f4d0f465447 (diff) |
v2.1.3v2.1.3
* (Add) PrusaSlicer printers:
* Peopoly Phenom XXL
* QIDI 3D ibox mono
* Wanhao CGR Mini Mono
* Wanhao CGR Mono
* (Add) PrusaSlicer light supports profiles
* (Add) Calibration - Elephant Foot: Mirror output
* (Add) Calibration - XYZ Accuracy: Mirror output
* (Add) Calibration - Tolerance: Mirror output
* (Add) Calibration - Grayscale: Mirror output
* (Add) Scripts on github
* (Change) Save 'Display Width' and 'Height' to calibration profiles and load them back only if file format aware from these properties
* (Fix) Tool - Morph: Set a rectangular 3x3 kernel by default
* (Fix) Tool - Blur: Set a rectangular 3x3 kernel by default
* (Fix) Calibration - Elephant Foot: Include part scale on profile text
* (Fix) MSI dont store instalation path (#121)
39 files changed, 1289 insertions, 86 deletions
diff --git a/.github/ISSUE_TEMPLATE/script.md b/.github/ISSUE_TEMPLATE/script.md new file mode 100644 index 0000000..3975cd6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/script.md @@ -0,0 +1,15 @@ +--- +name: Script +about: Share your PowerShell script or ask something script related +title: "[SCRIPT] " +labels: script +assignees: sn4k3 +--- + +## Describe what your script does +A clear and concise description of your script, and all it steps. + + +```Powershell +#Paste your code here or attach the .ps1 file +```
\ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bdc7492..b1899ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 07/01/2021 - v2.1.3 + +* (Add) PrusaSlicer printers: + * Peopoly Phenom XXL + * QIDI 3D ibox mono + * Wanhao CGR Mini Mono + * Wanhao CGR Mono +* (Add) PrusaSlicer light supports profiles +* (Add) Calibration - Elephant Foot: Mirror output +* (Add) Calibration - XYZ Accuracy: Mirror output +* (Add) Calibration - Tolerance: Mirror output +* (Add) Calibration - Grayscale: Mirror output +* (Add) Scripts on github +* (Change) Save 'Display Width' and 'Height' to calibration profiles and load them back only if file format aware from these properties +* (Fix) Tool - Morph: Set a rectangular 3x3 kernel by default +* (Fix) Tool - Blur: Set a rectangular 3x3 kernel by default +* (Fix) Calibration - Elephant Foot: Include part scale on profile text +* (Fix) MSI dont store instalation path (#121) + ## 03/01/2021 - v2.1.2 * (Add) Pixel editor - Text: Preview of text operation (#120) diff --git a/ImportPrusaSlicerData.bat b/ImportPrusaSlicerData.bat index 7b97991..98764e2 100644 --- a/ImportPrusaSlicerData.bat +++ b/ImportPrusaSlicerData.bat @@ -31,32 +31,36 @@ SET files[21]=Elegoo Saturn.ini SET files[22]=Peopoly Phenom.ini SET files[23]=Peopoly Phenom L.ini SET files[24]=Peopoly Phenom Noir.ini -SET files[25]=QIDI Shadow5.5.ini -SET files[26]=QIDI Shadow6.0 Pro.ini -SET files[27]=QIDI S-Box.ini -SET files[28]=Phrozen Shuffle.ini -SET files[29]=Phrozen Shuffle Lite.ini -SET files[30]=Phrozen Shuffle XL.ini -SET files[31]=Phrozen Shuffle XL Lite.ini -SET files[32]=Phrozen Shuffle 16.ini -SET files[33]=Phrozen Shuffle 4K.ini -SET files[34]=Phrozen Sonic.ini -SET files[35]=Phrozen Sonic 4K.ini -SET files[36]=Phrozen Sonic Mighty 4K.ini -SET files[37]=Phrozen Sonic Mini.ini -SET files[38]=Phrozen Sonic Mini 4K.ini -SET files[39]=Phrozen Transform.ini -SET files[40]=Kelant S400.ini -SET files[41]=Wanhao D7.ini -SET files[42]=Wanhao D8.ini -SET files[43]=Creality LD-002R.ini -SET files[44]=Creality LD-002H.ini -SET files[45]=Creality LD-006.ini -SET files[46]=Voxelab Polaris.ini -SET files[47]=Voxelab Proxima.ini -SET files[48]=Longer Orange 10.ini -SET files[49]=Longer Orange 30.ini -SET files[50]=Longer Orange4K.ini +SET files[25]=Peopoly Phenom XXL.ini +SET files[26]=QIDI Shadow5.5.ini +SET files[27]=QIDI Shadow6.0 Pro.ini +SET files[28]=QIDI S-Box.ini +SET files[29]=QIDI I-Box Mono.ini +SET files[30]=Phrozen Shuffle.ini +SET files[31]=Phrozen Shuffle Lite.ini +SET files[32]=Phrozen Shuffle XL.ini +SET files[33]=Phrozen Shuffle XL Lite.ini +SET files[34]=Phrozen Shuffle 16.ini +SET files[35]=Phrozen Shuffle 4K.ini +SET files[36]=Phrozen Sonic.ini +SET files[37]=Phrozen Sonic 4K.ini +SET files[38]=Phrozen Sonic Mighty 4K.ini +SET files[39]=Phrozen Sonic Mini.ini +SET files[40]=Phrozen Sonic Mini 4K.ini +SET files[41]=Phrozen Transform.ini +SET files[42]=Kelant S400.ini +SET files[43]=Wanhao D7.ini +SET files[44]=Wanhao D8.ini +SET files[45]=Wanhao CGR Mini Mono.ini +SET files[46]=Wanhao CGR Mono.ini +SET files[47]=Creality LD-002R.ini +SET files[48]=Creality LD-002H.ini +SET files[49]=Creality LD-006.ini +SET files[50]=Voxelab Polaris.ini +SET files[51]=Voxelab Proxima.ini +SET files[52]=Longer Orange 10.ini +SET files[53]=Longer Orange 30.ini +SET files[54]=Longer Orange4K.ini echo PrusaSlicer Printers Instalation echo This will replace printers, all changes will be discarded diff --git a/PrusaSlicer/printer/Peopoly Phenom XXL.ini b/PrusaSlicer/printer/Peopoly Phenom XXL.ini new file mode 100644 index 0000000..2b25a87 --- /dev/null +++ b/PrusaSlicer/printer/Peopoly Phenom XXL.ini @@ -0,0 +1,37 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-05 at 20:51:10 UTC +absolute_correction = 0 +area_fill = 50 +bed_custom_model = +bed_custom_texture = +bed_shape = 0x0,527.04x0,527.04x296.46,0x296.46 +default_sla_material_profile = Prusa Orange Tough 0.05 +default_sla_print_profile = 0.05 Normal +display_height = 296.46 +display_mirror_x = 1 +display_mirror_y = 0 +display_orientation = landscape +display_pixels_x = 3840 +display_pixels_y = 2160 +display_width = 527.04 +elefant_foot_compensation = 0.2 +elefant_foot_min_width = 0.2 +fast_tilt_time = 5 +gamma_correction = 1 +inherits = Original Prusa SL1 +max_exposure_time = 120 +max_initial_exposure_time = 300 +max_print_height = 550 +min_exposure_time = 1 +min_initial_exposure_time = 1 +print_host = +printer_model = SL1 +printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_SL1\nPRINTER_VENDOR_PEOPOLY\nPRINTER_MODEL_PHENOM_XXL\n\nSTART_CUSTOM_VALUES\nLayerOffTime_2\nBottomLightOffDelay_8\nBottomLiftHeight_15\nLiftHeight_14\nBottomLiftSpeed_32\nLiftSpeed_35\nRetractSpeed_100\nBottomLightPWM_255\nLightPWM_255\nAntiAliasing_4 ; Use 0 or 1 for disable AntiAliasing with "printer gamma correction" set to 0, otherwise use multiples of 2 and "gamma correction" set to 1 for enable\nEND_CUSTOM_VALUES +printer_settings_id = +printer_technology = SLA +printer_variant = default +printer_vendor = +printhost_apikey = +printhost_cafile = +relative_correction = 1,1 +slow_tilt_time = 8 +thumbnails = 400x400,800x480 diff --git a/PrusaSlicer/printer/QIDI I-Box Mono.ini b/PrusaSlicer/printer/QIDI I-Box Mono.ini new file mode 100644 index 0000000..e870f9d --- /dev/null +++ b/PrusaSlicer/printer/QIDI I-Box Mono.ini @@ -0,0 +1,37 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-05 at 20:54:54 UTC +absolute_correction = 0 +area_fill = 50 +bed_custom_model = +bed_custom_texture = +bed_shape = 0x0,192x0,192x120,0x120 +default_sla_material_profile = Prusa Orange Tough 0.05 +default_sla_print_profile = 0.05 Normal +display_height = 120 +display_mirror_x = 1 +display_mirror_y = 0 +display_orientation = landscape +display_pixels_x = 3840 +display_pixels_y = 2400 +display_width = 192 +elefant_foot_compensation = 0.2 +elefant_foot_min_width = 0.2 +fast_tilt_time = 5 +gamma_correction = 1 +inherits = Original Prusa SL1 +max_exposure_time = 120 +max_initial_exposure_time = 300 +max_print_height = 200 +min_exposure_time = 1 +min_initial_exposure_time = 1 +print_host = +printer_model = SL1 +printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_SL1\nPRINTER_VENDOR_QIDI\nPRINTER_MODEL_I-BOX_MONO\n\nSTART_CUSTOM_VALUES\nLayerOffTime_0\nBottomLightOffDelay_0\nBottomLiftHeight_6\nLiftHeight_6\nBottomLiftSpeed_65\nLiftSpeed_65\nRetractSpeed_100\nBottomLightPWM_255\nLightPWM_255\nAntiAliasing_4 ; Use 0 or 1 for disable AntiAliasing with "printer gamma correction" set to 0, otherwise use multiples of 2 and "gamma correction" set to 1 for enable\nEND_CUSTOM_VALUES +printer_settings_id = +printer_technology = SLA +printer_variant = default +printer_vendor = +printhost_apikey = +printhost_cafile = +relative_correction = 1,1 +slow_tilt_time = 8 +thumbnails = 400x400,800x480 diff --git a/PrusaSlicer/printer/Wanhao CGR Mini Mono.ini b/PrusaSlicer/printer/Wanhao CGR Mini Mono.ini new file mode 100644 index 0000000..12a718a --- /dev/null +++ b/PrusaSlicer/printer/Wanhao CGR Mini Mono.ini @@ -0,0 +1,37 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-05 at 21:18:50 UTC +absolute_correction = 0 +area_fill = 50 +bed_custom_model = +bed_custom_texture = +bed_shape = 0x0,82.62x0,82.62x130.56,0x130.56 +default_sla_material_profile = Prusa Orange Tough 0.05 +default_sla_print_profile = 0.05 Normal +display_height = 130.56 +display_mirror_x = 1 +display_mirror_y = 0 +display_orientation = landscape +display_pixels_x = 1620 +display_pixels_y = 2560 +display_width = 82.62 +elefant_foot_compensation = 0.2 +elefant_foot_min_width = 0.2 +fast_tilt_time = 5 +gamma_correction = 1 +inherits = Original Prusa SL1 +max_exposure_time = 120 +max_initial_exposure_time = 300 +max_print_height = 200 +min_exposure_time = 1 +min_initial_exposure_time = 1 +print_host = +printer_model = SL1 +printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_SL1\nPRINTER_VENDOR_WANHAO\nPRINTER_MODEL_CGR_MINI_MONO\n\nSTART_CUSTOM_VALUES\nLayerOffTime_0\nBottomLightOffDelay_0\nBottomLiftHeight_5\nLiftHeight_5\nBottomLiftSpeed_65\nLiftSpeed_50\nRetractSpeed_100\nBottomLightPWM_255\nLightPWM_255\nAntiAliasing_4 ; Use 0 or 1 for disable AntiAliasing with "printer gamma correction" set to 0, otherwise use multiples of 2 and "gamma correction" set to 1 for enable\nEND_CUSTOM_VALUES +printer_settings_id = +printer_technology = SLA +printer_variant = default +printer_vendor = +printhost_apikey = +printhost_cafile = +relative_correction = 1,1 +slow_tilt_time = 8 +thumbnails = 400x400,800x480 diff --git a/PrusaSlicer/printer/Wanhao CGR Mono.ini b/PrusaSlicer/printer/Wanhao CGR Mono.ini new file mode 100644 index 0000000..9770f50 --- /dev/null +++ b/PrusaSlicer/printer/Wanhao CGR Mono.ini @@ -0,0 +1,37 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-05 at 21:23:35 UTC +absolute_correction = 0 +area_fill = 50 +bed_custom_model = +bed_custom_texture = +bed_shape = 0x0,192x0,192x120,0x120 +default_sla_material_profile = Prusa Orange Tough 0.05 +default_sla_print_profile = 0.05 Normal +display_height = 120 +display_mirror_x = 1 +display_mirror_y = 0 +display_orientation = landscape +display_pixels_x = 1620 +display_pixels_y = 2560 +display_width = 192 +elefant_foot_compensation = 0.2 +elefant_foot_min_width = 0.2 +fast_tilt_time = 5 +gamma_correction = 1 +inherits = Original Prusa SL1 +max_exposure_time = 120 +max_initial_exposure_time = 300 +max_print_height = 200 +min_exposure_time = 1 +min_initial_exposure_time = 1 +print_host = +printer_model = SL1 +printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_SL1\nPRINTER_VENDOR_WANHAO\nPRINTER_MODEL_CGR_MONO\n\nSTART_CUSTOM_VALUES\nLayerOffTime_0\nBottomLightOffDelay_0\nBottomLiftHeight_6\nLiftHeight_6\nBottomLiftSpeed_60\nLiftSpeed_50\nRetractSpeed_60\nBottomLightPWM_255\nLightPWM_255\nAntiAliasing_4 ; Use 0 or 1 for disable AntiAliasing with "printer gamma correction" set to 0, otherwise use multiples of 2 and "gamma correction" set to 1 for enable\nEND_CUSTOM_VALUES +printer_settings_id = +printer_technology = SLA +printer_variant = default +printer_vendor = +printhost_apikey = +printhost_cafile = +relative_correction = 1,1 +slow_tilt_time = 8 +thumbnails = 400x400,800x480 diff --git a/PrusaSlicer/sla_print/Universal 0.01 - Light Supports.ini b/PrusaSlicer/sla_print/Universal 0.01 - Light Supports.ini new file mode 100644 index 0000000..3d03b66 --- /dev/null +++ b/PrusaSlicer/sla_print/Universal 0.01 - Light Supports.ini @@ -0,0 +1,44 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-07 at 02:08:08 UTC +compatible_printers = +compatible_printers_condition = +default_sla_print_profile = +faded_layers = 10 +hollowing_closing_distance = 2 +hollowing_enable = 0 +hollowing_min_thickness = 3 +hollowing_quality = 0.5 +inherits = 0.025 UltraDetail +layer_height = 0.01 +output_filename_format = {input_filename_base}_{material_type}{layer_height}mm_{printer_model}_{print_time}.sl1 +pad_around_object = 0 +pad_around_object_everywhere = 0 +pad_brim_size = 1.6 +pad_enable = 1 +pad_max_merge_distance = 50 +pad_object_connector_penetration = 0.3 +pad_object_connector_stride = 10 +pad_object_connector_width = 0.5 +pad_object_gap = 1 +pad_wall_height = 0 +pad_wall_slope = 90 +pad_wall_thickness = 0.4 +sla_print_settings_id = +slice_closing_radius = 0.005 +support_base_diameter = 3 +support_base_height = 1 +support_base_safety_distance = 1 +support_buildplate_only = 0 +support_critical_angle = 45 +support_head_front_diameter = 0.5 +support_head_penetration = 0.3 +support_head_width = 2 +support_max_bridge_length = 10 +support_max_bridges_on_pillar = 3 +support_max_pillar_link_distance = 10 +support_object_elevation = 5 +support_pillar_connection_mode = zigzag +support_pillar_diameter = 1 +support_pillar_widening_factor = 0 +support_points_density_relative = 100 +support_points_minimal_distance = 1 +supports_enable = 1 diff --git a/PrusaSlicer/sla_print/Universal 0.02 - Light Supports.ini b/PrusaSlicer/sla_print/Universal 0.02 - Light Supports.ini new file mode 100644 index 0000000..96da187 --- /dev/null +++ b/PrusaSlicer/sla_print/Universal 0.02 - Light Supports.ini @@ -0,0 +1,44 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-07 at 02:09:11 UTC +compatible_printers = +compatible_printers_condition = +default_sla_print_profile = +faded_layers = 6 +hollowing_closing_distance = 2 +hollowing_enable = 0 +hollowing_min_thickness = 3 +hollowing_quality = 0.5 +inherits = 0.025 UltraDetail +layer_height = 0.02 +output_filename_format = {input_filename_base}_{material_type}{layer_height}mm_{printer_model}_{print_time}.sl1 +pad_around_object = 0 +pad_around_object_everywhere = 0 +pad_brim_size = 1.6 +pad_enable = 1 +pad_max_merge_distance = 50 +pad_object_connector_penetration = 0.3 +pad_object_connector_stride = 10 +pad_object_connector_width = 0.5 +pad_object_gap = 1 +pad_wall_height = 0 +pad_wall_slope = 90 +pad_wall_thickness = 0.4 +sla_print_settings_id = +slice_closing_radius = 0.005 +support_base_diameter = 3 +support_base_height = 1 +support_base_safety_distance = 1 +support_buildplate_only = 0 +support_critical_angle = 45 +support_head_front_diameter = 0.5 +support_head_penetration = 0.3 +support_head_width = 2 +support_max_bridge_length = 10 +support_max_bridges_on_pillar = 3 +support_max_pillar_link_distance = 10 +support_object_elevation = 5 +support_pillar_connection_mode = zigzag +support_pillar_diameter = 1 +support_pillar_widening_factor = 0 +support_points_density_relative = 100 +support_points_minimal_distance = 1 +supports_enable = 1 diff --git a/PrusaSlicer/sla_print/Universal 0.03 - Light Supports.ini b/PrusaSlicer/sla_print/Universal 0.03 - Light Supports.ini new file mode 100644 index 0000000..02c00f7 --- /dev/null +++ b/PrusaSlicer/sla_print/Universal 0.03 - Light Supports.ini @@ -0,0 +1,44 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-07 at 02:09:40 UTC +compatible_printers = +compatible_printers_condition = +default_sla_print_profile = +faded_layers = 4 +hollowing_closing_distance = 2 +hollowing_enable = 0 +hollowing_min_thickness = 3 +hollowing_quality = 0.5 +inherits = 0.035 Detail +layer_height = 0.03 +output_filename_format = {input_filename_base}_{material_type}{layer_height}mm_{printer_model}_{print_time}.sl1 +pad_around_object = 0 +pad_around_object_everywhere = 0 +pad_brim_size = 1.6 +pad_enable = 1 +pad_max_merge_distance = 50 +pad_object_connector_penetration = 0.3 +pad_object_connector_stride = 10 +pad_object_connector_width = 0.5 +pad_object_gap = 1 +pad_wall_height = 0 +pad_wall_slope = 90 +pad_wall_thickness = 0.4 +sla_print_settings_id = +slice_closing_radius = 0.005 +support_base_diameter = 3 +support_base_height = 1 +support_base_safety_distance = 1 +support_buildplate_only = 0 +support_critical_angle = 45 +support_head_front_diameter = 0.5 +support_head_penetration = 0.3 +support_head_width = 3 +support_max_bridge_length = 10 +support_max_bridges_on_pillar = 3 +support_max_pillar_link_distance = 10 +support_object_elevation = 5 +support_pillar_connection_mode = zigzag +support_pillar_diameter = 1 +support_pillar_widening_factor = 0 +support_points_density_relative = 100 +support_points_minimal_distance = 1 +supports_enable = 1 diff --git a/PrusaSlicer/sla_print/Universal 0.04 - Light Supports.ini b/PrusaSlicer/sla_print/Universal 0.04 - Light Supports.ini new file mode 100644 index 0000000..fdb07f3 --- /dev/null +++ b/PrusaSlicer/sla_print/Universal 0.04 - Light Supports.ini @@ -0,0 +1,44 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-07 at 02:10:03 UTC +compatible_printers = +compatible_printers_condition = +default_sla_print_profile = +faded_layers = 4 +hollowing_closing_distance = 2 +hollowing_enable = 0 +hollowing_min_thickness = 3 +hollowing_quality = 0.5 +inherits = 0.05 Normal +layer_height = 0.04 +output_filename_format = {input_filename_base}_{material_type}{layer_height}mm_{printer_model}_{print_time}.sl1 +pad_around_object = 0 +pad_around_object_everywhere = 0 +pad_brim_size = 1.6 +pad_enable = 1 +pad_max_merge_distance = 50 +pad_object_connector_penetration = 0.3 +pad_object_connector_stride = 10 +pad_object_connector_width = 0.5 +pad_object_gap = 1 +pad_wall_height = 0 +pad_wall_slope = 90 +pad_wall_thickness = 0.4 +sla_print_settings_id = +slice_closing_radius = 0.005 +support_base_diameter = 3 +support_base_height = 1 +support_base_safety_distance = 1 +support_buildplate_only = 0 +support_critical_angle = 45 +support_head_front_diameter = 0.5 +support_head_penetration = 0.3 +support_head_width = 3 +support_max_bridge_length = 10 +support_max_bridges_on_pillar = 3 +support_max_pillar_link_distance = 10 +support_object_elevation = 5 +support_pillar_connection_mode = zigzag +support_pillar_diameter = 1 +support_pillar_widening_factor = 0 +support_points_density_relative = 100 +support_points_minimal_distance = 1 +supports_enable = 1 diff --git a/PrusaSlicer/sla_print/Universal 0.05 - Light Supports.ini b/PrusaSlicer/sla_print/Universal 0.05 - Light Supports.ini new file mode 100644 index 0000000..698b7a2 --- /dev/null +++ b/PrusaSlicer/sla_print/Universal 0.05 - Light Supports.ini @@ -0,0 +1,44 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-07 at 02:10:30 UTC +compatible_printers = +compatible_printers_condition = +default_sla_print_profile = +faded_layers = 3 +hollowing_closing_distance = 2 +hollowing_enable = 0 +hollowing_min_thickness = 3 +hollowing_quality = 0.5 +inherits = 0.05 Normal +layer_height = 0.05 +output_filename_format = {input_filename_base}_{material_type}{layer_height}mm_{printer_model}_{print_time}.sl1 +pad_around_object = 0 +pad_around_object_everywhere = 0 +pad_brim_size = 1.6 +pad_enable = 1 +pad_max_merge_distance = 50 +pad_object_connector_penetration = 0.3 +pad_object_connector_stride = 10 +pad_object_connector_width = 0.5 +pad_object_gap = 1 +pad_wall_height = 0 +pad_wall_slope = 90 +pad_wall_thickness = 0.4 +sla_print_settings_id = +slice_closing_radius = 0.005 +support_base_diameter = 3 +support_base_height = 1 +support_base_safety_distance = 1 +support_buildplate_only = 0 +support_critical_angle = 45 +support_head_front_diameter = 0.5 +support_head_penetration = 0.3 +support_head_width = 3 +support_max_bridge_length = 10 +support_max_bridges_on_pillar = 3 +support_max_pillar_link_distance = 10 +support_object_elevation = 5 +support_pillar_connection_mode = zigzag +support_pillar_diameter = 1 +support_pillar_widening_factor = 0 +support_points_density_relative = 100 +support_points_minimal_distance = 1 +supports_enable = 1 diff --git a/PrusaSlicer/sla_print/Universal 0.10 - Light Supports.ini b/PrusaSlicer/sla_print/Universal 0.10 - Light Supports.ini new file mode 100644 index 0000000..b3fab88 --- /dev/null +++ b/PrusaSlicer/sla_print/Universal 0.10 - Light Supports.ini @@ -0,0 +1,44 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-07 at 02:11:26 UTC +compatible_printers = +compatible_printers_condition = +default_sla_print_profile = +faded_layers = 3 +hollowing_closing_distance = 2 +hollowing_enable = 0 +hollowing_min_thickness = 3 +hollowing_quality = 0.5 +inherits = 0.1 Fast +layer_height = 0.1 +output_filename_format = {input_filename_base}_{material_type}{layer_height}mm_{printer_model}_{print_time}.sl1 +pad_around_object = 0 +pad_around_object_everywhere = 0 +pad_brim_size = 1.6 +pad_enable = 1 +pad_max_merge_distance = 50 +pad_object_connector_penetration = 0.3 +pad_object_connector_stride = 10 +pad_object_connector_width = 0.5 +pad_object_gap = 1 +pad_wall_height = 0 +pad_wall_slope = 90 +pad_wall_thickness = 0.4 +sla_print_settings_id = +slice_closing_radius = 0.005 +support_base_diameter = 3 +support_base_height = 1 +support_base_safety_distance = 1 +support_buildplate_only = 0 +support_critical_angle = 45 +support_head_front_diameter = 0.6 +support_head_penetration = 0.4 +support_head_width = 3 +support_max_bridge_length = 10 +support_max_bridges_on_pillar = 3 +support_max_pillar_link_distance = 10 +support_object_elevation = 5 +support_pillar_connection_mode = zigzag +support_pillar_diameter = 1.3 +support_pillar_widening_factor = 0 +support_points_density_relative = 100 +support_points_minimal_distance = 1 +supports_enable = 1 diff --git a/PrusaSlicer/sla_print/Universal 0.15 - Light Supports.ini b/PrusaSlicer/sla_print/Universal 0.15 - Light Supports.ini new file mode 100644 index 0000000..e1dbed6 --- /dev/null +++ b/PrusaSlicer/sla_print/Universal 0.15 - Light Supports.ini @@ -0,0 +1,44 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-07 at 02:12:14 UTC +compatible_printers = +compatible_printers_condition = +default_sla_print_profile = +faded_layers = 3 +hollowing_closing_distance = 2 +hollowing_enable = 0 +hollowing_min_thickness = 3 +hollowing_quality = 0.5 +inherits = 0.1 Fast +layer_height = 0.15 +output_filename_format = {input_filename_base}_{material_type}{layer_height}mm_{printer_model}_{print_time}.sl1 +pad_around_object = 0 +pad_around_object_everywhere = 0 +pad_brim_size = 1.6 +pad_enable = 1 +pad_max_merge_distance = 50 +pad_object_connector_penetration = 0.3 +pad_object_connector_stride = 10 +pad_object_connector_width = 0.5 +pad_object_gap = 1 +pad_wall_height = 0 +pad_wall_slope = 90 +pad_wall_thickness = 0.4 +sla_print_settings_id = +slice_closing_radius = 0.005 +support_base_diameter = 3 +support_base_height = 1 +support_base_safety_distance = 1 +support_buildplate_only = 0 +support_critical_angle = 45 +support_head_front_diameter = 0.7 +support_head_penetration = 0.4 +support_head_width = 3 +support_max_bridge_length = 10 +support_max_bridges_on_pillar = 3 +support_max_pillar_link_distance = 10 +support_object_elevation = 5 +support_pillar_connection_mode = zigzag +support_pillar_diameter = 1.3 +support_pillar_widening_factor = 0 +support_points_density_relative = 100 +support_points_minimal_distance = 1 +supports_enable = 1 diff --git a/PrusaSlicer/sla_print/Universal 0.20 - Light Supports.ini b/PrusaSlicer/sla_print/Universal 0.20 - Light Supports.ini new file mode 100644 index 0000000..cab31df --- /dev/null +++ b/PrusaSlicer/sla_print/Universal 0.20 - Light Supports.ini @@ -0,0 +1,44 @@ +# generated by PrusaSlicer 2.2.0+win64 on 2021-01-07 at 02:12:28 UTC +compatible_printers = +compatible_printers_condition = +default_sla_print_profile = +faded_layers = 3 +hollowing_closing_distance = 2 +hollowing_enable = 0 +hollowing_min_thickness = 3 +hollowing_quality = 0.5 +inherits = 0.1 Fast +layer_height = 0.2 +output_filename_format = {input_filename_base}_{material_type}{layer_height}mm_{printer_model}_{print_time}.sl1 +pad_around_object = 0 +pad_around_object_everywhere = 0 +pad_brim_size = 1.6 +pad_enable = 1 +pad_max_merge_distance = 50 +pad_object_connector_penetration = 0.3 +pad_object_connector_stride = 10 +pad_object_connector_width = 0.5 +pad_object_gap = 1 +pad_wall_height = 0 +pad_wall_slope = 90 +pad_wall_thickness = 0.4 +sla_print_settings_id = +slice_closing_radius = 0.005 +support_base_diameter = 3 +support_base_height = 1 +support_base_safety_distance = 1 +support_buildplate_only = 0 +support_critical_angle = 45 +support_head_front_diameter = 0.7 +support_head_penetration = 0.4 +support_head_width = 3 +support_max_bridge_length = 10 +support_max_bridges_on_pillar = 3 +support_max_pillar_link_distance = 10 +support_object_elevation = 5 +support_pillar_connection_mode = zigzag +support_pillar_diameter = 1.3 +support_pillar_widening_factor = 0 +support_points_density_relative = 100 +support_points_minimal_distance = 1 +supports_enable = 1 @@ -94,10 +94,12 @@ But also, i need victims for test subject. Proceed at your own risk! * Elegoo Saturn * Peopoly Phenom * Peopoly Phenom L +* Peopoly Phenom XXL * Peopoly Phenom Noir * QIDI Shadow5.5 * QIDI Shadow6.0 Pro * QIDI S-Box +* QIDI 3D ibox mono * Phrozen Shuffle * Phrozen Shuffle Lite * Phrozen Shuffle XL @@ -113,6 +115,8 @@ But also, i need victims for test subject. Proceed at your own risk! * Kelant S400 * Wanhao D7 * Wanhao D8 +* Wanhao CGR Mini Mono +* Wanhao CGR Mono * Creality LD-002R * Creality LD-002H * Creality LD-006 @@ -124,14 +128,8 @@ But also, i need victims for test subject. Proceed at your own risk! ## Available profiles for PrusaSlicer -* Universal 0.1 Fast - Heavy Supports -* Universal 0.1 Fast - Medium Supports -* Universal 0.05 Normal - Heavy Supports -* Universal 0.05 Normal - Medium Supports -* Universal 0.035 Detail - Heavy Supports -* Universal 0.035 Detail - Medium Supports -* Universal 0.025 UltraDetail - Heavy Supports -* Universal 0.025 UltraDetail - Medium Supports +* From 0.01mm to 0.20mm +* Light, Medium and Heavy Supports ## Install and configure profiles under PrusaSlicer diff --git a/UVtools.Core/Extensions/EmguExtensions.cs b/UVtools.Core/Extensions/EmguExtensions.cs index 1e46e99..64b2dc5 100644 --- a/UVtools.Core/Extensions/EmguExtensions.cs +++ b/UVtools.Core/Extensions/EmguExtensions.cs @@ -37,12 +37,17 @@ namespace UVtools.Core.Extensions /// <returns>A <see cref="Span{T}"/> containing all pixels in data memory</returns> public static unsafe Span<T> GetPixelSpan<T>(this Mat mat) { - return new Span<T>(mat.DataPointer.ToPointer(), mat.GetLength()); + return new(mat.DataPointer.ToPointer(), mat.GetLength()); + } + + public static unsafe Span<byte> GetPixelSpanByte(this Mat mat) + { + return new(mat.DataPointer.ToPointer(), mat.GetLength()); } public static unsafe Span<T> GetPixelSpan<T>(this Mat mat, int length, int offset = 0) { - return new Span<T>(IntPtr.Add(mat.DataPointer, offset).ToPointer(), length); + return new(IntPtr.Add(mat.DataPointer, offset).ToPointer(), length); } public static Span<T> GetSinglePixelSpan<T>(this Mat mat, int x, int y) diff --git a/UVtools.Core/Objects/Kernel.cs b/UVtools.Core/Objects/Kernel.cs index b73a0a5..67f528c 100644 --- a/UVtools.Core/Objects/Kernel.cs +++ b/UVtools.Core/Objects/Kernel.cs @@ -9,17 +9,24 @@ using System; using System.Drawing; using Emgu.CV; +using Emgu.CV.CvEnum; namespace UVtools.Core.Objects { [Serializable] public sealed class Kernel { - public Matrix<byte> Matrix { get; set; } - public Point Anchor { get; set; } + public Matrix<byte> Matrix { get; set; } + public Point Anchor { get; set; } = new(-1, -1); public Kernel() { + Matrix = new(3,3); + for(int y = 0; y < Matrix.Height; y++) + for(int x = 0; x < Matrix.Width; x++) + { + Matrix[x, y] = 1; + } } public Kernel(Matrix<byte> matrix, Point anchor) @@ -27,5 +34,15 @@ namespace UVtools.Core.Objects Matrix = matrix; Anchor = anchor; } + + public void SetKernel(ElementShape shape, Size size, Point anchor) + { + using var mat = CvInvoke.GetStructuringElement(shape, size, anchor); + Matrix = new Matrix<byte>(mat.Rows, mat.Cols); + mat.CopyTo(Matrix.Mat); + } + + public void SetKernel(ElementShape shape, Size size) => SetKernel(shape, size, new Point(-1, -1)); + public void SetKernel(ElementShape shape) => SetKernel(shape, new Size(3, 3), new Point(-1, -1)); } } diff --git a/UVtools.Core/Operations/OperationCalibrateElephantFoot.cs b/UVtools.Core/Operations/OperationCalibrateElephantFoot.cs index 399be60..b4e93e9 100644 --- a/UVtools.Core/Operations/OperationCalibrateElephantFoot.cs +++ b/UVtools.Core/Operations/OperationCalibrateElephantFoot.cs @@ -10,6 +10,7 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Text; +using System.Threading.Tasks; using System.Xml.Serialization; using Emgu.CV; using Emgu.CV.CvEnum; @@ -34,6 +35,8 @@ namespace UVtools.Core.Operations private decimal _normalExposure = 12; private decimal _partScale = 1; private byte _margin = 30; + private bool _enableAntiAliasing = true; + private bool _mirrorOutput; private bool _isErodeEnabled = true; private byte _erodeStartIteration = 2; private byte _erodeEndIteration = 6; @@ -44,7 +47,6 @@ namespace UVtools.Core.Operations private byte _dimmingEndBrightness = 200; private byte _dimmingBrightnessSteps = 20; private bool _outputOriginalPart = true; - private bool _enableAntiAliasing = true; #endregion @@ -98,10 +100,10 @@ namespace UVtools.Core.Operations var result = $"[Layer Height: {_layerHeight}] " + $"[Layers: {_bottomLayers}/{_normalLayers}] " + $"[Exposure: {_bottomExposure}/{_normalExposure}] " + - $"[Margin: {_margin}] [ORI: {_outputOriginalPart}]" + + $"[Scale: {_partScale}] [Margin: {_margin}] [ORI: {_outputOriginalPart}]" + $"[E: {_erodeStartIteration}-{_erodeEndIteration} S{_erodeIterationSteps}] " + $"[D: W{_dimmingWallThickness} B{_dimmingStartBrightness}-{_dimmingEndBrightness} S{_dimmingBrightnessSteps}] " + - $"[AA: {_enableAntiAliasing}]"; + $"[AA: {_enableAntiAliasing}] [Mirror: {_mirrorOutput}]"; if (!string.IsNullOrEmpty(ProfileName)) result = $"{ProfileName}: {result}"; return result; } @@ -224,6 +226,12 @@ namespace UVtools.Core.Operations set => RaiseAndSetIfChanged(ref _enableAntiAliasing, value); } + public bool MirrorOutput + { + get => _mirrorOutput; + set => RaiseAndSetIfChanged(ref _mirrorOutput, value); + } + public bool IsErodeEnabled { get => _isErodeEnabled; @@ -343,7 +351,7 @@ namespace UVtools.Core.Operations private bool Equals(OperationCalibrateElephantFoot other) { - return _layerHeight == other._layerHeight && _syncLayers == other._syncLayers && _bottomLayers == other._bottomLayers && _normalLayers == other._normalLayers && _bottomExposure == other._bottomExposure && _normalExposure == other._normalExposure && _margin == other._margin && _isErodeEnabled == other._isErodeEnabled && _erodeStartIteration == other._erodeStartIteration && _erodeEndIteration == other._erodeEndIteration && _erodeIterationSteps == other._erodeIterationSteps && _isDimmingEnabled == other._isDimmingEnabled && _dimmingWallThickness == other._dimmingWallThickness && _dimmingStartBrightness == other._dimmingStartBrightness && _dimmingEndBrightness == other._dimmingEndBrightness && _dimmingBrightnessSteps == other._dimmingBrightnessSteps && _outputOriginalPart == other._outputOriginalPart && _enableAntiAliasing == other._enableAntiAliasing; + return _layerHeight == other._layerHeight && _syncLayers == other._syncLayers && _bottomLayers == other._bottomLayers && _normalLayers == other._normalLayers && _bottomExposure == other._bottomExposure && _normalExposure == other._normalExposure && _partScale == other._partScale && _margin == other._margin && _isErodeEnabled == other._isErodeEnabled && _erodeStartIteration == other._erodeStartIteration && _erodeEndIteration == other._erodeEndIteration && _erodeIterationSteps == other._erodeIterationSteps && _isDimmingEnabled == other._isDimmingEnabled && _dimmingWallThickness == other._dimmingWallThickness && _dimmingStartBrightness == other._dimmingStartBrightness && _dimmingEndBrightness == other._dimmingEndBrightness && _dimmingBrightnessSteps == other._dimmingBrightnessSteps && _outputOriginalPart == other._outputOriginalPart && _enableAntiAliasing == other._enableAntiAliasing && _mirrorOutput == other._mirrorOutput; } public override bool Equals(object obj) @@ -360,7 +368,11 @@ namespace UVtools.Core.Operations hashCode.Add(_normalLayers); hashCode.Add(_bottomExposure); hashCode.Add(_normalExposure); + hashCode.Add(_partScale); hashCode.Add(_margin); + hashCode.Add(_enableAntiAliasing); + hashCode.Add(_outputOriginalPart); + hashCode.Add(_mirrorOutput); hashCode.Add(_isErodeEnabled); hashCode.Add(_erodeStartIteration); hashCode.Add(_erodeEndIteration); @@ -370,8 +382,7 @@ namespace UVtools.Core.Operations hashCode.Add(_dimmingStartBrightness); hashCode.Add(_dimmingEndBrightness); hashCode.Add(_dimmingBrightnessSteps); - hashCode.Add(_outputOriginalPart); - hashCode.Add(_enableAntiAliasing); + return hashCode.ToHashCode(); } @@ -583,6 +594,11 @@ namespace UVtools.Core.Operations } } + if (_mirrorOutput) + { + Parallel.ForEach(layers, mat => CvInvoke.Flip(mat, mat, FlipType.Horizontal)); + } + // Preview //layers[2] = new Mat(layers[0], new Rectangle(0, 0, Math.Min(layers[0].Width, maxX), Math.Min(layers[0].Height, currentY))); diff --git a/UVtools.Core/Operations/OperationCalibrateGrayscale.cs b/UVtools.Core/Operations/OperationCalibrateGrayscale.cs index 5ddddf7..7d78d6f 100644 --- a/UVtools.Core/Operations/OperationCalibrateGrayscale.cs +++ b/UVtools.Core/Operations/OperationCalibrateGrayscale.cs @@ -9,6 +9,7 @@ using System; using System.Drawing; using System.Text; +using System.Threading.Tasks; using System.Xml.Serialization; using Emgu.CV; using Emgu.CV.CvEnum; @@ -33,6 +34,8 @@ namespace UVtools.Core.Operations private decimal _normalExposure = 12; private ushort _outerMargin = 200; private ushort _innerMargin = 50; + private bool _enableAntiAliasing = true; + private bool _mirrorOutput; private byte _startBrightness = 175; private byte _endBrightness = 255; private byte _brightnessSteps = 10; @@ -42,7 +45,6 @@ namespace UVtools.Core.Operations private byte _lineDivisionThickness = 30; private byte _lineDivisionBrightness = 255; private short _textXOffset; - private bool _enableAntiAliasing = true; #endregion @@ -89,9 +91,9 @@ namespace UVtools.Core.Operations var result = $"[Layer Height: {_layerHeight}] " + $"[Layers: {_bottomLayers}/{_interfaceLayers}/{_normalLayers}] " + $"[Exposure: {_bottomExposure}/{_normalExposure}] " + - $"[Margin: {_outerMargin}] " + + $"[Margin: {_outerMargin}/{_innerMargin}] " + $"[B: {_startBrightness}-{_endBrightness} S{_brightnessSteps}] " + - $"[AA: {_enableAntiAliasing}]"; + $"[AA: {_enableAntiAliasing}] [Mirror: {_mirrorOutput}]"; if (!string.IsNullOrEmpty(ProfileName)) result = $"{ProfileName}: {result}"; return result; } @@ -191,6 +193,18 @@ namespace UVtools.Core.Operations set => RaiseAndSetIfChanged(ref _innerMargin, value); } + public bool EnableAntiAliasing + { + get => _enableAntiAliasing; + set => RaiseAndSetIfChanged(ref _enableAntiAliasing, value); + } + + public bool MirrorOutput + { + get => _mirrorOutput; + set => RaiseAndSetIfChanged(ref _mirrorOutput, value); + } + public byte StartBrightness { get => _startBrightness; @@ -275,19 +289,13 @@ namespace UVtools.Core.Operations set => RaiseAndSetIfChanged(ref _textXOffset, value); } - public bool EnableAntiAliasing - { - get => _enableAntiAliasing; - set => RaiseAndSetIfChanged(ref _enableAntiAliasing, value); - } - #endregion #region Equality private bool Equals(OperationCalibrateGrayscale other) { - return _layerHeight == other._layerHeight && _bottomLayers == other._bottomLayers && _normalLayers == other._normalLayers && _interfaceLayers == other._interfaceLayers && _bottomExposure == other._bottomExposure && _normalExposure == other._normalExposure && _outerMargin == other._outerMargin && _innerMargin == other._innerMargin && _startBrightness == other._startBrightness && _endBrightness == other._endBrightness && _brightnessSteps == other._brightnessSteps && _enableCenterHoleRelief == other._enableCenterHoleRelief && _centerHoleDiameter == other._centerHoleDiameter && _enableLineDivisions == other._enableLineDivisions && _lineDivisionThickness == other._lineDivisionThickness && _lineDivisionBrightness == other._lineDivisionBrightness && _textXOffset == other._textXOffset && _enableAntiAliasing == other._enableAntiAliasing; + return _layerHeight == other._layerHeight && _bottomLayers == other._bottomLayers && _normalLayers == other._normalLayers && _interfaceLayers == other._interfaceLayers && _bottomExposure == other._bottomExposure && _normalExposure == other._normalExposure && _outerMargin == other._outerMargin && _innerMargin == other._innerMargin && _startBrightness == other._startBrightness && _endBrightness == other._endBrightness && _brightnessSteps == other._brightnessSteps && _enableCenterHoleRelief == other._enableCenterHoleRelief && _centerHoleDiameter == other._centerHoleDiameter && _enableLineDivisions == other._enableLineDivisions && _lineDivisionThickness == other._lineDivisionThickness && _lineDivisionBrightness == other._lineDivisionBrightness && _textXOffset == other._textXOffset && _enableAntiAliasing == other._enableAntiAliasing && _mirrorOutput == other._mirrorOutput; } public override bool Equals(object obj) @@ -306,6 +314,8 @@ namespace UVtools.Core.Operations hashCode.Add(_normalExposure); hashCode.Add(_outerMargin); hashCode.Add(_innerMargin); + hashCode.Add(_enableAntiAliasing); + hashCode.Add(_mirrorOutput); hashCode.Add(_startBrightness); hashCode.Add(_endBrightness); hashCode.Add(_brightnessSteps); @@ -315,7 +325,6 @@ namespace UVtools.Core.Operations hashCode.Add(_lineDivisionThickness); hashCode.Add(_lineDivisionBrightness); hashCode.Add(_textXOffset); - hashCode.Add(_enableAntiAliasing); return hashCode.ToHashCode(); } @@ -416,6 +425,11 @@ namespace UVtools.Core.Operations new Point(center.X - radius / 2, center.Y + radius / 2 - 40), fontFace, fontScale, EmguExtensions.BlackByte, fontThickness, lineType, true); + if (_mirrorOutput) + { + Parallel.ForEach(layers, mat => CvInvoke.Flip(mat, mat, FlipType.Horizontal)); + } + return layers; } diff --git a/UVtools.Core/Operations/OperationCalibrateTolerance.cs b/UVtools.Core/Operations/OperationCalibrateTolerance.cs index a7fc0ff..aa9bf81 100644 --- a/UVtools.Core/Operations/OperationCalibrateTolerance.cs +++ b/UVtools.Core/Operations/OperationCalibrateTolerance.cs @@ -41,6 +41,7 @@ namespace UVtools.Core.Operations private bool _outputSameDiameterPart = true; private bool _fuseParts; private bool _enableAntiAliasing = true; + private bool _mirrorOutput; private decimal _femaleDiameter = 16; private decimal _femaleHoleDiameter = 10; @@ -115,7 +116,7 @@ namespace UVtools.Core.Operations $"[Z: {_zSize}] " + $"[TB:{_topBottomMargin} LR:{_leftRightMargin} PM:{_partMargin}] " + $"[Chamfer: {_chamferLayers}] [Erode: {_erodeBottomIterations}] " + - $"[OSHD: {_outputSameDiameterPart}] [Fuse: {_fuseParts}] [AA: {_enableAntiAliasing}] " + + $"[OSHD: {_outputSameDiameterPart}] [Fuse: {_fuseParts}] [AA: {_enableAntiAliasing}] [Mirror: {_mirrorOutput}]" + $"[{_shape}, {_femaleDiameter}/{_femaleHoleDiameter}] " + $"[tM: {_maleThinnerModels} O:{_maleThinnerOffset} S:{_maleThinnerStep}] " + $"[TM: {_maleThickerModels} O:{_maleThickerOffset} S:{_maleThickerStep}] "; @@ -130,7 +131,6 @@ namespace UVtools.Core.Operations [XmlIgnore] public Size Resolution { get; set; } = Size.Empty; - [XmlIgnore] public decimal DisplayWidth { get => _displayWidth; @@ -141,7 +141,6 @@ namespace UVtools.Core.Operations } } - [XmlIgnore] public decimal DisplayHeight { get => _displayHeight; @@ -272,6 +271,12 @@ namespace UVtools.Core.Operations set => RaiseAndSetIfChanged(ref _enableAntiAliasing, value); } + public bool MirrorOutput + { + get => _mirrorOutput; + set => RaiseAndSetIfChanged(ref _mirrorOutput, value); + } + public decimal FemaleDiameter { get => _femaleDiameter; @@ -431,12 +436,11 @@ namespace UVtools.Core.Operations public static Array ShapesItems => Enum.GetValues(typeof(Shapes)); #endregion - #region Equality private bool Equals(OperationCalibrateTolerance other) { - return _layerHeight == other._layerHeight && _bottomLayers == other._bottomLayers && _bottomExposure == other._bottomExposure && _normalExposure == other._normalExposure && _zSize == other._zSize && _topBottomMargin == other._topBottomMargin && _leftRightMargin == other._leftRightMargin && _chamferLayers == other._chamferLayers && _erodeBottomIterations == other._erodeBottomIterations && _shape == other._shape && _partMargin == other._partMargin && _outputSameDiameterPart == other._outputSameDiameterPart && _fuseParts == other._fuseParts && _enableAntiAliasing == other._enableAntiAliasing && _femaleDiameter == other._femaleDiameter && _femaleHoleDiameter == other._femaleHoleDiameter && _maleThinnerModels == other._maleThinnerModels && _maleThinnerOffset == other._maleThinnerOffset && _maleThinnerStep == other._maleThinnerStep && _maleThickerModels == other._maleThickerModels && _maleThickerOffset == other._maleThickerOffset && _maleThickerStep == other._maleThickerStep; + return _layerHeight == other._layerHeight && _bottomLayers == other._bottomLayers && _bottomExposure == other._bottomExposure && _normalExposure == other._normalExposure && _zSize == other._zSize && _topBottomMargin == other._topBottomMargin && _leftRightMargin == other._leftRightMargin && _chamferLayers == other._chamferLayers && _erodeBottomIterations == other._erodeBottomIterations && _shape == other._shape && _partMargin == other._partMargin && _outputSameDiameterPart == other._outputSameDiameterPart && _fuseParts == other._fuseParts && _enableAntiAliasing == other._enableAntiAliasing && _femaleDiameter == other._femaleDiameter && _femaleHoleDiameter == other._femaleHoleDiameter && _maleThinnerModels == other._maleThinnerModels && _maleThinnerOffset == other._maleThinnerOffset && _maleThinnerStep == other._maleThinnerStep && _maleThickerModels == other._maleThickerModels && _maleThickerOffset == other._maleThickerOffset && _maleThickerStep == other._maleThickerStep && _mirrorOutput == other._mirrorOutput; } public override bool Equals(object obj) @@ -461,6 +465,7 @@ namespace UVtools.Core.Operations hashCode.Add(_outputSameDiameterPart); hashCode.Add(_fuseParts); hashCode.Add(_enableAntiAliasing); + hashCode.Add(_mirrorOutput); hashCode.Add(_femaleDiameter); hashCode.Add(_femaleHoleDiameter); hashCode.Add(_maleThinnerModels); @@ -663,6 +668,11 @@ namespace UVtools.Core.Operations } }); + if (_mirrorOutput) + { + Parallel.ForEach(layers, mat => CvInvoke.Flip(mat, mat, FlipType.Horizontal)); + } + return layers; } diff --git a/UVtools.Core/Operations/OperationCalibrateXYZAccuracy.cs b/UVtools.Core/Operations/OperationCalibrateXYZAccuracy.cs index 7ac8790..3c5f4bd 100644 --- a/UVtools.Core/Operations/OperationCalibrateXYZAccuracy.cs +++ b/UVtools.Core/Operations/OperationCalibrateXYZAccuracy.cs @@ -9,6 +9,7 @@ using System; using System.Drawing; using System.Text; +using System.Threading.Tasks; using System.Xml.Serialization; using Emgu.CV; using Emgu.CV.CvEnum; @@ -36,6 +37,7 @@ namespace UVtools.Core.Operations private decimal _zSize = 15; private bool _centerHoleRelief = true; private bool _hollowModel = true; + private bool _mirrorOutput; private decimal _wallThickness = 2.5M; private decimal _observedXSize; private decimal _observedYSize; @@ -107,7 +109,7 @@ namespace UVtools.Core.Operations $"[Model: {_outputTLObject.ToByte()}{_outputTCObject.ToByte()}{_outputTRObject.ToByte()}" + $"|{_outputMLObject.ToByte()}{_outputMCObject.ToByte()}{_outputMRObject.ToByte()}" + $"|{_outputBLObject.ToByte()}{_outputBCObject.ToByte()}{_outputBRObject.ToByte()}] " + - $"[Hollow: {_hollowModel} @ {_wallThickness}mm] [Relief: {_centerHoleRelief}]"; + $"[Hollow: {_hollowModel} @ {_wallThickness}mm] [Relief: {_centerHoleRelief}] [Mirror: {_mirrorOutput}]"; if (!string.IsNullOrEmpty(ProfileName)) result = $"{ProfileName}: {result}"; return result; } @@ -119,7 +121,6 @@ namespace UVtools.Core.Operations [XmlIgnore] public Size Resolution { get; set; } = Size.Empty; - [XmlIgnore] public decimal DisplayWidth { get => _displayWidth; @@ -130,7 +131,6 @@ namespace UVtools.Core.Operations } } - [XmlIgnore] public decimal DisplayHeight { get => _displayHeight; @@ -269,6 +269,12 @@ namespace UVtools.Core.Operations set => RaiseAndSetIfChanged(ref _hollowModel, value); } + public bool MirrorOutput + { + get => _mirrorOutput; + set => RaiseAndSetIfChanged(ref _mirrorOutput, value); + } + public decimal WallThickness { get => _wallThickness; @@ -462,7 +468,7 @@ namespace UVtools.Core.Operations private bool Equals(OperationCalibrateXYZAccuracy other) { - return _layerHeight == other._layerHeight && _bottomLayers == other._bottomLayers && _bottomExposure == other._bottomExposure && _normalExposure == other._normalExposure && _topBottomMargin == other._topBottomMargin && _leftRightMargin == other._leftRightMargin && _xSize == other._xSize && _ySize == other._ySize && _zSize == other._zSize && _centerHoleRelief == other._centerHoleRelief && _hollowModel == other._hollowModel && _wallThickness == other._wallThickness && _observedXSize == other._observedXSize && _observedYSize == other._observedYSize && _observedZSize == other._observedZSize && _outputTLObject == other._outputTLObject && _outputTCObject == other._outputTCObject && _outputTRObject == other._outputTRObject && _outputMLObject == other._outputMLObject && _outputMCObject == other._outputMCObject && _outputMRObject == other._outputMRObject && _outputBLObject == other._outputBLObject && _outputBCObject == other._outputBCObject && _outputBRObject == other._outputBRObject; + return _layerHeight == other._layerHeight && _bottomLayers == other._bottomLayers && _bottomExposure == other._bottomExposure && _normalExposure == other._normalExposure && _topBottomMargin == other._topBottomMargin && _leftRightMargin == other._leftRightMargin && _xSize == other._xSize && _ySize == other._ySize && _zSize == other._zSize && _centerHoleRelief == other._centerHoleRelief && _hollowModel == other._hollowModel && _wallThickness == other._wallThickness && _observedXSize == other._observedXSize && _observedYSize == other._observedYSize && _observedZSize == other._observedZSize && _outputTLObject == other._outputTLObject && _outputTCObject == other._outputTCObject && _outputTRObject == other._outputTRObject && _outputMLObject == other._outputMLObject && _outputMCObject == other._outputMCObject && _outputMRObject == other._outputMRObject && _outputBLObject == other._outputBLObject && _outputBCObject == other._outputBCObject && _outputBRObject == other._outputBRObject && _mirrorOutput == other._mirrorOutput; } public override bool Equals(object obj) @@ -484,6 +490,7 @@ namespace UVtools.Core.Operations hashCode.Add(_zSize); hashCode.Add(_centerHoleRelief); hashCode.Add(_hollowModel); + hashCode.Add(_mirrorOutput); hashCode.Add(_wallThickness); hashCode.Add(_observedXSize); hashCode.Add(_observedYSize); @@ -673,6 +680,11 @@ namespace UVtools.Core.Operations } } + if (_mirrorOutput) + { + Parallel.ForEach(layers, mat => CvInvoke.Flip(mat, mat, FlipType.Horizontal)); + } + return layers; } diff --git a/UVtools.Core/Operations/OperationMorph.cs b/UVtools.Core/Operations/OperationMorph.cs index bdf5e8a..4ff99ad 100644 --- a/UVtools.Core/Operations/OperationMorph.cs +++ b/UVtools.Core/Operations/OperationMorph.cs @@ -72,6 +72,12 @@ namespace UVtools.Core.Operations get => _morphOperation; set => RaiseAndSetIfChanged(ref _morphOperation, value); } + + public uint Iterations + { + get => IterationsStart; + set => IterationsStart = IterationsEnd = value; + } public uint IterationsStart { diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj index c47cfa0..4986428 100644 --- a/UVtools.Core/UVtools.Core.csproj +++ b/UVtools.Core/UVtools.Core.csproj @@ -10,7 +10,7 @@ <RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl> <PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl> <Description>MSLA/DLP, file analysis, calibration, repair, conversion and manipulation</Description> - <Version>2.1.2</Version> + <Version>2.1.3</Version> <Copyright>Copyright © 2020 PTRTECH</Copyright> <PackageIcon>UVtools.png</PackageIcon> <Platforms>AnyCPU;x64</Platforms> diff --git a/UVtools.Installer/Code/Features.wxs b/UVtools.Installer/Code/Features.wxs index a0c923f..820a881 100644 --- a/UVtools.Installer/Code/Features.wxs +++ b/UVtools.Installer/Code/Features.wxs @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> + <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLLOCATION" Name="UVtools"> @@ -8,7 +9,16 @@ </Directory> </Directory> </Directory> + + <Property Id="INSTALLDIR"> + <RegistrySearch Id="INSTALLDIRRegistry" Type="raw" Root="HKCU" Key="Software\UVtools" Name="InstallDir" /> + </Property> + + <SetDirectory Id="INSTALLLOCATION" Value="[INSTALLDIR]">INSTALLDIR</SetDirectory> + + <Feature Id="UVtools" Title="UVtools" Description="Installs all the files needed for UVtools" Level="1" AllowAdvertise="no" ConfigurableDirectory="INSTALLLOCATION"> + <ComponentRef Id="RegistryEntries" /> <MergeRef Id="UVtools" /> <!-- Uncomment the below line to pull in IIS Metadata. Otherwise delete if not needed --> <!--<ComponentGroupRef Id="webSite" />--> diff --git a/UVtools.Installer/Code/Product.wxs b/UVtools.Installer/Code/Product.wxs index 1dcdb80..9a0b9fb 100644 --- a/UVtools.Installer/Code/Product.wxs +++ b/UVtools.Installer/Code/Product.wxs @@ -21,13 +21,29 @@ Schedule="afterInstallInitialize" /> <!--Common Launch Condition--> <!-- Examples at http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html --> + <!-- <PropertyRef Id="NETFRAMEWORK45" /> <Condition Message="[ProductName] requires .NET Framework 4.8.">Installed OR NETFRAMEWORK45</Condition> + --> <!-- Include User Interface Experience --> - <Icon Id="Icon.ico" SourceFile="..\UVtools.WPF\UVtools.ico" /> + <Icon Id="Icon.ico" SourceFile="..\UVtools.CAD\UVtools.ico" /> <Property Id="ARPPRODUCTICON" Value="Icon.ico"></Property> <UIRef Id="UI" /> <!-- Include Features and Directories Fragment --> - <DirectoryRef Id="INSTALLLOCATION" /> + <DirectoryRef Id="INSTALLLOCATION"> + <Component Id="RegistryEntries" Guid="C3603223-A8C1-4393-8C06-36B48DED2652"> + <RegistryKey + Root="HKCU" + Key="Software\UVtools" + ForceCreateOnInstall="yes" + ForceDeleteOnUninstall="yes" /> + <RegistryValue + Root="HKCU" + Key="Software\UVtools" + Name="InstallDir" + Type="string" + Value="[INSTALLLOCATION]" /> + </Component> + </DirectoryRef> </Product> </Wix>
\ No newline at end of file diff --git a/UVtools.InstallerMM/UVtools.InstallerMM.wxs b/UVtools.InstallerMM/UVtools.InstallerMM.wxs index 4e0d9bf..4c32268 100644 --- a/UVtools.InstallerMM/UVtools.InstallerMM.wxs +++ b/UVtools.InstallerMM/UVtools.InstallerMM.wxs @@ -921,6 +921,9 @@ <Component Id="owc13438B96466244BCB8EEF225433BC787" Guid="99b981b3-c851-900a-abaa-a18535df5331"> <File Id="owf13438B96466244BCB8EEF225433BC787" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\Peopoly Phenom Noir.ini" KeyPath="yes" /> </Component> + <Component Id="owc1FC1979B98DE233286C3B4804929A5FC" Guid="1ca2aa61-eb0a-2449-1c6f-07fa9749bce8"> + <File Id="owf1FC1979B98DE233286C3B4804929A5FC" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\Peopoly Phenom XXL.ini" KeyPath="yes" /> + </Component> <Component Id="owcA1B48C5E1FE8B630F74308849833290E" Guid="4d77c8e5-87d3-b989-e9ea-e5500471a42b"> <File Id="owfA1B48C5E1FE8B630F74308849833290E" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\Peopoly Phenom.ini" KeyPath="yes" /> </Component> @@ -960,6 +963,9 @@ <Component Id="owcFE299618D4ED99513A75713869AEB4B2" Guid="7e76d3e8-e561-5fcc-e266-d43e670840c2"> <File Id="owfFE299618D4ED99513A75713869AEB4B2" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\Phrozen Transform.ini" KeyPath="yes" /> </Component> + <Component Id="owc06E606590D5C2186D26EF1DDD7A361B7" Guid="578ba680-240d-d850-8372-b8c261fbe053"> + <File Id="owf06E606590D5C2186D26EF1DDD7A361B7" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\QIDI I-Box Mono.ini" KeyPath="yes" /> + </Component> <Component Id="owcACB41397AF3AAB714FF18711FC3D3D1B" Guid="a47810c7-ddf5-3a76-3113-c0cdab0551bf"> <File Id="owfACB41397AF3AAB714FF18711FC3D3D1B" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\QIDI S-Box.ini" KeyPath="yes" /> </Component> @@ -975,6 +981,12 @@ <Component Id="owc7F9A29B71850B673CBE3B2BE64A68AAA" Guid="08fa14b5-632c-7453-8805-078ce4e7ef9d"> <File Id="owf7F9A29B71850B673CBE3B2BE64A68AAA" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\Voxelab Proxima.ini" KeyPath="yes" /> </Component> + <Component Id="owc7C7E45D1C452D2676768409E4CA9CC60" Guid="860c70fe-c0a8-cd0a-e957-f1a6a9430509"> + <File Id="owf7C7E45D1C452D2676768409E4CA9CC60" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\Wanhao CGR Mini Mono.ini" KeyPath="yes" /> + </Component> + <Component Id="owcF9E5AF8C32ABDFCF9A192B1CDDF75FE7" Guid="bc420f43-9332-7e19-13d8-1704b3931172"> + <File Id="owfF9E5AF8C32ABDFCF9A192B1CDDF75FE7" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\Wanhao CGR Mono.ini" KeyPath="yes" /> + </Component> <Component Id="owcADA4A8BCF46DF0463053836AF5844507" Guid="a0052256-a256-d7c2-e8ab-fa76b6405a56"> <File Id="owfADA4A8BCF46DF0463053836AF5844507" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\Wanhao D7.ini" KeyPath="yes" /> </Component> @@ -989,48 +1001,72 @@ <Component Id="owc988205CB4C2FC6EA3D41704B657C5681" Guid="5dd3f394-0e58-76db-f891-78c219b5339e"> <File Id="owf988205CB4C2FC6EA3D41704B657C5681" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.01 - Heavy Supports.ini" KeyPath="yes" /> </Component> + <Component Id="owc9530BD1A200964A8B6FB63F24AAEE4C5" Guid="b7e61da6-1d32-a462-8bff-9868b050aa3b"> + <File Id="owf9530BD1A200964A8B6FB63F24AAEE4C5" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.01 - Light Supports.ini" KeyPath="yes" /> + </Component> <Component Id="owc4F3C7BA82787F7CE088482EF33C78BC7" Guid="93f4648f-2a87-6bb3-7307-e3b2fe27591f"> <File Id="owf4F3C7BA82787F7CE088482EF33C78BC7" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.01 - Medium Supports.ini" KeyPath="yes" /> </Component> <Component Id="owc32F3B55EC604E72AB3E2CBF3284ED826" Guid="064f01a1-52a6-8f88-a160-13fee848444c"> <File Id="owf32F3B55EC604E72AB3E2CBF3284ED826" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.02 - Heavy Supports.ini" KeyPath="yes" /> </Component> + <Component Id="owcCFA04F884099E9C9A7429607AE0D75AF" Guid="e4fb446b-5ee4-32ba-c702-4aa04f3411db"> + <File Id="owfCFA04F884099E9C9A7429607AE0D75AF" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.02 - Light Supports.ini" KeyPath="yes" /> + </Component> <Component Id="owc43A40112BBFB048562D12C4E2E58C8B5" Guid="01e92245-916a-7b5a-e545-a7c6394041f5"> <File Id="owf43A40112BBFB048562D12C4E2E58C8B5" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.02 - Medium Supports.ini" KeyPath="yes" /> </Component> <Component Id="owcA27D4D8B15C011B3790643C4A1B00661" Guid="249c6c1e-5613-e22c-fd9f-36d549071815"> <File Id="owfA27D4D8B15C011B3790643C4A1B00661" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.03 - Heavy Supports.ini" KeyPath="yes" /> </Component> + <Component Id="owcE0E9AB0C165E1DF9A9EECC157E94459A" Guid="aa0a95e6-19da-f220-183b-a2c3f3a1ab94"> + <File Id="owfE0E9AB0C165E1DF9A9EECC157E94459A" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.03 - Light Supports.ini" KeyPath="yes" /> + </Component> <Component Id="owc34F74C04D60157E217A40D1B948F4B62" Guid="1016acd9-7e5e-6764-1511-e4dba988d3f2"> <File Id="owf34F74C04D60157E217A40D1B948F4B62" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.03 - Medium Supports.ini" KeyPath="yes" /> </Component> <Component Id="owc7904A21F5D16A27BDCBF240575031DE0" Guid="46bbf031-1607-56f4-3b51-f8f627a1f7f4"> <File Id="owf7904A21F5D16A27BDCBF240575031DE0" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.04 - Heavy Supports.ini" KeyPath="yes" /> </Component> + <Component Id="owcE7EABB49A695AF60C1F60BC6FB670670" Guid="1ce43800-8800-c678-2d35-be079846fad0"> + <File Id="owfE7EABB49A695AF60C1F60BC6FB670670" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.04 - Light Supports.ini" KeyPath="yes" /> + </Component> <Component Id="owc2B441689691FEC00B7B263EAD5C86002" Guid="36d4eee3-4ef4-135a-78b3-22e7daa37092"> <File Id="owf2B441689691FEC00B7B263EAD5C86002" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.04 - Medium Supports.ini" KeyPath="yes" /> </Component> <Component Id="owc815E6AD1B21376FEEF54113695A5C221" Guid="08a67749-8d90-9d25-d535-d5a0c8b2b7dd"> <File Id="owf815E6AD1B21376FEEF54113695A5C221" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.05 - Heavy Supports.ini" KeyPath="yes" /> </Component> + <Component Id="owcFDA588D8F7C94B74B2F5A532FA05C3C7" Guid="b6fb44ab-7750-774e-3d80-e46f10a9ea07"> + <File Id="owfFDA588D8F7C94B74B2F5A532FA05C3C7" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.05 - Light Supports.ini" KeyPath="yes" /> + </Component> <Component Id="owcB7DCBF9D6771C07DED7DFD3475A2B942" Guid="2b6a6b3b-cc19-fb01-850e-2b82c9959d05"> <File Id="owfB7DCBF9D6771C07DED7DFD3475A2B942" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.05 - Medium Supports.ini" KeyPath="yes" /> </Component> <Component Id="owc0D8987D85101CB001DC4DC10FA5289AD" Guid="8b33c25d-8466-ad61-abdd-485fdf1b686e"> <File Id="owf0D8987D85101CB001DC4DC10FA5289AD" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.10 - Heavy Supports.ini" KeyPath="yes" /> </Component> + <Component Id="owc7428FCD8352F585DF3877BC90142C76A" Guid="3785ee28-f408-320c-d4b7-2bba99ff50d7"> + <File Id="owf7428FCD8352F585DF3877BC90142C76A" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.10 - Light Supports.ini" KeyPath="yes" /> + </Component> <Component Id="owc50D2BF90F467F36608822CBBEA7AAD24" Guid="7816893f-d916-c266-286e-c305755f4274"> <File Id="owf50D2BF90F467F36608822CBBEA7AAD24" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.10 - Medium Supports.ini" KeyPath="yes" /> </Component> <Component Id="owc4ED39C8A5521E8D8F652122F1391BEE7" Guid="f5d525d9-36a8-8f20-7132-a3837ac667c8"> <File Id="owf4ED39C8A5521E8D8F652122F1391BEE7" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.15 - Heavy Supports.ini" KeyPath="yes" /> </Component> + <Component Id="owc364830057E2D551CA18BB53C1117DA71" Guid="6f2f562e-b0c3-faf3-e489-8f7d980b9819"> + <File Id="owf364830057E2D551CA18BB53C1117DA71" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.15 - Light Supports.ini" KeyPath="yes" /> + </Component> <Component Id="owc67CE50B90C2334EE96FD81F894C657CE" Guid="91a69bac-800a-7280-0763-0a907778bbea"> <File Id="owf67CE50B90C2334EE96FD81F894C657CE" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.15 - Medium Supports.ini" KeyPath="yes" /> </Component> <Component Id="owc4EBB2288E3F6027567BCA149BD247731" Guid="c36f9208-8fe7-e520-313f-eac6f7487c10"> <File Id="owf4EBB2288E3F6027567BCA149BD247731" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.20 - Heavy Supports.ini" KeyPath="yes" /> </Component> + <Component Id="owc78AC1F1F1106BEE8B066F8A27100496E" Guid="79db9d7f-7f3c-877d-da6f-205047748117"> + <File Id="owf78AC1F1F1106BEE8B066F8A27100496E" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.20 - Light Supports.ini" KeyPath="yes" /> + </Component> <Component Id="owc33EDBA249FAD8C66CFD67EF0812F9D99" Guid="7b49a51b-8a43-11c8-de4c-4e82552700fc"> <File Id="owf33EDBA249FAD8C66CFD67EF0812F9D99" Source="$(var.SourceDir)\Assets\PrusaSlicer\sla_print\Universal 0.20 - Medium Supports.ini" KeyPath="yes" /> </Component> diff --git a/UVtools.Scripts/Erode-Bottom.ps1 b/UVtools.Scripts/Erode-Bottom.ps1 new file mode 100644 index 0000000..3087662 --- /dev/null +++ b/UVtools.Scripts/Erode-Bottom.ps1 @@ -0,0 +1,139 @@ +# UVtools Script +######################## +# Script Configuration # +######################## +$_TITLE = 'Erode Bottom' +$_DESCRIPTION = 'Erodes bottom layers with a given iteration' +$_AUTHOR = 'Tiago Conceição' +$_VERSION = 1 +$_CORE_PATH = '' # Input folder path to 'UVtools.Core.dll' if unable to work with env variables +#eg: [System.Environment]::SetEnvironmentVariable('UVTOOLS_PATH','C:\Program Files (x86)\UVtools', [System.EnvironmentVariableTarget]::User) + +############## +# Dont touch # +############## +# Sets the culture +$currentThread = [System.Threading.Thread]::CurrentThread +$culture = [System.Globalization.CultureInfo]::InvariantCulture +$currentThread.CurrentCulture = $culture +$currentThread.CurrentUICulture = $culture + +############## +# Dont touch # +############## +# Usefull Variables +$dirSeparator = [IO.Path]::DirectorySeparatorChar +$scriptPath = $MyInvocation.MyCommand.Name +$scriptFilenameNoExt = [System.IO.Path]::GetFileNameWithoutExtension($scriptPath); +$coreDll = 'UVtools.Core.dll' +$inputFile = $null +$slicerFile = $null + +############## +# Dont touch # +############## +# Script information +Write-Output "###############################################" +Write-Output "UVtools Script: ${scriptFilenameNoExt}.ps1" +Write-Output "Title: $_TITLE" +Write-Output $_DESCRIPTION +Write-Output "Author: $_AUTHOR" +Write-Output "Version: $_VERSION" +Write-Output "###############################################" + +try{ +if(Test-Path "$Env:UVTOOLS_PATH${dirSeparator}${coreDll}" -PathType Leaf){ + Add-Type -Path "$Env:UVTOOLS_PATH${dirSeparator}${coreDll}" +} +elseif(Test-Path "${_CORE_PATH}${dirSeparator}${coreDll}" -PathType Leaf) { + Add-Type -Path "${_CORE_PATH}${dirSeparator}${coreDll}" +} else { + Write-Error "Unable to find $coreDll, solutions are: +1) Open powershell with admin and run: [System.Environment]::SetEnvironmentVariable('UVTOOLS_PATH','FOLDER/PATH/TO/UVTOOLS', [System.EnvironmentVariableTarget]::User) +2) Edit the script and set the _CORE_PATH variable with the FOLDER/PATH/TO/UVTOOLS +Path example: 'C:\Program Files (x86)\UVtools' +Exiting now!" + return +} + +# Progress variable, not really used here but require with some methods +$progress = New-Object UVtools.Core.Operations.OperationProgress + +############## +# Dont touch # +############## +# Input file and validation +while ($null -eq $inputFile){ # Keep asking for a file if the input is invalid +$inputFile = read-host "Enter input file" + if($inputFile -eq 'q' -or $inputFile -eq 'e' -or $inputFile -eq 'exit') + { + return; + } + if (-not(test-path $inputFile)){ + Write-host "Invalid file path, re-enter." + $inputFile = $null + } + elseif ((get-item $inputFile).psiscontainer){ + Write-host "Input file must be an valid file, re-enter." + $inputFile = $null + } + else { + $slicerFile = [UVtools.Core.FileFormats.FileFormat]::FindByExtension($inputFile, $true, $true) + if(!$slicerFile){ + Write-host "Invalid file format, re-enter." + $inputFile = $null + } + } +} + + + + +###################################### +# All user inputs should be put here # +###################################### +# Input iterations number +[int]$iterations = 0; +while ($iterations -le 0) { # Keep asking for a number if the input is invalid + [int]$iterations = Read-Host "Number of bottom erode iterations" +} + +############## +# Dont touch # +############## +# Decode the file +Write-Output "Decoding, please wait..." +$slicerFile.Decode($inputFile, $progress); + +################################################### +# All operations over the file should be put here # +################################################### +# Morph bottom erode +Write-Output "Eroding bottoms with ${iterations} iterations, please wait..." +$morph = New-Object UVtools.Core.Operations.OperationMorph +$morph.MorphOperation = [Emgu.CV.CvEnum.MorphOp]::Erode +$morph.IterationsStart = $iterations +$morph.LayerIndexEnd = $slicerFile.BottomLayerCount - 1 +if(!$morph.Execute($slicerFile, $progress)){ return; } + + +############## +# Dont touch # +############## +# Save file with _modified name appended +$filePath = [System.IO.Path]::GetDirectoryName($inputFile); +$fileExt = [System.IO.Path]::GetExtension($inputFile); +$fileNoExt = [System.IO.Path]::GetFileNameWithoutExtension($inputFile) +$fileOutput = "${filePath}${dirSeparator}${fileNoExt}_modified${fileExt}" +Write-Output "Saving as ${fileNoExt}_modified${fileExt}, please wait..." +$slicerFile.SaveAs("$fileOutput", $progress) +Write-Output "$fileOutput" +Write-Output "Finished!" +} +catch{ + # Catch errors + Write-Error "An error occurred:" + Write-Error $_.ScriptStackTrace + Write-Error $_.Exception.Message + Write-Error $_.Exception.ItemName +}
\ No newline at end of file diff --git a/UVtools.Scripts/List-Layers.ps1 b/UVtools.Scripts/List-Layers.ps1 new file mode 100644 index 0000000..1eb5cee --- /dev/null +++ b/UVtools.Scripts/List-Layers.ps1 @@ -0,0 +1,126 @@ +# UVtools Script +######################## +# Script Configuration # +######################## +$_TITLE = 'List Layers' +$_DESCRIPTION = 'List all layers and show it information' +$_AUTHOR = 'Tiago Conceição' +$_VERSION = 1 +$_CORE_PATH = '' # Input folder path to 'UVtools.Core.dll' if unable to work with env variables +#eg: [System.Environment]::SetEnvironmentVariable('UVTOOLS_PATH','C:\Program Files (x86)\UVtools', [System.EnvironmentVariableTarget]::User) + +############## +# Dont touch # +############## +# Sets the culture +$currentThread = [System.Threading.Thread]::CurrentThread +$culture = [System.Globalization.CultureInfo]::InvariantCulture +$currentThread.CurrentCulture = $culture +$currentThread.CurrentUICulture = $culture + +############## +# Dont touch # +############## +# Usefull Variables +$dirSeparator = [IO.Path]::DirectorySeparatorChar +$scriptPath = $MyInvocation.MyCommand.Name +$scriptFilenameNoExt = [System.IO.Path]::GetFileNameWithoutExtension($scriptPath); +$coreDll = 'UVtools.Core.dll' +$inputFile = $null +$slicerFile = $null + +############## +# Dont touch # +############## +# Script information +Write-Output "###############################################" +Write-Output "UVtools Script: ${scriptFilenameNoExt}.ps1" +Write-Output "Title: $_TITLE" +Write-Output $_DESCRIPTION +Write-Output "Author: $_AUTHOR" +Write-Output "Version: $_VERSION" +Write-Output "###############################################" + +try{ +if(Test-Path "$Env:UVTOOLS_PATH${dirSeparator}${coreDll}" -PathType Leaf){ + Add-Type -Path "$Env:UVTOOLS_PATH${dirSeparator}${coreDll}" +} +elseif(Test-Path "${_CORE_PATH}${dirSeparator}${coreDll}" -PathType Leaf) { + Add-Type -Path "${_CORE_PATH}${dirSeparator}${coreDll}" +} else { + Write-Error "Unable to find $coreDll, solutions are: +1) Open powershell with admin and run: [System.Environment]::SetEnvironmentVariable('UVTOOLS_PATH','FOLDER/PATH/TO/UVTOOLS', [System.EnvironmentVariableTarget]::User) +2) Edit the script and set the _CORE_PATH variable with the FOLDER/PATH/TO/UVTOOLS +Path example: 'C:\Program Files (x86)\UVtools' +Exiting now!" + return +} + +# Progress variable, not really used here but require with some methods +$progress = New-Object UVtools.Core.Operations.OperationProgress + +############## +# Dont touch # +############## +# Input file and validation +while ($null -eq $inputFile){ # Keep asking for a file if the input is invalid +$inputFile = read-host "Enter input file" + if($inputFile -eq 'q' -or $inputFile -eq 'e' -or $inputFile -eq 'exit') + { + return; + } + if (-not(test-path $inputFile)){ + Write-host "Invalid file path, re-enter." + $inputFile = $null + } + elseif ((get-item $inputFile).psiscontainer){ + Write-host "Input file must be an valid file, re-enter." + $inputFile = $null + } + else { + $slicerFile = [UVtools.Core.FileFormats.FileFormat]::FindByExtension($inputFile, $true, $true) + if(!$slicerFile){ + Write-host "Invalid file format, re-enter." + $inputFile = $null + } + } +} + + + + +############## +# Dont touch # +############## +# Decode the file +Write-Output "Decoding, please wait..." +$slicerFile.Decode($inputFile, $progress); + +################################################### +# All operations over the file should be put here # +################################################### +foreach($layer in $slicerFile){ + Write-Output $layer.ToString() +} + + +############## +# Dont touch # +############## +# Save file with _modified name appended +#$filePath = [System.IO.Path]::GetDirectoryName($inputFile); +#$fileExt = [System.IO.Path]::GetExtension($inputFile); +#$fileNoExt = [System.IO.Path]::GetFileNameWithoutExtension($inputFile) +#$fileOutput = "${filePath}${dirSeparator}${fileNoExt}_modified${fileExt}" +#Write-Output "Saving as ${fileNoExt}_modified${fileExt}, please wait..." +#$slicerFile.SaveAs("$fileOutput", $progress) +#Write-Output "$fileOutput" +#Write-Output "Finished!" +} +catch{ + # Catch errors + Write-Error "An error occurred:" + Write-Error $_.ScriptStackTrace + Write-Error $_.Exception.Message + Write-Error $_.Exception.ItemName +}
\ No newline at end of file diff --git a/UVtools.Scripts/README.md b/UVtools.Scripts/README.md new file mode 100644 index 0000000..3bfec99 --- /dev/null +++ b/UVtools.Scripts/README.md @@ -0,0 +1,91 @@ +# UVtools PowerShell Scripts + +UVtools has become a big toolset, but do you know you can do your own scripts not limited +to what GUI offers you? With PowerShell you can have access to whole UVtools.Core, +which expose all core access to you to use. +If you have a workflow and need to speed up, scripts can save time and dismiss the GUI interaction. +You will get same performance as native calling, plus you can stack all your actions! + +## Requirements + +* UVtools +* [PowerShell >= 7.1](https://github.com/PowerShell/PowerShell/releases) +* [Visual Studio Code](https://code.visualstudio.com/) (Optional but easier to run and edit scripts) + +## How to run scripts + +**WARNING:** Running PowerShell scripts as administrator are very powerfull and with wide access on your system. +Never run scripts from untrusted sources! Always inspect the script content before run something new from others. + +1. First you need to register the UVtools install directory under a environment variable. This will +allow you to run scripts without have to modifie them to put the full path to run them. + * Open a PowerShell instance as admin + * Enter: `[System.Environment]::SetEnvironmentVariable('UVTOOLS_PATH','FOLDER/PATH/TO/UVTOOLS', [System.EnvironmentVariableTarget]::User)` + * Replace 'FOLDER/PATH/TO/UVTOOLS' with your UVtools instalation folder + * Run command + * Run: `$Env:UVTOOLS_PATH` to confirm if path is registed + * Quit terminal + * Note: You only need to repeat this step if you change install directory + * If your system is unable to register a environment you need to manuall set the path on each script +2. Download and open a script with Visual Studio Code + * After open a .ps1 file first time, visual code will ask if you want to install the PowerShell extension, say 'yes' and wait for instalation +3. Click on the play arrow (Run) or F5 +4. Script will run and prompt for inputs + * The easier way to input a file is drag and drop the file on the terminal + +## Documentation + +The best way to get function names and variables is exploring **UVtools.Core** source code, most of the functions and variables +have a good readable name that make sense what it does, you can only run public methods and variables. + +On Visual Code, after you have an valid variable on your script, type it name with a ended dot (.) will show you a list of avaliable methods and variables that you can call. +eg: `$slicerFile.`, if the list don't show up, press CTRL+Space, that should force show the list. + +Take **Erode-Bottom.ps1** as bootstrap and minimal script, read each line and start exploring! + + +* [Core - Source code](https://github.com/sn4k3/UVtools/tree/master/UVtools.Core) +* [IFileFormat.cs - File format functions & variables](https://github.com/sn4k3/UVtools/blob/master/UVtools.Core/FileFormats/IFileFormat.cs) + * How to load file: + ```Powershell + # Find a file format given a file path, $true = is file path, $true = Create a new instance + # Returns null if file is invalid + $slicerFile = [UVtools.Core.FileFormats.FileFormat]::FindByExtension($inputFile, $true, $true) + if(!$slicerFile){ + $slicerFile.Decode($inputFile) + } + ``` +* [Layer.cs - Layer representation and hold it's own data](https://github.com/sn4k3/UVtools/blob/master/UVtools.Core/Layer/Layer.cs) + * How to access: + * `$slicerFile[layerIndex]` + * `$slicerFile.LayerManager[layerIndex]` (Alternative) + * `$slicerFile.LayerManager.Layers[layerIndex]` (Alternative) + * Example: + ```Powershell + Write-Output $slicerFile[layerIndex].PositionZ + Write-Output $slicerFile[layerIndex].ExposureTime + Write-Output $slicerFile[layerIndex].LiftHeight + Write-Output $slicerFile[layerIndex].LiftSpeed + Write-Output $slicerFile[layerIndex].RetractSpeed + Write-Output $slicerFile[layerIndex].LayerOffTime + Write-Output $slicerFile[layerIndex].LightPWM + Write-Output $slicerFile[layerIndex].BoundingRectangle + Write-Output $slicerFile[layerIndex].NonZeroPixelCount + Write-Output $slicerFile[layerIndex].IsModified + ``` +* [LayerManager.cs - The layer manager that keeps all layers within the file](https://github.com/sn4k3/UVtools/blob/master/UVtools.Core/Layer/LayerManager.cs) + * How to access: `$slicerFile.LayerManager` +* [Operations - Applies operation over layers, the tools menu on the GUI](https://github.com/sn4k3/UVtools/tree/master/UVtools.Core/Operations) + * Example: + ```Powershell + $morph = New-Object UVtools.Core.Operations.OperationMorph + $morph.MorphOperation = [Emgu.CV.CvEnum.MorphOp]::Erode + $morph.IterationsStart = $iterations + $morph.LayerIndexEnd = $slicerFile.BottomLayerCount - 1 + if(!$morph.Execute($slicerFile, $progress)){ return; } + ``` + +## Contribute with your scripts + +If you make a usefull script and want to contribute you can share and publish your script under [github - issues](https://github.com/sn4k3/UVtools/issues/new/choose). +After analyzation it will be published on the repository
\ No newline at end of file diff --git a/UVtools.Scripts/Turn-Black.ps1 b/UVtools.Scripts/Turn-Black.ps1 new file mode 100644 index 0000000..d984c43 --- /dev/null +++ b/UVtools.Scripts/Turn-Black.ps1 @@ -0,0 +1,139 @@ +# UVtools Script +######################## +# Script Configuration # +######################## +$_TITLE = 'Turn Layers Black' +$_DESCRIPTION = 'Turn all layers into black, this is only a sample how to manipulate pixels' +$_AUTHOR = 'Tiago Conceição' +$_VERSION = 1 +$_CORE_PATH = '' # Input folder path to 'UVtools.Core.dll' if unable to work with env variables +#eg: [System.Environment]::SetEnvironmentVariable('UVTOOLS_PATH','C:\Program Files (x86)\UVtools', [System.EnvironmentVariableTarget]::User) + +############## +# Dont touch # +############## +# Sets the culture +$currentThread = [System.Threading.Thread]::CurrentThread +$culture = [System.Globalization.CultureInfo]::InvariantCulture +$currentThread.CurrentCulture = $culture +$currentThread.CurrentUICulture = $culture + +############## +# Dont touch # +############## +# Usefull Variables +$dirSeparator = [IO.Path]::DirectorySeparatorChar +$scriptPath = $MyInvocation.MyCommand.Name +$scriptFilenameNoExt = [System.IO.Path]::GetFileNameWithoutExtension($scriptPath); +$coreDll = 'UVtools.Core.dll' +$inputFile = $null +$slicerFile = $null + +############## +# Dont touch # +############## +# Script information +Write-Output "###############################################" +Write-Output "UVtools Script: ${scriptFilenameNoExt}.ps1" +Write-Output "Title: $_TITLE" +Write-Output $_DESCRIPTION +Write-Output "Author: $_AUTHOR" +Write-Output "Version: $_VERSION" +Write-Output "###############################################" + +try{ +if(Test-Path "$Env:UVTOOLS_PATH${dirSeparator}${coreDll}" -PathType Leaf){ + Add-Type -Path "$Env:UVTOOLS_PATH${dirSeparator}${coreDll}" +} +elseif(Test-Path "${_CORE_PATH}${dirSeparator}${coreDll}" -PathType Leaf) { + Add-Type -Path "${_CORE_PATH}${dirSeparator}${coreDll}" +} else { + Write-Error "Unable to find $coreDll, solutions are: +1) Open powershell with admin and run: [System.Environment]::SetEnvironmentVariable('UVTOOLS_PATH','FOLDER/PATH/TO/UVTOOLS', [System.EnvironmentVariableTarget]::User) +2) Edit the script and set the _CORE_PATH variable with the FOLDER/PATH/TO/UVTOOLS +Path example: 'C:\Program Files (x86)\UVtools' +Exiting now!" + return +} + +# Progress variable, not really used here but require with some methods +$progress = New-Object UVtools.Core.Operations.OperationProgress + +############## +# Dont touch # +############## +# Input file and validation +while ($null -eq $inputFile){ # Keep asking for a file if the input is invalid +$inputFile = read-host "Enter input file" + if($inputFile -eq 'q' -or $inputFile -eq 'e' -or $inputFile -eq 'exit') + { + return; + } + if (-not(test-path $inputFile)){ + Write-host "Invalid file path, re-enter." + $inputFile = $null + } + elseif ((get-item $inputFile).psiscontainer){ + Write-host "Input file must be an valid file, re-enter." + $inputFile = $null + } + else { + $slicerFile = [UVtools.Core.FileFormats.FileFormat]::FindByExtension($inputFile, $true, $true) + if(!$slicerFile){ + Write-host "Invalid file format, re-enter." + $inputFile = $null + } + } +} + + + + +############## +# Dont touch # +############## +# Decode the file +Write-Output "Decoding, please wait..." +$slicerFile.Decode($inputFile, $progress); + +################################################### +# All operations over the file should be put here # +################################################### +$slicerFile | ForEach-Object -Parallel { # Iterate all layers in parallel + $layer = $_ + Write-Output "Changing layer ${layer}" + + $mat = $layer.LayerMat # Get layer image + $bytes = [UVtools.Core.Extensions.EmguExtensions]::GetBytes($mat) + + + for ($i = 0; $i -lt $bytes.Length; $i++) { # Change every pixel + $bytes[$i] = $i % 2 * 255 + } + + [UVtools.Core.Extensions.EmguExtensions]::SetBytes($mat, $bytes) + $layer.LayerMat = $mat # Save layer image back + $mat.Dispose() +} + + +############## +# Dont touch # +############## +# Save file with _modified name appended +$filePath = [System.IO.Path]::GetDirectoryName($inputFile); +$fileExt = [System.IO.Path]::GetExtension($inputFile); +$fileNoExt = [System.IO.Path]::GetFileNameWithoutExtension($inputFile) +$fileOutput = "${filePath}${dirSeparator}${fileNoExt}_modified${fileExt}" +Write-Output "Saving as ${fileNoExt}_modified${fileExt}, please wait..." +$slicerFile.SaveAs("$fileOutput", $progress) +Write-Output "$fileOutput" +Write-Output "Finished!" +} +catch{ + # Catch errors + Write-Error "An error occurred:" + Write-Error $_.ScriptStackTrace + Write-Error $_.Exception.Message + Write-Error $_.Exception.ItemName +}
\ No newline at end of file diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateElephantFootControl.axaml b/UVtools.WPF/Controls/Calibrators/CalibrateElephantFootControl.axaml index 2ece303..01da1d5 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateElephantFootControl.axaml +++ b/UVtools.WPF/Controls/Calibrators/CalibrateElephantFootControl.axaml @@ -103,6 +103,9 @@ Minimum="1" Maximum="10" Value="{Binding Operation.PartScale}"/> + <TextBlock Grid.Row="6" Grid.Column="4" + VerticalAlignment="Center" + Text="x"/> <TextBlock Grid.Row="6" Grid.Column="6" VerticalAlignment="Center" @@ -147,6 +150,11 @@ Text="{Binding Operation.ObjectCount}"/> </StackPanel> + <CheckBox Grid.Row="8" Grid.Column="6" + Grid.ColumnSpan="5" + IsChecked="{Binding Operation.EnableAntiAliasing}" + Content="Enable Anti-Aliasing" /> + <CheckBox Grid.Row="10" Grid.Column="0" Grid.ColumnSpan="6" IsChecked="{Binding Operation.OutputOriginalPart}" @@ -154,8 +162,10 @@ <CheckBox Grid.Row="10" Grid.Column="6" Grid.ColumnSpan="5" - IsChecked="{Binding Operation.EnableAntiAliasing}" - Content="Enable Anti-Aliasing" /> + ToolTip.Tip="Most of the printers requires a mirror output to print with the correct orientation" + IsChecked="{Binding Operation.MirrorOutput}" + Content="Mirror output" /> + </Grid> diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateGrayscaleControl.axaml b/UVtools.WPF/Controls/Calibrators/CalibrateGrayscaleControl.axaml index bf65952..4e955ec 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateGrayscaleControl.axaml +++ b/UVtools.WPF/Controls/Calibrators/CalibrateGrayscaleControl.axaml @@ -7,7 +7,7 @@ <Grid ColumnDefinitions="Auto,10,350"> <StackPanel Spacing="10"> <Grid - RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto" + RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto" ColumnDefinitions="Auto,10,100,5,Auto,20,Auto,10,100,5,Auto" > @@ -142,11 +142,21 @@ Increment="1" Minimum="0" Maximum="10000" - Value="{Binding Operation.InnerMargin}" - /> + Value="{Binding Operation.InnerMargin}"/> <TextBlock Grid.Row="8" Grid.Column="10" VerticalAlignment="Center" Text="px"/> + + <CheckBox Grid.Row="10" Grid.Column="2" Grid.ColumnSpan="4" + VerticalAlignment="Center" + Content="Enable Anti-Aliasing" + IsChecked="{Binding Operation.EnableAntiAliasing}"/> + + <CheckBox Grid.Row="10" Grid.Column="8" + Grid.ColumnSpan="3" + ToolTip.Tip="Most of the printers requires a mirror output to print with the correct orientation" + IsChecked="{Binding Operation.MirrorOutput}" + Content="Mirror output" /> </Grid> @@ -163,7 +173,7 @@ <Grid Margin="0,10,0,0" - RowDefinitions="Auto,0,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto" + RowDefinitions="Auto,0,Auto,10,Auto,10,Auto,10,Auto,10,Auto" ColumnDefinitions="Auto,10,80,5,Auto,5,80,5,Auto,20,Auto,10,80" > @@ -293,11 +303,6 @@ <TextBlock Grid.Row="10" Grid.Column="4" VerticalAlignment="Center" Text="px"/> - - <CheckBox Grid.Row="12" Grid.Column="2" Grid.ColumnSpan="11" - VerticalAlignment="Center" - Content="Enable Anti-Aliasing" - IsChecked="{Binding Operation.EnableAntiAliasing}"/> </Grid> </StackPanel> </Border> diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml b/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml index 715b995..fed2a9e 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml +++ b/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml @@ -234,6 +234,12 @@ IsChecked="{Binding Operation.EnableAntiAliasing}" Content="Enable Anti-Aliasing"/> + <CheckBox Grid.Row="16" Grid.Column="8" + Grid.ColumnSpan="3" + ToolTip.Tip="Most of the printers requires a mirror output to print with the correct orientation" + IsChecked="{Binding Operation.MirrorOutput}" + Content="Mirror output" /> + </Grid> </Expander> </Border> diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml.cs b/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml.cs index 285f9fc..7191bfb 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml.cs +++ b/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml.cs @@ -69,8 +69,10 @@ namespace UVtools.WPF.Controls.Calibrators case ToolWindow.Callbacks.Init: case ToolWindow.Callbacks.ProfileLoaded: Operation.Resolution = App.SlicerFile.Resolution; - Operation.DisplayWidth = (decimal)App.SlicerFile.DisplayWidth; - Operation.DisplayHeight = (decimal)App.SlicerFile.DisplayHeight; + if (App.SlicerFile.DisplayWidth > 0) + Operation.DisplayWidth = (decimal)App.SlicerFile.DisplayWidth; + if (App.SlicerFile.DisplayHeight > 0) + Operation.DisplayHeight = (decimal)App.SlicerFile.DisplayHeight; Operation.PropertyChanged += (sender, e) => { _timer.Stop(); diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml b/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml index f865e56..8070a8d 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml +++ b/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml @@ -221,11 +221,17 @@ IsEnabled="{Binding Operation.HollowModel}" Text="mm"/> - <CheckBox Grid.Row="14" Grid.Column="2" Grid.ColumnSpan="9" + <CheckBox Grid.Row="14" Grid.Column="2" Grid.ColumnSpan="4" VerticalAlignment="Center" IsChecked="{Binding Operation.CenterHoleRelief}" Content="Relief with a center hole"/> + <CheckBox Grid.Row="14" Grid.Column="8" + Grid.ColumnSpan="3" + ToolTip.Tip="Most of the printers requires a mirror output to print with the correct orientation" + IsChecked="{Binding Operation.MirrorOutput}" + Content="Mirror output" /> + <TextBlock Grid.Row="16" Grid.Column="0" VerticalAlignment="Center" Text="Objects to output:"/> diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml.cs b/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml.cs index de538ab..c9deea5 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml.cs +++ b/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml.cs @@ -70,8 +70,10 @@ namespace UVtools.WPF.Controls.Calibrators case ToolWindow.Callbacks.Init: case ToolWindow.Callbacks.ProfileLoaded: Operation.Resolution = App.SlicerFile.Resolution; - Operation.DisplayWidth = (decimal)App.SlicerFile.DisplayWidth; - Operation.DisplayHeight = (decimal)App.SlicerFile.DisplayHeight; + if(App.SlicerFile.DisplayWidth > 0) + Operation.DisplayWidth = (decimal)App.SlicerFile.DisplayWidth; + if (App.SlicerFile.DisplayHeight > 0) + Operation.DisplayHeight = (decimal)App.SlicerFile.DisplayHeight; Operation.PropertyChanged += (sender, e) => { _timer.Stop(); diff --git a/UVtools.WPF/Controls/KernelControl.axaml.cs b/UVtools.WPF/Controls/KernelControl.axaml.cs index f587e3d..c836545 100644 --- a/UVtools.WPF/Controls/KernelControl.axaml.cs +++ b/UVtools.WPF/Controls/KernelControl.axaml.cs @@ -178,8 +178,7 @@ namespace UVtools.WPF.Controls public Kernel GetKernel() { var matrix = GetMatrix(); - if (matrix is null) return null; - return new Kernel(matrix, Anchor); + return matrix is null ? null : new Kernel(matrix, Anchor); } } } diff --git a/UVtools.WPF/UVtools.WPF.csproj b/UVtools.WPF/UVtools.WPF.csproj index b9344f0..5d5ad09 100644 --- a/UVtools.WPF/UVtools.WPF.csproj +++ b/UVtools.WPF/UVtools.WPF.csproj @@ -12,7 +12,7 @@ <PackageLicenseFile>LICENSE</PackageLicenseFile> <RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl> <RepositoryType>Git</RepositoryType> - <Version>2.1.2</Version> + <Version>2.1.3</Version> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> |