Beam shear load views have been created;
This commit is contained in:
@@ -20,5 +20,10 @@ namespace DataAccess.DTOs
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace DataAccess.DTOs
|
||||
{
|
||||
get
|
||||
{
|
||||
return new FactoredCombinationProperty()
|
||||
return new FactoredCombinationProperty(Guid.NewGuid())
|
||||
{
|
||||
CalcTerm = CalcTerm,
|
||||
LimitState = LimitState,
|
||||
|
||||
@@ -615,6 +615,15 @@
|
||||
</Canvas.Children>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ShearCalculator">
|
||||
<Canvas Style="{DynamicResource ButtonResultCanvas}">
|
||||
<Canvas.Children>
|
||||
<TextBlock Text="+-" FontSize="20" FontWeight="Bold" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="4,-6,0,0"/>
|
||||
<Path Data="M2,26 v-8 h10 v2 l-8,6 z" Fill="DarkGray" Stroke="Black" StrokeThickness="1"/>
|
||||
<Path Data="M14,22 v-2 h16 v8 h-24 z" Fill="DarkGray" Stroke="Black" StrokeThickness="1"/>
|
||||
</Canvas.Children>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ShearRectangleSection">
|
||||
<Canvas Style="{DynamicResource ButtonResultCanvas}">
|
||||
<Canvas.Children>
|
||||
|
||||
@@ -12,9 +12,18 @@
|
||||
<Compile Update="Windows\Arrays\ArrayView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\BeamShears\BeamShearActionView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\BeamShears\BeamShearView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\BeamShears\ConcentratedForceView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\BeamShears\UniformDistributedLoadView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\CalculationWindows\CalculatorsViews\Cracks\CrackCalculatorInputDataView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -140,9 +149,18 @@
|
||||
<Page Update="Windows\Arrays\ArrayView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\BeamShears\BeamShearActionView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\BeamShears\BeamShearView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\BeamShears\ConcentratedForceView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\BeamShears\UniformDistributedLoadView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\CalculationWindows\CalculatorsViews\Cracks\CrackCalculatorInputDataView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
|
||||
13
StructureHelper/Windows/BeamShears/BeamShearActionView.xaml
Normal file
13
StructureHelper/Windows/BeamShears/BeamShearActionView.xaml
Normal file
@@ -0,0 +1,13 @@
|
||||
<Window x:Class="StructureHelper.Windows.BeamShears.BeamShearActionView"
|
||||
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:BeamShearActionViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="BeamShearActionView" Height="450" Width="800" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,27 @@
|
||||
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 BeamShearActionView.xaml
|
||||
/// </summary>
|
||||
public partial class BeamShearActionView : Window
|
||||
{
|
||||
public BeamShearActionView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using StructureHelper.Windows.ViewModels;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
public class BeamShearActionViewModel : OkCancelViewModelBase
|
||||
{
|
||||
private readonly IBeamShearAction shearAction;
|
||||
public BeamShearLoadsViewModel ShearLoads { get; private set; }
|
||||
|
||||
public BeamShearActionViewModel(IBeamShearAction shearAction)
|
||||
{
|
||||
this.shearAction = shearAction;
|
||||
ShearLoads = new(this.shearAction.YAxisShearAction.ShearLoads);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Infrastructure.Enums;
|
||||
using StructureHelper.Windows.CalculationWindows.ProgressViews;
|
||||
using StructureHelper.Windows.ViewModels;
|
||||
using StructureHelper.Windows.ViewModels.Errors;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
@@ -31,7 +32,7 @@ namespace StructureHelper.Windows.BeamShears
|
||||
runCommand = new RelayCommand(param =>
|
||||
{
|
||||
RunMethod(param);
|
||||
}
|
||||
}, o => SelectedItem != null
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -86,6 +87,14 @@ namespace StructureHelper.Windows.BeamShears
|
||||
}
|
||||
private void RunCalculator()
|
||||
{
|
||||
if (SelectedItem.TraceLogger is not null)
|
||||
{
|
||||
SelectedItem.TraceLogger.TraceLoggerEntries.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectedItem.TraceLogger = new ShiftTraceLogger();
|
||||
}
|
||||
if (SelectedItem is IBeamShearCalculator beamShearCalculator)
|
||||
{
|
||||
beamShearCalculator.Run();
|
||||
@@ -94,6 +103,7 @@ namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(SelectedItem));
|
||||
}
|
||||
TraceDocumentService.ShowDocument(SelectedItem.TraceLogger.TraceLoggerEntries);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using StructureHelper.Windows.ViewModels;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
public class BeamShearLoadsViewModel : SelectItemVM<IBeamShearLoad>
|
||||
{
|
||||
public BeamShearLoadsViewModel(List<IBeamShearLoad> collection) : base(collection)
|
||||
{
|
||||
}
|
||||
|
||||
public override void EditMethod(object parameter)
|
||||
{
|
||||
if (SelectedItem is IDistributedLoad distributedLoad)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(SelectedItem));
|
||||
}
|
||||
base.EditMethod(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Shear action"
|
||||
IconContent="{StaticResource DistributedLoad}"
|
||||
DescriptionText="Add beam shear action"/>
|
||||
DescriptionText="Adds beam shear action"/>
|
||||
</Button.ToolTip>
|
||||
<Viewbox>
|
||||
<ContentControl ContentTemplate="{DynamicResource DistributedLoad}"/>
|
||||
@@ -44,7 +44,7 @@
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Add stirrups by density"
|
||||
IconContent="{StaticResource StirrupDensity}"
|
||||
DescriptionText="Add uniformly distributed stirrups by value of density"/>
|
||||
DescriptionText="Adds uniformly distributed stirrups by value of density"/>
|
||||
</Button.ToolTip>
|
||||
<Viewbox>
|
||||
<ContentControl ContentTemplate="{DynamicResource StirrupDensity}"/>
|
||||
@@ -54,25 +54,25 @@
|
||||
Command="{Binding Add}"
|
||||
CommandParameter="{x:Static enums:StirrupTypes.UniformRebar}">
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Open file"
|
||||
<uc:ButtonToolTipEh HeaderText="Add stirrup by rebars"
|
||||
IconContent="{StaticResource StirrupRebars}"
|
||||
DescriptionText="Add uniformly distributed stirrups by rebars (step, diameter, strength)"/>
|
||||
DescriptionText="Adds uniformly distributed stirrups by rebars (step, diameter, strength)"/>
|
||||
</Button.ToolTip>
|
||||
<Viewbox>
|
||||
<ContentControl ContentTemplate="{DynamicResource StirrupRebars}"/>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</ToolBar>
|
||||
<ToolBar ToolTip="Calculators">
|
||||
<ToolBar ToolTip="Calculators" DataContext="{Binding Calculators}">
|
||||
<Button Style="{StaticResource ToolButton}"
|
||||
Command="{Binding FileOpen}">
|
||||
Command="{Binding Add}" CommandParameter="{x:Static enums:CalculatorTypes.BeamShearCalculator}">
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Open file"
|
||||
IconContent="{StaticResource FileOpen}"
|
||||
DescriptionText="Open exsisting project from file"/>
|
||||
<uc:ButtonToolTipEh HeaderText="Add shear calculator"
|
||||
IconContent="{StaticResource ShearCalculator}"
|
||||
DescriptionText="Creates new shear beam calculator"/>
|
||||
</Button.ToolTip>
|
||||
<Viewbox>
|
||||
<ContentControl ContentTemplate="{DynamicResource FileOpen}"/>
|
||||
<ContentControl ContentTemplate="{DynamicResource ShearCalculator}"/>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</ToolBar>
|
||||
@@ -80,7 +80,7 @@
|
||||
<Button Style="{StaticResource ToolButton}"
|
||||
Command="{Binding AddTemplate}">
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Open file"
|
||||
<uc:ButtonToolTipEh HeaderText="Create rectangle template"
|
||||
IconContent="{StaticResource ShearSectionTemplate}"
|
||||
DescriptionText="Create rectangle section by template"/>
|
||||
</Button.ToolTip>
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<Window x:Class="StructureHelper.Windows.BeamShears.ConcentratedForceView"
|
||||
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:ConcentratedForceViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="ConcentratedForceView" Height="200" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterOwner">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="40"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Load value"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding ForceValue}"/>
|
||||
<TextBlock Grid.Row="1" Text="Substract ratio"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding LoadRatio, Converter={StaticResource PlainDouble}}"/>
|
||||
<TextBlock Grid.Row="2" Text="Relative applying level"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding RelativeLevel, Converter={StaticResource LengthConverter}}"/>
|
||||
<TextBlock Grid.Row="3" Text="Force point"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding ForceCoordinate, Converter={StaticResource LengthConverter}}"/>
|
||||
</Grid>
|
||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,24 @@
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System.Windows;
|
||||
|
||||
namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ConcentratedForceView.xaml
|
||||
/// </summary>
|
||||
public partial class ConcentratedForceView : Window
|
||||
{
|
||||
private readonly ConcentratedForceViewModel viewModel;
|
||||
public ConcentratedForceView(ConcentratedForceViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.viewModel = viewModel;
|
||||
DataContext = this.viewModel;
|
||||
this.viewModel.ParentWindow = this;
|
||||
}
|
||||
public ConcentratedForceView(IConcentratedForce concenratedForce) : this(new ConcentratedForceViewModel(concenratedForce))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using StructureHelper.Windows.ViewModels;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
|
||||
namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
public class ConcentratedForceViewModel : OkCancelViewModelBase
|
||||
{
|
||||
private readonly IConcentratedForce concenratedForce;
|
||||
|
||||
public double ForceCoordinate
|
||||
{
|
||||
get => concenratedForce.ForceCoordinate;
|
||||
set
|
||||
{
|
||||
concenratedForce.ForceCoordinate = value;
|
||||
}
|
||||
}
|
||||
public double ForceValue
|
||||
{
|
||||
get => concenratedForce.ForceValue;
|
||||
set
|
||||
{
|
||||
concenratedForce.ForceValue = value;
|
||||
}
|
||||
}
|
||||
public double LoadRatio
|
||||
{
|
||||
get => concenratedForce.LoadRatio;
|
||||
set
|
||||
{
|
||||
concenratedForce.LoadRatio = value;
|
||||
}
|
||||
}
|
||||
public double RelativeLevel
|
||||
{
|
||||
get => concenratedForce.RelativeLoadLevel;
|
||||
set
|
||||
{
|
||||
if (value > 0.5d)
|
||||
{
|
||||
concenratedForce.RelativeLoadLevel = 0.5;
|
||||
return;
|
||||
}
|
||||
if (value < -0.5d)
|
||||
{
|
||||
concenratedForce.RelativeLoadLevel = -0.5;
|
||||
return;
|
||||
}
|
||||
concenratedForce.RelativeLoadLevel = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ConcentratedForceViewModel(IConcentratedForce concenratedForce)
|
||||
{
|
||||
this.concenratedForce = concenratedForce;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<Window x:Class="StructureHelper.Windows.BeamShears.UniformDistributedLoadView"
|
||||
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:UniformDistributedLoadViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="Uniformly Distributed Load" Height="200" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterOwner">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="40"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Load value"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding LoadValue}"/>
|
||||
<TextBlock Grid.Row="1" Text="Substract ratio"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding LoadRatio, Converter={StaticResource PlainDouble}}"/>
|
||||
<TextBlock Grid.Row="2" Text="Relative applying level"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding RelativeLevel, Converter={StaticResource LengthConverter}}"/>
|
||||
<TextBlock Grid.Row="3" Text="Start point"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding StartCoordinate, Converter={StaticResource LengthConverter}}"/>
|
||||
<TextBlock Grid.Row="4" Text="End point"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding EndCoordinate, Converter={StaticResource LengthConverter}}"/>
|
||||
</Grid>
|
||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,37 @@
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
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 UniformDistributedLoadView.xaml
|
||||
/// </summary>
|
||||
public partial class UniformDistributedLoadView : Window
|
||||
{
|
||||
private readonly UniformDistributedLoadViewModel viewModel;
|
||||
public UniformDistributedLoadView(UniformDistributedLoadViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.viewModel = viewModel;
|
||||
this.DataContext = this.viewModel;
|
||||
this.viewModel.ParentWindow = this;
|
||||
}
|
||||
|
||||
public UniformDistributedLoadView(IDistributedLoad distributedLoad) : this(new UniformDistributedLoadViewModel(distributedLoad))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using StructureHelper.Windows.ViewModels;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Windows.BeamShears
|
||||
{
|
||||
public class UniformDistributedLoadViewModel : OkCancelViewModelBase
|
||||
{
|
||||
private readonly IDistributedLoad distributedLoad;
|
||||
|
||||
public double LoadRatio
|
||||
{
|
||||
get => distributedLoad.LoadRatio;
|
||||
set
|
||||
{
|
||||
distributedLoad.LoadRatio = value;
|
||||
}
|
||||
}
|
||||
public double LoadValue
|
||||
{
|
||||
get => distributedLoad.LoadValue * -1;
|
||||
set
|
||||
{
|
||||
distributedLoad.LoadValue = value * -1;
|
||||
}
|
||||
}
|
||||
public double RelativeLevel
|
||||
{
|
||||
get => distributedLoad.RelativeLoadLevel;
|
||||
set
|
||||
{
|
||||
if (value > 0.5d)
|
||||
{
|
||||
distributedLoad.RelativeLoadLevel = 0.5;
|
||||
return;
|
||||
}
|
||||
if (value < -0.5d)
|
||||
{
|
||||
distributedLoad.RelativeLoadLevel = -0.5;
|
||||
return;
|
||||
}
|
||||
distributedLoad.RelativeLoadLevel = value;
|
||||
}
|
||||
}
|
||||
public double StartCoordinate
|
||||
{
|
||||
get => distributedLoad.StartCoordinate;
|
||||
set
|
||||
{
|
||||
distributedLoad.StartCoordinate = value;
|
||||
}
|
||||
}
|
||||
public double EndCoordinate
|
||||
{
|
||||
get => distributedLoad.EndCoordinate;
|
||||
set
|
||||
{
|
||||
distributedLoad.EndCoordinate = value;
|
||||
}
|
||||
}
|
||||
|
||||
public UniformDistributedLoadViewModel(IDistributedLoad distributedLoad)
|
||||
{
|
||||
this.distributedLoad = distributedLoad;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Windows.CalculationWindows.ProgressViews
|
||||
{
|
||||
public static class TraceDocumentService
|
||||
{
|
||||
public static void ShowDocument(IEnumerable<ITraceLoggerEntry> traceLoggerEntries)
|
||||
{
|
||||
if (traceLoggerEntries is null)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ParameterIsNull + ": Document entries");
|
||||
}
|
||||
var wnd = new TraceDocumentView(traceLoggerEntries);
|
||||
wnd.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,12 +210,7 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
ProcessResult();
|
||||
}
|
||||
}
|
||||
|
||||
if (SelectedItem.TraceLogger is not null)
|
||||
{
|
||||
var wnd = new TraceDocumentView(SelectedItem.TraceLogger.TraceLoggerEntries);
|
||||
wnd.ShowDialog();
|
||||
}
|
||||
TraceDocumentService.ShowDocument(SelectedItem.TraceLogger.TraceLoggerEntries);
|
||||
}
|
||||
|
||||
private void ShowInteractionDiagramByInputData(LimitCurvesCalculator calculator)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class BeamShearAction : IBeamShearAction
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearAction> updateStrategy;
|
||||
public Guid Id { get; }
|
||||
public string Name { get; set; }
|
||||
public IBeamShearAxisAction XAxisShearAction { get; } = new BeamShearAxisAction(Guid.NewGuid());
|
||||
|
||||
public IBeamShearAxisAction YAxisShearAction { get; } = new BeamShearAxisAction(Guid.NewGuid());
|
||||
|
||||
public BeamShearAction(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
BeamShearAction beamShearAction = new(Guid.NewGuid());
|
||||
updateStrategy ??= new BeamShearActionUpdateStrategy();
|
||||
updateStrategy.Update(beamShearAction, this);
|
||||
return beamShearAction;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Services;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class BeamShearActionUpdateStrategy : IUpdateStrategy<IBeamShearAction>
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearAxisAction> axisActionUpdateStrategy;
|
||||
public void Update(IBeamShearAction targetObject, IBeamShearAction sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
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);
|
||||
}
|
||||
|
||||
private void InitializeStrategies()
|
||||
{
|
||||
axisActionUpdateStrategy ??= new BeamShearAxisActionUpdateStrategy();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class BeamShearAxisAction : IBeamShearAxisAction
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearAxisAction> updateStrategy;
|
||||
///<inheritdoc/>
|
||||
public Guid Id { get; }
|
||||
///<inheritdoc/>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
///<inheritdoc/>
|
||||
public double SupportShearForce { get; set; }
|
||||
///<inheritdoc/>
|
||||
public IFactoredCombinationProperty FactoredCombinationProperty { get; } = new FactoredCombinationProperty(Guid.NewGuid());
|
||||
///<inheritdoc/>
|
||||
public List<IBeamShearLoad> ShearLoads { get; }
|
||||
|
||||
|
||||
public BeamShearAxisAction(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
BeamShearAxisAction beamShearAxisAction = new(Guid.NewGuid());
|
||||
return beamShearAxisAction;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Forces.Logics;
|
||||
using StructureHelperCommon.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class BeamShearAxisActionUpdateStrategy : IUpdateStrategy<IBeamShearAxisAction>
|
||||
{
|
||||
private IUpdateStrategy<IFactoredCombinationProperty> combinationUpdateStrategy;
|
||||
public void Update(IBeamShearAxisAction targetObject, IBeamShearAxisAction sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
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);
|
||||
CheckObject.IsNull(targetObject.ShearLoads);
|
||||
targetObject.ShearLoads.Clear();
|
||||
CheckObject.IsNull(sourceObject.ShearLoads);
|
||||
foreach (var item in sourceObject.ShearLoads)
|
||||
{
|
||||
IBeamShearLoad beamShearLoad = item.Clone() as IBeamShearLoad;
|
||||
targetObject.ShearLoads.Add(beamShearLoad);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeStrategies()
|
||||
{
|
||||
combinationUpdateStrategy ??= new FactoredCombinationPropertyUpdateStrategy();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class BeamShearLoadBaseUpdateStrategy : IUpdateStrategy<IBeamShearLoad>
|
||||
{
|
||||
public void Update(IBeamShearLoad targetObject, IBeamShearLoad sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.Name = sourceObject.Name;
|
||||
targetObject.LoadRatio = sourceObject.LoadRatio;
|
||||
targetObject.RelativeLoadLevel = sourceObject.RelativeLoadLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
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 StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class BeamShearLoadUpdateStrategy : IUpdateStrategy<IBeamShearLoad>
|
||||
{
|
||||
private IUpdateStrategy<IConcentratedForce> concentratedForceUpdateStrategy;
|
||||
private IUpdateStrategy<IDistributedLoad> distributedLoadUpdateStrategy;
|
||||
public void Update(IBeamShearLoad targetObject, IBeamShearLoad sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
InitializeStrategies();
|
||||
UpdateObjects(targetObject, sourceObject);
|
||||
}
|
||||
|
||||
private void UpdateObjects(IBeamShearLoad targetObject, IBeamShearLoad sourceObject)
|
||||
{
|
||||
if (sourceObject is IDistributedLoad distributedSource)
|
||||
{
|
||||
if (targetObject is IDistributedLoad distributedTarget)
|
||||
{
|
||||
distributedLoadUpdateStrategy.Update(distributedTarget, distributedSource);
|
||||
return;
|
||||
}
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(targetObject) + ": target object is not distributed load");
|
||||
}
|
||||
if (sourceObject is IConcentratedForce concentratedSource)
|
||||
{
|
||||
if (targetObject is IConcentratedForce concentratedTarget)
|
||||
{
|
||||
concentratedForceUpdateStrategy.Update(concentratedTarget, concentratedSource);
|
||||
return;
|
||||
}
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(targetObject) + ": target object is not concentrated force");
|
||||
}
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(sourceObject));
|
||||
}
|
||||
|
||||
private void InitializeStrategies()
|
||||
{
|
||||
concentratedForceUpdateStrategy ??= new ConcentratedForceUpdateStrategy();
|
||||
distributedLoadUpdateStrategy ??= new DistributedLoadUpdateStrategy();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using NLog;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Forces.BeamShearActions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -8,12 +10,15 @@ using System.Threading.Tasks;
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class ConcentratedForce : IConcenratedForce
|
||||
public class ConcentratedForce : IConcentratedForce
|
||||
{
|
||||
private double relativeLoadLevel;
|
||||
private IUpdateStrategy<IConcentratedForce>? updateStrategy;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public Guid Id { get; set; }
|
||||
public Guid Id { get;}
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string Name { get; set; }
|
||||
/// <inheritdoc/>
|
||||
@@ -33,10 +38,18 @@ namespace StructureHelperCommon.Models.Forces
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public double LoadRatio { get; set; } = 1;
|
||||
public ConcentratedForce(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
ConcentratedForce concentratedForce = new(Guid.NewGuid());
|
||||
updateStrategy ??= new ConcentratedForceUpdateStrategy();
|
||||
updateStrategy.Update(concentratedForce, this);
|
||||
return concentratedForce;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Services;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class ConcentratedForceUpdateStrategy : IUpdateStrategy<IConcentratedForce>
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearLoad> baseUpdateStrategy;
|
||||
public void Update(IConcentratedForce targetObject, IConcentratedForce sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
InitializeStrategies();
|
||||
baseUpdateStrategy.Update(targetObject, sourceObject);
|
||||
targetObject.ForceValue = sourceObject.ForceValue;
|
||||
targetObject.ForceCoordinate = sourceObject.ForceCoordinate;
|
||||
}
|
||||
|
||||
private void InitializeStrategies()
|
||||
{
|
||||
baseUpdateStrategy ??= new BeamShearLoadBaseUpdateStrategy();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Forces.BeamShearActions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -6,9 +8,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public class UniformlyDistributedLoad : IUniformlyDistributedLoad
|
||||
public class DistributedLoad : IDistributedLoad
|
||||
{
|
||||
private double relativeLoadLevel;
|
||||
private IUpdateStrategy<IDistributedLoad> updateStrategy;
|
||||
|
||||
public Guid Id { get; }
|
||||
|
||||
@@ -30,14 +33,17 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <inheritdoc/>
|
||||
public double LoadRatio { get; set; } = 1;
|
||||
|
||||
public UniformlyDistributedLoad(Guid id)
|
||||
public DistributedLoad(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
DistributedLoad distributedLoad = new(Guid.NewGuid());
|
||||
updateStrategy ??= new DistributedLoadUpdateStrategy();
|
||||
updateStrategy.Update(distributedLoad, this);
|
||||
return distributedLoad;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Services;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
{
|
||||
public class DistributedLoadUpdateStrategy : IUpdateStrategy<IDistributedLoad>
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearLoad> baseUpdateStrategy;
|
||||
public void Update(IDistributedLoad targetObject, IDistributedLoad sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
InitializeStrategies();
|
||||
baseUpdateStrategy.Update(targetObject, sourceObject);
|
||||
targetObject.LoadValue = sourceObject.LoadValue;
|
||||
targetObject.StartCoordinate = sourceObject.StartCoordinate;
|
||||
targetObject.EndCoordinate = sourceObject.EndCoordinate;
|
||||
}
|
||||
private void InitializeStrategies()
|
||||
{
|
||||
baseUpdateStrategy ??= new BeamShearLoadBaseUpdateStrategy();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public interface IBeamShearAction : IAction
|
||||
{
|
||||
IBeamShearAxisAction XAxisSheaAction { get; }
|
||||
IBeamShearAxisAction YAxisSheaAction { get; }
|
||||
IBeamShearAxisAction XAxisShearAction { get; }
|
||||
IBeamShearAxisAction YAxisShearAction { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,17 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// </summary>
|
||||
public interface IBeamShearAxisAction : IAction
|
||||
{
|
||||
/// <summary>
|
||||
/// Shear force at support point, N
|
||||
/// </summary>
|
||||
double SupportShearForce { get; set; }
|
||||
/// <summary>
|
||||
/// Properties of combination of forces
|
||||
/// </summary>
|
||||
IFactoredCombinationProperty FactoredCombinationProperty { get; }
|
||||
/// <summary>
|
||||
/// Collection of loads which are applyed on beam at its span
|
||||
/// </summary>
|
||||
List<IBeamShearLoad> ShearLoads {get;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
public interface IBeamShearLoad : IAction
|
||||
{
|
||||
/// <summary>
|
||||
/// Value of level where action is applyied at, 0.5 is top surface, -0.5 is bottom surface
|
||||
/// Value of level where action is applyied at, 0.5 is top surface of beam, -0.5 is bottom surface of beam
|
||||
/// </summary>
|
||||
double RelativeLoadLevel { get; set; }
|
||||
/// <summary>
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <summary>
|
||||
/// Implement properties for concentrated load in beam
|
||||
/// </summary>
|
||||
public interface IConcenratedForce : IBeamShearLoad
|
||||
public interface IConcentratedForce : IBeamShearLoad
|
||||
{
|
||||
/// <summary>
|
||||
/// Coordinate of location of force along beam, m
|
||||
@@ -3,7 +3,7 @@
|
||||
/// <summary>
|
||||
/// Implement properties of
|
||||
/// </summary>
|
||||
public interface IUniformlyDistributedLoad : IBeamShearLoad
|
||||
public interface IDistributedLoad : IBeamShearLoad
|
||||
{
|
||||
/// <summary>
|
||||
/// Value of uniformly distributed load, N/m
|
||||
@@ -1,4 +1,6 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Forces.Logics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -10,6 +12,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <inheritdoc/>
|
||||
public class FactoredCombinationProperty : IFactoredCombinationProperty
|
||||
{
|
||||
private IUpdateStrategy<IFactoredCombinationProperty> updateStrategy;
|
||||
/// <inheritdoc/>
|
||||
public Guid Id { get; }
|
||||
/// <inheritdoc/>
|
||||
@@ -25,9 +28,13 @@ namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
public FactoredCombinationProperty() : this(Guid.NewGuid())
|
||||
{
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
FactoredCombinationProperty factoredCombinationProperty = new(Guid.NewGuid());
|
||||
updateStrategy ??= new FactoredCombinationPropertyUpdateStrategy();
|
||||
updateStrategy.Update(factoredCombinationProperty, this);
|
||||
return factoredCombinationProperty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
public bool SetInGravityCenter { get; set; } = true;
|
||||
public IPoint2D ForcePoint { get; set; } = new Point2D();
|
||||
|
||||
public IFactoredCombinationProperty CombinationProperty { get; set; } = new FactoredCombinationProperty();
|
||||
public IFactoredCombinationProperty CombinationProperty { get; set; } = new FactoredCombinationProperty(Guid.NewGuid());
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <inheritdoc/>
|
||||
public List<IForceTuple> ForceTuples { get; } = new() { new ForceTuple()};
|
||||
/// <inheritdoc/>
|
||||
public IFactoredCombinationProperty CombinationProperty { get; set; }= new FactoredCombinationProperty();
|
||||
public IFactoredCombinationProperty CombinationProperty { get; set; }= new FactoredCombinationProperty(Guid.NewGuid());
|
||||
|
||||
|
||||
public ForceFactoredList(Guid id)
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <summary>
|
||||
/// Properties of factored combination of forces
|
||||
/// </summary>
|
||||
public interface IFactoredCombinationProperty : ISaveable
|
||||
public interface IFactoredCombinationProperty : ISaveable, ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// Term of calculation for assigned combination
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public class UniformlyDisributedLoadUpdateStrategy : IUpdateStrategy<IUniformlyDistributedLoad>
|
||||
public class UniformlyDisributedLoadUpdateStrategy : IUpdateStrategy<IDistributedLoad>
|
||||
{
|
||||
public void Update(IUniformlyDistributedLoad targetObject, IUniformlyDistributedLoad sourceObject)
|
||||
public void Update(IDistributedLoad targetObject, IDistributedLoad sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
|
||||
@@ -20,11 +20,11 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
|
||||
public double GetSumShearForce(IBeamShearLoad beamShearAction, double startCoord, double endCoord)
|
||||
{
|
||||
if (beamShearAction is IUniformlyDistributedLoad distributedLoad)
|
||||
if (beamShearAction is IDistributedLoad distributedLoad)
|
||||
{
|
||||
return GetDistributedLoadSum(distributedLoad, startCoord, endCoord);
|
||||
}
|
||||
else if (beamShearAction is IConcenratedForce concenratedForce)
|
||||
else if (beamShearAction is IConcentratedForce concenratedForce)
|
||||
{
|
||||
return GetConcentratedForceSum(concenratedForce, startCoord, endCoord);
|
||||
}
|
||||
@@ -34,7 +34,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
}
|
||||
}
|
||||
|
||||
private double GetConcentratedForceSum(IConcenratedForce concentratedForce, double startCoord, double endCoord)
|
||||
private double GetConcentratedForceSum(IConcentratedForce concentratedForce, double startCoord, double endCoord)
|
||||
{
|
||||
TraceLogger?.AddMessage($"Concentrated force Name = {concentratedForce.Name}, Value = {concentratedForce.ForceValue}(N/m) ");
|
||||
if (concentratedForce.ForceCoordinate > endCoord)
|
||||
@@ -61,7 +61,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
return totalLoad;
|
||||
}
|
||||
|
||||
private double GetDistributedLoadSum(IUniformlyDistributedLoad distributedLoad, double startCoord, double endCoord)
|
||||
private double GetDistributedLoadSum(IDistributedLoad distributedLoad, double startCoord, double endCoord)
|
||||
{
|
||||
TraceLogger?.AddMessage($"Uniformly distributed load Name = {distributedLoad.Name}, Value = {distributedLoad.LoadValue}(N/m) ");
|
||||
double loadStartCoord = Math.Max(distributedLoad.StartCoordinate, 0d);
|
||||
|
||||
Reference in New Issue
Block a user