Window of interpolation tuple was changed
This commit is contained in:
7
StructureHelper/Documentation/License.txt
Normal file
7
StructureHelper/Documentation/License.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Copyright (c) 2023 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
7
StructureHelper/Documentation/LicenseRus.txt
Normal file
7
StructureHelper/Documentation/LicenseRus.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Copyright (c) 2023 Редикульцев Евгений, Екатеринбург, Россия
|
||||||
|
|
||||||
|
Данная лицензия разрешает лицам, получившим копию данного программного обеспечения и сопутствующей документации (далее — Программное обеспечение), безвозмездно использовать Программное обеспечение без ограничений, включая неограниченное право на использование, копирование, изменение, слияние, публикацию, распространение, сублицензирование и/или продажу копий Программного обеспечения, а также лицам, которым предоставляется данное Программное обеспечение, при соблюдении следующих условий:
|
||||||
|
|
||||||
|
Указанное выше уведомление об авторском праве и данные условия должны быть включены во все копии или значимые части данного Программного обеспечения.
|
||||||
|
|
||||||
|
ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ ГАРАНТИИ ТОВАРНОЙ ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ, НО НЕ ОГРАНИЧИВАЯСЬ ИМИ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО КАКИМ-ЛИБО ИСКАМ, ЗА УЩЕРБ ИЛИ ПО ИНЫМ ТРЕБОВАНИЯМ, В ТОМ ЧИСЛЕ, ПРИ ДЕЙСТВИИ КОНТРАКТА, ДЕЛИКТЕ ИЛИ ИНОЙ СИТУАЦИИ, ВОЗНИКШИМ ИЗ-ЗА ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫХ ДЕЙСТВИЙ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ.
|
||||||
@@ -50,6 +50,14 @@
|
|||||||
</Style.Setters>
|
</Style.Setters>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolButton" TargetType="Button">
|
||||||
|
<Setter Property="Width" Value="32"/>
|
||||||
|
<Setter Property="Height" Value="32"/>
|
||||||
|
<Setter Property="Margin" Value="2,0,2,0"/>
|
||||||
|
<Setter Property="Background" Value="#FFA19BC3"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#FF857AB9"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="ButtonImage16" TargetType="Image">
|
<Style x:Key="ButtonImage16" TargetType="Image">
|
||||||
<Setter Property="Height" Value="16"/>
|
<Setter Property="Height" Value="16"/>
|
||||||
<Setter Property="Width" Value="16"/>
|
<Setter Property="Width" Value="16"/>
|
||||||
|
|||||||
@@ -81,6 +81,7 @@
|
|||||||
<Folder Include="Documentation\Manuals\" />
|
<Folder Include="Documentation\Manuals\" />
|
||||||
<Folder Include="Infrastructure\UI\DataContexts\Logics\" />
|
<Folder Include="Infrastructure\UI\DataContexts\Logics\" />
|
||||||
<Folder Include="Resources\" />
|
<Folder Include="Resources\" />
|
||||||
|
<Folder Include="Windows\UserControls\MultiplyTuples\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -9,9 +9,15 @@
|
|||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Update="Windows\Arrays\ArrayView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="Windows\CalculationWindows\CalculatorsViews\GeometryCalculatorViews\GeometryCalculatorResultView.xaml.cs">
|
<Compile Update="Windows\CalculationWindows\CalculatorsViews\GeometryCalculatorViews\GeometryCalculatorResultView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="Windows\CalculationWindows\ProgressViews\InterpolationProgressView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="Windows\Errors\ErrorMessage.xaml.cs">
|
<Compile Update="Windows\Errors\ErrorMessage.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -33,6 +39,9 @@
|
|||||||
<Compile Update="Windows\PrimitiveTemplates\RCs\Beams\CircleView.xaml.cs">
|
<Compile Update="Windows\PrimitiveTemplates\RCs\Beams\CircleView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="Windows\UserControls\MultiplyTuple.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Update="Infrastructure\UI\Resources\ForceTemplates.xaml">
|
<Page Update="Infrastructure\UI\Resources\ForceTemplates.xaml">
|
||||||
@@ -44,9 +53,15 @@
|
|||||||
<Page Update="Infrastructure\UI\Resources\Materials.xaml">
|
<Page Update="Infrastructure\UI\Resources\Materials.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Windows\Arrays\ArrayView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="Windows\CalculationWindows\CalculatorsViews\GeometryCalculatorViews\GeometryCalculatorResultView.xaml">
|
<Page Update="Windows\CalculationWindows\CalculatorsViews\GeometryCalculatorViews\GeometryCalculatorResultView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Windows\CalculationWindows\ProgressViews\InterpolationProgressView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="Windows\Errors\ErrorMessage.xaml">
|
<Page Update="Windows\Errors\ErrorMessage.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
@@ -68,5 +83,8 @@
|
|||||||
<Page Update="Windows\PrimitiveTemplates\RCs\Beams\CircleView.xaml">
|
<Page Update="Windows\PrimitiveTemplates\RCs\Beams\CircleView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Windows\UserControls\MultiplyTuple.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
37
StructureHelper/Windows/Arrays/ArrayView.xaml
Normal file
37
StructureHelper/Windows/Arrays/ArrayView.xaml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<Window x:Class="StructureHelper.Windows.Arrays.ArrayView"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:StructureHelper.Windows.Arrays"
|
||||||
|
d:DataContext="{d:DesignInstance local:ArrayViewModel}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Array" Height="450" Width="800" MinHeight="400" MinWidth="700">
|
||||||
|
<Window.Resources>
|
||||||
|
<HierarchicalDataTemplate x:Key="ArrayTemplate" ItemsSource="{Binding Children}">
|
||||||
|
<TextBlock Text="{Binding Name}"/>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
</Window.Resources>
|
||||||
|
<DockPanel>
|
||||||
|
<ToolBarTray DockPanel.Dock="Top">
|
||||||
|
<ToolBar>
|
||||||
|
|
||||||
|
</ToolBar>
|
||||||
|
<ToolBar>
|
||||||
|
|
||||||
|
</ToolBar>
|
||||||
|
</ToolBarTray>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" MinWidth="200"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TreeView Grid.Column="0" Name="ArrayTreeView" SelectedItemChanged="ArrayTreeView_SelectedItemChanged">
|
||||||
|
|
||||||
|
</TreeView>
|
||||||
|
<ListBox Grid.Column="1">
|
||||||
|
|
||||||
|
</ListBox>
|
||||||
|
</Grid>
|
||||||
|
</DockPanel>
|
||||||
|
</Window>
|
||||||
38
StructureHelper/Windows/Arrays/ArrayView.xaml.cs
Normal file
38
StructureHelper/Windows/Arrays/ArrayView.xaml.cs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.Arrays
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для ArrayView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ArrayView : Window
|
||||||
|
{
|
||||||
|
private ArrayViewModel viewModel;
|
||||||
|
public ArrayView(ArrayViewModel vm)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
viewModel = vm;
|
||||||
|
DataContext = viewModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ArrayTreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||||
|
{
|
||||||
|
//if (e.NewValue is selectedItem)
|
||||||
|
//{
|
||||||
|
// viewModel.SelectedItem = selectedItem;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
StructureHelper/Windows/Arrays/ArrayViewModel.cs
Normal file
14
StructureHelper/Windows/Arrays/ArrayViewModel.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using StructureHelper.Infrastructure;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.Arrays
|
||||||
|
{
|
||||||
|
public class ArrayViewModel : ViewModelBase
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,14 @@
|
|||||||
d:DataContext="{d:DesignInstance vm:ForcesResultsViewModel}"
|
d:DataContext="{d:DesignInstance vm:ForcesResultsViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Calculation Results" Height="350" Width="850" MinHeight="300" MinWidth="400" WindowStartupLocation="CenterScreen">
|
Title="Calculation Results" Height="350" Width="850" MinHeight="300" MinWidth="400" WindowStartupLocation="CenterScreen">
|
||||||
|
<DockPanel>
|
||||||
|
<ToolBarTray DockPanel.Dock="Top">
|
||||||
|
<ToolBar>
|
||||||
|
<Button Style="{StaticResource ToolButton}"
|
||||||
|
Command="{Binding ShowCrackResultCommand}"
|
||||||
|
Content="Fcrc" ToolTip="Calc crack forces"/>
|
||||||
|
</ToolBar>
|
||||||
|
</ToolBarTray>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
@@ -51,4 +59,6 @@
|
|||||||
<Button Margin="3" Content="Acrc" ToolTip="Show crack width" Command="{Binding ShowCrackWidthResultCommand}"/>
|
<Button Margin="3" Content="Acrc" ToolTip="Show crack width" Command="{Binding ShowCrackWidthResultCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<Window x:Class="StructureHelper.Windows.CalculationWindows.ProgressViews.InterpolationProgressView"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.ProgressViews"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DataContext="{d:DesignInstance local:InterpolationProgressViewModel}"
|
||||||
|
Title="InterpolationProgressView" Height="150" Width="200" ResizeMode="NoResize" WindowStartupLocation="CenterOwner">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="IterationCount"/>
|
||||||
|
<ProgressBar Grid.Column="1" Grid.Row="0" Minimum="{Binding MinValue}" Maximum="{Binding MaxValue}" Value="{Binding Value}"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using StructureHelper.Properties;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.CalculationWindows.ProgressViews
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для InterpolationProgressView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class InterpolationProgressView : Window
|
||||||
|
{
|
||||||
|
InterpolationProgressViewModel viewModel;
|
||||||
|
public InterpolationProgressView(InterpolationProgressViewModel viewModel)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.viewModel = viewModel;
|
||||||
|
this.DataContext = this.viewModel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.CalculationWindows.ProgressViews
|
||||||
|
{
|
||||||
|
public class InterpolationProgressViewModel
|
||||||
|
{
|
||||||
|
public double MinValue { get; set; }
|
||||||
|
public double MaxValue { get; set; }
|
||||||
|
public double Value { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,9 +5,13 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:StructureHelper.Windows.Forces"
|
xmlns:local="clr-namespace:StructureHelper.Windows.Forces"
|
||||||
xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Forces"
|
xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Forces"
|
||||||
|
xmlns:uc="clr-namespace:StructureHelper.Windows.UserControls"
|
||||||
d:DataContext="{d:DesignInstance vm:InterpolateTuplesViewModel}"
|
d:DataContext="{d:DesignInstance vm:InterpolateTuplesViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Interpolate Combinations" Height="200" Width="440" MinHeight="180" MinWidth="440" WindowStartupLocation="CenterScreen">
|
Title="Interpolate Combinations" Height="200" Width="500" MinHeight="180" MinWidth="500" WindowStartupLocation="CenterScreen">
|
||||||
|
<Window.Resources>
|
||||||
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||||
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
@@ -32,6 +36,7 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Grid.Column="1" Text="Moment Mx" HorizontalAlignment="Center"/>
|
<TextBlock Grid.Column="1" Text="Moment Mx" HorizontalAlignment="Center"/>
|
||||||
<TextBlock Grid.Column="2" Text="Moment My" HorizontalAlignment="Center"/>
|
<TextBlock Grid.Column="2" Text="Moment My" HorizontalAlignment="Center"/>
|
||||||
@@ -44,12 +49,15 @@
|
|||||||
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding FinishMx, Converter={StaticResource MomentConverter}, ValidatesOnExceptions=True}"/>
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding FinishMx, Converter={StaticResource MomentConverter}, ValidatesOnExceptions=True}"/>
|
||||||
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding FinishMy, Converter={StaticResource MomentConverter}, ValidatesOnExceptions=True}"/>
|
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding FinishMy, Converter={StaticResource MomentConverter}, ValidatesOnExceptions=True}"/>
|
||||||
<TextBox Grid.Row="2" Grid.Column="3" Text="{Binding FinishNz, Converter={StaticResource ForceConverter}, ValidatesOnExceptions=True}"/>
|
<TextBox Grid.Row="2" Grid.Column="3" Text="{Binding FinishNz, Converter={StaticResource ForceConverter}, ValidatesOnExceptions=True}"/>
|
||||||
<TextBlock Grid.Row="3" Text="Step count"/>
|
<TextBlock Grid.Row="3" Text="Step count" Visibility="{Binding StepCountVisible, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding StepCount, ValidatesOnExceptions=True}"/>
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding StepCount, ValidatesOnExceptions=True}" Visibility="{Binding StepCountVisible, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
|
<uc:MultiplyTuple Grid.Column="4" Grid.Row="1" ForceTuple="{Binding StartDesignForce.ForceTuple}" ValueChanged="StartValueChanged"/>
|
||||||
|
<uc:MultiplyTuple Grid.Column="4" Grid.Row="2" ForceTuple="{Binding FinishDesignForce.ForceTuple}" ValueChanged="FinishValueChanged"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel Grid.Column="1">
|
<StackPanel Grid.Column="1">
|
||||||
<Button Content="Invert comb's" Command="{Binding InvertForcesCommand}" />
|
<Button Content="Invert comb's" Command="{Binding InvertForcesCommand}" />
|
||||||
|
<Button Content="Copy To Finish" Command="{Binding CopyToFinishCommand}" />
|
||||||
|
<Button Content="Copy To Start" Command="{Binding CopyToStartCommand}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,12 @@ namespace StructureHelper.Windows.Forces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class InterpolateTuplesView : Window
|
public partial class InterpolateTuplesView : Window
|
||||||
{
|
{
|
||||||
|
InterpolateTuplesViewModel viewModel;
|
||||||
public InterpolateTuplesView(InterpolateTuplesViewModel viewModel)
|
public InterpolateTuplesView(InterpolateTuplesViewModel viewModel)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = viewModel;
|
this.viewModel = viewModel;
|
||||||
|
DataContext = this.viewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Button_Click(object sender, RoutedEventArgs e)
|
private void Button_Click(object sender, RoutedEventArgs e)
|
||||||
@@ -33,5 +35,15 @@ namespace StructureHelper.Windows.Forces
|
|||||||
DialogResult = true;
|
DialogResult = true;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void StartValueChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
viewModel.RefreshStartTuple();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FinishValueChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
viewModel.RefreshFinishTuple();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,13 +16,6 @@
|
|||||||
d:DataContext="{d:DesignInstance local:MainViewModel}"
|
d:DataContext="{d:DesignInstance local:MainViewModel}"
|
||||||
Title="StructureHelper" Height="700" Width="1000" MinHeight="400" MinWidth="600">
|
Title="StructureHelper" Height="700" Width="1000" MinHeight="400" MinWidth="600">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<Style x:Key="ToolButton" TargetType="Button">
|
|
||||||
<Setter Property="Width" Value="32"/>
|
|
||||||
<Setter Property="Height" Value="32"/>
|
|
||||||
<Setter Property="Margin" Value="2,0,2,0"/>
|
|
||||||
<Setter Property="Background" Value="#FFA19BC3"/>
|
|
||||||
<Setter Property="BorderBrush" Value="#FF857AB9"/>
|
|
||||||
</Style>
|
|
||||||
<DataTemplate DataType="{x:Type dataContexts:RectangleViewPrimitive}">
|
<DataTemplate DataType="{x:Type dataContexts:RectangleViewPrimitive}">
|
||||||
<dataTemplates:RectangleTemplate/>
|
<dataTemplates:RectangleTemplate/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|||||||
27
StructureHelper/Windows/UserControls/MultiplyTuple.xaml
Normal file
27
StructureHelper/Windows/UserControls/MultiplyTuple.xaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<UserControl x:Class="StructureHelper.Windows.UserControls.MultiplyTuple"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:StructureHelper.Windows.UserControls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="25" d:DesignWidth="60">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button x:Name="Multy0_5" Grid.Column="0" Content="*0.5" Click="Multy0_5_Click"/>
|
||||||
|
<Button x:Name="Multy2_0" Grid.Column="1" Content="*2.0" Click="Multy2_0_Click"/>
|
||||||
|
<!--<Grid.ToolTip>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Button x:Name="MultyM1_2" Grid.Column="1" Content="*(-1)" Click="MultyM1_2_Click"/>
|
||||||
|
<Button x:Name="Multy02" Grid.Column="1" Content="*0" Click="Multy0_Click"/>
|
||||||
|
<Button x:Name="Multy0_12" Grid.Column="1" Content="*0.1" Click="Multy0_12_Click"/>
|
||||||
|
<Button x:Name="Multy0_52" Grid.Column="0" Content="*0.5" Click="Multy0_5_Click"/>
|
||||||
|
<Button x:Name="Multy2_02" Grid.Column="1" Content="*2.0" Click="Multy2_0_Click"/>
|
||||||
|
<Button x:Name="Multy10_02" Grid.Column="1" Content="*10.0" Click="Multy10_02_Click"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid.ToolTip>-->
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
101
StructureHelper/Windows/UserControls/MultiplyTuple.xaml.cs
Normal file
101
StructureHelper/Windows/UserControls/MultiplyTuple.xaml.cs
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
using StructureHelper.Infrastructure;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperCommon.Services.Forces;
|
||||||
|
using StructureHelperCommon.Services.Units;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Numerics;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.UserControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для MultiplyTuple.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class MultiplyTuple : UserControl
|
||||||
|
{
|
||||||
|
public event EventHandler ValueChanged;
|
||||||
|
|
||||||
|
public MultiplyTuple()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
//DataContext = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand MultiplyByFactor
|
||||||
|
{
|
||||||
|
get => muliplyByFactor ??= new RelayCommand(o =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string s = (string)o;
|
||||||
|
double factor = CommonOperation.ConvertToDoubleChangeComma(s);
|
||||||
|
ChangeValue(factor);
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static readonly DependencyProperty ForceTupleProperty = DependencyProperty.Register(
|
||||||
|
"ForceTuple", typeof(ForceTuple), typeof(MultiplyTuple), new PropertyMetadata(new ForceTuple()));
|
||||||
|
|
||||||
|
private RelayCommand muliplyByFactor;
|
||||||
|
|
||||||
|
public ForceTuple ForceTuple
|
||||||
|
{
|
||||||
|
get { return (ForceTuple)GetValue(ForceTupleProperty); }
|
||||||
|
set { SetValue(ForceTupleProperty, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Multy0_5_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ChangeValue(0.5d);
|
||||||
|
}
|
||||||
|
private void Multy2_0_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ChangeValue(2d);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ChangeValue(double factor)
|
||||||
|
{
|
||||||
|
var tmpTuple = ForceTupleService.MultiplyTuples(ForceTuple, factor);
|
||||||
|
ForceTupleService.CopyProperties(tmpTuple, ForceTuple, 1d);
|
||||||
|
ValueChanged?.Invoke(this, EventArgs.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Multy0_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ChangeValue(0d);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Multy0_12_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ChangeValue(0.1d);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MultyM1_2_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ChangeValue(-1d);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Multy10_02_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ChangeValue(10d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,7 +18,7 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
|||||||
public void Show(IDesignForceTuple finishDesignTuple, IForceCalculator forceCalculator)
|
public void Show(IDesignForceTuple finishDesignTuple, IForceCalculator forceCalculator)
|
||||||
{
|
{
|
||||||
IDesignForceTuple startDesignTuple;
|
IDesignForceTuple startDesignTuple;
|
||||||
var viewModel = new InterpolateTuplesViewModel(finishDesignTuple, null, 100);
|
var viewModel = new InterpolateTuplesViewModel(finishDesignTuple, null);
|
||||||
var wndTuples = new InterpolateTuplesView(viewModel);
|
var wndTuples = new InterpolateTuplesView(viewModel);
|
||||||
wndTuples.ShowDialog();
|
wndTuples.ShowDialog();
|
||||||
if (wndTuples.DialogResult != true) return;
|
if (wndTuples.DialogResult != true) return;
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
using StructureHelper.Windows.Errors;
|
using StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalculatorViews;
|
||||||
|
using StructureHelper.Windows.Errors;
|
||||||
|
using StructureHelper.Windows.Forces;
|
||||||
using StructureHelper.Windows.ViewModels.Errors;
|
using StructureHelper.Windows.ViewModels.Errors;
|
||||||
|
using StructureHelper.Windows.ViewModels.Forces;
|
||||||
using StructureHelperCommon.Infrastructures.Enums;
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
using StructureHelperCommon.Infrastructures.Settings;
|
using StructureHelperCommon.Infrastructures.Settings;
|
||||||
using StructureHelperCommon.Models.Forces;
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||||
using StructureHelperLogics.NdmCalculations.Cracking;
|
using StructureHelperLogics.NdmCalculations.Cracking;
|
||||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
|
using StructureHelperLogics.Services.NdmCalculations;
|
||||||
using StructureHelperLogics.Services.NdmPrimitives;
|
using StructureHelperLogics.Services.NdmPrimitives;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -23,14 +28,48 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators.ForceResul
|
|||||||
public CalcTerms CalcTerm { get; set; }
|
public CalcTerms CalcTerm { get; set; }
|
||||||
public ForceTuple ForceTuple { get; set; }
|
public ForceTuple ForceTuple { get; set; }
|
||||||
public IEnumerable<INdmPrimitive> ndmPrimitives { get; set; }
|
public IEnumerable<INdmPrimitive> ndmPrimitives { get; set; }
|
||||||
public void Show()
|
public void Show(IDesignForceTuple finishDesignTuple)
|
||||||
|
{
|
||||||
|
var viewModel = new InterpolateTuplesViewModel(finishDesignTuple, null);
|
||||||
|
viewModel.StepCountVisible = false;
|
||||||
|
var wndTuples = new InterpolateTuplesView(viewModel);
|
||||||
|
wndTuples.ShowDialog();
|
||||||
|
if (wndTuples.DialogResult != true) return;
|
||||||
|
var startDesignTuple = viewModel.StartDesignForce.ForceTuple;
|
||||||
|
var endDesignTuple = viewModel.FinishDesignForce.ForceTuple;
|
||||||
|
FindCrackFactor(endDesignTuple, startDesignTuple);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FindCrackFactor(ForceTuple finishDesignTuple, ForceTuple startDesignTuple)
|
||||||
{
|
{
|
||||||
var calculator = new CrackForceCalculator();
|
var calculator = new CrackForceCalculator();
|
||||||
calculator.EndTuple = ForceTuple;
|
calculator.StartTuple = startDesignTuple;
|
||||||
|
calculator.EndTuple = finishDesignTuple;
|
||||||
calculator.NdmCollection = NdmPrimitivesService.GetNdms(ndmPrimitives, LimitState, CalcTerm);
|
calculator.NdmCollection = NdmPrimitivesService.GetNdms(ndmPrimitives, LimitState, CalcTerm);
|
||||||
calculator.Run();
|
calculator.Run();
|
||||||
var result = (CrackForceResult)calculator.Result;
|
var result = (CrackForceResult)calculator.Result;
|
||||||
if (result.IsValid)
|
if (result.IsValid)
|
||||||
|
{
|
||||||
|
ShowResult(result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowError(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ShowError(CrackForceResult result)
|
||||||
|
{
|
||||||
|
var errorVM = new ErrorProcessor()
|
||||||
|
{
|
||||||
|
ShortText = "Error apeared while crack calculate",
|
||||||
|
DetailText = result.Description
|
||||||
|
};
|
||||||
|
var wnd = new ErrorMessage(errorVM);
|
||||||
|
wnd.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ShowResult(CrackForceResult result)
|
||||||
{
|
{
|
||||||
//var softLogic = new ExponentialSofteningLogic() { ForceRatio = result.ActualFactor };
|
//var softLogic = new ExponentialSofteningLogic() { ForceRatio = result.ActualFactor };
|
||||||
string message = string.Empty;
|
string message = string.Empty;
|
||||||
@@ -50,17 +89,5 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators.ForceResul
|
|||||||
MessageBoxButtons.OK,
|
MessageBoxButtons.OK,
|
||||||
MessageBoxIcon.Information);
|
MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
var errorVM = new ErrorProcessor()
|
|
||||||
{
|
|
||||||
ShortText = "Error apeared while crack calculate",
|
|
||||||
DetailText = result.Description
|
|
||||||
};
|
|
||||||
var wnd = new ErrorMessage(errorVM);
|
|
||||||
wnd.ShowDialog();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
|||||||
string[] labels = GetLabels(unitForce, unitMoment, unitCurvature);
|
string[] labels = GetLabels(unitForce, unitMoment, unitCurvature);
|
||||||
arrayParameter = new ArrayParameter<double>(resultList.Count(), labels.Count(), labels);
|
arrayParameter = new ArrayParameter<double>(resultList.Count(), labels.Count(), labels);
|
||||||
CalculateWithoutCrack(resultList, unitForce, unitMoment, unitCurvature);
|
CalculateWithoutCrack(resultList, unitForce, unitMoment, unitCurvature);
|
||||||
SafetyProcessor.RunSafeProcess(ShowWindow, "Errors apearred during showing graph, see detailed information");
|
SafetyProcessor.RunSafeProcess(ShowWindow, "Errors appeared during showing a graph, see detail information");
|
||||||
}
|
}
|
||||||
public void ShowCracks(List<IForcesTupleResult> results, IEnumerable<INdmPrimitive> ndmPrimitives)
|
public void ShowCracks(List<IForcesTupleResult> results, IEnumerable<INdmPrimitive> ndmPrimitives)
|
||||||
{
|
{
|
||||||
@@ -51,7 +51,7 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
|||||||
string[] labels = GetCrackLabels(unitForce, unitMoment, unitCurvature);
|
string[] labels = GetCrackLabels(unitForce, unitMoment, unitCurvature);
|
||||||
arrayParameter = new ArrayParameter<double>(resultList.Count(), labels.Count(), labels);
|
arrayParameter = new ArrayParameter<double>(resultList.Count(), labels.Count(), labels);
|
||||||
CalculateWithCrack(resultList, ndmPrimitives, unitForce, unitMoment, unitCurvature);
|
CalculateWithCrack(resultList, ndmPrimitives, unitForce, unitMoment, unitCurvature);
|
||||||
SafetyProcessor.RunSafeProcess(ShowWindow, "Errors apearred during showing graph, see detailed information");
|
SafetyProcessor.RunSafeProcess(ShowWindow, "Errors appeared during showing a graph, see detailed information");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculateWithCrack(List<IForcesTupleResult> resultList, IEnumerable<INdmPrimitive> ndmPrimitives, IUnit unitForce, IUnit unitMoment, IUnit unitCurvature)
|
private void CalculateWithCrack(List<IForcesTupleResult> resultList, IEnumerable<INdmPrimitive> ndmPrimitives, IUnit unitForce, IUnit unitMoment, IUnit unitCurvature)
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
|||||||
showCrackResultLogic.CalcTerm = CalcTerms.ShortTerm; //= SelectedResult.DesignForceTuple.CalcTerm;
|
showCrackResultLogic.CalcTerm = CalcTerms.ShortTerm; //= SelectedResult.DesignForceTuple.CalcTerm;
|
||||||
showCrackResultLogic.ForceTuple = SelectedResult.DesignForceTuple.ForceTuple;
|
showCrackResultLogic.ForceTuple = SelectedResult.DesignForceTuple.ForceTuple;
|
||||||
showCrackResultLogic.ndmPrimitives = ndmPrimitives;
|
showCrackResultLogic.ndmPrimitives = ndmPrimitives;
|
||||||
showCrackResultLogic.Show();
|
showCrackResultLogic.Show(SelectedResult.DesignForceTuple.Clone() as IDesignForceTuple);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICommand ShowCrackWidthResultCommand
|
public ICommand ShowCrackWidthResultCommand
|
||||||
|
|||||||
@@ -13,9 +13,13 @@ namespace StructureHelper.Windows.ViewModels.Forces
|
|||||||
public class InterpolateTuplesViewModel : OkCancelViewModelBase
|
public class InterpolateTuplesViewModel : OkCancelViewModelBase
|
||||||
{
|
{
|
||||||
private RelayCommand invertForcesCommand;
|
private RelayCommand invertForcesCommand;
|
||||||
|
private RelayCommand copyToStartCommand;
|
||||||
|
private RelayCommand copyToFinishCommand;
|
||||||
|
|
||||||
public IDesignForceTuple StartDesignForce { get; private set; }
|
public IDesignForceTuple StartDesignForce { get; private set; }
|
||||||
public IDesignForceTuple FinishDesignForce { get; private set; }
|
public IDesignForceTuple FinishDesignForce { get; private set; }
|
||||||
|
|
||||||
|
public bool StepCountVisible { get; set; }
|
||||||
public double StartMx
|
public double StartMx
|
||||||
{
|
{
|
||||||
get => StartDesignForce.ForceTuple.Mx;
|
get => StartDesignForce.ForceTuple.Mx;
|
||||||
@@ -77,19 +81,52 @@ namespace StructureHelper.Windows.ViewModels.Forces
|
|||||||
get => invertForcesCommand ??= new RelayCommand(o => InvertForces());
|
get => invertForcesCommand ??= new RelayCommand(o => InvertForces());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ICommand CopyToStartCommand
|
||||||
|
{
|
||||||
|
get => copyToStartCommand ??= new RelayCommand(o => CopyFinishToStart());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand CopyToFinishCommand
|
||||||
|
{
|
||||||
|
get => copyToFinishCommand ??= new RelayCommand(o => CopyStartToFinish());
|
||||||
|
}
|
||||||
|
|
||||||
private void InvertForces()
|
private void InvertForces()
|
||||||
{
|
{
|
||||||
var tmpForce = StartDesignForce.Clone() as IDesignForceTuple;
|
var tmpForce = StartDesignForce.Clone() as IDesignForceTuple;
|
||||||
StartDesignForce = FinishDesignForce;
|
StartDesignForce = FinishDesignForce;
|
||||||
FinishDesignForce = tmpForce;
|
FinishDesignForce = tmpForce;
|
||||||
OnPropertyChanged(nameof(StartMx));
|
StepCountVisible = true;
|
||||||
OnPropertyChanged(nameof(StartMy));
|
RefreshStartTuple();
|
||||||
OnPropertyChanged(nameof(StartNz));
|
RefreshFinishTuple();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CopyStartToFinish()
|
||||||
|
{
|
||||||
|
FinishDesignForce = StartDesignForce.Clone() as IDesignForceTuple;
|
||||||
|
RefreshFinishTuple();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CopyFinishToStart()
|
||||||
|
{
|
||||||
|
StartDesignForce = FinishDesignForce.Clone() as IDesignForceTuple;
|
||||||
|
RefreshStartTuple();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RefreshFinishTuple()
|
||||||
|
{
|
||||||
OnPropertyChanged(nameof(FinishMx));
|
OnPropertyChanged(nameof(FinishMx));
|
||||||
OnPropertyChanged(nameof(FinishMy));
|
OnPropertyChanged(nameof(FinishMy));
|
||||||
OnPropertyChanged(nameof(FinishNz));
|
OnPropertyChanged(nameof(FinishNz));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RefreshStartTuple()
|
||||||
|
{
|
||||||
|
OnPropertyChanged(nameof(StartMx));
|
||||||
|
OnPropertyChanged(nameof(StartMy));
|
||||||
|
OnPropertyChanged(nameof(StartNz));
|
||||||
|
}
|
||||||
|
|
||||||
public InterpolateTuplesViewModel(IDesignForceTuple finishDesignForce, IDesignForceTuple startDesignForce=null, int stepCount = 100)
|
public InterpolateTuplesViewModel(IDesignForceTuple finishDesignForce, IDesignForceTuple startDesignForce=null, int stepCount = 100)
|
||||||
{
|
{
|
||||||
if (startDesignForce !=null)
|
if (startDesignForce !=null)
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ namespace StructureHelperCommon.Models.Calculators
|
|||||||
public IAccuracy Accuracy {get;set;}
|
public IAccuracy Accuracy {get;set;}
|
||||||
public IResult Result => result;
|
public IResult Result => result;
|
||||||
|
|
||||||
|
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
|
|
||||||
public FindParameterCalculator()
|
public FindParameterCalculator()
|
||||||
{
|
{
|
||||||
StartValue = 0d;
|
StartValue = 0d;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using LoaderCalculator.Data.ResultData;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -19,5 +20,6 @@ namespace StructureHelperCommon.Models.Calculators
|
|||||||
/// Result of Calculations
|
/// Result of Calculations
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IResult Result { get; }
|
IResult Result { get; }
|
||||||
|
Action<IResult> ActionToOutputResults { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,16 @@ namespace StructureHelperCommon.Models.Forces
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public double Mz { get; set; }
|
public double Mz { get; set; }
|
||||||
|
|
||||||
|
public void Clear()
|
||||||
|
{
|
||||||
|
Mx = 0d;
|
||||||
|
My = 0d;
|
||||||
|
Nz = 0d;
|
||||||
|
Qx = 0d;
|
||||||
|
Qy = 0d;
|
||||||
|
Mz = 0d;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,5 +31,6 @@ namespace StructureHelperCommon.Models.Forces
|
|||||||
/// Twisting moment round about z-axis
|
/// Twisting moment round about z-axis
|
||||||
/// </summary>
|
/// </summary>
|
||||||
double Mz { get; set; }
|
double Mz { get; set; }
|
||||||
|
void Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,16 @@ namespace StructureHelperCommon.Models.Forces
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public double Mz { get; set; }
|
public double Mz { get; set; }
|
||||||
|
|
||||||
|
public void Clear()
|
||||||
|
{
|
||||||
|
Mx = 0d;
|
||||||
|
My = 0d;
|
||||||
|
Nz = 0d;
|
||||||
|
Qx = 0d;
|
||||||
|
Qy = 0d;
|
||||||
|
Mz = 0d;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace StructureHelperCommon.Services.Forces
|
|||||||
public static void CopyProperties(IForceTuple source, IForceTuple target, double factor = 1d)
|
public static void CopyProperties(IForceTuple source, IForceTuple target, double factor = 1d)
|
||||||
{
|
{
|
||||||
CheckTuples(source, target);
|
CheckTuples(source, target);
|
||||||
SumTupleToTarget(source, target, 0);
|
target.Clear();
|
||||||
SumTupleToTarget(source, target, factor);
|
SumTupleToTarget(source, target, factor);
|
||||||
}
|
}
|
||||||
public static IForceTuple MoveTupleIntoPoint(IForceTuple forceTuple, IPoint2D point2D)
|
public static IForceTuple MoveTupleIntoPoint(IForceTuple forceTuple, IPoint2D point2D)
|
||||||
@@ -66,7 +66,7 @@ namespace StructureHelperCommon.Services.Forces
|
|||||||
}
|
}
|
||||||
return tuples;
|
return tuples;
|
||||||
}
|
}
|
||||||
private static void SumTupleToTarget(IForceTuple source, IForceTuple target, double factor = 1d)
|
public static void SumTupleToTarget(IForceTuple source, IForceTuple target, double factor = 1d)
|
||||||
{
|
{
|
||||||
target.Mx += source.Mx * factor;
|
target.Mx += source.Mx * factor;
|
||||||
target.My += source.My * factor;
|
target.My += source.My * factor;
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ namespace StructureHelperCommon.Services.Units
|
|||||||
public static IStringDoublePair DivideIntoStringDoublePair(string s)
|
public static IStringDoublePair DivideIntoStringDoublePair(string s)
|
||||||
{
|
{
|
||||||
s = s.Replace(" ", "");
|
s = s.Replace(" ", "");
|
||||||
string digitPattern = @"^[-]?[+]?\d+(\.?|\,?)\d*";
|
//string digitPattern = @"^[-]?[+]?\d+(\.?)|(\,?)\d*";
|
||||||
|
string digitPattern = @"^[-]?[+]?\d*\.?\,?\d*";
|
||||||
string textPattern = @"[0-9]|\.|\,";
|
string textPattern = @"[0-9]|\.|\,";
|
||||||
string caracterPattern = "[a-z]+$";
|
string caracterPattern = "[a-z]+$";
|
||||||
string target = "";
|
string target = "";
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
public ICompressedMember CompressedMember { get; }
|
public ICompressedMember CompressedMember { get; }
|
||||||
public IAccuracy Accuracy { get; set; }
|
public IAccuracy Accuracy { get; set; }
|
||||||
public List<IForceCombinationList> ForceCombinationLists { get; private set; }
|
public List<IForceCombinationList> ForceCombinationLists { get; private set; }
|
||||||
|
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
var checkResult = CheckInputData();
|
var checkResult = CheckInputData();
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ using System.Runtime.CompilerServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using LoaderCalculator.Data.ResultData;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||||
{
|
{
|
||||||
@@ -18,6 +20,8 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public IResult Result { get; private set; }
|
public IResult Result { get; private set; }
|
||||||
|
|
||||||
|
public Action<IResult> ActionToOutputResults { get; set; }
|
||||||
|
|
||||||
public ForceTupleCalculator(IForceTupleInputData inputData)
|
public ForceTupleCalculator(IForceTupleInputData inputData)
|
||||||
{
|
{
|
||||||
InputData = inputData;
|
InputData = inputData;
|
||||||
@@ -51,6 +55,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
MaxIterationCount = accuracy.MaxIterationCount,
|
MaxIterationCount = accuracy.MaxIterationCount,
|
||||||
StartForceMatrix = new ForceMatrix { Mx = mx, My = my, Nz = nz }
|
StartForceMatrix = new ForceMatrix { Mx = mx, My = my, Nz = nz }
|
||||||
},
|
},
|
||||||
|
ActionToOutputResults = ShowResultToConsole,
|
||||||
NdmCollection = ndmCollection
|
NdmCollection = ndmCollection
|
||||||
};
|
};
|
||||||
var calculator = new Calculator();
|
var calculator = new Calculator();
|
||||||
@@ -79,5 +84,11 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void ShowResultToConsole(ILoaderResults result)
|
||||||
|
{
|
||||||
|
var strain = result.StrainMatrix;
|
||||||
|
//MessageBox.Show($" Текущие результаты в {result.IterationCounter} итерации:");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Geometry
|
|||||||
|
|
||||||
public IResult Result => geometryResult;
|
public IResult Result => geometryResult;
|
||||||
|
|
||||||
|
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
|
|
||||||
public GeometryCalculator(IEnumerable<INdm> ndms, IStrainMatrix strainMatrix)
|
public GeometryCalculator(IEnumerable<INdm> ndms, IStrainMatrix strainMatrix)
|
||||||
{
|
{
|
||||||
parametersLogic = new TextParametersLogic(ndms, strainMatrix);
|
parametersLogic = new TextParametersLogic(ndms, strainMatrix);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace StructureHelperLogics.NdmCalculations.Buckling
|
|||||||
public IResult Result { get; private set; }
|
public IResult Result { get; private set; }
|
||||||
|
|
||||||
public IAccuracy Accuracy { get; set; }
|
public IAccuracy Accuracy { get; set; }
|
||||||
|
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
|
|
||||||
private (double EtaAlongX, double EtaAlongY) GetBucklingCoefficients()
|
private (double EtaAlongX, double EtaAlongY) GetBucklingCoefficients()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
public IEnumerable<INdm> NdmCollection { get; set; }
|
public IEnumerable<INdm> NdmCollection { get; set; }
|
||||||
public Accuracy Accuracy {get;set; }
|
public Accuracy Accuracy {get;set; }
|
||||||
public IResult Result => result;
|
public IResult Result => result;
|
||||||
|
|
||||||
|
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
|
|
||||||
public CrackForceCalculator(IForceTupleCalculator forceTupleCalculator)
|
public CrackForceCalculator(IForceTupleCalculator forceTupleCalculator)
|
||||||
{
|
{
|
||||||
StartTuple ??= new ForceTuple();
|
StartTuple ??= new ForceTuple();
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
public CrackWidthCalculatorInputData InputData { get; set; }
|
public CrackWidthCalculatorInputData InputData { get; set; }
|
||||||
public IResult Result => result;
|
public IResult Result => result;
|
||||||
|
|
||||||
|
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
result = new() { IsValid = true, Description = ""};
|
result = new() { IsValid = true, Description = ""};
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
public ICrackWidthSimpleCalculatorInputData InputData { get; set; }
|
public ICrackWidthSimpleCalculatorInputData InputData { get; set; }
|
||||||
public IResult Result => result;
|
public IResult Result => result;
|
||||||
|
|
||||||
|
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,4 +16,8 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="NdmCalculations\Analyses\Interaction\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user