2025-09-16 16:06:41 +08:00
|
|
|
|
<controls:MaterialWindow
|
|
|
|
|
|
x:Class="Szmedi.RvKits.Modeling.TrackCreatorWin"
|
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
|
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
|
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
|
xmlns:local="clr-namespace:Szmedi.RvKits.Modeling"
|
|
|
|
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
|
Title="轨道创建"
|
|
|
|
|
|
Width="420"
|
|
|
|
|
|
Height="720"
|
|
|
|
|
|
d:DataContext="{d:DesignInstance Type=local:TrackCreatorViewModel}"
|
2025-09-19 09:18:09 +08:00
|
|
|
|
SizeToContent="Height"
|
2025-09-16 16:06:41 +08:00
|
|
|
|
mc:Ignorable="d">
|
|
|
|
|
|
<controls:MaterialWindow.Resources>
|
|
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
|
|
|
|
|
</controls:MaterialWindow.Resources>
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<Image Margin="5,5,5,5" Source="{Binding PreviewImage}" />
|
|
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2025-09-19 09:18:09 +08:00
|
|
|
|
<GroupBox
|
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
|
Header="轨道">
|
2025-09-16 16:06:41 +08:00
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<ComboBox
|
|
|
|
|
|
materialDesign:HintAssist.Hint="轨道轮廓类型"
|
2025-09-19 09:18:09 +08:00
|
|
|
|
DisplayMemberPath="FullName"
|
2025-09-16 16:06:41 +08:00
|
|
|
|
IsEditable="True"
|
2025-09-19 09:18:09 +08:00
|
|
|
|
ItemsSource="{Binding ProfileFamilyTypesView, Mode=OneWay}"
|
2025-09-16 16:06:41 +08:00
|
|
|
|
SelectedItem="{Binding SelectedProfileFamilyType, UpdateSourceTrigger=PropertyChanged}"
|
2025-09-19 09:18:09 +08:00
|
|
|
|
Text="{Binding SearchProfileText, UpdateSourceTrigger=PropertyChanged}"
|
2025-09-16 16:06:41 +08:00
|
|
|
|
ToolTip="未选择则不创建,
右键点击清除选择">
|
|
|
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
|
<b:EventTrigger EventName="MouseRightButtonUp">
|
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding ClearProfilesSelectionCommand}" />
|
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
|
</b:Interaction.Triggers>
|
|
|
|
|
|
</ComboBox>
|
|
|
|
|
|
<ComboBox
|
|
|
|
|
|
materialDesign:HintAssist.Hint="轨道材质"
|
|
|
|
|
|
DisplayMemberPath="Name"
|
2025-09-19 09:18:09 +08:00
|
|
|
|
IsEditable="True"
|
|
|
|
|
|
ItemsSource="{Binding MaterialsView, Mode=OneWay}"
|
2025-09-16 16:06:41 +08:00
|
|
|
|
SelectedItem="{Binding SelectedMaterial, UpdateSourceTrigger=PropertyChanged}"
|
2025-09-19 09:18:09 +08:00
|
|
|
|
Text="{Binding SearchMaterialText, UpdateSourceTrigger=PropertyChanged}"
|
2025-09-16 16:06:41 +08:00
|
|
|
|
ToolTip="未选择无材质,
右键点击清除选择">
|
|
|
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
|
<b:EventTrigger EventName="MouseRightButtonUp">
|
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding ClearMaterialSelectionCommand}" />
|
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
|
</b:Interaction.Triggers>
|
|
|
|
|
|
</ComboBox>
|
|
|
|
|
|
<TextBox
|
|
|
|
|
|
materialDesign:TextFieldAssist.PrefixText="偏移距离X:"
|
|
|
|
|
|
materialDesign:TextFieldAssist.SuffixText="mm"
|
|
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
|
|
|
|
|
Text="{Binding OffsetX, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:N2}}"
|
|
|
|
|
|
ToolTip="向右偏移设置为正值,
向左偏移为负值" />
|
|
|
|
|
|
<TextBox
|
|
|
|
|
|
materialDesign:TextFieldAssist.PrefixText="偏移距离Y:"
|
|
|
|
|
|
materialDesign:TextFieldAssist.SuffixText="mm"
|
|
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
|
|
|
|
|
Text="{Binding OffsetY, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:N2}}"
|
|
|
|
|
|
ToolTip="向上偏移设置为正值,
向下偏移为负值" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</GroupBox>
|
2025-09-19 09:18:09 +08:00
|
|
|
|
<GroupBox
|
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
|
Header="扣件、轨枕">
|
2025-09-16 16:06:41 +08:00
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<ComboBox
|
|
|
|
|
|
materialDesign:HintAssist.Hint="扣件或轨枕类型"
|
2025-09-19 09:18:09 +08:00
|
|
|
|
DisplayMemberPath="FullName"
|
2025-09-16 16:06:41 +08:00
|
|
|
|
IsEditable="True"
|
2025-09-19 09:18:09 +08:00
|
|
|
|
ItemsSource="{Binding FamilyTypesView, Mode=OneWay}"
|
2025-09-16 16:06:41 +08:00
|
|
|
|
SelectedItem="{Binding SelectedFamilyType, UpdateSourceTrigger=PropertyChanged}"
|
2025-09-19 09:18:09 +08:00
|
|
|
|
Text="{Binding SearchFamilyText, UpdateSourceTrigger=PropertyChanged}"
|
2025-09-16 16:06:41 +08:00
|
|
|
|
ToolTip="未选择则不创建,
右键点击清除选择">
|
|
|
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
|
<b:EventTrigger EventName="MouseRightButtonUp">
|
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding ClearFmailyTypeSelectionCommand}" />
|
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
|
</b:Interaction.Triggers>
|
|
|
|
|
|
</ComboBox>
|
|
|
|
|
|
<TextBox
|
|
|
|
|
|
materialDesign:TextFieldAssist.PrefixText="水平间距:"
|
|
|
|
|
|
materialDesign:TextFieldAssist.SuffixText="mm"
|
|
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
|
|
|
|
|
Text="{Binding Spacing, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:N2}}" />
|
|
|
|
|
|
<TextBox
|
|
|
|
|
|
materialDesign:TextFieldAssist.PrefixText="偏移距离X:"
|
|
|
|
|
|
materialDesign:TextFieldAssist.SuffixText="mm"
|
|
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
|
|
|
|
|
Text="{Binding InstanceOffsetX, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:N2}}"
|
|
|
|
|
|
ToolTip="向右偏移设置为正值,
向左偏移为负值" />
|
|
|
|
|
|
<TextBox
|
|
|
|
|
|
materialDesign:TextFieldAssist.PrefixText="偏移距离Y:"
|
|
|
|
|
|
materialDesign:TextFieldAssist.SuffixText="mm"
|
|
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
|
|
|
|
|
Text="{Binding InstanceOffsetY, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0:N2}}"
|
|
|
|
|
|
ToolTip="向上偏移设置为正值,
向下偏移为负值" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</GroupBox>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
<GroupBox Grid.Row="2" Header="中心线类型">
|
|
|
|
|
|
<UniformGrid VerticalAlignment="Center" Rows="1">
|
2025-09-19 09:18:09 +08:00
|
|
|
|
<RadioButton
|
|
|
|
|
|
Content="模型线"
|
|
|
|
|
|
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static local:CenterCurveType.ModelCurve}, Converter={StaticResource ComparisonConverter}}"
|
|
|
|
|
|
ToolTip="框选连续、非闭合的模型线并在工具栏完成选择,
模型线的定位平面为绘制时的工作平面,
如在楼层楼层平面为该楼层高度" />
|
|
|
|
|
|
<RadioButton
|
|
|
|
|
|
Content="体量族"
|
|
|
|
|
|
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static local:CenterCurveType.MassCurve}, Converter={StaticResource ComparisonConverter}}"
|
|
|
|
|
|
ToolTip="体量族中仅包含有一条连续的三维曲线" />
|
|
|
|
|
|
<RadioButton
|
|
|
|
|
|
Content="dwg链接"
|
|
|
|
|
|
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static local:CenterCurveType.DWGCurve}, Converter={StaticResource ComparisonConverter}}"
|
|
|
|
|
|
ToolTip="dwg中仅有一条连续的三维曲线" />
|
2025-09-16 16:06:41 +08:00
|
|
|
|
</UniformGrid>
|
|
|
|
|
|
</GroupBox>
|
|
|
|
|
|
<UniformGrid Grid.Row="3" Rows="1">
|
|
|
|
|
|
<TextBox
|
|
|
|
|
|
materialDesign:TextFieldAssist.PrefixText="最小细分长度:"
|
|
|
|
|
|
materialDesign:TextFieldAssist.SuffixText="m"
|
|
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
|
|
|
|
|
Text="{Binding Precision, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
ToolTip="数值越小,越贴合原曲线,
建议模型线(由于单条曲线较长)取值小一些" />
|
|
|
|
|
|
<CheckBox
|
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
|
Content="两侧布置"
|
|
|
|
|
|
IsChecked="{Binding IsTwoSides}"
|
|
|
|
|
|
ToolTip="截面或者实例是否在中心线另一侧创建或布置" />
|
2025-09-19 09:18:09 +08:00
|
|
|
|
<Button
|
|
|
|
|
|
Command="{Binding CreateTrackCommand}"
|
|
|
|
|
|
Content="创建"
|
|
|
|
|
|
ToolTip="选择合适的选项,创建模型。
注意:两根模型线之间若角度极小,
可作为一条直线时,使用一条直线代替" />
|
2025-09-16 16:06:41 +08:00
|
|
|
|
</UniformGrid>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</controls:MaterialWindow>
|