Files
Shrlalgo.RvKits/ShrlAlgoToolkit.RevitAddins/RvCommon/ModelByCurveCreatorView.xaml
2025-04-24 20:56:44 +08:00

147 lines
8.0 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<ui:FluentWindowEx
Title="曲线布置"
Width="500"
d:DataContext="{d:DesignInstance Type=local:ModelByCurveCreatorViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvCommon.ModelByCurveCreatorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvCommon"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:rvCommon="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvCommon"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
<ui:AutoGrid Columns="*" Rows="*,Auto,Auto">
<ui:AutoGrid
ChildMargin="5"
Columns="*,*"
Grid.Row="0"
Rows="*">
<GroupBox
Grid.Column="0"
Grid.Row="0"
Header="沿线放样"
VerticalAlignment="Stretch">
<ui:StackPanel Spacing="5">
<ui:ComboBoxEx
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding ProfileFamilyTypes, Mode=OneWay}"
PlaceholderText="请选择轮廓类型"
SelectedItem="{Binding SelectedProfileFamilyType, UpdateSourceTrigger=PropertyChanged}"
ToolTip="选择轮廓类型,未选择则不创建,&#xA;右键点击清除选择">
<b:Interaction.Triggers>
<b:EventTrigger EventName="MouseRightButtonUp">
<b:InvokeCommandAction Command="{Binding ClearProfilesSelectionCommand}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</ui:ComboBoxEx>
<ui:ComboBoxEx
DisplayMemberPath="Name"
ItemsSource="{Binding Materials, Mode=OneWay}"
PlaceholderText="请选择放样的材质"
SelectedItem="{Binding SelectedMaterial, UpdateSourceTrigger=PropertyChanged}"
ToolTip="选择放样模型材质,未选择则为默认材质,&#xA;右键点击清除选择">
<b:Interaction.Triggers>
<b:EventTrigger EventName="MouseRightButtonUp">
<b:InvokeCommandAction Command="{Binding ClearMaterialSelectionCommand}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</ui:ComboBoxEx>
<ui:TextBoxEx
InputMethod.IsInputMethodEnabled="False"
Prefix="偏移距离X"
Suffix="mm"
Text="{Binding OffsetX, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
ToolTip="向右偏移设置为正值,&#xA;向左偏移为负值" />
<ui:TextBoxEx
InputMethod.IsInputMethodEnabled="False"
Prefix="偏移距离Y"
Suffix="mm"
Text="{Binding OffsetY, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
ToolTip="向上偏移设置为正值,&#xA;向下偏移为负值" />
</ui:StackPanel>
</GroupBox>
<GroupBox
Grid.Column="1"
Grid.Row="0"
Header="沿线布置"
VerticalAlignment="Stretch">
<ui:StackPanel Spacing="5">
<ui:ComboBoxEx
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding FamilyTypes, Mode=OneWay}"
PlaceholderText="请选择实例类型"
SelectedItem="{Binding SelectedFamilyType, UpdateSourceTrigger=PropertyChanged}"
ToolTip="选择需要布置的族实例,未选择则不创建,&#xA;右键点击清除选择">
<b:Interaction.Triggers>
<b:EventTrigger EventName="MouseRightButtonUp">
<b:InvokeCommandAction Command="{Binding ClearFmailyTypeSelectionCommand}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</ui:ComboBoxEx>
<ui:TextBoxEx
InputMethod.IsInputMethodEnabled="False"
Prefix="水平间距:"
Suffix="mm"
Text="{Binding Spacing, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}" />
<ui:TextBoxEx
InputMethod.IsInputMethodEnabled="False"
Prefix="偏移距离X"
Suffix="mm"
Text="{Binding InstanceOffsetX, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
ToolTip="向右偏移设置为正值,&#xA;向左偏移为负值" />
<ui:TextBoxEx
InputMethod.IsInputMethodEnabled="False"
Prefix="偏移距离Y"
Suffix="mm"
Text="{Binding InstanceOffsetY, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
ToolTip="向上偏移设置为正值,&#xA;向下偏移为负值" />
</ui:StackPanel>
</GroupBox>
</ui:AutoGrid>
<GroupBox
Grid.Row="1"
Header="中心线类型"
Margin="5">
<UniformGrid Rows="1" VerticalAlignment="Center">
<RadioButton
Content="模型线"
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static rvCommon:CenterCurveType.ModelCurve}, Converter={StaticResource ComparisonConverter}}"
ToolTip="模型线的定位平面为绘制时的工作平面,&#xA;如在楼层楼层平面为该楼层高度" />
<RadioButton
Content="体量族"
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static rvCommon:CenterCurveType.MassCurve}, Converter={StaticResource ComparisonConverter}}"
ToolTip="体量族中仅包含有一条连续的三维曲线" />
<RadioButton
Content="dwg链接"
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static rvCommon:CenterCurveType.DWGCurve}, Converter={StaticResource ComparisonConverter}}"
ToolTip="dwg中仅有一条连续的三维曲线" />
</UniformGrid>
</GroupBox>
<UniformGrid
Grid.Row="2"
Margin="5"
Rows="1">
<ui:TextBoxEx
InputMethod.IsInputMethodEnabled="False"
Prefix="最小细分长度:"
Suffix="m"
Text="{Binding Precision, UpdateSourceTrigger=PropertyChanged}"
ToolTip="数值越小,越拟合原曲线,&#xA;建议模型线由于单条曲线较长取值小一些dwg的曲线由于单条曲线较短取值大一些" />
<CheckBox
Content="两侧布置"
HorizontalAlignment="Center"
IsChecked="{Binding IsTwoSides}"
ToolTip="在中心线两侧布置放样(会合并)和实例" />
<Button
Command="{Binding CreateTrackCommand}"
Content="创建"
HorizontalAlignment="Stretch" />
</UniformGrid>
</ui:AutoGrid>
</ui:FluentWindowEx>