feat: 增加钻带涨缩功能,支持倍率/PPM模式缩放坐标
- 新增 ExcellonScaler 引擎:普通孔缩放坐标,G85槽孔保护槽长,刀具定义行原样保留 - 新增 DrillScalingWindow 参数设置窗口:倍率/PPM模式切换,X/Y独立输入 - 集成到启动功能菜单:.dr2/.dpin 文件显示"涨缩"按钮 - 输出覆盖原文件 + .bak 备份,GB2312 编码
This commit is contained in:
94
DrillScalingWindow.xaml
Normal file
94
DrillScalingWindow.xaml
Normal file
@@ -0,0 +1,94 @@
|
||||
<Window x:Class="DrillTools.DrillScalingWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="钻带涨缩"
|
||||
Width="350"
|
||||
SizeToContent="Height"
|
||||
ResizeMode="NoResize"
|
||||
Topmost="True"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
<Grid Margin="15">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 模式选择 -->
|
||||
<GroupBox Grid.Row="0" Header="输入模式" Margin="0,0,0,10">
|
||||
<StackPanel>
|
||||
<RadioButton Name="RatioRadioButton"
|
||||
Content="倍率模式"
|
||||
IsChecked="True"
|
||||
Margin="0,5,0,5"
|
||||
Checked="ModeRadioButton_Changed" />
|
||||
<RadioButton Name="PpmRadioButton"
|
||||
Content="PPM 模式"
|
||||
Margin="0,0,0,5"
|
||||
Checked="ModeRadioButton_Changed" />
|
||||
<TextBlock Text="{Binding ModeDescription}"
|
||||
Foreground="Gray"
|
||||
FontSize="11"
|
||||
Margin="20,0,0,5" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<!-- X 方向参数 -->
|
||||
<Grid Grid.Row="1" Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Text="{Binding ModeLabelX}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,10,0" />
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding InputX, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="25" />
|
||||
</Grid>
|
||||
|
||||
<!-- Y 方向参数 -->
|
||||
<Grid Grid.Row="2" Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Text="{Binding ModeLabelY}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,10,0" />
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding InputY, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="25" />
|
||||
</Grid>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<TextBlock Grid.Row="3"
|
||||
Name="ErrorText"
|
||||
Foreground="Red"
|
||||
FontSize="11"
|
||||
Text=""
|
||||
Margin="0,0,0,10"
|
||||
Visibility="Collapsed" />
|
||||
|
||||
<!-- 按钮区域 -->
|
||||
<StackPanel Grid.Row="4"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button Width="80"
|
||||
Height="30"
|
||||
Content="取消"
|
||||
IsCancel="True"
|
||||
Margin="0,0,10,0"
|
||||
Click="CancelButton_Click" />
|
||||
<Button Width="80"
|
||||
Height="30"
|
||||
Content="执行"
|
||||
IsDefault="True"
|
||||
Click="ExecuteButton_Click" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user