Skip to content

Commit

Permalink
release candidate (preview 25) for build 36
Browse files Browse the repository at this point in the history
  • Loading branch information
terjeio committed Dec 26, 2021
1 parent f2652b1 commit 42149d3
Show file tree
Hide file tree
Showing 99 changed files with 0 additions and 7,190 deletions.
13 changes: 0 additions & 13 deletions CNC Controls Dragknife/DragKnifeDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,17 @@
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto" Margin="5,5">
<GroupBox x:Uid="grp_knife" Header="Knife" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Height="Auto" Width="280">
<StackPanel>
<<<<<<< HEAD
<Controls:NumericField x:Uid="fld_tipOffset" Label="Tip offset:" ColonAt="120" Unit="mm" Format="#0.###" Value="{Binding Path=KnifeTipOffset, Mode=TwoWay}"/>
<Controls:NumericField x:Uid="fld_cutDepth" Label="Cut depth:" ColonAt="120" Unit="mm" Format="-###0.###" Value="{Binding Path=CutDepth, Mode=TwoWay}"/>
<Controls:NumericField x:Uid="fld_swivelAngle" Label="Swivel angle:" ColonAt="120" Unit="deg" Format="##0" Value="{Binding Path=SwivelAngle, Mode=TwoWay}"/>
<Controls:NumericField x:Uid="fld_dentLength" Label="Dent length:" ColonAt="120" Unit="mm" Format="###0.###" Value="{Binding Path=DentLength, Mode=TwoWay}"/>
=======
<Controls:NumericField x:Uid="fld_tipOffset" Label="Tip offset:" ColonAt="90" Unit="mm" Format="#0.###" Value="{Binding Path=KnifeTipOffset, Mode=TwoWay}"/>
<Controls:NumericField x:Uid="fld_cutDepth" Label="Cut depth:" ColonAt="90" Unit="mm" Format="-###0.###" Value="{Binding Path=CutDepth, Mode=TwoWay}"/>
<Controls:NumericField x:Uid="fld_swivelAngle" Label="Swivel angle:" ColonAt="90" Unit="deg" Format="##0" Value="{Binding Path=SwivelAngle, Mode=TwoWay}"/>
<Controls:NumericField x:Uid="fld_dentLength" Label="Dent length:" ColonAt="90" Unit="mm" Format="###0.###" Value="{Binding Path=DentLength, Mode=TwoWay}"/>
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
</StackPanel>
</GroupBox>
<GroupBox x:Uid="grp_retract" Header="Retract" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Height="Auto" Width="280">
<StackPanel>
<<<<<<< HEAD
<CheckBox x:Uid="lbl_retractEnable" Content="Retract enable" IsChecked="{Binding Path=RetractEnable, Mode=TwoWay}" Margin="120,5,0,0"/>
<Controls:NumericField x:Uid="fld_retractAngle" Label="Retract angle:" ColonAt="120" Unit="deg" Format="##0" Value="{Binding Path=RetractAngle, Mode=TwoWay}"/>
<Controls:NumericField x:Uid="fld_retractDepth" Label="Retract depth:" ColonAt="120" Unit="mm/min" Format="-###0.###" Value="{Binding Path=RetractDepth, Mode=TwoWay}"/>
=======
<CheckBox x:Uid="lbl_retractEnable" Content="Retract enable" IsChecked="{Binding Path=RetractEnable, Mode=TwoWay}" Margin="90,5,0,0"/>
<Controls:NumericField x:Uid="fld_retractAngle" Label="Retract angle:" ColonAt="90" Unit="deg" Format="##0" Value="{Binding Path=RetractAngle, Mode=TwoWay}"/>
<Controls:NumericField x:Uid="fld_retractDepth" Label="Retract depth:" ColonAt="90" Unit="mm/min" Format="-###0.###" Value="{Binding Path=RetractDepth, Mode=TwoWay}"/>
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
</StackPanel>
</GroupBox>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Width="Auto" Margin="0,10">
Expand Down
18 changes: 0 additions & 18 deletions CNC Controls Lathe/CNC Controls Lathe/ConfigControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,27 @@
xmlns:local="clr-namespace:CNC.Controls.Lathe"
xmlns:Controls="clr-namespace:CNC.Controls;assembly=CNC.Controls.WPF"
mc:Ignorable="d"
<<<<<<< HEAD
d:DesignHeight="140" d:DesignWidth="310">
<GroupBox x:Name="grpLathe" Header="Lathe" HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto" Width="310">
<StackPanel HorizontalAlignment="Left" Height="Auto" Margin="0,3,0,0" VerticalAlignment="Top" Width="235">
<Grid Height="29">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="140"/>
=======
d:DesignHeight="140" d:DesignWidth="250">
<GroupBox x:Name="grpLathe" Header="Lathe" HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto" Width="250">
<StackPanel HorizontalAlignment="Left" Height="Auto" Margin="0,3,0,0" VerticalAlignment="Top" Width="235">
<Grid Height="29">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
<ColumnDefinition Width="100*"/>
</Grid.ColumnDefinitions>
<Label Content="Mode:" HorizontalAlignment="Right" Margin="0,0,0,0" VerticalAlignment="Top"/>
<ComboBox ItemsSource="{Binding Path=Lathe.LatheModes}" SelectedItem="{Binding Path=Lathe.XMode, Mode=TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="0,2,0,0" VerticalAlignment="Top" Width="80"/>
</Grid>
<Grid Height="29">
<Grid.ColumnDefinitions>
<<<<<<< HEAD
<ColumnDefinition Width="140"/>
=======
<ColumnDefinition Width="90"/>
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
<ColumnDefinition Width="100*"/>
</Grid.ColumnDefinitions>
<Label Content="Z direction:" HorizontalAlignment="Right" Margin="0,0,0,0" VerticalAlignment="Top"/>
<ComboBox ItemsSource="{Binding Path=Lathe.ZDirections}" SelectedItem="{Binding Path=Lathe.ZDirection, Mode=TwoWay}" IsEnabled="{Binding Path=Lathe.IsEnabled, Mode=OneWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="0,2,0,0" VerticalAlignment="Top" Width="80"/>
</Grid>
<<<<<<< HEAD
<Controls:NumericField Label="Feedrate:" ColonAt="140" Unit="mm/min" Format="###0" Value="{Binding Path=Lathe.FeedRate, Mode=TwoWay}" IsEnabled="{Binding Path=Lathe.IsEnabled, Mode=OneWay}"/>
<Controls:NumericField Label="Last passdepth:" ColonAt="140" Value="{Binding Path=Lathe.PassDepthLast, Mode=TwoWay}" IsEnabled="{Binding Path=Lathe.IsEnabled, Mode=OneWay}"/>
=======
<Controls:NumericField Label="Feedrate:" ColonAt="90" Unit="mm/min" Format="###0" Value="{Binding Path=Lathe.FeedRate, Mode=TwoWay}" IsEnabled="{Binding Path=Lathe.IsEnabled, Mode=OneWay}"/>
<Controls:NumericField Label="Last passdepth:" ColonAt="90" Value="{Binding Path=Lathe.PassDepthLast, Mode=TwoWay}" IsEnabled="{Binding Path=Lathe.IsEnabled, Mode=OneWay}"/>
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
</StackPanel>
</GroupBox>
</UserControl>
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<<<<<<< HEAD
<Page Include="LibStrings.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
=======
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
<Page Include="ProbingView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
19 changes: 0 additions & 19 deletions CNC Controls Probing/CNC Controls Probing/CenterFinderControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:Controls="clr-namespace:CNC.Controls;assembly=CNC.Controls.WPF"
xmlns:local="clr-namespace:CNC.Controls.Probing"
<<<<<<< HEAD
xmlns:system="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" Height="370"
d:DesignHeight="370" d:DesignWidth="625">
Expand All @@ -18,11 +17,6 @@
<system:String x:Uid="str_centerFinderClearance" x:Key="Clearance">Probing XY clearance too large for workpiece {0} size.</system:String>
<system:String x:Uid="str_centerFinderFailed" x:Key="ProbingFailed">Probing failed</system:String>
<system:String x:Uid="str_centerFinderCompleted" x:Key="ProbingCompleted">Probing completed: X distance {0}, Y distance {1}.</system:String>
=======
mc:Ignorable="d" Height="370"
d:DesignHeight="370" d:DesignWidth="600">
<UserControl.Resources>
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
<Controls:MultiLineConverter x:Key="ErrorMessageConverter" />
<Controls:LogicalNotConverter x:Key="IsNotRunningConverter" />
<Controls:BoolToVisibleConverter x:Key="ToVisibleConverter" />
Expand All @@ -43,19 +37,11 @@
</Style>
</UserControl.Resources>
<Grid>
<<<<<<< HEAD
<StackPanel Orientation="Vertical" Margin="5" HorizontalAlignment="Left" Width="350">
<DockPanel>
<local:CsSelectControl/>
<GroupBox x:Uid="grp_passes" Header="Passes" ToolTip="More than one pass is usually needed to get accurate dimensions." HorizontalAlignment="Stretch">
<Controls:NumericField x:Uid="fld_passes" Label="Passes:" ColonAt="80" Value="{Binding Path=Passes, Mode=TwoWay}" Unit="" Format="0" Margin="0,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource ErrorStyle}"/>
=======
<StackPanel Orientation="Vertical" Margin="5" HorizontalAlignment="Left" Width="330">
<DockPanel>
<local:CsSelectControl/>
<GroupBox x:Uid="grp_passes" Header="Passes" ToolTip="More than one pass is usually needed to get accurate dimensions." HorizontalAlignment="Stretch">
<Controls:NumericField x:Uid="fld_passes" Label="Passes:" Value="{Binding Path=Passes, Mode=TwoWay}" Unit="" Format="0" Margin="0,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource ErrorStyle}"/>
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
</GroupBox>
</DockPanel>
<GroupBox x:Uid="grp_dimensions" Header="Workpiece dimensions">
Expand Down Expand Up @@ -103,13 +89,8 @@
<Button x:Uid="btn_start" Content="Start" IsEnabled="{Binding Path=Grbl.IsJobRunning, Converter={StaticResource IsNotRunningConverter}}" Margin="2,0" Width="75" Click="start_Click"/>
<Button x:Uid="btn_stop" Content="Stop" IsEnabled="{Binding Path=Grbl.IsJobRunning}" Margin="2,0" Width="75" Click="stop_Click"/>
</StackPanel>
<<<<<<< HEAD
<CheckBox x:Uid="lbl_preview" Content="Preview" Margin="365,10,0,0" IsChecked="{Binding Path=PreviewEnable}"/>
<GroupBox x:Uid="grp_preview" Header="Preview" Margin="365,30,0,0" Visibility="{Binding Path=PreviewEnable, Converter={StaticResource ToVisibleConverter}}" VerticalAlignment="Top">
=======
<CheckBox x:Uid="lbl_preview" Content="Preview" Margin="345,10,0,0" IsChecked="{Binding Path=PreviewEnable}"/>
<GroupBox x:Uid="grp_preview" Header="Preview" Margin="345,30,0,0" Visibility="{Binding Path=PreviewEnable, Converter={StaticResource ToVisibleConverter}}" VerticalAlignment="Top">
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
<TextBox IsReadOnly="True" Text="{Binding Path=PreviewText, Mode=OneWay}" TextWrapping="NoWrap" Margin="0,5,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="235" Height="300"
FontSize="10" FontFamily="Verdana"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/*
* CenterFinderControl.xaml.cs - part of CNC Probing library
*
<<<<<<< HEAD
* v0.36 / 2021-12-01 / Io Engineering (Terje Io)
=======
* v0.30 / 2021-04-04 / Io Engineering (Terje Io)
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
*
*/

Expand Down Expand Up @@ -80,11 +76,7 @@ public CenterFinderControl()

public void Activate()
{
<<<<<<< HEAD
(DataContext as ProbingViewModel).Instructions = ((string)FindResource("Instructions")).Replace("\\n", "\n");
=======
(DataContext as ProbingViewModel).Instructions = "Click image above to select probing action.\nPlace the probe above the approximate center of the workpiece before start.";
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
}

private bool CreateProgram(bool preview)
Expand All @@ -93,21 +85,13 @@ private bool CreateProgram(bool preview)

if (probing.ProbeCenter == Center.None)
{
<<<<<<< HEAD
MessageBox.Show((string)FindResource("SelectType"), "Center finder", MessageBoxButton.OK, MessageBoxImage.Exclamation);
=======
MessageBox.Show("Select type of probe by clicking on one of the images above.", "Center finder", MessageBoxButton.OK, MessageBoxImage.Exclamation);
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
return false;
}

if (!probing.Program.Init())
{
<<<<<<< HEAD
probing.Message = (string)FindResource("InitFailed");
=======
probing.Message = "Init failed!";
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
return false;
}

Expand Down Expand Up @@ -220,11 +204,7 @@ private bool CreateProgram(bool preview)
}

if(probing.Passes > 1)
<<<<<<< HEAD
probing.Message = string.Format((string)FindResource("ProbingPass"), (probing.Passes - pass + 1), probing.Passes);
=======
probing.Message = string.Format("Probing, pass {0} of {1}...", (probing.Passes - pass + 1), probing.Passes);
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6

return true;
}
Expand All @@ -240,13 +220,8 @@ public void Start(bool preview = false)

if (probing.WorkpieceSizeX <= 0d && probing.WorkpieceSizeY <= 0d)
{
<<<<<<< HEAD
probing.SetError(nameof(probing.WorkpieceSizeX), string.Format((string)FindResource("WorkPieceSize"), "X"));
probing.SetError(nameof(probing.WorkpieceSizeY), string.Format((string)FindResource("WorkPieceSize"), "Y"));
=======
probing.SetError(nameof(probing.WorkpieceSizeX), "Workpiece X size cannot be 0.");
probing.SetError(nameof(probing.WorkpieceSizeY), "Workpiece Y size cannot be 0.");
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
return;
}

Expand All @@ -266,21 +241,13 @@ public void Start(bool preview = false)

if (mode != FindMode.Y && probing.ProbeCenter == Center.Inside && probing.WorkpieceSizeX < probing.XYClearance * 2d + probing.ProbeDiameter)
{
<<<<<<< HEAD
probing.SetError(nameof(probing.WorkpieceSizeX), string.Format((string)FindResource("Clearance"), "X"));
=======
probing.SetError(nameof(probing.WorkpieceSizeX), "Probing XY clearance too large for workpiece X size.");
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
return;
}

if (mode != FindMode.X && probing.ProbeCenter == Center.Inside && probing.WorkpieceSizeY < probing.XYClearance * 2d + probing.ProbeDiameter)
{
<<<<<<< HEAD
probing.SetError(nameof(probing.WorkpieceSizeY), string.Format((string)FindResource("Clearance"), "Y"));
=======
probing.SetError(nameof(probing.WorkpieceSizeY), "Probing XY clearance too large for workpiece Y size.");
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
return;
}

Expand Down Expand Up @@ -317,11 +284,7 @@ private bool OnCompleted()
if (probing.IsSuccess && probing.Positions.Count != (mode == FindMode.XY ? 4 : 2))
{
probing.IsSuccess = false;
<<<<<<< HEAD
probing.Program.End((string)FindResource("ProbingFailed"));
=======
probing.Program.End("Probing failed");
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
return false;
}

Expand Down Expand Up @@ -372,32 +335,20 @@ private bool OnCompleted()
{
center.X = probing.ProbeOffsetX;
center.Y = probing.ProbeOffsetY;
<<<<<<< HEAD
probing.WaitForResponse("G92" + center.ToString(axisflags));
=======
probing.Grbl.ExecuteCommand("G92" + center.ToString(axisflags));
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
if (!probing.Grbl.IsParserStateLive)
probing.Grbl.ExecuteCommand("$G");
}
else
{
center.X += probing.ProbeOffsetX;
center.Y += probing.ProbeOffsetY;
<<<<<<< HEAD
probing.WaitForResponse(string.Format("G10L2P{0}{1}", probing.CoordinateSystem, center.ToString(axisflags)));
=======
probing.Grbl.ExecuteCommand(string.Format("G10L2P{0}{1}", probing.CoordinateSystem, center.ToString(axisflags)));
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
}
}

if (!ok || pass == 1)
<<<<<<< HEAD
probing.Program.End(ok ? string.Format((string)FindResource("ProbingCompleted"), X_distance.ToInvariantString(), Y_distance.ToInvariantString()) : (string)FindResource("ProbingFailed"));
=======
probing.Program.End(ok ? string.Format("Probing completed: X distance {0}, Y distance {1}", X_distance.ToInvariantString(), Y_distance.ToInvariantString()) : "Probing failed");
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
}

return ok;
Expand Down
6 changes: 0 additions & 6 deletions CNC Controls Probing/CNC Controls Probing/ConfigControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@
xmlns:local="clr-namespace:CNC.Controls.Probing"
xmlns:Controls="clr-namespace:CNC.Controls;assembly=CNC.Controls.WPF"
mc:Ignorable="d"
<<<<<<< HEAD
d:DesignHeight="42" d:DesignWidth="310">
<GroupBox x:Uid="grp_probeConfig" Header="Probing" HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto" Width="310">
<StackPanel HorizontalAlignment="Left" Height="Auto" Margin="0,3,0,0" VerticalAlignment="Top" Width="290">
=======
d:DesignHeight="42" d:DesignWidth="250">
<GroupBox x:Uid="grp_probeConfig" Header="Probing" HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto" Width="250">
<StackPanel HorizontalAlignment="Left" Height="Auto" Margin="0,3,0,0" VerticalAlignment="Top" Width="235">
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
<CheckBox x:Uid="lbl_chkProbeStatus" Content="Check probe status before start (G59.3)" HorizontalContentAlignment="Left" HorizontalAlignment="Left" Margin="5,0,0,0" IsChecked="{Binding Path=Probing.CheckProbeStatus, Mode=TwoWay}" ToolTip="An alarm will be generated by the controller if not enabled and the probe is asserted."/>
</StackPanel>
</GroupBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:Controls="clr-namespace:CNC.Controls;assembly=CNC.Controls.WPF"
xmlns:local="clr-namespace:CNC.Controls.Probing"
<<<<<<< HEAD
xmlns:system="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" Height="370"
d:DesignHeight="370" d:DesignWidth="500">
Expand All @@ -15,11 +14,6 @@
<system:String x:Uid="str_edgeFinderInitFailed" x:Key="PositionUnknown">Probing failed, machine position not known.</system:String>
<system:String x:Uid="str_edgeFinderFailed" x:Key="ProbingFailed">Probing failed</system:String>
<system:String x:Uid="str_edgeFinderCompleted" x:Key="ProbingCompleted">Probing completed.</system:String>
=======
mc:Ignorable="d" Height="370"
d:DesignHeight="370" d:DesignWidth="500">
<UserControl.Resources>
>>>>>>> 19fdd92047b4cf80b9621a803d965739e89ec2a6
<Controls:LogicalNotConverter x:Key="IsNotRunningConverter" />
<Controls:EnumValueToBooleanConverter x:Key="EnumToEdgeConverter" />
<Controls:BoolToVisibleConverter x:Key="ToVisibleConverter" />
Expand Down
Loading

0 comments on commit 42149d3

Please sign in to comment.