Add beam shear calculator view
This commit is contained in:
@@ -7,16 +7,7 @@
|
|||||||
<ComboBox Height="25" VerticalAlignment="Top" ItemsSource="{Binding CodeList}" SelectedItem="{Binding CodeEntity}">
|
<ComboBox Height="25" VerticalAlignment="Top" ItemsSource="{Binding CodeList}" SelectedItem="{Binding CodeEntity}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Name}">
|
<TextBlock Text="{Binding Name}"/>
|
||||||
<!--<ToolTip>
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock FontWeight="Bold" Text="Code short name:"/>
|
|
||||||
<TextBlock Text="{Binding Name}"/>
|
|
||||||
<TextBlock FontWeight="Bold" Text="Full name:"/>
|
|
||||||
<TextBlock Text="{Binding FullName}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ToolTip>-->
|
|
||||||
</TextBlock>
|
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
@@ -28,8 +19,11 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<TextBlock Text="Material Model"/>
|
<TextBlock Text="Material Model" Visibility="{Binding MaterialLogicVisibility, Converter = {StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
<ComboBox Height="25" VerticalAlignment="Top" ItemsSource="{Binding MaterialLogics}" SelectedItem="{Binding MaterialLogic}">
|
<ComboBox Height="25" VerticalAlignment="Top"
|
||||||
|
ItemsSource="{Binding MaterialLogics}"
|
||||||
|
SelectedItem="{Binding MaterialLogic}"
|
||||||
|
Visibility="{Binding MaterialLogicVisibility, Converter = {StaticResource BooleanToVisibilityConverter}}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Name}"/>
|
<TextBlock Text="{Binding Name}"/>
|
||||||
@@ -113,12 +107,12 @@
|
|||||||
<RowDefinition Height="22"/>
|
<RowDefinition Height="22"/>
|
||||||
<RowDefinition Height="22"/>
|
<RowDefinition Height="22"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Row="0" Text="Tension for ULS"/>
|
<TextBlock Grid.Row="0" Text="Tension for ULS" Visibility="{Binding TensionForULSVisibility, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
<TextBlock Grid.Row="1" Text="Tension for SLS"/>
|
<CheckBox Grid.Column="1" IsChecked="{Binding TensionForULS}" Visibility="{Binding TensionForULSVisibility, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
<TextBlock Grid.Row="2" Text="Relative humidity"/>
|
<TextBlock Grid.Row="1" Text="Tension for SLS" Visibility="{Binding TensionForSLSVisibility, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
<CheckBox Grid.Column="1" IsChecked="{Binding TensionForULS}"/>
|
<CheckBox Grid.Column="1" Grid.Row="1" IsChecked="{Binding TensionForSLS}" Visibility="{Binding TensionForSLSVisibility, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
<CheckBox Grid.Column="1" Grid.Row="1" IsChecked="{Binding TensionForSLS}"/>
|
<TextBlock Grid.Row="2" Text="Relative humidity" Visibility="{Binding HumidityVisibility, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Humidity}"/>
|
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Humidity}" Visibility="{Binding HumidityVisibility, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Button Content="Show Safety Factors" Command="{Binding ShowSafetyFactors}"/>
|
<Button Content="Show Safety Factors" Command="{Binding ShowSafetyFactors}"/>
|
||||||
<ContentControl ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding SafetyFactors}"/>
|
<ContentControl ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding SafetyFactors}"/>
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
<Compile Update="Windows\BeamShears\BeamShearActionView.xaml.cs">
|
<Compile Update="Windows\BeamShears\BeamShearActionView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="Windows\BeamShears\BeamShearCalculatorView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="Windows\BeamShears\BeamShearView.xaml.cs">
|
<Compile Update="Windows\BeamShears\BeamShearView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -24,9 +27,15 @@
|
|||||||
<Compile Update="Windows\BeamShears\DistributedLoadView.xaml.cs">
|
<Compile Update="Windows\BeamShears\DistributedLoadView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="Windows\BeamShears\SectionView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="Windows\BeamShears\StirrupByDensityView.xaml.cs">
|
<Compile Update="Windows\BeamShears\StirrupByDensityView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="Windows\BeamShears\StirrupByRebarView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="Windows\CalculationWindows\CalculatorsViews\Cracks\CrackCalculatorInputDataView.xaml.cs">
|
<Compile Update="Windows\CalculationWindows\CalculatorsViews\Cracks\CrackCalculatorInputDataView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -114,6 +123,9 @@
|
|||||||
<Compile Update="Windows\UserControls\ListOfFileControl.xaml.cs">
|
<Compile Update="Windows\UserControls\ListOfFileControl.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="Windows\UserControls\Materials\ReinforcementSelector.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="Windows\UserControls\MultiplyDouble.xaml.cs">
|
<Compile Update="Windows\UserControls\MultiplyDouble.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -155,6 +167,9 @@
|
|||||||
<Page Update="Windows\BeamShears\BeamShearActionView.xaml">
|
<Page Update="Windows\BeamShears\BeamShearActionView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Windows\BeamShears\BeamShearCalculatorView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="Windows\BeamShears\BeamShearView.xaml">
|
<Page Update="Windows\BeamShears\BeamShearView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
@@ -164,9 +179,15 @@
|
|||||||
<Page Update="Windows\BeamShears\DistributedLoadView.xaml">
|
<Page Update="Windows\BeamShears\DistributedLoadView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Windows\BeamShears\SectionView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="Windows\BeamShears\StirrupByDensityView.xaml">
|
<Page Update="Windows\BeamShears\StirrupByDensityView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Windows\BeamShears\StirrupByRebarView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="Windows\CalculationWindows\CalculatorsViews\Cracks\CrackCalculatorInputDataView.xaml">
|
<Page Update="Windows\CalculationWindows\CalculatorsViews\Cracks\CrackCalculatorInputDataView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
@@ -257,6 +278,9 @@
|
|||||||
<Page Update="Windows\UserControls\ListOfFileControl.xaml">
|
<Page Update="Windows\UserControls\ListOfFileControl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Windows\UserControls\Materials\ReinforcementSelector.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="Windows\UserControls\MultiplyDouble.xaml">
|
<Page Update="Windows\UserControls\MultiplyDouble.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TabControl Grid.Row="1">
|
<TabControl Grid.Row="1">
|
||||||
<TabItem Header="External forces" DataContext="{Binding ExternalForces}">
|
<TabItem Header="External force" DataContext="{Binding ExternalForces}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="50"/>
|
<RowDefinition Height="50"/>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<uc:FactoredCombination Grid.Row="1" DataContext="{Binding CombinationProperty}"/>
|
<uc:FactoredCombination Grid.Row="1" DataContext="{Binding CombinationProperty}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Support" DataContext="{Binding SupportAction.SupportForces}">
|
<TabItem Header="Imternal force" DataContext="{Binding SupportAction.SupportForces}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="50"/>
|
<RowDefinition Height="50"/>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
private readonly IBeamShearRepository shearRepository;
|
private readonly IBeamShearRepository shearRepository;
|
||||||
private IUpdateStrategy<IBeamShearAction> updateStrategy;
|
private IUpdateStrategy<IBeamShearAction> updateStrategy;
|
||||||
|
|
||||||
public BeamShearActionsViewModel(IBeamShearRepository shearRepository) : base(shearRepository.BeamShearActions)
|
public BeamShearActionsViewModel(IBeamShearRepository shearRepository) : base(shearRepository.Actions)
|
||||||
{
|
{
|
||||||
this.shearRepository = shearRepository;
|
this.shearRepository = shearRepository;
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
}
|
}
|
||||||
public override void DeleteMethod(object parameter)
|
public override void DeleteMethod(object parameter)
|
||||||
{
|
{
|
||||||
shearRepository.DeleteAction(SelectedItem);
|
BeamShearRepositoryService.DeleteAction(shearRepository, SelectedItem);
|
||||||
base.DeleteMethod(parameter);
|
base.DeleteMethod(parameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using StructureHelper.Infrastructure;
|
||||||
|
using StructureHelper.Windows.ViewModels;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.BeamShears
|
||||||
|
{
|
||||||
|
public class BeamShearCalculatorInputDataViewModel : ViewModelBase
|
||||||
|
{
|
||||||
|
private readonly IBeamShearRepository shearRepository;
|
||||||
|
private readonly IBeamShearCalculatorInputData inputData;
|
||||||
|
|
||||||
|
public SourceTargetVM<IBeamShearAction> ActionSourceTarget { get; } = new();
|
||||||
|
public SourceTargetVM<IStirrup> StirrupSourceTarget { get; } = new();
|
||||||
|
public SourceTargetVM<IBeamShearSection> SectionSourceTarget { get; } = new();
|
||||||
|
|
||||||
|
public BeamShearCalculatorInputDataViewModel(IBeamShearRepository shearRepository, IBeamShearCalculatorInputData inputData)
|
||||||
|
{
|
||||||
|
this.shearRepository = shearRepository;
|
||||||
|
this.inputData = inputData;
|
||||||
|
InitializeViewModels();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeViewModels()
|
||||||
|
{
|
||||||
|
ActionSourceTarget.SetTargetItems(inputData.Actions);
|
||||||
|
ActionSourceTarget.SetSourceItems(shearRepository.Actions);
|
||||||
|
ActionSourceTarget.ItemDataDemplate = SourceTargetFactory.GetSimpleTemplate();
|
||||||
|
StirrupSourceTarget.SetTargetItems(inputData.Stirrups);
|
||||||
|
StirrupSourceTarget.SetSourceItems(shearRepository.Stirrups);
|
||||||
|
StirrupSourceTarget.ItemDataDemplate = SourceTargetFactory.GetSimpleTemplate();
|
||||||
|
SectionSourceTarget.SetTargetItems(inputData.Sections);
|
||||||
|
SectionSourceTarget.SetSourceItems(shearRepository.Sections);
|
||||||
|
SectionSourceTarget.ItemDataDemplate = SourceTargetFactory.GetSimpleTemplate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<Window x:Class="StructureHelper.Windows.BeamShears.BeamShearCalculatorView"
|
||||||
|
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.BeamShears"
|
||||||
|
d:DataContext="{d:DesignInstance local:BeamShearCalculatorViewModel}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Beam Shear Calculator" Height="300" Width="350" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="Name"/>
|
||||||
|
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
||||||
|
<TabControl Grid.Row="1" Grid.ColumnSpan="2" DataContext="{Binding InputDataViewModel}">
|
||||||
|
<TabItem Header="Sections">
|
||||||
|
<ContentControl ContentTemplate="{StaticResource SourceToTarget}" Content="{Binding SectionSourceTarget}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Stirrups">
|
||||||
|
<ContentControl ContentTemplate="{StaticResource SourceToTarget}" Content="{Binding StirrupSourceTarget}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Actions">
|
||||||
|
<ContentControl ContentTemplate="{StaticResource SourceToTarget}" Content="{Binding ActionSourceTarget}"/>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.BeamShears
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for BeamShearCalculatorView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class BeamShearCalculatorView : Window
|
||||||
|
{
|
||||||
|
private BeamShearCalculatorViewModel viewModel;
|
||||||
|
public BeamShearCalculatorView(BeamShearCalculatorViewModel viewModel)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.viewModel = viewModel;
|
||||||
|
this.viewModel.ParentWindow = this;
|
||||||
|
this.DataContext = this.viewModel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,19 +1,29 @@
|
|||||||
using StructureHelper.Windows.ViewModels;
|
using StructureHelper.Windows.ViewModels;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelper.Windows.BeamShears
|
namespace StructureHelper.Windows.BeamShears
|
||||||
{
|
{
|
||||||
public class BeamShearCalculatorViewModel : OkCancelViewModelBase
|
public class BeamShearCalculatorViewModel : OkCancelViewModelBase
|
||||||
{
|
{
|
||||||
private IBeamShearCalculator calculator;
|
private readonly IBeamShearRepository shearRepository;
|
||||||
public BeamShearCalculatorViewModel(IBeamShearCalculator calculator)
|
private readonly IBeamShearCalculator calculator;
|
||||||
|
|
||||||
|
|
||||||
|
public string Name
|
||||||
{
|
{
|
||||||
|
get => calculator.Name;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
calculator.Name = value;
|
||||||
|
OnPropertyChanged(nameof(Name));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public BeamShearCalculatorInputDataViewModel InputDataViewModel { get; }
|
||||||
|
public BeamShearCalculatorViewModel(IBeamShearRepository shearRepository, IBeamShearCalculator calculator)
|
||||||
|
{
|
||||||
|
this.shearRepository = shearRepository;
|
||||||
this.calculator = calculator;
|
this.calculator = calculator;
|
||||||
|
InputDataViewModel = new(this.shearRepository, this.calculator.InputData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
@@ -72,14 +73,17 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
}
|
}
|
||||||
private void EditCalculator()
|
private void EditCalculator()
|
||||||
{
|
{
|
||||||
|
Window window;
|
||||||
if (SelectedItem is IBeamShearCalculator beamShearCalculator)
|
if (SelectedItem is IBeamShearCalculator beamShearCalculator)
|
||||||
{
|
{
|
||||||
//to do
|
var viewModel = new BeamShearCalculatorViewModel(shearRepository, beamShearCalculator);
|
||||||
|
window = new BeamShearCalculatorView(viewModel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(SelectedItem));
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(SelectedItem));
|
||||||
}
|
}
|
||||||
|
window.ShowDialog();
|
||||||
}
|
}
|
||||||
private void RunMethod(object param)
|
private void RunMethod(object param)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,24 +1,72 @@
|
|||||||
using StructureHelper.Windows.ViewModels;
|
using StructureHelper.Infrastructure.Enums;
|
||||||
|
using StructureHelper.Windows.ViewModels;
|
||||||
|
using StructureHelper.Windows.ViewModels.Errors;
|
||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Windows;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace StructureHelper.Windows.BeamShears
|
namespace StructureHelper.Windows.BeamShears
|
||||||
{
|
{
|
||||||
public class BeamShearSectionsViewModel : SelectItemVM<IBeamShearSection>
|
public class BeamShearSectionsViewModel : SelectItemVM<IBeamShearSection>
|
||||||
{
|
{
|
||||||
IBeamShearRepository shearRepository;
|
private const string ErrorText = "Error of creating of section";
|
||||||
public BeamShearSectionsViewModel(IBeamShearRepository shearRepository) : base(shearRepository.ShearSections)
|
private IUpdateStrategy<IBeamShearSection> updateStrategy;
|
||||||
|
private IBeamShearRepository shearRepository;
|
||||||
|
private PrimitiveType sectionType;
|
||||||
|
public BeamShearSectionsViewModel(IBeamShearRepository shearRepository) : base(shearRepository.Sections)
|
||||||
{
|
{
|
||||||
this.shearRepository = shearRepository;
|
this.shearRepository = shearRepository;
|
||||||
}
|
}
|
||||||
|
public override void EditMethod(object parameter)
|
||||||
|
{
|
||||||
|
if (SelectedItem is null) { return; }
|
||||||
|
SafetyProcessor.RunSafeProcess(EditSection, "Error of editing of section");
|
||||||
|
base.EditMethod(parameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void AddMethod(object parameter)
|
||||||
|
{
|
||||||
|
if (parameter is PrimitiveType primitiveType)
|
||||||
|
{
|
||||||
|
sectionType = primitiveType;
|
||||||
|
SafetyProcessor.RunSafeProcess(AddSection, ErrorText);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(parameter));
|
||||||
|
}
|
||||||
|
base.AddMethod(parameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddSection()
|
||||||
|
{
|
||||||
|
if (sectionType is PrimitiveType.Rectangle)
|
||||||
|
{
|
||||||
|
NewItem = new BeamShearSection(Guid.NewGuid())
|
||||||
|
{
|
||||||
|
Name = "New rectangle section"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EditSection()
|
||||||
|
{
|
||||||
|
Window window;
|
||||||
|
IBeamShearSection temporarySection = SelectedItem.Clone() as IBeamShearSection;
|
||||||
|
window = new SectionView(SelectedItem);
|
||||||
|
window.ShowDialog();
|
||||||
|
if (window.DialogResult != true)
|
||||||
|
{
|
||||||
|
updateStrategy ??= new BeamShearSectionUpdateStrategy();
|
||||||
|
updateStrategy.Update(SelectedItem, temporarySection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void DeleteMethod(object parameter)
|
public override void DeleteMethod(object parameter)
|
||||||
{
|
{
|
||||||
shearRepository.DeleteSection(SelectedItem);
|
BeamShearRepositoryService.DeleteSection(shearRepository, SelectedItem);
|
||||||
base.DeleteMethod(parameter);
|
base.DeleteMethod(parameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,10 @@
|
|||||||
</Viewbox>
|
</Viewbox>
|
||||||
</Button>
|
</Button>
|
||||||
</ToolBar>
|
</ToolBar>
|
||||||
<ToolBar ToolTip="Sections">
|
<ToolBar ToolTip="Sections" DataContext="{Binding Sections}">
|
||||||
<Button Style="{StaticResource ToolButton}"
|
<Button Style="{StaticResource ToolButton}"
|
||||||
Command="{Binding FileOpen}">
|
Command="{Binding Add}"
|
||||||
|
CommandParameter="{x:Static enums:PrimitiveType.Rectangle}">
|
||||||
<Button.ToolTip>
|
<Button.ToolTip>
|
||||||
<uc:ButtonToolTipEh HeaderText="Rectangle section"
|
<uc:ButtonToolTipEh HeaderText="Rectangle section"
|
||||||
IconContent="{StaticResource ShearRectangleSection}"
|
IconContent="{StaticResource ShearRectangleSection}"
|
||||||
|
|||||||
@@ -9,8 +9,14 @@ using StructureHelperLogics.Models.Materials;
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
|
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||||
|
//All rights reserved.
|
||||||
|
|
||||||
namespace StructureHelper.Windows.BeamShears
|
namespace StructureHelper.Windows.BeamShears
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Implements logic of CRUD operations with stirrups in beam shear calculations
|
||||||
|
/// </summary>
|
||||||
public class BeamStirrupsViewModel : SelectItemVM<IStirrup>
|
public class BeamStirrupsViewModel : SelectItemVM<IStirrup>
|
||||||
{
|
{
|
||||||
private const string ErrorText = "Error of creating of stirrup";
|
private const string ErrorText = "Error of creating of stirrup";
|
||||||
@@ -22,37 +28,14 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
{
|
{
|
||||||
this.shearRepository = shearRepository;
|
this.shearRepository = shearRepository;
|
||||||
}
|
}
|
||||||
|
/// <inheritdoc/>
|
||||||
public override void EditMethod(object parameter)
|
public override void EditMethod(object parameter)
|
||||||
{
|
{
|
||||||
if (SelectedItem is null) { return; }
|
if (SelectedItem is null) { return; }
|
||||||
SafetyProcessor.RunSafeProcess(EditStirrup, "Error of editing of stirrup");
|
SafetyProcessor.RunSafeProcess(EditStirrup, "Error of editing of stirrup");
|
||||||
base.EditMethod(parameter);
|
base.EditMethod(parameter);
|
||||||
}
|
}
|
||||||
|
/// <inheritdoc/>
|
||||||
private void EditStirrup()
|
|
||||||
{
|
|
||||||
Window window;
|
|
||||||
IStirrup temporaryStirrup = SelectedItem.Clone() as IStirrup;
|
|
||||||
if (SelectedItem is IStirrupByDensity stirrupByDensity)
|
|
||||||
{
|
|
||||||
window = new StirrupByDensityView(stirrupByDensity);
|
|
||||||
}
|
|
||||||
//else if (SelectedItem is IStirrupByUniformRebar stirrupByUniformRebar)
|
|
||||||
//{
|
|
||||||
// window = ;
|
|
||||||
//}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(SelectedItem));
|
|
||||||
}
|
|
||||||
window.ShowDialog();
|
|
||||||
if (window.DialogResult != true)
|
|
||||||
{
|
|
||||||
updateStrategy ??= new StirrupUpdateStrategy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void AddMethod(object parameter)
|
public override void AddMethod(object parameter)
|
||||||
{
|
{
|
||||||
if (parameter is StirrupTypes stirrupParameter)
|
if (parameter is StirrupTypes stirrupParameter)
|
||||||
@@ -66,6 +49,29 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void EditStirrup()
|
||||||
|
{
|
||||||
|
Window window;
|
||||||
|
IStirrup temporaryStirrup = SelectedItem.Clone() as IStirrup;
|
||||||
|
if (SelectedItem is IStirrupByDensity stirrupByDensity)
|
||||||
|
{
|
||||||
|
window = new StirrupByDensityView(stirrupByDensity);
|
||||||
|
}
|
||||||
|
else if (SelectedItem is IStirrupByRebar stirrupByRebar)
|
||||||
|
{
|
||||||
|
window = new StirrupByRebarView(stirrupByRebar);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(SelectedItem));
|
||||||
|
}
|
||||||
|
window.ShowDialog();
|
||||||
|
if (window.DialogResult != true)
|
||||||
|
{
|
||||||
|
updateStrategy ??= new StirrupUpdateStrategy();
|
||||||
|
updateStrategy.Update(SelectedItem, temporaryStirrup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void AddStirrup()
|
private void AddStirrup()
|
||||||
{
|
{
|
||||||
@@ -73,26 +79,29 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
{
|
{
|
||||||
AddStirrupByDensity();
|
AddStirrupByDensity();
|
||||||
}
|
}
|
||||||
if (stirrupType is StirrupTypes.UniformRebar)
|
else if (stirrupType is StirrupTypes.UniformRebar)
|
||||||
{
|
{
|
||||||
AddUniformRebarStirrup();
|
AddUniformRebarStirrup();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(stirrupType));
|
||||||
|
}
|
||||||
base.AddMethod(stirrupType);
|
base.AddMethod(stirrupType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddUniformRebarStirrup()
|
private void AddUniformRebarStirrup()
|
||||||
{
|
{
|
||||||
IReinforcementLibMaterial reinforcement = new ReinforcementLibMaterial(Guid.NewGuid());
|
IReinforcementLibMaterial reinforcement = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Reinforcement400).HelperMaterial as IReinforcementLibMaterial;
|
||||||
NewItem = new StirrupByUniformRebar(Guid.NewGuid())
|
NewItem = new StirrupByRebar(Guid.NewGuid())
|
||||||
{
|
{
|
||||||
Name = "New stirrup by uniformly distributed rebar",
|
Name = "New stirrup by uniformly distributed rebar",
|
||||||
Diameter = 0.008,
|
Diameter = 0.008,
|
||||||
LegCount = 2,
|
LegCount = 2,
|
||||||
Step = 0.1,
|
Spacing = 0.1,
|
||||||
Material = reinforcement
|
Material = reinforcement
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddStirrupByDensity()
|
private void AddStirrupByDensity()
|
||||||
{
|
{
|
||||||
NewItem = new StirrupByDensity(Guid.NewGuid())
|
NewItem = new StirrupByDensity(Guid.NewGuid())
|
||||||
@@ -104,7 +113,7 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
|
|
||||||
public override void DeleteMethod(object parameter)
|
public override void DeleteMethod(object parameter)
|
||||||
{
|
{
|
||||||
shearRepository.DeleteStirrup(SelectedItem);
|
BeamShearRepositoryService.DeleteStirrup(shearRepository, SelectedItem);
|
||||||
base.DeleteMethod(parameter);
|
base.DeleteMethod(parameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
48
StructureHelper/Windows/BeamShears/SectionView.xaml
Normal file
48
StructureHelper/Windows/BeamShears/SectionView.xaml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<Window x:Class="StructureHelper.Windows.BeamShears.SectionView"
|
||||||
|
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.BeamShears"
|
||||||
|
d:DataContext="{d:DesignInstance local:SectionViewModel}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Beam shear section" Height="400" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||||
|
<Window.Resources>
|
||||||
|
<ResourceDictionary Source="/Infrastructure/UI/Resources/Materials.xaml"/>
|
||||||
|
</Window.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TabControl>
|
||||||
|
<TabItem Header="Main">
|
||||||
|
<StackPanel>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="Name"/>
|
||||||
|
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
||||||
|
<TextBlock Grid.Row="1" Text="Cover to center of rebar"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding CenterCover, Converter={StaticResource LengthConverter}}"/>
|
||||||
|
</Grid>
|
||||||
|
<!--ShapeEditTemplates.xaml-->
|
||||||
|
<ContentControl ContentTemplate="{StaticResource RectangleShapeEdit}" Content="{Binding Shape}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Material" DataContext="{Binding Material}">
|
||||||
|
<!--Material.xaml-->
|
||||||
|
<ContentControl ContentTemplate="{StaticResource ConcreteMaterial}" Content="{Binding}"/>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
24
StructureHelper/Windows/BeamShears/SectionView.xaml.cs
Normal file
24
StructureHelper/Windows/BeamShears/SectionView.xaml.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.BeamShears
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for SectionView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class SectionView : Window
|
||||||
|
{
|
||||||
|
private readonly SectionViewModel viewModel;
|
||||||
|
public SectionView(SectionViewModel viewModel)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.viewModel = viewModel;
|
||||||
|
this.viewModel.ParentWindow = this;
|
||||||
|
this.DataContext = this.viewModel;
|
||||||
|
}
|
||||||
|
public SectionView(IBeamShearSection section) : this(new SectionViewModel(section))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
51
StructureHelper/Windows/BeamShears/SectionViewModel.cs
Normal file
51
StructureHelper/Windows/BeamShears/SectionViewModel.cs
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
using StructureHelper.Windows.ViewModels;
|
||||||
|
using StructureHelper.Windows.ViewModels.Materials;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
|
||||||
|
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||||
|
//All rights reserved.
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.BeamShears
|
||||||
|
{
|
||||||
|
public class SectionViewModel : OkCancelViewModelBase
|
||||||
|
{
|
||||||
|
private readonly IBeamShearSection beamShearSection;
|
||||||
|
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get => beamShearSection.Name;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
beamShearSection.Name = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public double CenterCover
|
||||||
|
{
|
||||||
|
get => beamShearSection.CenterCover;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
beamShearSection.CenterCover = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public IRectangleShape Shape { get; }
|
||||||
|
public ConcreteViewModel Material { get; }
|
||||||
|
|
||||||
|
public SectionViewModel(IBeamShearSection beamShearSection)
|
||||||
|
{
|
||||||
|
this.beamShearSection = beamShearSection;
|
||||||
|
Material = new(beamShearSection.Material)
|
||||||
|
{
|
||||||
|
MaterialLogicVisibility = false,
|
||||||
|
TensionForULSVisibility = false,
|
||||||
|
TensionForSLSVisibility = false,
|
||||||
|
HumidityVisibility = false
|
||||||
|
};
|
||||||
|
Shape = beamShearSection.Shape as IRectangleShape;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
xmlns:local="clr-namespace:StructureHelper.Windows.BeamShears"
|
xmlns:local="clr-namespace:StructureHelper.Windows.BeamShears"
|
||||||
d:DataContext="{d:DesignInstance local:StirrupByDensityViewModel}"
|
d:DataContext="{d:DesignInstance local:StirrupByDensityViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Stirrup By Density" Height="200" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
Title="Stirrups by uniform density" Height="200" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
|
|||||||
@@ -1,17 +1,5 @@
|
|||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
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.BeamShears
|
namespace StructureHelper.Windows.BeamShears
|
||||||
{
|
{
|
||||||
@@ -26,6 +14,7 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.viewModel = viewModel;
|
this.viewModel = viewModel;
|
||||||
this.viewModel.ParentWindow = this;
|
this.viewModel.ParentWindow = this;
|
||||||
|
this.DataContext = this.viewModel;
|
||||||
}
|
}
|
||||||
public StirrupByDensityView(IStirrupByDensity stirrupByDensity) : this(new StirrupByDensityViewModel(stirrupByDensity))
|
public StirrupByDensityView(IStirrupByDensity stirrupByDensity) : this(new StirrupByDensityViewModel(stirrupByDensity))
|
||||||
{
|
{
|
||||||
|
|||||||
48
StructureHelper/Windows/BeamShears/StirrupByRebarView.xaml
Normal file
48
StructureHelper/Windows/BeamShears/StirrupByRebarView.xaml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<Window x:Class="StructureHelper.Windows.BeamShears.StirrupByRebarView"
|
||||||
|
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.BeamShears"
|
||||||
|
d:DataContext="{d:DesignInstance local:StirrupByRebarViewModel}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Stirrup by uniformly distributed rebars" Height="350" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||||
|
<Window.Resources>
|
||||||
|
<ResourceDictionary Source="/Infrastructure/UI/Resources/Materials.xaml"/>
|
||||||
|
</Window.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TabControl>
|
||||||
|
<TabItem Header="Main">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition Height="25"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="Name"/>
|
||||||
|
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
||||||
|
<TextBlock Grid.Row="1" Text="Diameter"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Diameter, Converter={StaticResource LengthConverter}}"/>
|
||||||
|
<TextBlock Grid.Row="2" Text="Number of legs"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding LegCount, Converter={StaticResource PlainDouble}}"/>
|
||||||
|
<TextBlock Grid.Row="3" Text="Spacing"/>
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Spacing, Converter={StaticResource LengthConverter}}"/>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Material" DataContext="{Binding Material}">
|
||||||
|
<ContentControl ContentTemplate="{StaticResource ReinforcementMaterial}" Content="{Binding}"/>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
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.BeamShears
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for StirrupByRebarView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class StirrupByRebarView : Window
|
||||||
|
{
|
||||||
|
private StirrupByRebarViewModel viewModel;
|
||||||
|
public StirrupByRebarView(StirrupByRebarViewModel viewModel)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.viewModel = viewModel;
|
||||||
|
this.viewModel.ParentWindow = this;
|
||||||
|
this.DataContext = this.viewModel;
|
||||||
|
}
|
||||||
|
public StirrupByRebarView(IStirrupByRebar stirrupByRebar) : this(new StirrupByRebarViewModel(stirrupByRebar))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
using StructureHelper.Windows.ViewModels;
|
||||||
|
using StructureHelper.Windows.ViewModels.Materials;
|
||||||
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.BeamShears
|
||||||
|
{
|
||||||
|
public class StirrupByRebarViewModel : OkCancelViewModelBase
|
||||||
|
{
|
||||||
|
private readonly IStirrupByRebar stirrupByRebar;
|
||||||
|
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get => stirrupByRebar.Name;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
stirrupByRebar.Name = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Diameter
|
||||||
|
{
|
||||||
|
get => stirrupByRebar.Diameter;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0)
|
||||||
|
{
|
||||||
|
value = 0.008;
|
||||||
|
}
|
||||||
|
stirrupByRebar.Diameter = value;
|
||||||
|
OnPropertyChanged(nameof(Diameter));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double LegCount
|
||||||
|
{
|
||||||
|
get => stirrupByRebar.LegCount;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
stirrupByRebar.LegCount = value;
|
||||||
|
OnPropertyChanged(nameof(LegCount));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Spacing
|
||||||
|
{
|
||||||
|
get => stirrupByRebar.Spacing;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0)
|
||||||
|
{
|
||||||
|
value = 0.1;
|
||||||
|
}
|
||||||
|
stirrupByRebar.Spacing = value;
|
||||||
|
OnPropertyChanged(nameof(Spacing));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReinforcementViewModel Material { get; private set; }
|
||||||
|
|
||||||
|
public StirrupByRebarViewModel(IStirrupByRebar stirrupByRebar)
|
||||||
|
{
|
||||||
|
this.stirrupByRebar = stirrupByRebar;
|
||||||
|
Material = new(this.stirrupByRebar.Material) { MaterialLogicVisibility = false};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,20 +1,9 @@
|
|||||||
using LoaderCalculator.Data.Materials;
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
using StructureHelper.Infrastructure;
|
|
||||||
using StructureHelperCommon.Infrastructures.Enums;
|
|
||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
|
||||||
using StructureHelperCommon.Infrastructures.Settings;
|
|
||||||
using StructureHelperCommon.Models.Materials;
|
|
||||||
using StructureHelperCommon.Models.Materials.Libraries;
|
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelper.Windows.ViewModels.Materials
|
namespace StructureHelper.Windows.ViewModels.Materials
|
||||||
{
|
{
|
||||||
internal class ConcreteViewModel : LibMaterialViewModel<IConcreteMaterialEntity>
|
public class ConcreteViewModel : LibMaterialViewModel<IConcreteMaterialEntity>
|
||||||
{
|
{
|
||||||
readonly IConcreteLibMaterial concreteMaterial;
|
readonly IConcreteLibMaterial concreteMaterial;
|
||||||
public bool TensionForULS
|
public bool TensionForULS
|
||||||
@@ -26,6 +15,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
OnPropertyChanged(nameof(TensionForULS));
|
OnPropertyChanged(nameof(TensionForULS));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool TensionForULSVisibility { get; set; } = true;
|
||||||
public bool TensionForSLS
|
public bool TensionForSLS
|
||||||
{
|
{
|
||||||
get => concreteMaterial.TensionForSLS;
|
get => concreteMaterial.TensionForSLS;
|
||||||
@@ -35,6 +25,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
OnPropertyChanged(nameof(TensionForSLS));
|
OnPropertyChanged(nameof(TensionForSLS));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool TensionForSLSVisibility { get; set; } = true;
|
||||||
public double Humidity
|
public double Humidity
|
||||||
{
|
{
|
||||||
get => concreteMaterial.RelativeHumidity;
|
get => concreteMaterial.RelativeHumidity;
|
||||||
@@ -44,14 +35,11 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
OnPropertyChanged(nameof(Humidity));
|
OnPropertyChanged(nameof(Humidity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool HumidityVisibility { get; set; } = true;
|
||||||
|
|
||||||
public ConcreteViewModel(ILibMaterial material) : base(material)
|
public ConcreteViewModel(IConcreteLibMaterial concreteMaterial) : base(concreteMaterial)
|
||||||
{
|
{
|
||||||
if (material is not IConcreteLibMaterial)
|
this.concreteMaterial = concreteMaterial;
|
||||||
{
|
|
||||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $". Expected: {typeof(IConcreteLibMaterial)}, but was: {material.GetType()}");
|
|
||||||
}
|
|
||||||
concreteMaterial = material as IConcreteLibMaterial;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,10 +24,10 @@ namespace StructureHelper.Windows.MainWindow.Materials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class HeadMaterialView : Window
|
public partial class HeadMaterialView : Window
|
||||||
{
|
{
|
||||||
IHeadMaterial headMaterial;
|
private readonly IHeadMaterial headMaterial;
|
||||||
HeadMaterialViewModel viewModel;
|
private readonly HeadMaterialViewModel viewModel;
|
||||||
Dictionary<string, Binding> bindings = new();
|
private readonly Dictionary<string, Binding> bindings = new();
|
||||||
IHelperMaterial helperMaterial;
|
private readonly IHelperMaterial helperMaterial;
|
||||||
string templateName;
|
string templateName;
|
||||||
|
|
||||||
public HeadMaterialView(HeadMaterialViewModel viewModel)
|
public HeadMaterialView(HeadMaterialViewModel viewModel)
|
||||||
@@ -64,7 +64,7 @@ namespace StructureHelper.Windows.MainWindow.Materials
|
|||||||
}
|
}
|
||||||
else if (helperMaterial is IReinforcementLibMaterial)
|
else if (helperMaterial is IReinforcementLibMaterial)
|
||||||
{
|
{
|
||||||
SetReinForcementLibraryMaterial();
|
SetReinforcementLibraryMaterial();
|
||||||
}
|
}
|
||||||
else if (helperMaterial is IElasticMaterial)
|
else if (helperMaterial is IElasticMaterial)
|
||||||
{
|
{
|
||||||
@@ -81,7 +81,7 @@ namespace StructureHelper.Windows.MainWindow.Materials
|
|||||||
{
|
{
|
||||||
foreach (var item in bindings)
|
foreach (var item in bindings)
|
||||||
{
|
{
|
||||||
ContentControl contentControl = new ContentControl();
|
ContentControl contentControl = new();
|
||||||
contentControl.SetResourceReference(ContentTemplateProperty, item.Key);
|
contentControl.SetResourceReference(ContentTemplateProperty, item.Key);
|
||||||
contentControl.SetBinding(ContentProperty, item.Value);
|
contentControl.SetBinding(ContentProperty, item.Value);
|
||||||
StpMaterialProperties.Children.Add(contentControl);
|
StpMaterialProperties.Children.Add(contentControl);
|
||||||
@@ -105,11 +105,13 @@ namespace StructureHelper.Windows.MainWindow.Materials
|
|||||||
frBinding.Source = (viewModel.HelperMaterialViewModel as ElasticViewModel).SafetyFactors;
|
frBinding.Source = (viewModel.HelperMaterialViewModel as ElasticViewModel).SafetyFactors;
|
||||||
bindings.Add(templateName, frBinding);
|
bindings.Add(templateName, frBinding);
|
||||||
}
|
}
|
||||||
private void SetReinForcementLibraryMaterial()
|
private void SetReinforcementLibraryMaterial()
|
||||||
{
|
{
|
||||||
templateName = "ReinforcementMaterial";
|
templateName = "ReinforcementMaterial";
|
||||||
var binding = new Binding();
|
var binding = new Binding
|
||||||
binding.Source = viewModel.HelperMaterialViewModel;
|
{
|
||||||
|
Source = viewModel.HelperMaterialViewModel
|
||||||
|
};
|
||||||
bindings.Add(templateName, binding);
|
bindings.Add(templateName, binding);
|
||||||
}
|
}
|
||||||
private void SetConcreteLibraryMaterial()
|
private void SetConcreteLibraryMaterial()
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
{
|
{
|
||||||
public class HeadMaterialViewModel : OkCancelViewModelBase
|
public class HeadMaterialViewModel : OkCancelViewModelBase
|
||||||
{
|
{
|
||||||
IHeadMaterial headMaterial;
|
private readonly IHeadMaterial headMaterial;
|
||||||
HelperMaterialViewModel helperMaterialViewModel;
|
private readonly HelperMaterialViewModel helperMaterialViewModel;
|
||||||
private ICommand showSafetyFactors;
|
private ICommand showSafetyFactors;
|
||||||
private ICommand editColorCommand;
|
private ICommand editColorCommand;
|
||||||
|
|
||||||
@@ -41,10 +41,9 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
{
|
{
|
||||||
return showSafetyFactors ??= new RelayCommand(o =>
|
return showSafetyFactors ??= new RelayCommand(o =>
|
||||||
{
|
{
|
||||||
if (headMaterial is ILibMaterial)
|
if (headMaterial is ILibMaterial libMaterial)
|
||||||
{
|
{
|
||||||
var material = headMaterial as ILibMaterial;
|
var wnd = new SafetyFactorsView(libMaterial.SafetyFactors);
|
||||||
var wnd = new SafetyFactorsView(material.SafetyFactors);
|
|
||||||
wnd.ShowDialog();
|
wnd.ShowDialog();
|
||||||
}
|
}
|
||||||
}, o => headMaterial is LibMaterial
|
}, o => headMaterial is LibMaterial
|
||||||
@@ -66,27 +65,23 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
{
|
{
|
||||||
this.headMaterial = headMaterial;
|
this.headMaterial = headMaterial;
|
||||||
var helperMaterial = headMaterial.HelperMaterial;
|
var helperMaterial = headMaterial.HelperMaterial;
|
||||||
if (helperMaterial is IConcreteLibMaterial)
|
if (helperMaterial is IConcreteLibMaterial concreteMaterial)
|
||||||
{
|
{
|
||||||
var material = helperMaterial as IConcreteLibMaterial;
|
helperMaterialViewModel = new ConcreteViewModel(concreteMaterial);
|
||||||
helperMaterialViewModel = new ConcreteViewModel(material);
|
|
||||||
}
|
}
|
||||||
else if (helperMaterial is IReinforcementLibMaterial)
|
else if (helperMaterial is IReinforcementLibMaterial reinforcementMaterial)
|
||||||
{
|
{
|
||||||
var material = helperMaterial as IReinforcementLibMaterial;
|
helperMaterialViewModel = new LibMaterialViewModel<IReinforcementMaterialEntity>(reinforcementMaterial);
|
||||||
helperMaterialViewModel = new LibMaterialViewModel<IReinforcementMaterialEntity>(material);
|
|
||||||
}
|
}
|
||||||
else if (helperMaterial is IElasticMaterial)
|
else if (helperMaterial is IElasticMaterial elasticMaterial)
|
||||||
{
|
{
|
||||||
if (helperMaterial is IFRMaterial)
|
if (helperMaterial is IFRMaterial fRMaterial)
|
||||||
{
|
{
|
||||||
var material = helperMaterial as IFRMaterial;
|
helperMaterialViewModel = new FRViewModel(fRMaterial);
|
||||||
helperMaterialViewModel = new FRViewModel(material);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var material = helperMaterial as IElasticMaterial;
|
helperMaterialViewModel = new ElasticViewModel(elasticMaterial);
|
||||||
helperMaterialViewModel = new ElasticViewModel(material);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1,23 +1,15 @@
|
|||||||
using StructureHelper.Infrastructure;
|
using StructureHelper.Infrastructure;
|
||||||
using StructureHelper.Models.Materials;
|
using StructureHelper.Models.Materials;
|
||||||
using StructureHelper.Services.Primitives;
|
|
||||||
using StructureHelper.Windows.AddMaterialWindow;
|
using StructureHelper.Windows.AddMaterialWindow;
|
||||||
using StructureHelper.Windows.MainWindow;
|
|
||||||
using StructureHelper.Windows.MainWindow.Materials;
|
using StructureHelper.Windows.MainWindow.Materials;
|
||||||
using StructureHelperCommon.Infrastructures.Enums;
|
|
||||||
using StructureHelperCommon.Infrastructures.Settings;
|
|
||||||
using StructureHelperCommon.Models.Materials;
|
using StructureHelperCommon.Models.Materials;
|
||||||
using StructureHelperCommon.Models.Materials.Libraries;
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
using StructureHelperCommon.Services.ColorServices;
|
using StructureHelperCommon.Services.ColorServices;
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
@@ -26,10 +18,10 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
{
|
{
|
||||||
public class HeadMaterialsViewModel : ViewModelBase
|
public class HeadMaterialsViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
IHasHeadMaterials parent;
|
private readonly IHasHeadMaterials parent;
|
||||||
List<IHeadMaterial> headMaterials;
|
private readonly List<IHeadMaterial> headMaterials;
|
||||||
IHeadMaterial selectedMaterial;
|
private IHeadMaterial selectedMaterial;
|
||||||
ILibMaterialEntity selectedLibMaterial;
|
private ILibMaterialEntity selectedLibMaterial;
|
||||||
|
|
||||||
public ICommand AddNewConcreteMaterialCommand { get;}
|
public ICommand AddNewConcreteMaterialCommand { get;}
|
||||||
public ICommand AddNewReinforcementMaterialCommand { get; }
|
public ICommand AddNewReinforcementMaterialCommand { get; }
|
||||||
@@ -1,29 +1,23 @@
|
|||||||
using LoaderCalculator.Data.Materials;
|
using StructureHelper.Infrastructure;
|
||||||
using StructureHelper.Infrastructure;
|
|
||||||
using StructureHelper.Windows.AddMaterialWindow;
|
using StructureHelper.Windows.AddMaterialWindow;
|
||||||
using StructureHelperCommon.Infrastructures.Enums;
|
|
||||||
using StructureHelperCommon.Infrastructures.Settings;
|
using StructureHelperCommon.Infrastructures.Settings;
|
||||||
using StructureHelperCommon.Models.Codes;
|
using StructureHelperCommon.Models.Codes;
|
||||||
using StructureHelperCommon.Models.Materials;
|
using StructureHelperCommon.Models.Materials;
|
||||||
using StructureHelperCommon.Models.Materials.Libraries;
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
using StructureHelperLogics.Models.Materials;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace StructureHelper.Windows.ViewModels.Materials
|
namespace StructureHelper.Windows.ViewModels.Materials
|
||||||
{
|
{
|
||||||
internal class LibMaterialViewModel<T> : HelperMaterialViewModel where T: class, ILibMaterialEntity
|
public class LibMaterialViewModel<T> : HelperMaterialViewModel where T: class, ILibMaterialEntity
|
||||||
{
|
{
|
||||||
ILibMaterial material;
|
private readonly ILibMaterial material;
|
||||||
ICommand showSafetyFactors;
|
private ICommand showSafetyFactors;
|
||||||
SafetyFactorsViewModel safetyFactorsViewModel;
|
SafetyFactorsViewModel safetyFactorsViewModel;
|
||||||
private ICodeEntity codeEntity;
|
private ICodeEntity codeEntity;
|
||||||
private IMaterialLogic materialLogic;
|
//private IMaterialLogic materialLogic;
|
||||||
|
|
||||||
public ILibMaterialEntity MaterialEntity
|
public ILibMaterialEntity MaterialEntity
|
||||||
{
|
{
|
||||||
@@ -50,28 +44,12 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<IMaterialLogic> MaterialLogics => material.MaterialLogics;
|
public List<IMaterialLogic> MaterialLogics => material.MaterialLogics;
|
||||||
public IMaterialLogic MaterialLogic { get => material.MaterialLogic; set => material.MaterialLogic = value; }
|
public IMaterialLogic MaterialLogic
|
||||||
|
|
||||||
private void FillMaterialKinds()
|
|
||||||
{
|
{
|
||||||
var materialKinds = ProgramSetting
|
get => material.MaterialLogic;
|
||||||
.MaterialRepository
|
set => material.MaterialLogic = value;
|
||||||
.Repository
|
|
||||||
.Where(x => x.Code == codeEntity & x is T);
|
|
||||||
|
|
||||||
MaterialLibrary = new ObservableCollection<T>();
|
|
||||||
if (materialKinds.Count() > 0)
|
|
||||||
{
|
|
||||||
foreach (var item in materialKinds)
|
|
||||||
{
|
|
||||||
MaterialLibrary.Add((T)item);
|
|
||||||
}
|
|
||||||
OnPropertyChanged(nameof(MaterialLibrary));
|
|
||||||
material.MaterialEntity = MaterialLibrary.First();
|
|
||||||
OnPropertyChanged(nameof(MaterialEntity));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
public bool MaterialLogicVisibility { get; set; } = true;
|
||||||
public ObservableCollection<ICodeEntity> CodeList { get; }
|
public ObservableCollection<ICodeEntity> CodeList { get; }
|
||||||
public ObservableCollection<T> MaterialLibrary { get; private set; }
|
public ObservableCollection<T> MaterialLibrary { get; private set; }
|
||||||
public SafetyFactorsViewModel SafetyFactors => safetyFactorsViewModel;
|
public SafetyFactorsViewModel SafetyFactors => safetyFactorsViewModel;
|
||||||
@@ -85,7 +63,6 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
OnPropertyChanged(nameof(SafetyFactors));
|
OnPropertyChanged(nameof(SafetyFactors));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
public LibMaterialViewModel(ILibMaterial material)
|
public LibMaterialViewModel(ILibMaterial material)
|
||||||
{
|
{
|
||||||
this.material = material;
|
this.material = material;
|
||||||
@@ -108,5 +85,24 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
OnPropertyChanged(nameof(MaterialEntity));
|
OnPropertyChanged(nameof(MaterialEntity));
|
||||||
safetyFactorsViewModel = new SafetyFactorsViewModel(material.SafetyFactors);
|
safetyFactorsViewModel = new SafetyFactorsViewModel(material.SafetyFactors);
|
||||||
}
|
}
|
||||||
|
private void FillMaterialKinds()
|
||||||
|
{
|
||||||
|
var materialKinds = ProgramSetting
|
||||||
|
.MaterialRepository
|
||||||
|
.Repository
|
||||||
|
.Where(x => x.Code == codeEntity & x is T);
|
||||||
|
|
||||||
|
MaterialLibrary = new ObservableCollection<T>();
|
||||||
|
if (materialKinds.Count() > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in materialKinds)
|
||||||
|
{
|
||||||
|
MaterialLibrary.Add((T)item);
|
||||||
|
}
|
||||||
|
OnPropertyChanged(nameof(MaterialLibrary));
|
||||||
|
material.MaterialEntity = MaterialLibrary.First();
|
||||||
|
OnPropertyChanged(nameof(MaterialEntity));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Infrastructures.Settings;
|
||||||
|
using StructureHelperCommon.Models.Codes;
|
||||||
|
using StructureHelperCommon.Models.Materials;
|
||||||
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.ViewModels.Materials
|
||||||
|
{
|
||||||
|
public class ReinforcementViewModel : LibMaterialViewModel<IReinforcementMaterialEntity>
|
||||||
|
{
|
||||||
|
public ReinforcementViewModel(IReinforcementLibMaterial reinforcementMaterial) : base(reinforcementMaterial)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,18 +2,12 @@
|
|||||||
using StructureHelper.Windows.AddMaterialWindow;
|
using StructureHelper.Windows.AddMaterialWindow;
|
||||||
using StructureHelper.Windows.MainWindow.Materials;
|
using StructureHelper.Windows.MainWindow.Materials;
|
||||||
using StructureHelperCommon.Models.Materials.Libraries;
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
using StructureHelperLogics.Models.Materials;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace StructureHelper.Windows.ViewModels.Materials
|
namespace StructureHelper.Windows.ViewModels.Materials
|
||||||
{
|
{
|
||||||
internal class SafetyFactorsViewModel : SelectItemVM<IMaterialSafetyFactor>
|
public class SafetyFactorsViewModel : SelectItemVM<IMaterialSafetyFactor>
|
||||||
{
|
{
|
||||||
List<IMaterialSafetyFactor> safetyFactors;
|
List<IMaterialSafetyFactor> safetyFactors;
|
||||||
private RelayCommand showPartialCommand;
|
private RelayCommand showPartialCommand;
|
||||||
@@ -22,13 +16,12 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return showPartialCommand ??
|
return showPartialCommand ??= new RelayCommand(o =>
|
||||||
(showPartialCommand = new RelayCommand(o =>
|
|
||||||
{
|
{
|
||||||
var wnd = new PartialFactorsView(SelectedItem.PartialFactors);
|
var wnd = new PartialFactorsView(SelectedItem.PartialFactors);
|
||||||
wnd.ShowDialog();
|
wnd.ShowDialog();
|
||||||
}, o => SelectedItem != null
|
}, o => SelectedItem != null
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9,23 +9,9 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="PrimitiveProperties" Height="450" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
Title="PrimitiveProperties" Height="450" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
|
||||||
<DataTemplate x:Key="RectangleProperties">
|
<DataTemplate x:Key="RectangleProperties">
|
||||||
<Expander Header="Rectangle" IsExpanded="True">
|
<Expander Header="Rectangle" IsExpanded="True">
|
||||||
<Grid>
|
<ContentControl ContentTemplate="{StaticResource RectangleShapeEdit}" Content="{Binding}"/>
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="22"/>
|
|
||||||
<RowDefinition Height="22"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="100"/>
|
|
||||||
<ColumnDefinition/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBlock Grid.Row="0" Text="Width"/>
|
|
||||||
<TextBlock Grid.Row="1" Text="Height"/>
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Margin="1" Text="{Binding Width, Converter={StaticResource LengthConverter}, ValidatesOnExceptions=True}"/>
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Margin="1" Text="{Binding Height, Converter={StaticResource LengthConverter}, ValidatesOnExceptions=True}"/>
|
|
||||||
</Grid>
|
|
||||||
</Expander>
|
</Expander>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate x:Key="CircleProperties">
|
<DataTemplate x:Key="CircleProperties">
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<UserControl x:Class="StructureHelper.Windows.UserControls.ReinforcementSelector"
|
||||||
|
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="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
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.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.UserControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for ReinforcementSelector.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ReinforcementSelector : UserControl
|
||||||
|
{
|
||||||
|
public ReinforcementSelector()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,6 +38,16 @@ namespace StructureHelper.Windows.ViewModels
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DataTemplate GetSimpleTemplate()
|
||||||
|
{
|
||||||
|
return GetDataTemplate(SimpleItemTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DataTemplate GetColoredTemplate()
|
||||||
|
{
|
||||||
|
return GetDataTemplate(ColoredItemTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
private static DataTemplate GetDataTemplate(string dataTemplateName)
|
private static DataTemplate GetDataTemplate(string dataTemplateName)
|
||||||
{
|
{
|
||||||
DataTemplate dataTemplate;
|
DataTemplate dataTemplate;
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
|
||||||
using StructureHelperCommon.Infrastructures.Settings;
|
|
||||||
using StructureHelperCommon.Models.Codes;
|
|
||||||
using StructureHelperCommon.Models.Materials;
|
|
||||||
using StructureHelperCommon.Models.Materials.Libraries;
|
|
||||||
using StructureHelperLogics.Models.Materials;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelper.Windows.ViewModels.Materials
|
|
||||||
{
|
|
||||||
internal class ReinforcementViewModel
|
|
||||||
{
|
|
||||||
public IEnumerable<ICodeEntity> CodeList => ProgramSetting
|
|
||||||
.MaterialRepository
|
|
||||||
.Repository
|
|
||||||
.Select( x => x.Code)
|
|
||||||
.Distinct();
|
|
||||||
public IEnumerable<ILibMaterialEntity> MaterialLibrary => LibMaterialPepository.GetReinforcementRepository();
|
|
||||||
|
|
||||||
|
|
||||||
public ReinforcementViewModel(ILibMaterial material)
|
|
||||||
{
|
|
||||||
if (material is not IReinforcementLibMaterial)
|
|
||||||
{
|
|
||||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $". Expected: {typeof(IConcreteLibMaterial)}, but was: {material.GetType()}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
using LoaderCalculator;
|
using StructureHelper.Infrastructure;
|
||||||
using StructureHelper.Infrastructure;
|
|
||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@@ -86,7 +84,10 @@ namespace StructureHelper.Windows.ViewModels
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Incaplsulates logic of editing of object when Edit-command runs
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parameter"></param>
|
||||||
public virtual void EditMethod(object parameter)
|
public virtual void EditMethod(object parameter)
|
||||||
{
|
{
|
||||||
Items.Clear();
|
Items.Clear();
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ namespace StructureHelperCommon.Infrastructures.Interfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasBeamShearActions
|
public interface IHasBeamShearActions
|
||||||
{
|
{
|
||||||
List<IBeamShearAction> BeamShearActions { get; }
|
List<IBeamShearAction> Actions { get; }
|
||||||
void DeleteAction(IBeamShearAction action);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
|||||||
|
|
||||||
private static void SetExternalForceFactors(IFactoredCombinationProperty combinationProperty)
|
private static void SetExternalForceFactors(IFactoredCombinationProperty combinationProperty)
|
||||||
{
|
{
|
||||||
combinationProperty.CalcTerm = CalcTerms.ShortTerm;
|
|
||||||
combinationProperty.LimitState = LimitStates.ULS;
|
combinationProperty.LimitState = LimitStates.ULS;
|
||||||
|
combinationProperty.CalcTerm = CalcTerms.ShortTerm;
|
||||||
combinationProperty.LongTermFactor = 1;
|
combinationProperty.LongTermFactor = 1;
|
||||||
combinationProperty.ULSFactor = 1;
|
combinationProperty.ULSFactor = 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetAction(IBeamShearAxisAction beamShearAxisAction, double supportForce)
|
private static void SetAction(IBeamShearAxisAction beamShearAxisAction, double supportForce)
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public List<IBeamShearAction> BeamShearActions { get; } = new();
|
public List<IBeamShearAction> Actions { get; } = new();
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public List<IBeamShearSection> ShearSections { get; } = new();
|
public List<IBeamShearSection> Sections { get; } = new();
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public List<IStirrup> Stirrups { get; } = new();
|
public List<IStirrup> Stirrups { get; } = new();
|
||||||
public BeamShearCalculatorInputData(Guid id)
|
public BeamShearCalculatorInputData(Guid id)
|
||||||
|
|||||||
@@ -67,11 +67,11 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
private void GetSectionInputDatas(IBeamShearCalculatorInputData inputData)
|
private void GetSectionInputDatas(IBeamShearCalculatorInputData inputData)
|
||||||
{
|
{
|
||||||
sectionInputDatas = new();
|
sectionInputDatas = new();
|
||||||
foreach (var beamShearSection in inputData.ShearSections)
|
foreach (var beamShearSection in inputData.Sections)
|
||||||
{
|
{
|
||||||
foreach (var stirrup in inputData.Stirrups)
|
foreach (var stirrup in inputData.Stirrups)
|
||||||
{
|
{
|
||||||
foreach (var beamShearAction in inputData.BeamShearActions)
|
foreach (var beamShearAction in inputData.Actions)
|
||||||
{
|
{
|
||||||
BeamShearSectionCalculatorInputData newInputData = new(Guid.NewGuid())
|
BeamShearSectionCalculatorInputData newInputData = new(Guid.NewGuid())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
|
|
||||||
public Guid Id { get; }
|
public Guid Id { get; }
|
||||||
|
|
||||||
public List<IBeamShearAction> BeamShearActions { get; } = new();
|
public List<IBeamShearAction> Actions { get; } = new();
|
||||||
|
|
||||||
public List<ICalculator> Calculators { get; } = new();
|
public List<ICalculator> Calculators { get; } = new();
|
||||||
|
|
||||||
public List<IBeamShearSection> ShearSections { get; } = new();
|
public List<IBeamShearSection> Sections { get; } = new();
|
||||||
|
|
||||||
public List<IStirrup> Stirrups { get; } = new();
|
public List<IStirrup> Stirrups { get; } = new();
|
||||||
|
|
||||||
@@ -28,65 +28,9 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
Id = id;
|
Id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteBeamShearAction(IBeamShearAction beamShearAction)
|
|
||||||
{
|
|
||||||
foreach (var calculator in Calculators)
|
|
||||||
{
|
|
||||||
if (calculator is IBeamShearCalculator beamShearCalculator)
|
|
||||||
{
|
|
||||||
var inputData = beamShearCalculator.InputData;
|
|
||||||
inputData.BeamShearActions.Remove(beamShearAction);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BeamShearActions.Remove(beamShearAction);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteSection(IBeamShearSection section)
|
|
||||||
{
|
|
||||||
foreach (var calculator in Calculators)
|
|
||||||
{
|
|
||||||
if (calculator is IBeamShearCalculator beamShearCalculator)
|
|
||||||
{
|
|
||||||
if (beamShearCalculator.InputData.ShearSections.Contains(section))
|
|
||||||
{
|
|
||||||
beamShearCalculator.InputData.DeleteSection(section);
|
|
||||||
beamShearCalculator.InputData.ShearSections.Remove(section);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void DeleteAction(IBeamShearAction action)
|
|
||||||
{
|
|
||||||
foreach (var calculator in Calculators)
|
|
||||||
{
|
|
||||||
if (calculator is IBeamShearCalculator beamShearCalculator)
|
|
||||||
{
|
|
||||||
if (beamShearCalculator.InputData.BeamShearActions.Contains(action))
|
|
||||||
{
|
|
||||||
beamShearCalculator.InputData.DeleteAction(action);
|
|
||||||
beamShearCalculator.InputData.BeamShearActions.Remove(action);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void DeleteStirrup(IStirrup stirrup)
|
|
||||||
{
|
|
||||||
foreach (var calculator in Calculators)
|
|
||||||
{
|
|
||||||
if (calculator is IBeamShearCalculator beamShearCalculator)
|
|
||||||
{
|
|
||||||
if (beamShearCalculator.InputData.Stirrups.Contains(stirrup))
|
|
||||||
{
|
|
||||||
beamShearCalculator.InputData.DeleteStirrup(stirrup);
|
|
||||||
beamShearCalculator.InputData.Stirrups.Remove(stirrup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using StructureHelperCommon.Models.Materials;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models.Shapes;
|
using StructureHelperCommon.Models.Shapes;
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
|
||||||
@@ -6,24 +6,30 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
{
|
{
|
||||||
public class BeamShearSection : IBeamShearSection
|
public class BeamShearSection : IBeamShearSection
|
||||||
{
|
{
|
||||||
|
private IUpdateStrategy<IBeamShearSection> updateStrategy;
|
||||||
public Guid Id { get; }
|
public Guid Id { get; }
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public IMaterialStrength MaterialStrength { get; } = new MaterialStrengthByLibMaterial(Guid.NewGuid(), new ConcreteLibMaterial(Guid.NewGuid()));
|
public IConcreteLibMaterial Material { get; set; }
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public IShape Shape { get; } = new RectangleShape(Guid.NewGuid()) { Height = 0.6, Width = 0.4};
|
public IShape Shape { get; } = new RectangleShape(Guid.NewGuid()) { Height = 0.6, Width = 0.4};
|
||||||
|
|
||||||
public double CenterCover { get; set; }
|
public double CenterCover { get; set; } = 0.05;
|
||||||
|
|
||||||
|
|
||||||
public BeamShearSection(Guid id)
|
public BeamShearSection(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
Material = ConcreteLibMaterialFactory.GetConcreteLibMaterial(ConcreteLibTypes.Concrete25);
|
||||||
|
Material.TensionForULS = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
BeamShearSection newItem = new(Guid.NewGuid());
|
||||||
|
updateStrategy ??= new BeamShearSectionUpdateStrategy();
|
||||||
|
updateStrategy.Update(newItem, this);
|
||||||
|
return newItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,14 +32,15 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
BeamShearRepository shearRepository = new(Guid.Empty);
|
BeamShearRepository shearRepository = new(Guid.Empty);
|
||||||
IBeamShearAction shearAction = BeamShearActionFactory.GetBeamShearAction(ShearActionTypes.DistributedLoad);
|
IBeamShearAction shearAction = BeamShearActionFactory.GetBeamShearAction(ShearActionTypes.DistributedLoad);
|
||||||
shearAction.Name = "New shear action";
|
shearAction.Name = "New shear action";
|
||||||
shearRepository.BeamShearActions.Add(shearAction);
|
shearRepository.Actions.Add(shearAction);
|
||||||
BeamShearSection section = new(Guid.Empty) { Name = "New shear section"};
|
BeamShearSection section = new(Guid.Empty) { Name = "New shear section"};
|
||||||
shearRepository.ShearSections.Add(section);
|
shearRepository.Sections.Add(section);
|
||||||
StirrupByUniformRebar stirrupByUniformRebar = new(Guid.Empty) { Name = "New uniform stirrup"};
|
StirrupByRebar stirrupByUniformRebar = new(Guid.Empty) { Name = "New uniform stirrup"};
|
||||||
shearRepository.Stirrups.Add(stirrupByUniformRebar);
|
shearRepository.Stirrups.Add(stirrupByUniformRebar);
|
||||||
BeamShearCalculator beamShearCalculator = new(Guid.Empty) { Name = "New shear calculator"};
|
BeamShearCalculator beamShearCalculator = new(Guid.Empty) { Name = "New shear calculator"};
|
||||||
beamShearCalculator.InputData.ShearSections.Add(section);
|
beamShearCalculator.InputData.Sections.Add(section);
|
||||||
beamShearCalculator.InputData.Stirrups.Add(stirrupByUniformRebar);
|
beamShearCalculator.InputData.Stirrups.Add(stirrupByUniformRebar);
|
||||||
|
beamShearCalculator.InputData.Actions.Add(shearAction);
|
||||||
shearRepository.Calculators.Add(beamShearCalculator);
|
shearRepository.Calculators.Add(beamShearCalculator);
|
||||||
return shearRepository;
|
return shearRepository;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Concrete of cross-section
|
/// Concrete of cross-section
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IMaterialStrength MaterialStrength { get;}
|
IConcreteLibMaterial Material { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shape of cross-section
|
/// Shape of cross-section
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
{
|
{
|
||||||
public interface IHasBeamShearSections
|
public interface IHasBeamShearSections
|
||||||
{
|
{
|
||||||
List<IBeamShearSection> ShearSections { get; }
|
List<IBeamShearSection> Sections { get; }
|
||||||
void DeleteSection(IBeamShearSection section);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,5 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
public interface IHasStirrups
|
public interface IHasStirrups
|
||||||
{
|
{
|
||||||
List<IStirrup> Stirrups { get; }
|
List<IStirrup> Stirrups { get; }
|
||||||
void DeleteStirrup(IStirrup stirrup);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||||
using System.Linq;
|
//All rights reserved.
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implement properties for uniformly distributed stirrups
|
/// Implement properties for uniformly distributed stirrups
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IStirrupByUniformRebar : IStirrup
|
public interface IStirrupByRebar : IStirrup
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Material of stirrups
|
/// Material of stirrups
|
||||||
@@ -27,6 +27,6 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Step of uniformly distibuted stirrup along axis of beam, m
|
/// Step of uniformly distibuted stirrup along axis of beam, m
|
||||||
/// </summary>
|
/// </summary>
|
||||||
double Step { get; set; }
|
double Spacing { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,8 +11,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
CheckObject.IsNull(sourceObject, ErrorStrings.SourceObject);
|
CheckObject.IsNull(sourceObject, ErrorStrings.SourceObject);
|
||||||
CheckObject.IsNull(targetObject, ErrorStrings.TargetObject);
|
CheckObject.IsNull(targetObject, ErrorStrings.TargetObject);
|
||||||
if (ReferenceEquals(targetObject, sourceObject)) { return; };
|
if (ReferenceEquals(targetObject, sourceObject)) { return; };
|
||||||
targetObject.BeamShearActions.AddRange(sourceObject.BeamShearActions);
|
targetObject.Actions.AddRange(sourceObject.Actions);
|
||||||
targetObject.ShearSections.AddRange(sourceObject.ShearSections);
|
targetObject.Sections.AddRange(sourceObject.Sections);
|
||||||
targetObject.Stirrups.AddRange(sourceObject.Stirrups);
|
targetObject.Stirrups.AddRange(sourceObject.Stirrups);
|
||||||
targetObject.Calculators.AddRange(sourceObject.Calculators);
|
targetObject.Calculators.AddRange(sourceObject.Calculators);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperCommon.Models.Forces.BeamShearActions;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
|
{
|
||||||
|
public static class BeamShearRepositoryService
|
||||||
|
{
|
||||||
|
public static void DeleteAction(IBeamShearRepository repository, IBeamShearAction action)
|
||||||
|
{
|
||||||
|
foreach (var calculator in repository.Calculators)
|
||||||
|
{
|
||||||
|
if (calculator is IBeamShearCalculator beamShearCalculator)
|
||||||
|
{
|
||||||
|
var inputData = beamShearCalculator.InputData;
|
||||||
|
inputData.Actions.Remove(action);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repository.Actions.Remove(action);
|
||||||
|
}
|
||||||
|
public static void DeleteSection(IBeamShearRepository repository, IBeamShearSection section)
|
||||||
|
{
|
||||||
|
foreach (var calculator in repository.Calculators)
|
||||||
|
{
|
||||||
|
if (calculator is IBeamShearCalculator beamShearCalculator)
|
||||||
|
{
|
||||||
|
if (beamShearCalculator.InputData.Sections.Contains(section))
|
||||||
|
{
|
||||||
|
beamShearCalculator.InputData.Sections.Remove(section);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void DeleteStirrup(IBeamShearRepository repository, IStirrup stirrup)
|
||||||
|
{
|
||||||
|
foreach (var calculator in repository.Calculators)
|
||||||
|
{
|
||||||
|
if (calculator is IBeamShearCalculator beamShearCalculator)
|
||||||
|
{
|
||||||
|
if (beamShearCalculator.InputData.Stirrups.Contains(stirrup))
|
||||||
|
{
|
||||||
|
beamShearCalculator.InputData.Stirrups.Remove(stirrup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
|
using StructureHelperCommon.Models.Shapes.Logics;
|
||||||
|
using StructureHelperCommon.Services;
|
||||||
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
|
{
|
||||||
|
public class BeamShearSectionUpdateStrategy : IUpdateStrategy<IBeamShearSection>
|
||||||
|
{
|
||||||
|
private IUpdateStrategy<IShape> shapeUpdateStrategy;
|
||||||
|
private IUpdateStrategy<IConcreteLibMaterial> concreteUpdateStrategy;
|
||||||
|
public void Update(IBeamShearSection targetObject, IBeamShearSection sourceObject)
|
||||||
|
{
|
||||||
|
CheckObject.IsNull(targetObject);
|
||||||
|
CheckObject.IsNull(sourceObject);
|
||||||
|
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||||
|
InitializeStrategies();
|
||||||
|
targetObject.Name = sourceObject.Name;
|
||||||
|
shapeUpdateStrategy.Update(targetObject.Shape, sourceObject.Shape);
|
||||||
|
targetObject.Material ??= new ConcreteLibMaterial();
|
||||||
|
concreteUpdateStrategy.Update(targetObject.Material, sourceObject.Material);
|
||||||
|
targetObject.CenterCover = sourceObject.CenterCover;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeStrategies()
|
||||||
|
{
|
||||||
|
shapeUpdateStrategy ??= new ShapeUpdateStrategy();
|
||||||
|
concreteUpdateStrategy ??= new ConcreteLibUpdateStrategy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +1,13 @@
|
|||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
using StructureHelperCommon.Models.Loggers;
|
using StructureHelperCommon.Models.Loggers;
|
||||||
using StructureHelperCommon.Services;
|
using StructureHelperCommon.Services;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||||
//All rights reserved.
|
//All rights reserved.
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
public class BeamShearStrengthByStirrupDensityLogic : IBeamShearStrenghLogic
|
public class BeamShearStrengthByStirrupDensityLogic : IBeamShearStrenghLogic
|
||||||
{
|
{
|
||||||
private readonly IStirrupEffectiveness stirrupEffectiveness;
|
private readonly IStirrupEffectiveness stirrupEffectiveness;
|
||||||
@@ -32,7 +28,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
}
|
}
|
||||||
|
|
||||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
public double GetShearStrength()
|
public double GetShearStrength()
|
||||||
{
|
{
|
||||||
Check();
|
Check();
|
||||||
@@ -34,13 +34,13 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
string errorString = ErrorStrings.ParameterIsNull + ": Input data";
|
string errorString = ErrorStrings.ParameterIsNull + ": Input data";
|
||||||
throw new StructureHelperException(errorString);
|
throw new StructureHelperException(errorString);
|
||||||
}
|
}
|
||||||
if (InputData.BeamShearActions is null || ! InputData.BeamShearActions.Any())
|
if (InputData.Actions is null || ! InputData.Actions.Any())
|
||||||
{
|
{
|
||||||
result = false;
|
result = false;
|
||||||
string errorString = "Collection of actions does not contain any action";
|
string errorString = "Collection of actions does not contain any action";
|
||||||
TraceMessage(errorString);
|
TraceMessage(errorString);
|
||||||
}
|
}
|
||||||
if (InputData.ShearSections is null || ! InputData.ShearSections.Any())
|
if (InputData.Sections is null || ! InputData.Sections.Any())
|
||||||
{
|
{
|
||||||
result = false;
|
result = false;
|
||||||
string errorString = "Collection of sections does not contain any section";
|
string errorString = "Collection of sections does not contain any section";
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Services;
|
using StructureHelperCommon.Services;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears.Logics
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
public class StirrupBaseUpdateStrategy : IUpdateStrategy<IStirrup>
|
public class StirrupBaseUpdateStrategy : IUpdateStrategy<IStirrup>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using StructureHelperCommon.Services;
|
|||||||
//Copyright (c) 2026 Redikultsev Evgeny, Ekaterinburg, Russia
|
//Copyright (c) 2026 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||||
//All rights reserved.
|
//All rights reserved.
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears.Logics
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
public class StirrupByDensityUpdateStrategy : IUpdateStrategy<IStirrupByDensity>
|
public class StirrupByDensityUpdateStrategy : IUpdateStrategy<IStirrupByDensity>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Enums;
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
public class StirrupByUniformRebarToDensityConvertStrategy : IConvertStrategy<IStirrupByDensity, IStirrupByUniformRebar>
|
public class StirrupByRebarToDensityConvertStrategy : IConvertStrategy<IStirrupByDensity, IStirrupByRebar>
|
||||||
{
|
{
|
||||||
private const double stirrupStrengthFactor = 1d;
|
private const double stirrupStrengthFactor = 1d;
|
||||||
private const double maxStirrupStrength = 3e8;
|
private const double maxStirrupStrength = 3e8;
|
||||||
@@ -18,30 +13,30 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
public Dictionary<(Guid id, Type type), ISaveable> ReferenceDictionary { get; set; }
|
public Dictionary<(Guid id, Type type), ISaveable> ReferenceDictionary { get; set; }
|
||||||
public IShiftTraceLogger TraceLogger { get; set; }
|
public IShiftTraceLogger TraceLogger { get; set; }
|
||||||
|
|
||||||
public StirrupByUniformRebarToDensityConvertStrategy(IUpdateStrategy<IStirrup> updateStrategy, IShiftTraceLogger traceLogger)
|
public StirrupByRebarToDensityConvertStrategy(IUpdateStrategy<IStirrup> updateStrategy, IShiftTraceLogger traceLogger)
|
||||||
{
|
{
|
||||||
this.updateStrategy = updateStrategy;
|
this.updateStrategy = updateStrategy;
|
||||||
TraceLogger = traceLogger;
|
TraceLogger = traceLogger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IStirrupByDensity Convert(IStirrupByUniformRebar source)
|
public IStirrupByDensity Convert(IStirrupByRebar source)
|
||||||
{
|
{
|
||||||
updateStrategy ??= new StirrupUpdateStrategy();
|
updateStrategy ??= new StirrupBaseUpdateStrategy();
|
||||||
StirrupByDensity stirrupByDensity = new(Guid.NewGuid());
|
StirrupByDensity stirrupByDensity = new(Guid.NewGuid());
|
||||||
updateStrategy.Update(stirrupByDensity, source);
|
updateStrategy.Update(stirrupByDensity, source);
|
||||||
stirrupByDensity.StirrupDensity = GetStirrupDensity(source);
|
stirrupByDensity.StirrupDensity = GetStirrupDensity(source);
|
||||||
return stirrupByDensity;
|
return stirrupByDensity;
|
||||||
}
|
}
|
||||||
|
|
||||||
private double GetStirrupDensity(IStirrupByUniformRebar source)
|
private double GetStirrupDensity(IStirrupByRebar source)
|
||||||
{
|
{
|
||||||
double area = Math.PI * source.Diameter * source.Diameter / 4d;
|
double area = Math.PI * source.Diameter * source.Diameter / 4d;
|
||||||
TraceLogger?.AddMessage($"Area of rebar = {Math.PI} * ({source.Diameter})^2 / 4 = {area}, m^2");
|
TraceLogger?.AddMessage($"Area of rebar = {Math.PI} * ({source.Diameter})^2 / 4 = {area}, m^2");
|
||||||
double strength = stirrupStrengthFactor * source.Material.GetStrength(LimitStates.ULS, CalcTerms.ShortTerm).Tensile;
|
double strength = stirrupStrengthFactor * source.Material.GetStrength(LimitStates.ULS, CalcTerms.ShortTerm).Tensile;
|
||||||
TraceLogger?.AddMessage($"Strength of rebar = {strength}, Pa");
|
TraceLogger?.AddMessage($"Strength of rebar = {strength}, Pa");
|
||||||
strength = Math.Min(strength, maxStirrupStrength);
|
strength = Math.Min(strength, maxStirrupStrength);
|
||||||
double density = strength * area * source.LegCount / source.Step;
|
double density = strength * area * source.LegCount / source.Spacing;
|
||||||
TraceLogger?.AddMessage($"Density of stirrups = {strength} * {area} * {source.LegCount} / {source.Step} = {density}, N/m");
|
TraceLogger?.AddMessage($"Density of stirrups = {strength} * {area} * {source.LegCount} / {source.Spacing} = {density}, N/m");
|
||||||
return density;
|
return density;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,12 +7,12 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears.Logics
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
public class StirrupByUniformRebarUpdateStrategy : IUpdateStrategy<IStirrupByUniformRebar>
|
public class StirrupByRebarUpdateStrategy : IUpdateStrategy<IStirrupByRebar>
|
||||||
{
|
{
|
||||||
private IUpdateStrategy<IStirrup>? baseUpdateStrategy;
|
private IUpdateStrategy<IStirrup>? baseUpdateStrategy;
|
||||||
public void Update(IStirrupByUniformRebar targetObject, IStirrupByUniformRebar sourceObject)
|
public void Update(IStirrupByRebar targetObject, IStirrupByRebar sourceObject)
|
||||||
{
|
{
|
||||||
CheckObject.IsNull(targetObject);
|
CheckObject.IsNull(targetObject);
|
||||||
CheckObject.IsNull(sourceObject);
|
CheckObject.IsNull(sourceObject);
|
||||||
@@ -23,7 +23,7 @@ namespace StructureHelperLogics.Models.BeamShears.Logics
|
|||||||
targetObject.Material = sourceObject.Material.Clone() as IReinforcementLibMaterial;
|
targetObject.Material = sourceObject.Material.Clone() as IReinforcementLibMaterial;
|
||||||
targetObject.Diameter = sourceObject.Diameter;
|
targetObject.Diameter = sourceObject.Diameter;
|
||||||
targetObject.LegCount = sourceObject.LegCount;
|
targetObject.LegCount = sourceObject.LegCount;
|
||||||
targetObject.Step = sourceObject.Step;
|
targetObject.Spacing = sourceObject.Spacing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ namespace StructureHelperLogics.Models.BeamShears.Logics
|
|||||||
public class StirrupUpdateStrategy : IUpdateStrategy<IStirrup>
|
public class StirrupUpdateStrategy : IUpdateStrategy<IStirrup>
|
||||||
{
|
{
|
||||||
private IUpdateStrategy<IStirrupByDensity> densityUpdateStrategy;
|
private IUpdateStrategy<IStirrupByDensity> densityUpdateStrategy;
|
||||||
private IUpdateStrategy<IStirrupByUniformRebar> uniformUpdateStrategy;
|
private IUpdateStrategy<IStirrupByRebar> uniformUpdateStrategy;
|
||||||
public void Update(IStirrup targetObject, IStirrup sourceObject)
|
public void Update(IStirrup targetObject, IStirrup sourceObject)
|
||||||
{
|
{
|
||||||
CheckObject.IsNull(targetObject);
|
CheckObject.IsNull(targetObject);
|
||||||
@@ -22,7 +22,7 @@ namespace StructureHelperLogics.Models.BeamShears.Logics
|
|||||||
{
|
{
|
||||||
UpdateByDensity(targetObject, density);
|
UpdateByDensity(targetObject, density);
|
||||||
}
|
}
|
||||||
else if (sourceObject is IStirrupByUniformRebar stirrupByUniformRebar)
|
else if (sourceObject is IStirrupByRebar stirrupByUniformRebar)
|
||||||
{
|
{
|
||||||
UpdateByUniformRebar(targetObject, stirrupByUniformRebar);
|
UpdateByUniformRebar(targetObject, stirrupByUniformRebar);
|
||||||
}
|
}
|
||||||
@@ -32,10 +32,10 @@ namespace StructureHelperLogics.Models.BeamShears.Logics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateByUniformRebar(IStirrup targetObject, IStirrupByUniformRebar stirrupByUniformRebar)
|
private void UpdateByUniformRebar(IStirrup targetObject, IStirrupByRebar stirrupByUniformRebar)
|
||||||
{
|
{
|
||||||
uniformUpdateStrategy ??= new StirrupByUniformRebarUpdateStrategy();
|
uniformUpdateStrategy ??= new StirrupByRebarUpdateStrategy();
|
||||||
if (targetObject is IStirrupByUniformRebar targetUniformRebar)
|
if (targetObject is IStirrupByRebar targetUniformRebar)
|
||||||
{
|
{
|
||||||
uniformUpdateStrategy.Update(targetUniformRebar, stirrupByUniformRebar);
|
uniformUpdateStrategy.Update(targetUniformRebar, stirrupByUniformRebar);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
using System;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
{
|
{
|
||||||
public class StirrupByDensity : IStirrupByDensity
|
public class StirrupByDensity : IStirrupByDensity
|
||||||
{
|
{
|
||||||
|
private IUpdateStrategy<IStirrupByDensity> updateStrategy;
|
||||||
public Guid Id { get; }
|
public Guid Id { get; }
|
||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
public double StirrupDensity { get; set; }
|
public double StirrupDensity { get; set; }
|
||||||
@@ -20,7 +17,10 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
StirrupByDensity newItem = new(Guid.NewGuid());
|
||||||
|
updateStrategy ??= new StirrupByDensityUpdateStrategy();
|
||||||
|
updateStrategy.Update(newItem, this);
|
||||||
|
return newItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
75
StructureHelperLogics/Models/BeamShears/StirrupByRebar.cs
Normal file
75
StructureHelperLogics/Models/BeamShears/StirrupByRebar.cs
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public class StirrupByRebar : IStirrupByRebar
|
||||||
|
{
|
||||||
|
private IUpdateStrategy<IStirrupByRebar> updateStrategy;
|
||||||
|
private double diameter = 0.008;
|
||||||
|
private double step = 0.1;
|
||||||
|
private double legCount = 2;
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public Guid Id { get; }
|
||||||
|
|
||||||
|
public string? Name { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public IReinforcementLibMaterial Material { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double LegCount
|
||||||
|
{
|
||||||
|
get => legCount; set
|
||||||
|
{
|
||||||
|
if (value < 0)
|
||||||
|
{
|
||||||
|
throw new StructureHelperException("Number of legs of stirrup must be greater than zero");
|
||||||
|
}
|
||||||
|
legCount = value;
|
||||||
|
}
|
||||||
|
} /// <inheritdoc/>
|
||||||
|
public double Diameter
|
||||||
|
{
|
||||||
|
get => diameter; set
|
||||||
|
{
|
||||||
|
if (value < 0.001)
|
||||||
|
{
|
||||||
|
throw new StructureHelperException("Diameter of stirrup must not be less than 1mm");
|
||||||
|
}
|
||||||
|
if (value > 0.050)
|
||||||
|
{
|
||||||
|
throw new StructureHelperException("Diameter of stirrup must be less or equal than 50mm");
|
||||||
|
}
|
||||||
|
diameter = value;
|
||||||
|
}
|
||||||
|
} /// <inheritdoc/>
|
||||||
|
public double Spacing
|
||||||
|
{
|
||||||
|
get => step; set
|
||||||
|
{
|
||||||
|
if (value < 0.01)
|
||||||
|
{
|
||||||
|
throw new StructureHelperException("Spacing of stirrups must not be less than 10mm");
|
||||||
|
}
|
||||||
|
step = value;
|
||||||
|
}
|
||||||
|
} /// <inheritdoc/>
|
||||||
|
public double CompressedGap { get; set; } = 0;
|
||||||
|
|
||||||
|
public StirrupByRebar(Guid id)
|
||||||
|
{
|
||||||
|
Id = id;
|
||||||
|
Material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Reinforcement400).HelperMaterial as IReinforcementLibMaterial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
StirrupByRebar stirrupByRebar = new(Guid.NewGuid());
|
||||||
|
updateStrategy ??= new StirrupByRebarUpdateStrategy();
|
||||||
|
updateStrategy.Update(stirrupByRebar, this);
|
||||||
|
return stirrupByRebar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
using StructureHelperLogics.Models.Materials;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
|
||||||
{
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public class StirrupByUniformRebar : IStirrupByUniformRebar
|
|
||||||
{
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Guid Id { get; }
|
|
||||||
|
|
||||||
public string? Name { get; set; }
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public IReinforcementLibMaterial Material { get; set; }
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double LegCount { get; set; } = 2;
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double Diameter { get; set; } = 0.008;
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double Step { get; set; } = 0.1;
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double CompressedGap { get; set; } = 0;
|
|
||||||
|
|
||||||
public StirrupByUniformRebar(Guid id)
|
|
||||||
{
|
|
||||||
Id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Clone()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
|
||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
|
||||||
using StructureHelperCommon.Services;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.BeamShears
|
|
||||||
{
|
|
||||||
internal class StirrupUpdateStrategy : IUpdateStrategy<IStirrup>
|
|
||||||
{
|
|
||||||
public void Update(IStirrup targetObject, IStirrup sourceObject)
|
|
||||||
{
|
|
||||||
CheckObject.IsNull(sourceObject, ErrorStrings.SourceObject);
|
|
||||||
CheckObject.IsNull(targetObject, ErrorStrings.TargetObject);
|
|
||||||
if (ReferenceEquals(targetObject, sourceObject)) { return; };
|
|
||||||
targetObject.CompressedGap = sourceObject.CompressedGap;
|
|
||||||
targetObject.Name = sourceObject.Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -28,17 +28,17 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public List<IMaterialSafetyFactor> SafetyFactors { get; set; }
|
public List<IMaterialSafetyFactor> SafetyFactors { get; set; }
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public bool TensionForULS { get ; set; }
|
public bool TensionForULS { get; set; } = false;
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public bool TensionForSLS { get; set; }
|
public bool TensionForSLS { get; set; } = true;
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public double RelativeHumidity { get; set; }
|
public double RelativeHumidity { get; set; } = 0.55d;
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public IMaterialLogic MaterialLogic { get; set; }
|
public IMaterialLogic MaterialLogic { get; set; }
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public double MinAge { get; set; }
|
public double MinAge { get; set; } = 0d;
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public double MaxAge { get; set; }
|
public double MaxAge { get; set; } = maxAge;
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public List<IMaterialLogic> MaterialLogics => materialLogics;
|
public List<IMaterialLogic> MaterialLogics => materialLogics;
|
||||||
|
|
||||||
@@ -51,11 +51,6 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
SafetyFactors = new List<IMaterialSafetyFactor>();
|
SafetyFactors = new List<IMaterialSafetyFactor>();
|
||||||
lmOptions = new LMBuilders.ConcreteOptions();
|
lmOptions = new LMBuilders.ConcreteOptions();
|
||||||
SafetyFactors.AddRange(PartialCoefficientFactory.GetDefaultConcreteSafetyFactors(ProgramSetting.CodeType));
|
SafetyFactors.AddRange(PartialCoefficientFactory.GetDefaultConcreteSafetyFactors(ProgramSetting.CodeType));
|
||||||
TensionForULS = false;
|
|
||||||
TensionForSLS = true;
|
|
||||||
RelativeHumidity = 0.55d;
|
|
||||||
MinAge = 0d;
|
|
||||||
MaxAge = maxAge;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConcreteLibMaterial() : this (Guid.NewGuid())
|
public ConcreteLibMaterial() : this (Guid.NewGuid())
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.Materials
|
||||||
|
{
|
||||||
|
public enum ConcreteLibTypes
|
||||||
|
{
|
||||||
|
Concrete15,
|
||||||
|
Concrete20,
|
||||||
|
Concrete25,
|
||||||
|
Concrete30,
|
||||||
|
Concrete35,
|
||||||
|
Concrete40,
|
||||||
|
}
|
||||||
|
public static class ConcreteLibMaterialFactory
|
||||||
|
{
|
||||||
|
private static IEnumerable<ILibMaterialEntity> LibConcreteMaterials => LibMaterialPepository.GetConcreteRepository();
|
||||||
|
public static IConcreteLibMaterial GetConcreteLibMaterial(ConcreteLibTypes concreteLibTypes)
|
||||||
|
{
|
||||||
|
if (concreteLibTypes == ConcreteLibTypes.Concrete25)
|
||||||
|
{
|
||||||
|
return GetConcrete(25);
|
||||||
|
}
|
||||||
|
if (concreteLibTypes == ConcreteLibTypes.Concrete40)
|
||||||
|
{
|
||||||
|
return GetConcrete(40);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(concreteLibTypes));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IConcreteLibMaterial GetConcrete(double strength)
|
||||||
|
{
|
||||||
|
string stringStrength = Convert.ToString(strength);
|
||||||
|
var libMaterial = LibConcreteMaterials
|
||||||
|
.Where(x => x.Name.Contains(stringStrength))
|
||||||
|
.First();
|
||||||
|
var libMat = new ConcreteLibMaterial
|
||||||
|
{
|
||||||
|
MaterialEntity = libMaterial,
|
||||||
|
TensionForULS = false,
|
||||||
|
TensionForSLS = true
|
||||||
|
};
|
||||||
|
return libMat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,7 @@
|
|||||||
using StructureHelper.Models.Materials;
|
using StructureHelper.Models.Materials;
|
||||||
using StructureHelperCommon.Infrastructures.Enums;
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
using StructureHelperCommon.Infrastructures.Settings;
|
|
||||||
using StructureHelperCommon.Models.Codes;
|
|
||||||
using StructureHelperCommon.Models.Materials.Libraries;
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
using System;
|
|
||||||
using System.CodeDom.Compiler;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.Materials
|
namespace StructureHelperLogics.Models.Materials
|
||||||
{
|
{
|
||||||
@@ -17,7 +9,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
Concrete40,
|
Concrete40,
|
||||||
Reinforcement400,
|
Reinforcement400,
|
||||||
Reinforecement500,
|
Reinforcement500,
|
||||||
Elastic200,
|
Elastic200,
|
||||||
Carbon1400,
|
Carbon1400,
|
||||||
Glass1200
|
Glass1200
|
||||||
@@ -33,7 +25,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
if (type == HeadmaterialType.Concrete40) { return GetConcrete40(); }
|
if (type == HeadmaterialType.Concrete40) { return GetConcrete40(); }
|
||||||
if (type == HeadmaterialType.Reinforcement400) { return GetReinforcement400(); }
|
if (type == HeadmaterialType.Reinforcement400) { return GetReinforcement400(); }
|
||||||
if (type == HeadmaterialType.Reinforecement500) { return GetReinforcement500(); }
|
if (type == HeadmaterialType.Reinforcement500) { return GetReinforcement500(); }
|
||||||
if (type == HeadmaterialType.Elastic200) { return GetElastic200(); }
|
if (type == HeadmaterialType.Elastic200) { return GetElastic200(); }
|
||||||
if (type == HeadmaterialType.Carbon1400) { return GetCarbon1400(); }
|
if (type == HeadmaterialType.Carbon1400) { return GetCarbon1400(); }
|
||||||
if (type == HeadmaterialType.Glass1200) { return GetGlass1200(); }
|
if (type == HeadmaterialType.Glass1200) { return GetGlass1200(); }
|
||||||
@@ -94,12 +86,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
private static IHeadMaterial GetConcrete40()
|
private static IHeadMaterial GetConcrete40()
|
||||||
{
|
{
|
||||||
var material = new HeadMaterial();
|
var material = new HeadMaterial();
|
||||||
var libMaterial = LibConcreteMaterials.Where(x => x.Name.Contains("40")).First();
|
material.HelperMaterial = ConcreteLibMaterialFactory.GetConcreteLibMaterial(ConcreteLibTypes.Concrete40);
|
||||||
var libMat = new ConcreteLibMaterial();
|
|
||||||
libMat.MaterialEntity = libMaterial;
|
|
||||||
libMat.TensionForULS = false;
|
|
||||||
libMat.TensionForSLS = true;
|
|
||||||
material.HelperMaterial = libMat;
|
|
||||||
return material;
|
return material;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
using StructureHelper.Models.Materials;
|
using StructureHelper.Models.Materials;
|
||||||
using StructureHelperCommon.Infrastructures.Settings;
|
|
||||||
using StructureHelperCommon.Models.Materials.Libraries;
|
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using StructureHelperCommon.Models.Shapes;
|
using StructureHelperCommon.Models.Shapes;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelperLogics.NdmCalculations.Primitives
|
namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace StructureHelperTests.UnitTests.BeamShearTests
|
|||||||
{
|
{
|
||||||
private Mock<IUpdateStrategy<IStirrup>> _mockUpdateStrategy;
|
private Mock<IUpdateStrategy<IStirrup>> _mockUpdateStrategy;
|
||||||
private Mock<IShiftTraceLogger> _mockTraceLogger;
|
private Mock<IShiftTraceLogger> _mockTraceLogger;
|
||||||
private StirrupByUniformRebarToDensityConvertStrategy _convertStrategy;
|
private StirrupByRebarToDensityConvertStrategy _convertStrategy;
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup()
|
public void Setup()
|
||||||
@@ -25,7 +25,7 @@ namespace StructureHelperTests.UnitTests.BeamShearTests
|
|||||||
_mockUpdateStrategy = new Mock<IUpdateStrategy<IStirrup>>();
|
_mockUpdateStrategy = new Mock<IUpdateStrategy<IStirrup>>();
|
||||||
_mockTraceLogger = new Mock<IShiftTraceLogger>();
|
_mockTraceLogger = new Mock<IShiftTraceLogger>();
|
||||||
|
|
||||||
_convertStrategy = new StirrupByUniformRebarToDensityConvertStrategy(
|
_convertStrategy = new StirrupByRebarToDensityConvertStrategy(
|
||||||
_mockUpdateStrategy.Object,
|
_mockUpdateStrategy.Object,
|
||||||
_mockTraceLogger.Object
|
_mockTraceLogger.Object
|
||||||
);
|
);
|
||||||
@@ -38,11 +38,11 @@ namespace StructureHelperTests.UnitTests.BeamShearTests
|
|||||||
var mockMaterial = new Mock<IReinforcementLibMaterial>();
|
var mockMaterial = new Mock<IReinforcementLibMaterial>();
|
||||||
mockMaterial.Setup(m => m.GetStrength(LimitStates.ULS, CalcTerms.ShortTerm)).Returns((2e8, 2e8));
|
mockMaterial.Setup(m => m.GetStrength(LimitStates.ULS, CalcTerms.ShortTerm)).Returns((2e8, 2e8));
|
||||||
|
|
||||||
var stirrupRebar = new Mock<IStirrupByUniformRebar>();
|
var stirrupRebar = new Mock<IStirrupByRebar>();
|
||||||
stirrupRebar.Setup(s => s.Diameter).Returns(0.02);
|
stirrupRebar.Setup(s => s.Diameter).Returns(0.02);
|
||||||
stirrupRebar.Setup(s => s.Material).Returns(mockMaterial.Object);
|
stirrupRebar.Setup(s => s.Material).Returns(mockMaterial.Object);
|
||||||
stirrupRebar.Setup(s => s.LegCount).Returns(2);
|
stirrupRebar.Setup(s => s.LegCount).Returns(2);
|
||||||
stirrupRebar.Setup(s => s.Step).Returns(0.15);
|
stirrupRebar.Setup(s => s.Spacing).Returns(0.15);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var result = _convertStrategy.Convert(stirrupRebar.Object);
|
var result = _convertStrategy.Convert(stirrupRebar.Object);
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ namespace StructureHelperTests.UnitTests.MaterialTests
|
|||||||
{
|
{
|
||||||
[TestCase(HeadmaterialType.Reinforcement400, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 339130434.78260875d, 339130434.78260875d)]
|
[TestCase(HeadmaterialType.Reinforcement400, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 339130434.78260875d, 339130434.78260875d)]
|
||||||
[TestCase(HeadmaterialType.Reinforcement400, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 390000000d, 390000000d)]
|
[TestCase(HeadmaterialType.Reinforcement400, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 390000000d, 390000000d)]
|
||||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 400000000.0d, 434782608.69565225d)]
|
[TestCase(HeadmaterialType.Reinforcement500, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 400000000.0d, 434782608.69565225d)]
|
||||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.LongTerm, 434782608.69565225d, 434782608.69565225d)]
|
[TestCase(HeadmaterialType.Reinforcement500, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.LongTerm, 434782608.69565225d, 434782608.69565225d)]
|
||||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
[TestCase(HeadmaterialType.Reinforcement500, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
||||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
[TestCase(HeadmaterialType.Reinforcement500, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
||||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 22461538.46153846d, 1395297.0017909051d)]
|
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 22461538.46153846d, 1395297.0017909051d)]
|
||||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.LongTerm, 20215384.615384616d, 1255767.3016118146d)]
|
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.LongTerm, 20215384.615384616d, 1255767.3016118146d)]
|
||||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 29200000.0d, 2092945.5026863578d)]
|
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 29200000.0d, 2092945.5026863578d)]
|
||||||
|
|||||||
Reference in New Issue
Block a user