mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
Add Sonic Mini 4K
This commit is contained in:
+2
-1
@@ -30,4 +30,5 @@
|
||||
* Paul Hammerstrom
|
||||
* Jeremy Lauzon
|
||||
* Peter Teal
|
||||
* Ulrich Mandl
|
||||
* Ulrich Mandl
|
||||
* Erwin Ried
|
||||
@@ -31,15 +31,16 @@ SET files[21]=Phrozen Shuffle XL.ini
|
||||
SET files[22]=Phrozen Shuffle 4K.ini
|
||||
SET files[23]=Phrozen Sonic.ini
|
||||
SET files[24]=Phrozen Sonic Mini.ini
|
||||
SET files[25]=Phrozen Transform.ini
|
||||
SET files[26]=Kelant S400.ini
|
||||
SET files[27]=Wanhao D7.ini
|
||||
SET files[28]=Wanhao D8.ini
|
||||
SET files[29]=Creality LD-002R.ini
|
||||
SET files[30]=Creality LD-002H.ini
|
||||
SET files[31]=Voxelab Polaris.ini
|
||||
SET files[32]=Longer Orange 10.ini
|
||||
SET files[33]=Longer Orange 30.ini
|
||||
SET files[25]=Phrozen Sonic Mini 4K.ini
|
||||
SET files[26]=Phrozen Transform.ini
|
||||
SET files[27]=Kelant S400.ini
|
||||
SET files[28]=Wanhao D7.ini
|
||||
SET files[29]=Wanhao D8.ini
|
||||
SET files[30]=Creality LD-002R.ini
|
||||
SET files[31]=Creality LD-002H.ini
|
||||
SET files[32]=Voxelab Polaris.ini
|
||||
SET files[33]=Longer Orange 10.ini
|
||||
SET files[34]=Longer Orange 30.ini
|
||||
|
||||
echo PrusaSlicer Printers Instalation
|
||||
echo This will replace printers, all changes will be discarded
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# generated by PrusaSlicer 2.2.0+win64 on 2020-09-23 at 19:41:00 UTC
|
||||
absolute_correction = 0
|
||||
area_fill = 50
|
||||
bed_custom_model =
|
||||
bed_custom_texture =
|
||||
bed_shape = 0x0,134.4x0,134.4x75.6,0x75.6
|
||||
default_sla_material_profile = Prusa Orange Tough 0.05
|
||||
default_sla_print_profile = 0.05 Normal
|
||||
display_height = 75.6
|
||||
display_mirror_x = 0
|
||||
display_mirror_y = 1
|
||||
display_orientation = landscape
|
||||
display_pixels_x = 3840
|
||||
display_pixels_y = 2160
|
||||
display_width = 134.4
|
||||
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 = 130
|
||||
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_PHROZEN\nPRINTER_MODEL_SONIC_MINI_4K\n\nSTART_CUSTOM_VALUES\nLayerOffTime_10\nBottomLightOffDelay_10\nBottomLiftHeight_6\nLiftHeight_5\nBottomLiftSpeed_100\nLiftSpeed_100\nRetractSpeed_150\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
|
||||
@@ -416,7 +416,109 @@
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<Grid
|
||||
RowDefinitions="Auto,*">
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Orientation="Horizontal"
|
||||
Spacing="5"
|
||||
VerticalAlignment="Center">
|
||||
<Button
|
||||
IsEnabled="{Binding IssueCanGoPrevious}"
|
||||
Command="{Binding IssueGoPrevious}"
|
||||
>
|
||||
<Image Source="/Assets/Icons/back-16x16.png" Width="16"/>
|
||||
</Button>
|
||||
|
||||
<TextBlock VerticalAlignment="Center">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="\{0\}/\{1\}">
|
||||
<Binding Path="#IssuesGrid.SelectedIndex"/>
|
||||
<Binding Path="Issues.Count"/>
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
|
||||
<Button
|
||||
IsEnabled="{Binding IssueCanGoNext}"
|
||||
Command="{Binding IssueGoNext}"
|
||||
>
|
||||
<Image Source="/Assets/Icons/next-16x16.png" Width="16"/>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Orientation="Horizontal"
|
||||
Spacing="5"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<Button
|
||||
IsEnabled="{Binding VisibleThumbnailIndex}"
|
||||
ToolTip.Tip="Replace the current preview image"
|
||||
Command="{Binding OnClickThumbnailImport}">
|
||||
<Image Source="/Assets/Icons/photo-16x16.png" />
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
ToolTip.Tip="Compute Issues. Right click to access settings."
|
||||
Command="{Binding OnClickDetectIssues}">
|
||||
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu PlacementMode="Bottom">
|
||||
<CheckBox
|
||||
IsChecked="{Binding Settings.Issues.ComputeIslands}"
|
||||
Content="Islands"/>
|
||||
<CheckBox
|
||||
IsChecked="{Binding Settings.Issues.ComputeResinTraps}"
|
||||
Content="Resin traps"/>
|
||||
<CheckBox
|
||||
IsChecked="{Binding Settings.Issues.ComputeTouchingBounds}"
|
||||
Content="Touching bounds"/>
|
||||
<CheckBox
|
||||
IsChecked="{Binding Settings.Issues.ComputeEmptyLayers}"
|
||||
Content="Empty layers"/>
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<Image Source="/Assets/Icons/save-16x16.png" />
|
||||
<TextBlock Text="Detect ⮟"/>
|
||||
</StackPanel>
|
||||
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<DataGrid
|
||||
Name="IssuesGrid"
|
||||
Grid.Row="1"
|
||||
CanUserReorderColumns="True"
|
||||
CanUserResizeColumns="True"
|
||||
CanUserSortColumns="True"
|
||||
GridLinesVisibility="All"
|
||||
IsReadOnly="True"
|
||||
ClipboardCopyMode="IncludeHeader"
|
||||
Items="{Binding Issues}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Type"
|
||||
Binding="{Binding Type}"
|
||||
Width="Auto" />
|
||||
<DataGridTextColumn Header="Layer"
|
||||
Binding="{Binding LayerIndex}"
|
||||
Width="Auto" />
|
||||
<DataGridTextColumn Header="Position (X, Y)"
|
||||
Binding="{Binding FirstPoint}"
|
||||
Width="Auto" />
|
||||
<DataGridTextColumn Header="Pixels"
|
||||
Binding="{Binding PixelsCount}"
|
||||
Width="Auto" />
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ using Avalonia.Input;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Threading;
|
||||
using DynamicData;
|
||||
using Emgu.CV;
|
||||
using Emgu.CV.CvEnum;
|
||||
using Emgu.CV.Structure;
|
||||
@@ -190,7 +191,6 @@ namespace UVtools.WPF
|
||||
{
|
||||
return; // This should never happen!
|
||||
}
|
||||
|
||||
var dialog = new SaveFileDialog
|
||||
{
|
||||
Filters = Helpers.PngFileFilter,
|
||||
@@ -372,6 +372,95 @@ namespace UVtools.WPF
|
||||
|
||||
#endregion
|
||||
|
||||
#region Issues
|
||||
|
||||
public void OnClickDetectIssues()
|
||||
{
|
||||
if (!IsFileLoaded) return;
|
||||
ComputeIssues(
|
||||
GetIslandDetectionConfiguration(),
|
||||
GetResinTrapDetectionConfiguration(),
|
||||
GetTouchingBoundsDetectionConfiguration(),
|
||||
Settings.Issues.ComputeEmptyLayers);
|
||||
}
|
||||
|
||||
private async void ComputeIssues(IslandDetectionConfiguration islandConfig = null,
|
||||
ResinTrapDetectionConfiguration resinTrapConfig = null,
|
||||
TouchingBoundDetectionConfiguration touchingBoundConfig = null, bool emptyLayersConfig = true)
|
||||
{
|
||||
|
||||
Issues.Clear();
|
||||
IsGUIEnabled = false;
|
||||
|
||||
ProgressWindow.SetTitle("Computing Issues");
|
||||
|
||||
var task = Task.Factory.StartNew(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var issues = SlicerFile.LayerManager.GetAllIssues(islandConfig, resinTrapConfig, touchingBoundConfig,
|
||||
emptyLayersConfig, ProgressWindow.RestartProgress());
|
||||
return issues;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await this.MessageBoxError(ex.Message, "Error while trying compute issues");
|
||||
}
|
||||
finally
|
||||
{
|
||||
IsGUIEnabled = true;
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
await ProgressWindow.ShowDialog(this);
|
||||
if (task.Result.Result is null) return;
|
||||
Issues.AddRange(task.Result.Result);
|
||||
|
||||
}
|
||||
|
||||
public IslandDetectionConfiguration GetIslandDetectionConfiguration()
|
||||
{
|
||||
return new IslandDetectionConfiguration
|
||||
{
|
||||
Enabled = Settings.Issues.ComputeIslands,
|
||||
AllowDiagonalBonds = Settings.Issues.IslandAllowDiagonalBonds,
|
||||
BinaryThreshold = Settings.Issues.IslandBinaryThreshold,
|
||||
RequiredAreaToProcessCheck = Settings.Issues.IslandRequiredAreaToProcessCheck,
|
||||
RequiredPixelBrightnessToProcessCheck = Settings.Issues.IslandRequiredPixelBrightnessToProcessCheck,
|
||||
RequiredPixelsToSupport = Settings.Issues.IslandRequiredPixelsToSupport,
|
||||
RequiredPixelBrightnessToSupport = Settings.Issues.IslandRequiredPixelBrightnessToSupport
|
||||
};
|
||||
}
|
||||
|
||||
public ResinTrapDetectionConfiguration GetResinTrapDetectionConfiguration()
|
||||
{
|
||||
return new ResinTrapDetectionConfiguration
|
||||
{
|
||||
Enabled = Settings.Issues.ComputeResinTraps,
|
||||
BinaryThreshold = Settings.Issues.ResinTrapBinaryThreshold,
|
||||
RequiredAreaToProcessCheck = Settings.Issues.ResinTrapRequiredAreaToProcessCheck,
|
||||
RequiredBlackPixelsToDrain = Settings.Issues.ResinTrapRequiredBlackPixelsToDrain,
|
||||
MaximumPixelBrightnessToDrain = Settings.Issues.ResinTrapMaximumPixelBrightnessToDrain
|
||||
};
|
||||
}
|
||||
|
||||
public TouchingBoundDetectionConfiguration GetTouchingBoundsDetectionConfiguration()
|
||||
{
|
||||
return new TouchingBoundDetectionConfiguration
|
||||
{
|
||||
Enabled = Settings.Issues.ComputeTouchingBounds,
|
||||
//MaximumPixelBrightness = 100
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Log
|
||||
public bool IsVerbose
|
||||
{
|
||||
@@ -543,16 +632,16 @@ namespace UVtools.WPF
|
||||
set
|
||||
{
|
||||
if (!SetProperty(ref _actualLayer, value)) return;
|
||||
InvalidateLayerNavigation();
|
||||
ShowLayer();
|
||||
InvalidateLayerNavigation();
|
||||
}
|
||||
}
|
||||
|
||||
public void ForceUpdateActualLayer(uint layerIndex = 0)
|
||||
{
|
||||
_actualLayer = layerIndex;
|
||||
InvalidateLayerNavigation();
|
||||
ShowLayer();
|
||||
InvalidateLayerNavigation();
|
||||
}
|
||||
|
||||
public void InvalidateLayerNavigation()
|
||||
@@ -763,9 +852,6 @@ namespace UVtools.WPF
|
||||
return false;
|
||||
});
|
||||
|
||||
//ProgressWindow progressWindow = new ProgressWindow();
|
||||
//progressWindow.ShowDialog(this);
|
||||
|
||||
await ProgressWindow.ShowDialog<DialogResults>(this);
|
||||
if (!task.Result.Result)
|
||||
{
|
||||
@@ -805,7 +891,6 @@ namespace UVtools.WPF
|
||||
|
||||
UpdateTitle();
|
||||
|
||||
_actualLayer = actualLayer.Clamp(actualLayer, SliderMaximumValue);
|
||||
|
||||
if (!(mat is null) && Settings.LayerPreview.AutoRotateLayerBestView)
|
||||
{
|
||||
@@ -814,8 +899,8 @@ namespace UVtools.WPF
|
||||
|
||||
ResetDataContext();
|
||||
|
||||
ShowLayer();
|
||||
|
||||
ForceUpdateActualLayer(actualLayer.Clamp(actualLayer, SliderMaximumValue));
|
||||
|
||||
if (Settings.LayerPreview.ZoomToFitPrintVolumeBounds)
|
||||
{
|
||||
ZoomToFit();
|
||||
|
||||
Reference in New Issue
Block a user