Add stirrup update strategy
This commit is contained in:
@@ -24,6 +24,9 @@
|
||||
<Compile Update="Windows\BeamShears\DistributedLoadView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\BeamShears\StirrupByDensityView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\CalculationWindows\CalculatorsViews\Cracks\CrackCalculatorInputDataView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -161,6 +164,9 @@
|
||||
<Page Update="Windows\BeamShears\DistributedLoadView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\BeamShears\StirrupByDensityView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\CalculationWindows\CalculatorsViews\Cracks\CrackCalculatorInputDataView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
|
||||
@@ -31,8 +31,29 @@
|
||||
<TextBlock Text="Name"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
||||
</Grid>
|
||||
<TabControl Grid.Row="1" DataContext="{Binding YAxisAction}">
|
||||
<TabItem Header="Support">
|
||||
<TabControl Grid.Row="1">
|
||||
<TabItem Header="External forces" DataContext="{Binding ExternalForces}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Longitudinal force"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding ForceTuple.Nz, Converter={StaticResource ForceConverter}}"/>
|
||||
</Grid>
|
||||
<uc:FactoredCombination Grid.Row="1" DataContext="{Binding CombinationProperty}"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Support" DataContext="{Binding SupportAction.SupportForces}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50"/>
|
||||
@@ -48,12 +69,12 @@
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Shear force at support"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding SupportShearForce, Converter={StaticResource ForceConverter}}"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding ForceTuple.Qy, Converter={StaticResource ForceConverter}}"/>
|
||||
</Grid>
|
||||
<uc:FactoredCombination Grid.Row="1" DataContext="{Binding CombinationProperty}"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem DataContext="{Binding ShearLoads}" Header="Span loads">
|
||||
<TabItem DataContext="{Binding SupportAction.ShearLoads}" Header="Span loads">
|
||||
<DockPanel>
|
||||
<ToolBarTray DockPanel.Dock="Top">
|
||||
<ToolBar>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using StructureHelper.Windows.ViewModels;
|
||||
using StructureHelper.Windows.Forces;
|
||||
using StructureHelper.Windows.ViewModels;
|
||||
using StructureHelper.Windows.ViewModels.Forces;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -21,12 +23,16 @@ namespace StructureHelper.Windows.BeamShears
|
||||
shearAction.Name = value;
|
||||
}
|
||||
}
|
||||
public BeamShearAxisActionViewModel YAxisAction { get; private set; }
|
||||
|
||||
public FactoredForceTupleViewModel ExternalForces { get; private set; }
|
||||
|
||||
public BeamShearAxisActionViewModel SupportAction { get; private set; }
|
||||
|
||||
public BeamShearActionViewModel(IBeamShearAction shearAction)
|
||||
{
|
||||
this.shearAction = shearAction;
|
||||
YAxisAction = new(this.shearAction.YAxisShearAction);
|
||||
SupportAction = new(this.shearAction.SupportAction);
|
||||
ExternalForces = new(this.shearAction.ExternalForce);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Windows.Forces;
|
||||
using StructureHelper.Windows.ViewModels.Forces;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
@@ -13,21 +12,13 @@ namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
private readonly IBeamShearAxisAction beamShearAxisAction;
|
||||
|
||||
public double SupportShearForce
|
||||
{
|
||||
get => beamShearAxisAction.SupportShearForce;
|
||||
set
|
||||
{
|
||||
beamShearAxisAction.SupportShearForce = value;
|
||||
}
|
||||
}
|
||||
public FactoredCombinationPropertyVM CombinationProperty { get; }
|
||||
public FactoredForceTupleViewModel SupportForces { get; private set; }
|
||||
public BeamShearLoadsViewModel ShearLoads { get; }
|
||||
|
||||
public BeamShearAxisActionViewModel(IBeamShearAxisAction beamShearAxisAction)
|
||||
{
|
||||
this.beamShearAxisAction = beamShearAxisAction;
|
||||
CombinationProperty = new(this.beamShearAxisAction.FactoredCombinationProperty);
|
||||
SupportForces = new(this.beamShearAxisAction.SupportForce);
|
||||
ShearLoads = new(this.beamShearAxisAction.ShearLoads);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ using System.Windows.Forms;
|
||||
|
||||
namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
public class BeamShearLoadsViewModel : SelectItemVM<IBeamShearLoad>
|
||||
public class BeamShearLoadsViewModel : SelectItemVM<IBeamSpanLoad>
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearLoad> updateStrategy;
|
||||
public BeamShearLoadsViewModel(List<IBeamShearLoad> collection) : base(collection)
|
||||
private IUpdateStrategy<IBeamSpanLoad> updateStrategy;
|
||||
public BeamShearLoadsViewModel(List<IBeamSpanLoad> collection) : base(collection)
|
||||
{
|
||||
}
|
||||
public override void AddMethod(object parameter)
|
||||
@@ -41,7 +41,7 @@ namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
if (SelectedItem is null) { return; }
|
||||
Window window;
|
||||
IBeamShearLoad temporaryShearLoad = SelectedItem.Clone() as IBeamShearLoad;
|
||||
IBeamSpanLoad temporaryShearLoad = SelectedItem.Clone() as IBeamSpanLoad;
|
||||
if (SelectedItem is IDistributedLoad distributedLoad)
|
||||
{
|
||||
window = new DistributedLoadView(distributedLoad);
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
Title="Beam Shear Analysis" Height="450" Width="800" MinHeight="250" MinWidth="400" MaxHeight="1000" MaxWidth="1500" WindowStartupLocation="CenterScreen">
|
||||
<DockPanel>
|
||||
<ToolBarTray DockPanel.Dock="Top">
|
||||
<ToolBar ToolTip="Actions">
|
||||
<ToolBar ToolTip="Actions" DataContext="{Binding Actions}">
|
||||
<Button Style="{StaticResource ToolButton}"
|
||||
Command="{Binding FileOpen}">
|
||||
Command="{Binding Add}">
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Shear action"
|
||||
IconContent="{StaticResource DistributedLoad}"
|
||||
|
||||
@@ -1,21 +1,107 @@
|
||||
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.Logics;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
public class BeamStirrupsViewModel : SelectItemVM<IStirrup>
|
||||
{
|
||||
private const string ErrorText = "Error of creating of stirrup";
|
||||
private IUpdateStrategy<IStirrup> updateStrategy;
|
||||
private readonly IBeamShearRepository shearRepository;
|
||||
private StirrupTypes stirrupType;
|
||||
|
||||
public BeamStirrupsViewModel(IBeamShearRepository shearRepository) : base(shearRepository.Stirrups)
|
||||
{
|
||||
this.shearRepository = shearRepository;
|
||||
}
|
||||
|
||||
public override void EditMethod(object parameter)
|
||||
{
|
||||
if (SelectedItem is null) { return; }
|
||||
SafetyProcessor.RunSafeProcess(EditStirrup, "Error of editing of stirrup");
|
||||
base.EditMethod(parameter);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if (parameter is StirrupTypes stirrupParameter)
|
||||
{
|
||||
stirrupType = stirrupParameter;
|
||||
SafetyProcessor.RunSafeProcess(AddStirrup, ErrorText);
|
||||
}
|
||||
else
|
||||
{
|
||||
SafetyProcessor.ShowMessage(ErrorText, $"parameter type is {parameter.GetType()}, not valid type of stirrup");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddStirrup()
|
||||
{
|
||||
if (stirrupType is StirrupTypes.Density)
|
||||
{
|
||||
AddStirrupByDensity();
|
||||
}
|
||||
if (stirrupType is StirrupTypes.UniformRebar)
|
||||
{
|
||||
AddUniformRebarStirrup();
|
||||
}
|
||||
base.AddMethod(stirrupType);
|
||||
}
|
||||
|
||||
private void AddUniformRebarStirrup()
|
||||
{
|
||||
IReinforcementLibMaterial reinforcement = new ReinforcementLibMaterial(Guid.NewGuid());
|
||||
NewItem = new StirrupByUniformRebar(Guid.NewGuid())
|
||||
{
|
||||
Name = "New stirrup by uniformly distributed rebar",
|
||||
Diameter = 0.008,
|
||||
LegCount = 2,
|
||||
Step = 0.1,
|
||||
Material = reinforcement
|
||||
};
|
||||
}
|
||||
|
||||
private void AddStirrupByDensity()
|
||||
{
|
||||
NewItem = new StirrupByDensity(Guid.NewGuid())
|
||||
{
|
||||
Name = "New stirrup by density",
|
||||
StirrupDensity = 3e5
|
||||
};
|
||||
}
|
||||
|
||||
public override void DeleteMethod(object parameter)
|
||||
{
|
||||
shearRepository.DeleteStirrup(SelectedItem);
|
||||
|
||||
32
StructureHelper/Windows/BeamShears/StirrupByDensityView.xaml
Normal file
32
StructureHelper/Windows/BeamShears/StirrupByDensityView.xaml
Normal file
@@ -0,0 +1,32 @@
|
||||
<Window x:Class="StructureHelper.Windows.BeamShears.StirrupByDensityView"
|
||||
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:StirrupByDensityViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="Stirrup By Density" Height="200" Width="300" 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 Height="25"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Name"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
||||
<TextBlock Grid.Row="1" Text="Density"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Density, Converter={StaticResource DistributedLoadConverter}}"/>
|
||||
</Grid>
|
||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,35 @@
|
||||
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 StirrupByDensityView.xaml
|
||||
/// </summary>
|
||||
public partial class StirrupByDensityView : Window
|
||||
{
|
||||
private readonly StirrupByDensityViewModel viewModel;
|
||||
public StirrupByDensityView(StirrupByDensityViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.viewModel = viewModel;
|
||||
this.viewModel.ParentWindow = this;
|
||||
}
|
||||
public StirrupByDensityView(IStirrupByDensity stirrupByDensity) : this(new StirrupByDensityViewModel(stirrupByDensity))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Windows.ViewModels;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
public class StirrupByDensityViewModel : OkCancelViewModelBase
|
||||
{
|
||||
private readonly IStirrupByDensity stirrupByDensity;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => stirrupByDensity.Name;
|
||||
set
|
||||
{
|
||||
stirrupByDensity.Name = value;
|
||||
OnPropertyChanged(nameof(Name));
|
||||
}
|
||||
}
|
||||
public double Density
|
||||
{
|
||||
get => stirrupByDensity.StirrupDensity;
|
||||
set
|
||||
{
|
||||
stirrupByDensity.StirrupDensity = value;
|
||||
OnPropertyChanged(nameof(Density));
|
||||
}
|
||||
}
|
||||
|
||||
public StirrupByDensityViewModel(IStirrupByDensity stirrupByDensity)
|
||||
{
|
||||
this.stirrupByDensity = stirrupByDensity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Windows.ViewModels.Forces;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Windows.Forces
|
||||
{
|
||||
public class FactoredForceTupleViewModel : ViewModelBase
|
||||
{
|
||||
private readonly IFactoredForceTuple factoredForceTuple;
|
||||
public ForceTupleVM ForceTuple { get; }
|
||||
public FactoredCombinationPropertyVM CombinationProperty { get; }
|
||||
|
||||
public FactoredForceTupleViewModel(IFactoredForceTuple factoredForceTuple)
|
||||
{
|
||||
this.factoredForceTuple = factoredForceTuple;
|
||||
ForceTuple = new(this.factoredForceTuple.ForceTuple);
|
||||
CombinationProperty = new(this.factoredForceTuple.CombinationProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,23 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class BeamShearAction : IBeamShearAction
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearAction> updateStrategy;
|
||||
/// <inheritdoc/>
|
||||
public Guid Id { get; }
|
||||
/// <inheritdoc/>
|
||||
public string Name { get; set; }
|
||||
public IBeamShearAxisAction XAxisShearAction { get; } = new BeamShearAxisAction(Guid.NewGuid());
|
||||
|
||||
public IBeamShearAxisAction YAxisShearAction { get; } = new BeamShearAxisAction(Guid.NewGuid());
|
||||
/// <inheritdoc/>
|
||||
public IFactoredForceTuple ExternalForce { get; } = new FactoredForceTuple(Guid.NewGuid());
|
||||
/// <inheritdoc/>
|
||||
public IBeamShearAxisAction SupportAction { get; } = new BeamShearAxisAction(Guid.NewGuid());
|
||||
|
||||
public BeamShearAction(Guid id)
|
||||
{
|
||||
|
||||
@@ -12,12 +12,9 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
InitializeStrategies();
|
||||
CheckObject.IsNull(targetObject.XAxisShearAction);
|
||||
CheckObject.IsNull(sourceObject.XAxisShearAction);
|
||||
axisActionUpdateStrategy.Update(targetObject.XAxisShearAction, sourceObject.XAxisShearAction);
|
||||
CheckObject.IsNull(sourceObject.YAxisShearAction);
|
||||
CheckObject.IsNull(targetObject.YAxisShearAction);
|
||||
axisActionUpdateStrategy.Update(targetObject.YAxisShearAction, sourceObject.YAxisShearAction);
|
||||
CheckObject.IsNull(sourceObject.SupportAction);
|
||||
CheckObject.IsNull(targetObject.SupportAction);
|
||||
axisActionUpdateStrategy.Update(targetObject.SupportAction, sourceObject.SupportAction);
|
||||
}
|
||||
|
||||
private void InitializeStrategies()
|
||||
|
||||
@@ -16,12 +16,9 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
///<inheritdoc/>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
///<inheritdoc/>
|
||||
public double SupportShearForce { get; set; }
|
||||
public IFactoredForceTuple SupportForce { get; set; } = new FactoredForceTuple(Guid.NewGuid());
|
||||
///<inheritdoc/>
|
||||
public IFactoredCombinationProperty FactoredCombinationProperty { get; } = new FactoredCombinationProperty(Guid.NewGuid());
|
||||
///<inheritdoc/>
|
||||
public List<IBeamShearLoad> ShearLoads { get; } = new();
|
||||
|
||||
public List<IBeamSpanLoad> ShearLoads { get; } = new();
|
||||
|
||||
public BeamShearAxisAction(Guid id)
|
||||
{
|
||||
|
||||
@@ -19,16 +19,16 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
InitializeStrategies();
|
||||
targetObject.Name = sourceObject.Name;
|
||||
targetObject.SupportShearForce = sourceObject.SupportShearForce;
|
||||
CheckObject.IsNull(targetObject.FactoredCombinationProperty);
|
||||
CheckObject.IsNull(sourceObject.FactoredCombinationProperty);
|
||||
combinationUpdateStrategy.Update(targetObject.FactoredCombinationProperty, sourceObject.FactoredCombinationProperty);
|
||||
targetObject.SupportForce = sourceObject.SupportForce;
|
||||
CheckObject.IsNull(targetObject.SupportForce.CombinationProperty);
|
||||
CheckObject.IsNull(sourceObject.SupportForce.CombinationProperty);
|
||||
combinationUpdateStrategy.Update(targetObject.SupportForce.CombinationProperty, sourceObject.SupportForce.CombinationProperty);
|
||||
CheckObject.IsNull(targetObject.ShearLoads);
|
||||
targetObject.ShearLoads.Clear();
|
||||
CheckObject.IsNull(sourceObject.ShearLoads);
|
||||
foreach (var item in sourceObject.ShearLoads)
|
||||
{
|
||||
IBeamShearLoad beamShearLoad = item.Clone() as IBeamShearLoad;
|
||||
IBeamSpanLoad beamShearLoad = item.Clone() as IBeamSpanLoad;
|
||||
targetObject.ShearLoads.Add(beamShearLoad);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class BeamShearLoadBaseUpdateStrategy : IUpdateStrategy<IBeamShearLoad>
|
||||
public class BeamShearLoadBaseUpdateStrategy : IUpdateStrategy<IBeamSpanLoad>
|
||||
{
|
||||
public void Update(IBeamShearLoad targetObject, IBeamShearLoad sourceObject)
|
||||
public void Update(IBeamSpanLoad targetObject, IBeamSpanLoad sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
|
||||
@@ -9,11 +9,11 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class BeamShearLoadUpdateStrategy : IUpdateStrategy<IBeamShearLoad>
|
||||
public class BeamShearLoadUpdateStrategy : IUpdateStrategy<IBeamSpanLoad>
|
||||
{
|
||||
private IUpdateStrategy<IConcentratedForce> concentratedForceUpdateStrategy;
|
||||
private IUpdateStrategy<IDistributedLoad> distributedLoadUpdateStrategy;
|
||||
public void Update(IBeamShearLoad targetObject, IBeamShearLoad sourceObject)
|
||||
public void Update(IBeamSpanLoad targetObject, IBeamSpanLoad sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
@@ -22,7 +22,7 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
UpdateObjects(targetObject, sourceObject);
|
||||
}
|
||||
|
||||
private void UpdateObjects(IBeamShearLoad targetObject, IBeamShearLoad sourceObject)
|
||||
private void UpdateObjects(IBeamSpanLoad targetObject, IBeamSpanLoad sourceObject)
|
||||
{
|
||||
if (sourceObject is IDistributedLoad distributedSource)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class ConcentratedForceUpdateStrategy : IUpdateStrategy<IConcentratedForce>
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearLoad> baseUpdateStrategy;
|
||||
private IUpdateStrategy<IBeamSpanLoad> baseUpdateStrategy;
|
||||
public void Update(IConcentratedForce targetObject, IConcentratedForce sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class DistributedLoadUpdateStrategy : IUpdateStrategy<IDistributedLoad>
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearLoad> baseUpdateStrategy;
|
||||
private IUpdateStrategy<IBeamSpanLoad> baseUpdateStrategy;
|
||||
public void Update(IDistributedLoad targetObject, IDistributedLoad sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -37,28 +38,34 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
Name = "Beam shear action"
|
||||
};
|
||||
SetAction(beamShearAction.XAxisShearAction, 0);
|
||||
SetFactors(beamShearAction.XAxisShearAction);
|
||||
beamShearAction.XAxisShearAction.ShearLoads.Clear();
|
||||
SetExternalForceFactors(beamShearAction.ExternalForce.CombinationProperty);
|
||||
|
||||
SetAction(beamShearAction.YAxisShearAction, 1e5);
|
||||
SetFactors(beamShearAction.YAxisShearAction);
|
||||
SetAction(beamShearAction.SupportAction, 1e5);
|
||||
SetFactors(beamShearAction.SupportAction);
|
||||
return beamShearAction;
|
||||
}
|
||||
|
||||
private static void SetExternalForceFactors(IFactoredCombinationProperty combinationProperty)
|
||||
{
|
||||
combinationProperty.CalcTerm = CalcTerms.ShortTerm;
|
||||
combinationProperty.LimitState = LimitStates.ULS;
|
||||
combinationProperty.LongTermFactor = 1;
|
||||
combinationProperty.ULSFactor = 1;
|
||||
}
|
||||
|
||||
private static void SetAction(IBeamShearAxisAction beamShearAxisAction, double supportForce)
|
||||
{
|
||||
beamShearAxisAction.SupportShearForce = 1e5;
|
||||
IBeamShearLoad distributedLoad = BeamShearLoadFactory.GetBeamShearLoad(ShearLoadTypes.DistributedLoad);
|
||||
beamShearAxisAction.SupportForce.ForceTuple.Qy = supportForce;
|
||||
IBeamSpanLoad distributedLoad = BeamShearLoadFactory.GetBeamShearLoad(ShearLoadTypes.DistributedLoad);
|
||||
beamShearAxisAction.ShearLoads.Add(distributedLoad);
|
||||
}
|
||||
|
||||
private static void SetFactors(IBeamShearAxisAction beamShearAxisAction)
|
||||
{
|
||||
beamShearAxisAction.FactoredCombinationProperty.LimitState = Infrastructures.Enums.LimitStates.ULS;
|
||||
beamShearAxisAction.FactoredCombinationProperty.CalcTerm = Infrastructures.Enums.CalcTerms.ShortTerm;
|
||||
beamShearAxisAction.FactoredCombinationProperty.LongTermFactor = 0.95;
|
||||
beamShearAxisAction.FactoredCombinationProperty.ULSFactor = 1.2;
|
||||
beamShearAxisAction.SupportForce.CombinationProperty.LimitState = LimitStates.ULS;
|
||||
beamShearAxisAction.SupportForce.CombinationProperty.CalcTerm = CalcTerms.ShortTerm;
|
||||
beamShearAxisAction.SupportForce.CombinationProperty.LongTermFactor = 0.95;
|
||||
beamShearAxisAction.SupportForce.CombinationProperty.ULSFactor = 1.2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
}
|
||||
public static class BeamShearLoadFactory
|
||||
{
|
||||
public static IBeamShearLoad GetBeamShearLoad(ShearLoadTypes loadType)
|
||||
public static IBeamSpanLoad GetBeamShearLoad(ShearLoadTypes loadType)
|
||||
{
|
||||
if (loadType == ShearLoadTypes.DistributedLoad)
|
||||
{
|
||||
|
||||
@@ -4,11 +4,23 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements properties of force at the and of bar
|
||||
/// </summary>
|
||||
public interface IBeamShearAction : IAction
|
||||
{
|
||||
IBeamShearAxisAction XAxisShearAction { get; }
|
||||
IBeamShearAxisAction YAxisShearAction { get; }
|
||||
/// <summary>
|
||||
/// External force at the end of bar
|
||||
/// </summary>
|
||||
IFactoredForceTuple ExternalForce { get; }
|
||||
/// <summary>
|
||||
/// Internal loads on bar
|
||||
/// </summary>
|
||||
IBeamShearAxisAction SupportAction { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,16 +12,12 @@ namespace StructureHelperCommon.Models.Forces
|
||||
public interface IBeamShearAxisAction : IAction
|
||||
{
|
||||
/// <summary>
|
||||
/// Shear force at support point, N
|
||||
/// Internal force at support point
|
||||
/// </summary>
|
||||
double SupportShearForce { get; set; }
|
||||
/// <summary>
|
||||
/// Properties of combination of forces
|
||||
/// </summary>
|
||||
IFactoredCombinationProperty FactoredCombinationProperty { get; }
|
||||
IFactoredForceTuple SupportForce { get; set; }
|
||||
/// <summary>
|
||||
/// Collection of loads which are applyed on beam at its span
|
||||
/// </summary>
|
||||
List<IBeamShearLoad> ShearLoads {get;}
|
||||
List<IBeamSpanLoad> ShearLoads {get;}
|
||||
}
|
||||
}
|
||||
|
||||
25
StructureHelperCommon/Models/Forces/FactoredForceTuple.cs
Normal file
25
StructureHelperCommon/Models/Forces/FactoredForceTuple.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public class FactoredForceTuple : IFactoredForceTuple
|
||||
{
|
||||
public Guid Id { get; }
|
||||
public IForceTuple ForceTuple { get; set; } = new ForceTuple();
|
||||
public IFactoredCombinationProperty CombinationProperty { get; set; } = new FactoredCombinationProperty(Guid.NewGuid());
|
||||
|
||||
public FactoredForceTuple(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <summary>
|
||||
/// Implement properties for shear beam load
|
||||
/// </summary>
|
||||
public interface IBeamShearLoad : IAction
|
||||
public interface IBeamSpanLoad : IAction
|
||||
{
|
||||
/// <summary>
|
||||
/// Value of level where action is applyied at, 0.5 is top surface of beam, -0.5 is bottom surface of beam
|
||||
@@ -9,7 +9,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <summary>
|
||||
/// Implement properties for concentrated load in beam
|
||||
/// </summary>
|
||||
public interface IConcentratedForce : IBeamShearLoad
|
||||
public interface IConcentratedForce : IBeamSpanLoad
|
||||
{
|
||||
/// <summary>
|
||||
/// Coordinate of location of force along beam, m
|
||||
@@ -3,7 +3,7 @@
|
||||
/// <summary>
|
||||
/// Implement properties of
|
||||
/// </summary>
|
||||
public interface IDistributedLoad : IBeamShearLoad
|
||||
public interface IDistributedLoad : IBeamSpanLoad
|
||||
{
|
||||
/// <summary>
|
||||
/// Value of uniformly distributed load, N/m
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -6,9 +7,15 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public interface IFactoredForceTuple
|
||||
public interface IFactoredForceTuple : ISaveable, ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// Combination of internal forces for bar
|
||||
/// </summary>
|
||||
IForceTuple ForceTuple { get; set; }
|
||||
/// <summary>
|
||||
/// Properties of combination of forces
|
||||
/// </summary>
|
||||
IFactoredCombinationProperty CombinationProperty { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
TraceLogger?.AddMessage(LoggerStrings.LogicType(this), TraceLogStatuses.Service);
|
||||
InitializeStrategies();
|
||||
double supportShearForce = AxisAction.SupportShearForce;
|
||||
double supportShearForce = AxisAction.SupportForce.ForceTuple.Qx;
|
||||
TraceLogger?.AddMessage($"Shear force at support Qmax = {supportShearForce}(N)");
|
||||
TraceLogger?.AddMessage($"Start of inclined section a,start = {InclinedSection.StartCoord}(m)");
|
||||
TraceLogger?.AddMessage($"End of inclined section a,end = {InclinedSection.EndCoord}(m)");
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
|
||||
@@ -20,6 +20,6 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
/// <param name="startCoord">Coordinate of start point, m</param>
|
||||
/// <param name="endCoord">Coordinate of end point, m</param>
|
||||
/// <returns>Summary force, N</returns>
|
||||
double GetSumShearForce(IBeamShearLoad beamShearLoad, double startCoord, double endCoord);
|
||||
double GetSumShearForce(IBeamSpanLoad beamShearLoad, double startCoord, double endCoord);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
getFactorLogic ??= new GetFactorByFactoredCombinationProperty()
|
||||
{
|
||||
CombinationProperty = InputData.AxisAction.FactoredCombinationProperty,
|
||||
CombinationProperty = InputData.AxisAction.SupportForce.CombinationProperty,
|
||||
LimitState = InputData.LimitState,
|
||||
CalcTerm = InputData.CalcTerm
|
||||
};
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
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.Logics
|
||||
{
|
||||
public class StirrupBaseUpdateStrategy : IUpdateStrategy<IStirrup>
|
||||
{
|
||||
public void Update(IStirrup targetObject, IStirrup sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.Name = sourceObject.Name;
|
||||
targetObject.CompressedGap = sourceObject.CompressedGap;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Services;
|
||||
|
||||
//Copyright (c) 2026 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears.Logics
|
||||
{
|
||||
public class StirrupByDensityUpdateStrategy : IUpdateStrategy<IStirrupByDensity>
|
||||
{
|
||||
private IUpdateStrategy<IStirrup>? baseUpdateStrategy;
|
||||
public void Update(IStirrupByDensity targetObject, IStirrupByDensity sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
baseUpdateStrategy ??= new StirrupBaseUpdateStrategy();
|
||||
baseUpdateStrategy.Update(targetObject, sourceObject);
|
||||
targetObject.StirrupDensity = sourceObject.StirrupDensity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
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.Logics
|
||||
{
|
||||
public class StirrupByUniformRebarUpdateStrategy : IUpdateStrategy<IStirrupByUniformRebar>
|
||||
{
|
||||
private IUpdateStrategy<IStirrup>? baseUpdateStrategy;
|
||||
public void Update(IStirrupByUniformRebar targetObject, IStirrupByUniformRebar sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
baseUpdateStrategy ??= new StirrupBaseUpdateStrategy();
|
||||
baseUpdateStrategy.Update(targetObject, sourceObject);
|
||||
CheckObject.IsNull(sourceObject.Material);
|
||||
targetObject.Material = sourceObject.Material.Clone() as IReinforcementLibMaterial;
|
||||
targetObject.Diameter = sourceObject.Diameter;
|
||||
targetObject.LegCount = sourceObject.LegCount;
|
||||
targetObject.Step = sourceObject.Step;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
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.Logics
|
||||
{
|
||||
public class StirrupUpdateStrategy : IUpdateStrategy<IStirrup>
|
||||
{
|
||||
private IUpdateStrategy<IStirrupByDensity> densityUpdateStrategy;
|
||||
private IUpdateStrategy<IStirrupByUniformRebar> uniformUpdateStrategy;
|
||||
public void Update(IStirrup targetObject, IStirrup sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
if (sourceObject is IStirrupByDensity density)
|
||||
{
|
||||
UpdateByDensity(targetObject, density);
|
||||
}
|
||||
else if (sourceObject is IStirrupByUniformRebar stirrupByUniformRebar)
|
||||
{
|
||||
UpdateByUniformRebar(targetObject, stirrupByUniformRebar);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(sourceObject));
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateByUniformRebar(IStirrup targetObject, IStirrupByUniformRebar stirrupByUniformRebar)
|
||||
{
|
||||
uniformUpdateStrategy ??= new StirrupByUniformRebarUpdateStrategy();
|
||||
if (targetObject is IStirrupByUniformRebar targetUniformRebar)
|
||||
{
|
||||
uniformUpdateStrategy.Update(targetUniformRebar, stirrupByUniformRebar);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(targetObject));
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateByDensity(IStirrup targetObject, IStirrupByDensity density)
|
||||
{
|
||||
densityUpdateStrategy ??= new StirrupByDensityUpdateStrategy();
|
||||
if (targetObject is IStirrupByDensity targetDensity)
|
||||
{
|
||||
densityUpdateStrategy.Update(targetDensity, density);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(targetObject));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
TraceLogger = traceLogger;
|
||||
}
|
||||
|
||||
public double GetSumShearForce(IBeamShearLoad beamShearLoad, double startCoord, double endCoord)
|
||||
public double GetSumShearForce(IBeamSpanLoad beamShearLoad, double startCoord, double endCoord)
|
||||
{
|
||||
TraceLogger?.AddMessage(LoggerStrings.LogicType(this), TraceLogStatuses.Service);
|
||||
if (beamShearLoad is IConcentratedForce concentratedForce)
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
TraceLogger = traceLogger;
|
||||
}
|
||||
|
||||
public double GetSumShearForce(IBeamShearLoad beamShearLoad, double startCoord, double endCoord)
|
||||
public double GetSumShearForce(IBeamSpanLoad beamShearLoad, double startCoord, double endCoord)
|
||||
{
|
||||
TraceLogger?.AddMessage(LoggerStrings.LogicType(this), TraceLogStatuses.Service);
|
||||
if (beamShearLoad is IDistributedLoad distributedLoad)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Loggers;
|
||||
using StructureHelperLogics.Models.BeamShears.Logics;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
@@ -27,7 +26,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
TraceLogger = traceLogger;
|
||||
}
|
||||
|
||||
public double GetSumShearForce(IBeamShearLoad beamShearLoad, double startCoord, double endCoord)
|
||||
public double GetSumShearForce(IBeamSpanLoad beamShearLoad, double startCoord, double endCoord)
|
||||
{
|
||||
TraceLogger?.AddMessage(LoggerStrings.LogicType(this), TraceLogStatuses.Service);
|
||||
if (beamShearLoad is IDistributedLoad distributedLoad)
|
||||
|
||||
@@ -25,10 +25,10 @@ namespace StructureHelperTests.UnitTests.BeamShearTests
|
||||
_mockSummaryForceLogic = new Mock<ISumForceByShearLoadLogic>();
|
||||
var mockAxisAction = new Mock<IBeamShearAxisAction>();
|
||||
var mockInclinedSection = new Mock<IInclinedSection>();
|
||||
var mockShearLoad = new Mock<IBeamShearLoad>();
|
||||
var mockShearLoad = new Mock<IBeamSpanLoad>();
|
||||
|
||||
mockAxisAction.Setup(a => a.SupportShearForce).Returns(100.0);
|
||||
mockAxisAction.Setup(a => a.ShearLoads).Returns(new List<IBeamShearLoad> { mockShearLoad.Object });
|
||||
mockAxisAction.Setup(a => a.SupportForce.ForceTuple.Qx).Returns(100.0);
|
||||
mockAxisAction.Setup(a => a.ShearLoads).Returns(new List<IBeamSpanLoad> { mockShearLoad.Object });
|
||||
|
||||
mockInclinedSection.Setup(i => i.StartCoord).Returns(2.0);
|
||||
mockInclinedSection.Setup(i => i.EndCoord).Returns(5.0);
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace StructureHelperTests.UnitTests.BeamShearTests
|
||||
public void GetSumShearForce_ShouldThrowException_ForInvalidShearLoad()
|
||||
{
|
||||
// Arrange
|
||||
var mockInvalidShearLoad = new Mock<IBeamShearLoad>();
|
||||
var mockInvalidShearLoad = new Mock<IBeamSpanLoad>();
|
||||
|
||||
// Act & Assert
|
||||
Assert.Throws<StructureHelperException>(() => _logic.GetSumShearForce(mockInvalidShearLoad.Object, 2.0, 5.0));
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace StructureHelperTests.UnitTests.BeamShearTests
|
||||
public void GetSumShearForce_ShouldThrowException_ForInvalidShearLoad()
|
||||
{
|
||||
// Arrange
|
||||
var mockInvalidShearLoad = new Mock<IBeamShearLoad>();
|
||||
var mockInvalidShearLoad = new Mock<IBeamSpanLoad>();
|
||||
|
||||
// Act & Assert
|
||||
Assert.Throws<StructureHelperException>(() => _logic.GetSumShearForce(mockInvalidShearLoad.Object, 2.0, 5.0));
|
||||
|
||||
Reference in New Issue
Block a user