2026-01-02 17:30:41 +08:00
|
|
|
|
<ui:MelWindow
|
2025-04-24 20:56:44 +08:00
|
|
|
|
x:Class="ShrlAlgoToolkit.RevitAddins.RvCommon.ModelByCurveCreatorView"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
2025-04-24 20:56:44 +08:00
|
|
|
|
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvCommon"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2025-04-24 20:56:44 +08:00
|
|
|
|
xmlns:rvCommon="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvCommon"
|
2026-01-02 17:30:41 +08:00
|
|
|
|
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
Title="曲线布置"
|
|
|
|
|
|
Width="500"
|
|
|
|
|
|
Height="400"
|
|
|
|
|
|
d:DataContext="{d:DesignInstance Type=local:ModelByCurveCreatorViewModel}"
|
|
|
|
|
|
Icon="{DynamicResource RevitIcon}"
|
|
|
|
|
|
mc:Ignorable="d">
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<Window.Resources>
|
2025-04-24 20:56:10 +08:00
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</Window.Resources>
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<ui:Grid Columns="*" Rows="*,Auto,Auto">
|
|
|
|
|
|
<ui:Grid
|
2025-10-10 11:19:58 +08:00
|
|
|
|
Grid.Row="0"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
ChildMargin="5"
|
|
|
|
|
|
Columns="*,*"
|
|
|
|
|
|
Rows="*">
|
|
|
|
|
|
<GroupBox
|
2025-04-24 20:56:44 +08:00
|
|
|
|
Grid.Row="0"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
Grid.Column="0"
|
|
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
|
|
Header="沿线放样">
|
2025-04-24 20:56:10 +08:00
|
|
|
|
<ui:StackPanel Spacing="5">
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<ComboBox
|
2025-12-23 21:35:54 +08:00
|
|
|
|
ui:InputAssist.PlaceholderText="请选择轮廓类型"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
|
|
|
|
|
|
ItemsSource="{Binding ProfileFamilyTypes, Mode=OneWay}"
|
|
|
|
|
|
SelectedItem="{Binding SelectedProfileFamilyType, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
ToolTip="选择轮廓类型,未选择则不创建,
右键点击清除选择">
|
|
|
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
|
<b:EventTrigger EventName="MouseRightButtonUp">
|
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding ClearProfilesSelectionCommand}" />
|
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
|
</b:Interaction.Triggers>
|
2025-08-20 12:10:35 +08:00
|
|
|
|
</ComboBox>
|
|
|
|
|
|
<ComboBox
|
2025-12-23 21:35:54 +08:00
|
|
|
|
ui:InputAssist.PlaceholderText="请选择放样的材质"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
DisplayMemberPath="Name"
|
|
|
|
|
|
ItemsSource="{Binding Materials, Mode=OneWay}"
|
|
|
|
|
|
SelectedItem="{Binding SelectedMaterial, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
ToolTip="选择放样模型材质,未选择则为默认材质,
右键点击清除选择">
|
|
|
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
|
<b:EventTrigger EventName="MouseRightButtonUp">
|
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding ClearMaterialSelectionCommand}" />
|
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
|
</b:Interaction.Triggers>
|
2025-08-20 12:10:35 +08:00
|
|
|
|
</ComboBox>
|
|
|
|
|
|
<TextBox
|
|
|
|
|
|
ui:InputAssist.Prefix="偏移距离X:"
|
|
|
|
|
|
ui:InputAssist.Suffix="mm"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
Text="{Binding OffsetX, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
ToolTip="向右偏移设置为正值,
向左偏移为负值" />
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<TextBox
|
|
|
|
|
|
ui:InputAssist.Prefix="偏移距离Y:"
|
|
|
|
|
|
ui:InputAssist.Suffix="mm"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
Text="{Binding OffsetY, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
ToolTip="向上偏移设置为正值,
向下偏移为负值" />
|
2025-04-24 20:56:10 +08:00
|
|
|
|
</ui:StackPanel>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</GroupBox>
|
|
|
|
|
|
<GroupBox
|
2025-04-24 20:56:44 +08:00
|
|
|
|
Grid.Row="0"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
Grid.Column="1"
|
|
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
|
|
Header="沿线布置">
|
2025-04-24 20:56:10 +08:00
|
|
|
|
<ui:StackPanel Spacing="5">
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<ComboBox
|
2025-12-23 21:35:54 +08:00
|
|
|
|
ui:InputAssist.PlaceholderText="请选择实例类型"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
|
|
|
|
|
|
ItemsSource="{Binding FamilyTypes, Mode=OneWay}"
|
|
|
|
|
|
SelectedItem="{Binding SelectedFamilyType, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
ToolTip="选择需要布置的族实例,未选择则不创建,
右键点击清除选择">
|
|
|
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
|
<b:EventTrigger EventName="MouseRightButtonUp">
|
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding ClearFmailyTypeSelectionCommand}" />
|
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
|
</b:Interaction.Triggers>
|
2025-08-20 12:10:35 +08:00
|
|
|
|
</ComboBox>
|
|
|
|
|
|
<TextBox
|
|
|
|
|
|
ui:InputAssist.Prefix="水平间距:"
|
|
|
|
|
|
ui:InputAssist.Suffix="mm"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
Text="{Binding Spacing, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}" />
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<TextBox
|
|
|
|
|
|
ui:InputAssist.Prefix="偏移距离X:"
|
|
|
|
|
|
ui:InputAssist.Suffix="mm"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
Text="{Binding InstanceOffsetX, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
ToolTip="向右偏移设置为正值,
向左偏移为负值" />
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<TextBox
|
|
|
|
|
|
ui:InputAssist.Prefix="偏移距离Y:"
|
|
|
|
|
|
ui:InputAssist.Suffix="mm"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
Text="{Binding InstanceOffsetY, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
ToolTip="向上偏移设置为正值,
向下偏移为负值" />
|
2025-04-24 20:56:10 +08:00
|
|
|
|
</ui:StackPanel>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</GroupBox>
|
2025-08-20 12:10:35 +08:00
|
|
|
|
</ui:Grid>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<GroupBox
|
|
|
|
|
|
Grid.Row="1"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
Margin="5"
|
|
|
|
|
|
Header="中心线类型">
|
|
|
|
|
|
<UniformGrid VerticalAlignment="Center" Rows="1">
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<RadioButton
|
|
|
|
|
|
Content="模型线"
|
2025-04-24 20:56:44 +08:00
|
|
|
|
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static rvCommon:CenterCurveType.ModelCurve}, Converter={StaticResource ComparisonConverter}}"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
ToolTip="模型线的定位平面为绘制时的工作平面,
如在楼层楼层平面为该楼层高度" />
|
|
|
|
|
|
<RadioButton
|
|
|
|
|
|
Content="体量族"
|
2025-04-24 20:56:44 +08:00
|
|
|
|
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static rvCommon:CenterCurveType.MassCurve}, Converter={StaticResource ComparisonConverter}}"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
ToolTip="体量族中仅包含有一条连续的三维曲线" />
|
|
|
|
|
|
<RadioButton
|
|
|
|
|
|
Content="dwg链接"
|
2025-04-24 20:56:44 +08:00
|
|
|
|
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static rvCommon:CenterCurveType.DWGCurve}, Converter={StaticResource ComparisonConverter}}"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
ToolTip="dwg中仅有一条连续的三维曲线" />
|
|
|
|
|
|
</UniformGrid>
|
|
|
|
|
|
</GroupBox>
|
|
|
|
|
|
<UniformGrid
|
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
|
Margin="5"
|
|
|
|
|
|
Rows="1">
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<TextBox
|
|
|
|
|
|
ui:InputAssist.Prefix="最小细分长度:"
|
|
|
|
|
|
ui:InputAssist.Suffix="m"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
InputMethod.IsInputMethodEnabled="False"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
Text="{Binding Precision, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
ToolTip="数值越小,越拟合原曲线,
建议模型线(由于单条曲线较长)取值小一些,dwg的曲线(由于单条曲线较短)取值大一些" />
|
|
|
|
|
|
<CheckBox
|
2025-04-24 20:56:44 +08:00
|
|
|
|
HorizontalAlignment="Center"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
Content="两侧布置"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
IsChecked="{Binding IsTwoSides}"
|
|
|
|
|
|
ToolTip="在中心线两侧布置放样(会合并)和实例" />
|
|
|
|
|
|
<Button
|
2025-10-10 11:19:58 +08:00
|
|
|
|
HorizontalAlignment="Stretch"
|
2024-09-22 11:05:41 +08:00
|
|
|
|
Command="{Binding CreateTrackCommand}"
|
2025-10-10 11:19:58 +08:00
|
|
|
|
Content="创建" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</UniformGrid>
|
2025-08-20 12:10:35 +08:00
|
|
|
|
</ui:Grid>
|
2026-01-02 17:30:41 +08:00
|
|
|
|
</ui:MelWindow>
|