mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
5c5670f0b1
* (Add) Pixel Dimming: Chamfer - Allow the number of walls pixels to be gradually varied as the operation progresses from the starting layer to the ending layer (#106) * (Add) PrusaSlicer print profiles: 0.01, 0.02, 0.03, 0.04, 0.15, 0.2 * (Change) Morph: "Fade" to "Chamfer" naming, created profiles need redo * (Change) Pixel Dimming: Allow start with 0px walls when using "Walls Only" * (Change) PrusaSlicer print profiles names, reduced bottom layers and raft height * (Remove) PrusaSlicer print profiles with 3 digit z precision (0.025 and 0.035) * (Fix) PW0, PWS, PWMX, PWMO, PWMS, PWX file formats, where 4 offsets (16 bytes) were missing on preview image, leading to wrong table size. Previous converted files with UVtools wont open from now on, you need to reconvert them. (ezrec/uv3dp#124) * (Fix) Unable to run Re-Height tool due a rounding problem on some cases (#101) * (Fix) Layer preview end with exception when no per layer settings are available (SL1 case)
68 lines
2.0 KiB
C#
68 lines
2.0 KiB
C#
/*
|
|
* GNU AFFERO GENERAL PUBLIC LICENSE
|
|
* Version 3, 19 November 2007
|
|
* Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
* of this license document, but changing it is not allowed.
|
|
*/
|
|
|
|
using System;
|
|
using System.Windows.Forms;
|
|
using Emgu.CV.CvEnum;
|
|
using UVtools.Core.Objects;
|
|
using UVtools.Core.Operations;
|
|
|
|
namespace UVtools.GUI.Controls.Tools
|
|
{
|
|
public partial class CtrlToolMorph : CtrlToolWindowContent
|
|
{
|
|
public OperationMorph Operation { get; }
|
|
|
|
|
|
public CtrlToolMorph()
|
|
{
|
|
InitializeComponent();
|
|
Operation = new OperationMorph();
|
|
SetOperation(Operation);
|
|
|
|
|
|
cbMorphOperation.Items.AddRange(OperationMorph.MorphOperations);
|
|
cbMorphOperation.SelectedIndex = 0;
|
|
}
|
|
|
|
|
|
public override bool UpdateOperation()
|
|
{
|
|
base.UpdateOperation();
|
|
Operation.IterationsStart = (uint) nmIterationsStart.Value;
|
|
Operation.IterationsEnd = (uint) nmIterationsEnd.Value;
|
|
Operation.Chamfer = cbIterationsFade.Checked;
|
|
Operation.MorphOperation = (MorphOp)((StringTag) cbMorphOperation.SelectedItem).Tag;
|
|
Operation.Kernel.Anchor = ctrlKernel.KernelAnchor;
|
|
Operation.Kernel.Matrix = ctrlKernel.GetMatrix();
|
|
return true;
|
|
}
|
|
|
|
public override void ExtraActionCall(object sender)
|
|
{
|
|
if (ReferenceEquals(sender, ParentToolWindow.cbActionExtra))
|
|
{
|
|
ctrlKernel.Visible = ParentToolWindow.cbActionExtra.Checked;
|
|
return;
|
|
}
|
|
}
|
|
|
|
private void EventCheckedChanged(object sender, EventArgs e)
|
|
{
|
|
if (ReferenceEquals(sender, cbIterationsFade))
|
|
{
|
|
lbIterationsStop.Enabled =
|
|
nmIterationsEnd.Enabled =
|
|
cbIterationsFade.Checked;
|
|
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|