Carbon Fiber Material was Added
This commit is contained in:
@@ -10,6 +10,8 @@ namespace StructureHelper.Infrastructure.Enums
|
||||
{
|
||||
Concrete,
|
||||
Reinforcement,
|
||||
Elastic
|
||||
Elastic,
|
||||
CarbonFiber,
|
||||
GlassFiber
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,33 +81,33 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
}
|
||||
public double InvertedCenterY => - CenterY;
|
||||
public double PrestrainKx
|
||||
{ get => primitive.UsersPrestrain.Kx;
|
||||
{ get => primitive.UsersPrestrain.Mx;
|
||||
set
|
||||
{
|
||||
primitive.UsersPrestrain.Kx = value;
|
||||
primitive.UsersPrestrain.Mx = value;
|
||||
OnPropertyChanged(nameof(PrestrainKx));
|
||||
}
|
||||
}
|
||||
public double PrestrainKy
|
||||
{ get => primitive.UsersPrestrain.Ky;
|
||||
{ get => primitive.UsersPrestrain.My;
|
||||
set
|
||||
{
|
||||
primitive.UsersPrestrain.Ky = value;
|
||||
primitive.UsersPrestrain.My = value;
|
||||
OnPropertyChanged(nameof(PrestrainKy));
|
||||
}
|
||||
}
|
||||
public double PrestrainEpsZ
|
||||
{ get => primitive.UsersPrestrain.EpsZ;
|
||||
{ get => primitive.UsersPrestrain.Nz;
|
||||
set
|
||||
{
|
||||
primitive.UsersPrestrain.EpsZ = value;
|
||||
primitive.UsersPrestrain.Nz = value;
|
||||
OnPropertyChanged(nameof(PrestrainEpsZ));
|
||||
}
|
||||
}
|
||||
|
||||
public double AutoPrestrainKx => primitive.AutoPrestrain.Kx;
|
||||
public double AutoPrestrainKy => primitive.AutoPrestrain.Ky;
|
||||
public double AutoPrestrainEpsZ => primitive.AutoPrestrain.EpsZ;
|
||||
public double AutoPrestrainKx => primitive.AutoPrestrain.Mx;
|
||||
public double AutoPrestrainKy => primitive.AutoPrestrain.My;
|
||||
public double AutoPrestrainEpsZ => primitive.AutoPrestrain.Nz;
|
||||
|
||||
public IHeadMaterial HeadMaterial
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="SafetyFactors">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -23,6 +24,20 @@
|
||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding DataContext, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="DirectSafetyFactors">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="200"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Content="Show Safety Factors" Command="{Binding ShowSafetyFactors}"/>
|
||||
<Button Grid.Row="1" Content="Show Partial Factors" Command="{Binding ShowPartialFactors}"/>
|
||||
<ContentControl Grid.Row="2" ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ConcreteLibMaterial">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Library material"/>
|
||||
@@ -36,6 +51,7 @@
|
||||
<ContentControl ContentTemplate="{StaticResource SafetyFactors}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ConcreteMaterial">
|
||||
<StackPanel>
|
||||
<ContentControl ContentTemplate="{StaticResource LibraryMaterial}" Content="{Binding}"/>
|
||||
@@ -82,6 +98,7 @@
|
||||
<ContentControl ContentTemplate="{StaticResource SafetyFactors}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ElasticMaterial">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
|
||||
public partial class SetPrestrainView : Window
|
||||
{
|
||||
SetPrestrainViewModel viewModel;
|
||||
public IStrainTuple StrainTuple { get; set; }
|
||||
public StrainTuple StrainTuple { get; set; }
|
||||
|
||||
public SetPrestrainView(SetPrestrainViewModel vm)
|
||||
{
|
||||
|
||||
@@ -106,6 +106,8 @@
|
||||
<Button Content="Concrete" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.Concrete}"/>
|
||||
<Button Content="Reinforcement" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.Reinforcement}"/>
|
||||
<Button Content="Elastic" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.Elastic}"/>
|
||||
<Button Content="CarbonFiber" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.CarbonFiber}"/>
|
||||
<Button Content="GlassFiber" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.GlassFiber}"/>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</Expander.ContextMenu>
|
||||
|
||||
@@ -42,28 +42,36 @@ namespace StructureHelper.Windows.MainWindow.Materials
|
||||
var bindings = new Dictionary<string, Binding>();
|
||||
var helperMaterial = headMaterial.HelperMaterial;
|
||||
string templateName;
|
||||
var binding = new Binding();
|
||||
if (helperMaterial is IConcreteLibMaterial)
|
||||
{
|
||||
templateName = "ConcreteMaterial";
|
||||
var binding = new Binding();
|
||||
binding.Source = vm.HelperMaterialViewModel;
|
||||
bindings.Add(templateName, binding);
|
||||
}
|
||||
else if (helperMaterial is IReinforcementLibMaterial)
|
||||
{
|
||||
templateName = "ReinforcementMaterial";
|
||||
var binding = new Binding();
|
||||
binding.Source = vm.HelperMaterialViewModel;
|
||||
bindings.Add(templateName, binding);
|
||||
}
|
||||
else if (helperMaterial is IElasticMaterial)
|
||||
{
|
||||
templateName = "ElasticMaterial";
|
||||
var binding = new Binding();
|
||||
binding.Source = vm.HelperMaterialViewModel;
|
||||
bindings.Add(templateName, binding);
|
||||
templateName = "DirectSafetyFactors";
|
||||
var frBinding = new Binding();
|
||||
frBinding.Source = (vm.HelperMaterialViewModel as ElasticViewModel).SafetyFactors;
|
||||
bindings.Add(templateName, frBinding);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $". Expected: {typeof(IHelperMaterial)}, but was: {helperMaterial.GetType()}");
|
||||
}
|
||||
|
||||
bindings.Add(templateName, binding);
|
||||
foreach (var item in bindings)
|
||||
{
|
||||
ContentControl contentControl = new ContentControl();
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
||||
{
|
||||
foreach (var item in ndmPrimitives)
|
||||
{
|
||||
StrainTupleService.CopyProperties(wnd.StrainTuple, item.AutoPrestrain);
|
||||
ForceTupleService.CopyProperties(wnd.StrainTuple, item.AutoPrestrain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
||||
{
|
||||
public class SetPrestrainViewModel : ViewModelBase
|
||||
{
|
||||
IStrainTuple SourceTuple;
|
||||
StrainTuple SourceTuple;
|
||||
private double coefficient;
|
||||
|
||||
public double Coefficient
|
||||
@@ -26,16 +26,16 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
||||
}
|
||||
}
|
||||
|
||||
public SetPrestrainViewModel(IStrainTuple sourceTuple)
|
||||
public SetPrestrainViewModel(StrainTuple sourceTuple)
|
||||
{
|
||||
SourceTuple = sourceTuple;
|
||||
coefficient = 1d;
|
||||
}
|
||||
|
||||
public IStrainTuple GetStrainTuple()
|
||||
public StrainTuple GetStrainTuple()
|
||||
{
|
||||
var result = new StrainTuple();
|
||||
StrainTupleService.CopyProperties(SourceTuple, result, coefficient);
|
||||
ForceTupleService.CopyProperties(SourceTuple, result, coefficient);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
||||
internal class ElasticViewModel : HelperMaterialViewModel
|
||||
{
|
||||
IElasticMaterial material;
|
||||
SafetyFactorsViewModel safetyFactorsViewModel;
|
||||
public SafetyFactorsViewModel SafetyFactors => safetyFactorsViewModel;
|
||||
public double Modulus
|
||||
{
|
||||
get => material.Modulus;
|
||||
@@ -43,6 +45,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
||||
public ElasticViewModel(IElasticMaterial material)
|
||||
{
|
||||
this.material = material;
|
||||
safetyFactorsViewModel = new SafetyFactorsViewModel(material.SafetyFactors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
18
StructureHelper/Windows/ViewModels/Materials/FRViewModel.cs
Normal file
18
StructureHelper/Windows/ViewModels/Materials/FRViewModel.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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 FRViewModel : ElasticViewModel
|
||||
{
|
||||
public FRViewModel(IFRMaterial material) : base(material)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,10 +81,18 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
||||
helperMaterialViewModel = new ReinforcementViewModel(material);
|
||||
}
|
||||
else if (helperMaterial is IElasticMaterial)
|
||||
{
|
||||
if (helperMaterial is IFRMaterial)
|
||||
{
|
||||
var material = helperMaterial as IFRMaterial;
|
||||
helperMaterialViewModel = new FRViewModel(material);
|
||||
}
|
||||
else
|
||||
{
|
||||
var material = helperMaterial as IElasticMaterial;
|
||||
helperMaterialViewModel = new ElasticViewModel(material);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $". Expected: {typeof(IHelperMaterial)}, but was: {helperMaterial.GetType()}");
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Windows.ViewModels.Materials
|
||||
{
|
||||
internal interface ISafetyFactorViewModel<TItem> : ICRUDViewModel<TItem>
|
||||
{
|
||||
RelayCommand ShowPartialFactors { get; }
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,8 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
||||
if (paramType == MaterialType.Concrete) { AddConcrete(); }
|
||||
else if (paramType == MaterialType.Reinforcement) { AddReinforcement(); }
|
||||
else if (paramType == MaterialType.Elastic) { AddElastic(); }
|
||||
else if (paramType == MaterialType.CarbonFiber) { AddCarbonFiber(); }
|
||||
else if (paramType == MaterialType.GlassFiber) { AddGlassFiber(); }
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $". Expected: {typeof(MaterialType)}, Actual type: {nameof(paramType)}");
|
||||
base.AddMethod(parameter);
|
||||
}
|
||||
@@ -78,6 +80,18 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
||||
material.Name = "New Elastic Material";
|
||||
NewItem = material;
|
||||
}
|
||||
private void AddCarbonFiber()
|
||||
{
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Carbon4000, ProgramSetting.CodeType);
|
||||
material.Name = "New CFR Material";
|
||||
NewItem = material;
|
||||
}
|
||||
private void AddGlassFiber()
|
||||
{
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Glass1200, ProgramSetting.CodeType);
|
||||
material.Name = "New GFR Material";
|
||||
NewItem = material;
|
||||
}
|
||||
private void AddReinforcement()
|
||||
{
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Reinforecement400, ProgramSetting.CodeType);
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Windows.AddMaterialWindow;
|
||||
using StructureHelper.Windows.MainWindow.Materials;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace StructureHelper.Windows.ViewModels.Materials
|
||||
{
|
||||
internal class SafetyFactorsViewModel : SelectedItemViewModel<IMaterialSafetyFactor>
|
||||
{
|
||||
List<IMaterialSafetyFactor> safetyFactors;
|
||||
private RelayCommand showPartialCommand;
|
||||
|
||||
public RelayCommand ShowPartialFactors
|
||||
@@ -28,6 +32,22 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand showSafetyFactors;
|
||||
|
||||
public ICommand ShowSafetyFactors
|
||||
{
|
||||
get
|
||||
{
|
||||
return showSafetyFactors ??= new RelayCommand(o =>
|
||||
{
|
||||
var wnd = new SafetyFactorsView(safetyFactors);
|
||||
wnd.ShowDialog();
|
||||
Refresh();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddMethod(object parameter)
|
||||
{
|
||||
NewItem = new MaterialSafetyFactor();
|
||||
@@ -36,6 +56,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
||||
|
||||
public SafetyFactorsViewModel(List<IMaterialSafetyFactor> safetyFactors) : base(safetyFactors)
|
||||
{
|
||||
this.safetyFactors = safetyFactors;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
{
|
||||
public enum CodeTypes
|
||||
{
|
||||
SP63_13330_2018,
|
||||
EuroCode_2_1990
|
||||
SP63_2018,
|
||||
EuroCode_2_1990,
|
||||
SP164_2014,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
Concrete,
|
||||
Reinforcement,
|
||||
//Steel,
|
||||
//CarbonFiber,
|
||||
CarbonFiber,
|
||||
GlassFiber,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ namespace StructureHelperCommon.Infrastructures.Settings
|
||||
{
|
||||
public static class ProgramSetting
|
||||
{
|
||||
public static CodeTypes CodeType => CodeTypes.SP63_13330_2018;
|
||||
public static CodeTypes CodeType => CodeTypes.SP63_2018;
|
||||
public static CodeTypes FRCodeType => CodeTypes.SP164_2014;
|
||||
public static CrossSectionAxisNames CrossSectionAxisNames => new CrossSectionAxisNames();
|
||||
public static LimitStatesList LimitStatesList => new LimitStatesList();
|
||||
public static CalcTermList CalcTermList => new CalcTermList();
|
||||
|
||||
36
StructureHelperCommon/Models/Forces/DesignForcePair.cs
Normal file
36
StructureHelperCommon/Models/Forces/DesignForcePair.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public class DesignForcePair : IDesignForcePair
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public IPoint2D ForcePoint { get; set; }
|
||||
public bool SetInGravityCenter { get; set; }
|
||||
public LimitStates LimitState { get; set; }
|
||||
public IForceTuple LongForceTuple { get; set; }
|
||||
public IForceTuple FullForceTuple { get; set; }
|
||||
|
||||
public DesignForcePair()
|
||||
{
|
||||
LongForceTuple = new ForceTuple();
|
||||
FullForceTuple = new ForceTuple();
|
||||
}
|
||||
|
||||
public IForceCombinationList GetCombinations()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public LimitStates LimitState { get; set; }
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
public IForceTuple ForceTuple { get; set; }
|
||||
public ForceTuple ForceTuple { get; set; }
|
||||
|
||||
public DesignForceTuple(LimitStates limitState, CalcTerms calcTerm) : this()
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
public object Clone()
|
||||
{
|
||||
var newTuple = new DesignForceTuple(this.LimitState, this.CalcTerm);
|
||||
newTuple.ForceTuple = this.ForceTuple.Clone() as IForceTuple;
|
||||
newTuple.ForceTuple = this.ForceTuple.Clone() as ForceTuple;
|
||||
return newTuple;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
var termFactor = calcTerm is CalcTerms.ShortTerm ? 1d : LongTermFactor;
|
||||
var designForceTuple = new DesignForceTuple() { LimitState = limitState, CalcTerm = calcTerm };
|
||||
designForceTuple.ForceTuple = ForceTupleService.MultiplyTuples(FullSLSForces, stateFactor * termFactor);
|
||||
designForceTuple.ForceTuple = ForceTupleService.MultiplyTuples(FullSLSForces, stateFactor * termFactor) as ForceTuple;
|
||||
result.DesignForces.Add(designForceTuple);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
var forceTupleList = DesignForces.Where(x => x.LimitState == limitState & x.CalcTerm == calcTerm);
|
||||
foreach (var item in forceTupleList)
|
||||
{
|
||||
designForceTuple.ForceTuple = ForceTupleService.SumTuples(designForceTuple.ForceTuple, item.ForceTuple);
|
||||
designForceTuple.ForceTuple = ForceTupleService.SumTuples(designForceTuple.ForceTuple, item.ForceTuple) as ForceTuple;
|
||||
}
|
||||
result.DesignForces.Add(designForceTuple);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
@@ -21,20 +22,13 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <inheritdoc/>
|
||||
public object Clone()
|
||||
{
|
||||
IForceTuple forceTuple = new ForceTuple() { Mx = Mx, My = My, Nz = Nz, Qx = Qx, Qy = Qy, Mz = Mz};
|
||||
ForceTuple forceTuple = new ForceTuple() { Mx = Mx, My = My, Nz = Nz, Qx = Qx, Qy = Qy, Mz = Mz};
|
||||
return forceTuple;
|
||||
}
|
||||
public static ForceTuple operator +(ForceTuple first) => first;
|
||||
public static ForceTuple operator +(ForceTuple first, ForceTuple second)
|
||||
{
|
||||
var result = new ForceTuple();
|
||||
result.Mx += first.Mx + second.Mx;
|
||||
result.My += first.My + second.My;
|
||||
result.Mz += first.Mz + second.Mz;
|
||||
result.Qx += first.Qx + second.Qx;
|
||||
result.Qy += first.Qy + second.Qy;
|
||||
result.Nz += first.Nz + second.Nz;
|
||||
return result;
|
||||
return ForceTupleService.SumTuples(first, second) as ForceTuple;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
StructureHelperCommon/Models/Forces/IDesignForcePair.cs
Normal file
16
StructureHelperCommon/Models/Forces/IDesignForcePair.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public interface IDesignForcePair : IForceAction
|
||||
{
|
||||
LimitStates LimitState { get; set; }
|
||||
IForceTuple LongForceTuple { get; set; }
|
||||
IForceTuple FullForceTuple { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@ namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
LimitStates LimitState { get; set; }
|
||||
CalcTerms CalcTerm { get; set; }
|
||||
IForceTuple ForceTuple { get; set; }
|
||||
|
||||
ForceTuple ForceTuple { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
33
StructureHelperCommon/Models/Forces/StrainTuple.cs
Normal file
33
StructureHelperCommon/Models/Forces/StrainTuple.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class StrainTuple : IForceTuple
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public double Mx { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double My { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double Nz { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double Qx { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double Qy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double Mz { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public object Clone()
|
||||
{
|
||||
StrainTuple forceTuple = new StrainTuple() { Mx = Mx, My = My, Nz = Nz, Qx = Qx, Qy = Qy, Mz = Mz };
|
||||
return forceTuple;
|
||||
}
|
||||
public static StrainTuple operator +(StrainTuple first) => first;
|
||||
public static StrainTuple operator +(StrainTuple first, ForceTuple second)
|
||||
{
|
||||
return ForceTupleService.SumTuples(first, second) as StrainTuple;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for generic curvature for beams
|
||||
/// </summary>
|
||||
public interface IStrainTuple : ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// Curvature about x-axis
|
||||
/// </summary>
|
||||
double Kx { get; set; }
|
||||
/// <summary>
|
||||
/// Curvature about y-axis
|
||||
/// </summary>
|
||||
double Ky { get; set; }
|
||||
/// <summary>
|
||||
/// Strain along z-axis
|
||||
/// </summary>
|
||||
double EpsZ { get; set; }
|
||||
/// <summary>
|
||||
/// Screw along x-axis
|
||||
/// </summary>
|
||||
double Gx { get; set; }
|
||||
/// <summary>
|
||||
/// Screw along y-axis
|
||||
/// </summary>
|
||||
double Gy { get; set; }
|
||||
/// <summary>
|
||||
/// Twisting about z-axis
|
||||
/// </summary>
|
||||
double Gz { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class StrainTuple : IStrainTuple
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public double Kx { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double Ky { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double EpsZ { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double Gx { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double Gy { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double Gz { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public object Clone()
|
||||
{
|
||||
var target = new StrainTuple();
|
||||
StrainTupleService.CopyProperties(this, target);
|
||||
return target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public class FactorLogic : IFactorLogic
|
||||
{
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
public (double Compressive, double Tensile) GetTotalFactor(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
double compressionVal = 1d;
|
||||
double tensionVal = 1d;
|
||||
foreach (var item in SafetyFactors.Where(x => x.Take == true))
|
||||
{
|
||||
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
||||
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
||||
}
|
||||
return (compressionVal, tensionVal);
|
||||
}
|
||||
public FactorLogic(List<IMaterialSafetyFactor> safetyFactors)
|
||||
{
|
||||
SafetyFactors = safetyFactors;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using StructureHelperCommon.Infrastructures.Strings;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public enum FactorType
|
||||
public enum ConcreteFactorType
|
||||
{
|
||||
LongTermFactor,
|
||||
BleedingFactor,
|
||||
@@ -13,11 +13,11 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
|
||||
public static class ConcreteFactorsFactory
|
||||
{
|
||||
public static IMaterialSafetyFactor GetFactor(FactorType factorType)
|
||||
public static IMaterialSafetyFactor GetFactor(ConcreteFactorType factorType)
|
||||
{
|
||||
if (factorType == FactorType.LongTermFactor) { return LongTerm(); }
|
||||
else if (factorType == FactorType.BleedingFactor) { return Bleeding(); }
|
||||
else if (factorType == FactorType.PlainConcreteFactor) { return PlainConcrete(); }
|
||||
if (factorType == ConcreteFactorType.LongTermFactor) { return LongTerm(); }
|
||||
else if (factorType == ConcreteFactorType.BleedingFactor) { return Bleeding(); }
|
||||
else if (factorType == ConcreteFactorType.PlainConcreteFactor) { return PlainConcrete(); }
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Strings;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public enum FRFactorType
|
||||
{
|
||||
ConditionFactor,
|
||||
CohesionFactor,
|
||||
LongTermFactor,
|
||||
}
|
||||
public static class FRFactorsFactory
|
||||
{
|
||||
const string gammaf1Name = "Gamma_f1";
|
||||
const string gammaf1Description = "Coefficient for considering environment";
|
||||
const string gammaf2Name = "Gamma_f2";
|
||||
const string gammaf2Description = "Coefficient for considering cohesion";
|
||||
const string gammaf3Name = "Gamma_f3";
|
||||
const string gammaf3Description = "Coefficient for considering long term calculations";
|
||||
public static IMaterialSafetyFactor GetCarbonFactor(FRFactorType factorType)
|
||||
{
|
||||
if (factorType == FRFactorType.LongTermFactor) { return LongTerm(1d / 1.2d,0.8d); }
|
||||
else if (factorType == FRFactorType.ConditionFactor) { return Condition(gammaf1Name, gammaf1Description , 0.9d); }
|
||||
else if (factorType == FRFactorType.CohesionFactor) { return Condition(gammaf2Name, gammaf2Description, 0.9d); }
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||
}
|
||||
public static IMaterialSafetyFactor GetGlassFactor(FRFactorType factorType)
|
||||
{
|
||||
if (factorType == FRFactorType.LongTermFactor) { return LongTerm(1d / 1.8d, 0.3d); }
|
||||
else if (factorType == FRFactorType.ConditionFactor) { return Condition(gammaf1Name, gammaf1Description, 0.7d); }
|
||||
else if (factorType == FRFactorType.CohesionFactor) { return Condition(gammaf2Name, gammaf2Description, 0.9d); }
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||
}
|
||||
|
||||
private static IMaterialSafetyFactor Condition(string name, string description, double value)
|
||||
{
|
||||
IMaterialSafetyFactor safetyFactor = new MaterialSafetyFactor()
|
||||
{
|
||||
Name = name,
|
||||
Description = description,
|
||||
};
|
||||
IMaterialPartialFactor partialFactor;
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Tension,
|
||||
CalcTerm = CalcTerms.ShortTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = value
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Compression,
|
||||
CalcTerm = CalcTerms.ShortTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = value
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Tension,
|
||||
CalcTerm = CalcTerms.LongTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = value
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Compression,
|
||||
CalcTerm = CalcTerms.LongTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = value
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
return safetyFactor;
|
||||
}
|
||||
|
||||
private static IMaterialSafetyFactor LongTerm(double shortValue, double longValue)
|
||||
{
|
||||
IMaterialSafetyFactor safetyFactor = new MaterialSafetyFactor()
|
||||
{
|
||||
Name = gammaf3Name,
|
||||
Description = gammaf3Description,
|
||||
};
|
||||
IMaterialPartialFactor partialFactor;
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Tension,
|
||||
CalcTerm = CalcTerms.ShortTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = shortValue
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Compression,
|
||||
CalcTerm = CalcTerms.ShortTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = shortValue
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Tension,
|
||||
CalcTerm = CalcTerms.LongTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = longValue
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Compression,
|
||||
CalcTerm = CalcTerms.LongTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = longValue
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
return safetyFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
}
|
||||
private static IEnumerable<ILibMaterialEntity> GetConcreteSP63()
|
||||
{
|
||||
var code = CodeTypes.SP63_13330_2018;
|
||||
var code = CodeTypes.SP63_2018;
|
||||
List<ILibMaterialEntity> libMaterials = new List<ILibMaterialEntity>();
|
||||
libMaterials.Add(new ConcreteMaterialEntity() { CodeType = code, Name = "B5", MainStrength = 5e6 });
|
||||
libMaterials.Add(new ConcreteMaterialEntity() { CodeType = code, Name = "B7,5", MainStrength = 7.5e6 });
|
||||
@@ -57,7 +57,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
}
|
||||
private static IEnumerable<ILibMaterialEntity> GetReinforcementSP63()
|
||||
{
|
||||
var code = CodeTypes.SP63_13330_2018;
|
||||
var code = CodeTypes.SP63_2018;
|
||||
List<ILibMaterialEntity> libMaterials = new List<ILibMaterialEntity>();
|
||||
libMaterials.Add(new ReinforcementMaterialEntity() { CodeType = code, Name = "A240", MainStrength = 240e6 });
|
||||
libMaterials.Add(new ReinforcementMaterialEntity() { CodeType = code, Name = "A400", MainStrength = 400e6 });
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public interface IFactorLogic
|
||||
{
|
||||
List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
(double Compressive, double Tensile) GetTotalFactor(LimitStates limitState, CalcTerms calcTerm);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
using System;
|
||||
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for point of center of some shape
|
||||
/// Интерфейс для точки центра некоторой формы
|
||||
/// </summary>
|
||||
public interface IPoint2D
|
||||
public interface IPoint2D : ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// Coordinate of center of rectangle by local axis X, m
|
||||
|
||||
@@ -7,5 +7,11 @@
|
||||
public double X { get; set; }
|
||||
/// <inheritdoc />
|
||||
public double Y { get; set; }
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
var point = new Point2D() { X = X, Y = Y };
|
||||
return point;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Strings;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -17,5 +21,82 @@ namespace StructureHelperCommon.Services.Forces
|
||||
target.ForcePoint.X = source.ForcePoint.X;
|
||||
target.ForcePoint.Y = source.ForcePoint.Y;
|
||||
}
|
||||
|
||||
public static List<IDesignForcePair> ConvertCombinationToPairs(IForceCombinationList combinations)
|
||||
{
|
||||
var resultList = new List<IDesignForcePair>();
|
||||
var limitStates = new List<LimitStates>() { LimitStates.ULS, LimitStates.SLS };
|
||||
var calcTerms = new List<CalcTerms>() { CalcTerms.ShortTerm, CalcTerms.LongTerm };
|
||||
foreach (var limitState in limitStates)
|
||||
{
|
||||
var tuples = new IForceTuple[2];
|
||||
for (int i = 0; i < calcTerms.Count; i++)
|
||||
{
|
||||
var forceTupleList = combinations.DesignForces.Where(x => x.LimitState == limitState && x.CalcTerm == calcTerms[i]).Select(x => x.ForceTuple);
|
||||
var sumLongTuple = ForceTupleService.MergeTupleCollection(forceTupleList);
|
||||
tuples[i] = sumLongTuple;
|
||||
}
|
||||
var pair = new DesignForcePair()
|
||||
{
|
||||
Name = combinations.Name,
|
||||
ForcePoint = (IPoint2D)combinations.ForcePoint.Clone(),
|
||||
SetInGravityCenter = combinations.SetInGravityCenter,
|
||||
LimitState = limitState,
|
||||
FullForceTuple = tuples[0],
|
||||
LongForceTuple = tuples[1]
|
||||
};
|
||||
resultList.Add(pair);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
public static List<IDesignForcePair> ConvertCombinationToPairs(IForceCombinationByFactor combinations)
|
||||
{
|
||||
var resultList = new List<IDesignForcePair>();
|
||||
var limitStates = new List<LimitStates>() { LimitStates.ULS, LimitStates.SLS };
|
||||
var calcTerms = new List<CalcTerms>() { CalcTerms.ShortTerm, CalcTerms.LongTerm };
|
||||
foreach (var limitState in limitStates)
|
||||
{
|
||||
var tuples = new IForceTuple[2];
|
||||
for (int i = 0; i < calcTerms.Count; i++)
|
||||
{
|
||||
var stateFactor = limitState is LimitStates.SLS ? 1d : combinations.ULSFactor;
|
||||
var termFactor = calcTerms[i] == CalcTerms.ShortTerm ? 1d : combinations.LongTermFactor;
|
||||
var forceTupleList = ForceTupleService.MultiplyTuples(combinations.FullSLSForces, stateFactor * termFactor);
|
||||
tuples[i] = forceTupleList;
|
||||
}
|
||||
var pair = new DesignForcePair()
|
||||
{
|
||||
Name = combinations.Name,
|
||||
ForcePoint = (IPoint2D)combinations.ForcePoint.Clone(),
|
||||
SetInGravityCenter = combinations.SetInGravityCenter,
|
||||
LimitState = limitState,
|
||||
FullForceTuple = tuples[0],
|
||||
LongForceTuple = tuples[1]
|
||||
};
|
||||
resultList.Add(pair);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public static List<IDesignForcePair> ConvertCombinationToPairs(IForceAction forceAction)
|
||||
{
|
||||
var resultList = new List<IDesignForcePair>();
|
||||
if (forceAction is IForceCombinationList)
|
||||
{
|
||||
var item = forceAction as IForceCombinationList;
|
||||
resultList.AddRange(ConvertCombinationToPairs(item));
|
||||
}
|
||||
else if (forceAction is IForceCombinationByFactor)
|
||||
{
|
||||
var item = forceAction as IForceCombinationByFactor;
|
||||
resultList.AddRange(ConvertCombinationToPairs(item));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $": expected {typeof(IForceAction)}, but was {forceAction.GetType()}");
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Strings;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
@@ -8,6 +9,12 @@ namespace StructureHelperCommon.Services.Forces
|
||||
{
|
||||
public static class ForceTupleService
|
||||
{
|
||||
public static void CopyProperties(IForceTuple source, IForceTuple target, double factor = 1d)
|
||||
{
|
||||
CheckTuples(source, target);
|
||||
SumTupleToTarget(source, target, 0);
|
||||
SumTupleToTarget(source, target, factor);
|
||||
}
|
||||
public static IForceTuple MoveTupleIntoPoint(IForceTuple forceTuple, IPoint2D point2D)
|
||||
{
|
||||
var newTuple = forceTuple.Clone() as IForceTuple;
|
||||
@@ -15,44 +22,37 @@ namespace StructureHelperCommon.Services.Forces
|
||||
newTuple.My -= newTuple.Nz * point2D.X;
|
||||
return newTuple;
|
||||
}
|
||||
public static IForceTuple SumTuples(IForceTuple first, IForceTuple second)
|
||||
public static IForceTuple SumTuples(IForceTuple first, IForceTuple second, double factor = 1d)
|
||||
{
|
||||
var result = new ForceTuple();
|
||||
result.Mx += first.Mx + second.Mx;
|
||||
result.My += first.My + second.My;
|
||||
result.Mz += first.Mz + second.Mz;
|
||||
result.Qx += first.Qx + second.Qx;
|
||||
result.Qy += first.Qy + second.Qy;
|
||||
result.Nz += first.Nz + second.Nz;
|
||||
CheckTuples(first, second);
|
||||
IForceTuple result = GetNewTupleSameType(first);
|
||||
SumTupleToTarget(first, result, 1d);
|
||||
SumTupleToTarget(second, result, factor);
|
||||
return result;
|
||||
}
|
||||
public static IForceTuple MergeTupleCollection(IEnumerable<IForceTuple> tupleCollection)
|
||||
{
|
||||
CheckTupleCollection(tupleCollection);
|
||||
var result = GetNewTupleSameType(tupleCollection.First());
|
||||
foreach (var item in tupleCollection)
|
||||
{
|
||||
SumTuples(result, item);
|
||||
};
|
||||
return result;
|
||||
}
|
||||
public static IForceTuple MultiplyTuples(IForceTuple first, double factor)
|
||||
{
|
||||
var result = new ForceTuple();
|
||||
result.Mx += first.Mx * factor;
|
||||
result.My += first.My * factor;
|
||||
result.Mz += first.Mz * factor;
|
||||
result.Qx += first.Qx * factor;
|
||||
result.Qy += first.Qy * factor;
|
||||
result.Nz += first.Nz * factor;
|
||||
var result = GetNewTupleSameType(first);
|
||||
CopyProperties(first, result, factor);
|
||||
return result;
|
||||
}
|
||||
public static IForceTuple InterpolateTuples(IForceTuple endTuple, IForceTuple startTuple = null, double coefficient = 0.5d)
|
||||
{
|
||||
if (startTuple == null) startTuple = new ForceTuple();
|
||||
double dMx, dMy, dNz;
|
||||
dMx = endTuple.Mx - startTuple.Mx;
|
||||
dMy = endTuple.My - startTuple.My;
|
||||
dNz = endTuple.Nz - startTuple.Nz;
|
||||
return new ForceTuple()
|
||||
{
|
||||
Mx = startTuple.Mx + dMx * coefficient,
|
||||
My = startTuple.My + dMy * coefficient,
|
||||
Nz = startTuple.Nz + dNz * coefficient
|
||||
};
|
||||
if (startTuple is null) startTuple = GetNewTupleSameType(endTuple);
|
||||
else { CheckTuples(startTuple, endTuple); }
|
||||
var deltaTuple = SumTuples(endTuple, startTuple, -1d);
|
||||
return SumTuples(startTuple, deltaTuple, coefficient);
|
||||
}
|
||||
|
||||
|
||||
public static List<IDesignForceTuple> InterpolateDesignTuple(IDesignForceTuple finishDesignForce, IDesignForceTuple startDesignForce = null, int stepCount = 10)
|
||||
{
|
||||
if (startDesignForce.LimitState != finishDesignForce.LimitState) throw new StructureHelperException(ErrorStrings.LimitStatesIsNotValid);
|
||||
@@ -61,11 +61,50 @@ namespace StructureHelperCommon.Services.Forces
|
||||
double step = 1d / stepCount;
|
||||
for (int i = 0; i <= stepCount; i++)
|
||||
{
|
||||
var currentTuple = InterpolateTuples(finishDesignForce.ForceTuple, startDesignForce.ForceTuple, i * step);
|
||||
var currentTuple = InterpolateTuples(finishDesignForce.ForceTuple, startDesignForce.ForceTuple, i * step) as ForceTuple;
|
||||
var currentDesignTuple = new DesignForceTuple() { LimitState = finishDesignForce.LimitState, CalcTerm = finishDesignForce.CalcTerm, ForceTuple = currentTuple };
|
||||
tuples.Add(currentDesignTuple);
|
||||
}
|
||||
return tuples;
|
||||
}
|
||||
private static void SumTupleToTarget(IForceTuple source, IForceTuple target, double factor = 1d)
|
||||
{
|
||||
target.Mx += source.Mx * factor;
|
||||
target.My += source.My * factor;
|
||||
target.Nz += source.Nz * factor;
|
||||
target.Qx += source.Qx * factor;
|
||||
target.Qy += source.Qy * factor;
|
||||
target.Mz += source.Mz * factor;
|
||||
}
|
||||
private static void CheckTuples(IForceTuple first, IForceTuple second)
|
||||
{
|
||||
if (first.GetType() != second.GetType())
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect +
|
||||
$": Type of first parameter (type = {first.GetType()}) doesn't corespond second parameter type ({second.GetType()})");
|
||||
}
|
||||
}
|
||||
private static void CheckTupleCollection(IEnumerable<IForceTuple> tupleCollection)
|
||||
{
|
||||
if (tupleCollection.Count() == 0)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Collection is Empty");
|
||||
}
|
||||
foreach (var item in tupleCollection)
|
||||
{
|
||||
CheckTuples(tupleCollection.First(), item);
|
||||
}
|
||||
}
|
||||
private static IForceTuple GetNewTupleSameType(IForceTuple first)
|
||||
{
|
||||
IForceTuple result;
|
||||
if (first is ForceTuple) { result = new ForceTuple(); }
|
||||
else if (first is StrainTuple) { result = new StrainTuple(); }
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,25 +5,15 @@ namespace StructureHelperCommon.Services.Forces
|
||||
{
|
||||
public static class StrainTupleService
|
||||
{
|
||||
public static void CopyProperties (IStrainTuple source, IStrainTuple target, double factor = 1 )
|
||||
public static IStrainMatrix ConvertToLoaderStrainMatrix(StrainTuple strainTuple)
|
||||
{
|
||||
target.Kx = source.Kx * factor;
|
||||
target.Ky = source.Ky * factor;
|
||||
target.EpsZ = source.EpsZ * factor;
|
||||
target.Gx = source.Gx * factor;
|
||||
target.Gy = source.Gy * factor;
|
||||
target.Gz = source.Gz * factor;
|
||||
}
|
||||
|
||||
public static IStrainMatrix ConvertToLoaderStrainMatrix(IStrainTuple strainTuple)
|
||||
{
|
||||
IStrainMatrix strainMatrix = new StrainMatrix() { Kx = strainTuple.EpsZ, Ky = strainTuple.Ky, EpsZ = strainTuple.EpsZ };
|
||||
IStrainMatrix strainMatrix = new StrainMatrix() { Kx = strainTuple.Nz, Ky = strainTuple.My, EpsZ = strainTuple.Nz };
|
||||
return strainMatrix;
|
||||
}
|
||||
|
||||
public static IStrainTuple ConvertToStrainTuple(IStrainMatrix strainMatrix)
|
||||
public static StrainTuple ConvertToStrainTuple(IStrainMatrix strainMatrix)
|
||||
{
|
||||
IStrainTuple strainTuple = new StrainTuple() { Kx = strainMatrix.Kx, Ky = strainMatrix.Ky, EpsZ = strainMatrix.EpsZ };
|
||||
StrainTuple strainTuple = new StrainTuple() { Mx = strainMatrix.Kx, My = strainMatrix.Ky, Nz = strainMatrix.EpsZ };
|
||||
return strainTuple;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
public class ConcreteLibMaterial : IConcreteLibMaterial
|
||||
{
|
||||
private IFactorLogic factorLogic => new FactorLogic(SafetyFactors);
|
||||
public ILibMaterialEntity MaterialEntity { get; set; }
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
public bool TensionForULS { get ; set; }
|
||||
@@ -52,7 +53,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
materialOptions.WorkInTension = true;
|
||||
}
|
||||
var strength = GetStrengthFactors(limitState, calcTerm);
|
||||
var strength = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||
materialOptions.ExternalFactor.Compressive = strength.Compressive;
|
||||
materialOptions.ExternalFactor.Tensile = strength.Tensile;
|
||||
LoaderMaterialBuilders.IMaterialBuilder builder = new LoaderMaterialBuilders.ConcreteBuilder(materialOptions);
|
||||
@@ -60,18 +61,6 @@ namespace StructureHelperLogics.Models.Materials
|
||||
return director.BuildMaterial();
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrengthFactors(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
double compressionVal = 1d;
|
||||
double tensionVal = 1d;
|
||||
foreach (var item in SafetyFactors.Where(x => x.Take == true))
|
||||
{
|
||||
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
||||
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
||||
}
|
||||
return (compressionVal, tensionVal);
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
strengthLogic = new LoaderMaterialLogic.TrueStrengthConcreteLogicSP63_2018(MaterialEntity.MainStrength);
|
||||
@@ -82,7 +71,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
compressionFactor /= 1.3d;
|
||||
tensionFactor /= 1.5d;
|
||||
var factors = GetStrengthFactors(limitState, calcTerm);
|
||||
var factors = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||
compressionFactor *= factors.Compressive;
|
||||
tensionFactor *= factors.Tensile;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using LoaderCalculator.Data.Materials;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,30 +12,23 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
public class ElasticMaterial : IElasticMaterial
|
||||
{
|
||||
private IElasticMaterialLogic elasticMaterialLogic => new ElasticMaterialLogic();
|
||||
public double Modulus { get; set; }
|
||||
public double CompressiveStrength { get; set; }
|
||||
public double TensileStrength { get; set; }
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
|
||||
public ElasticMaterial()
|
||||
{
|
||||
SafetyFactors = new List<IMaterialSafetyFactor>();
|
||||
}
|
||||
|
||||
public IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
IMaterial material = new Material();
|
||||
material.InitModulus = Modulus;
|
||||
IEnumerable<double> parameters = new List<double>() { Modulus, CompressiveStrength, TensileStrength};
|
||||
material.DiagramParameters = parameters;
|
||||
material.Diagram = GetStress;
|
||||
var material = elasticMaterialLogic.GetLoaderMaterial(this, limitState, calcTerm);
|
||||
return material;
|
||||
}
|
||||
|
||||
private double GetStress (IEnumerable<double> parameters, double strain)
|
||||
{
|
||||
double modulus = parameters.First();
|
||||
double stress = modulus * strain;
|
||||
double compressiveStrength = (-1d) * parameters.ElementAt(1);
|
||||
double tensileStrength = parameters.ElementAt(2);
|
||||
if (stress > tensileStrength || stress < compressiveStrength) { return 0d; }
|
||||
else { return stress; }
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new ElasticMaterial() { Modulus = Modulus, CompressiveStrength = CompressiveStrength, TensileStrength = TensileStrength };
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
using LoaderCalculator.Data.Materials;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Settings;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
public class FRMaterial : IFRMaterial
|
||||
{
|
||||
private IElasticMaterialLogic elasticMaterialLogic => new ElasticMaterialLogic();
|
||||
private MaterialTypes materialType;
|
||||
public double Modulus { get; set; }
|
||||
public double CompressiveStrength { get; set; }
|
||||
public double TensileStrength { get; set; }
|
||||
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
|
||||
public FRMaterial(MaterialTypes materialType)
|
||||
{
|
||||
SafetyFactors = new List<IMaterialSafetyFactor>();
|
||||
this.materialType = materialType;
|
||||
SafetyFactors.AddRange(PartialCoefficientFactory.GetDefaultFRSafetyFactors(ProgramSetting.FRCodeType, this.materialType));
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
var newItem = new FRMaterial(materialType)
|
||||
{
|
||||
Modulus = Modulus,
|
||||
CompressiveStrength = CompressiveStrength,
|
||||
TensileStrength = TensileStrength
|
||||
};
|
||||
return newItem;
|
||||
}
|
||||
|
||||
public IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
var material = elasticMaterialLogic.GetLoaderMaterial(this, limitState, calcTerm);
|
||||
return material;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
public interface IFRMaterial : IElasticMaterial
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,9 @@ namespace StructureHelperLogics.Models.Materials
|
||||
Concrete40,
|
||||
Reinforecement400,
|
||||
Reinforecement500,
|
||||
Elastic200
|
||||
Elastic200,
|
||||
Carbon4000,
|
||||
Glass1200
|
||||
}
|
||||
|
||||
public static class HeadMaterialFactory
|
||||
@@ -33,6 +35,8 @@ namespace StructureHelperLogics.Models.Materials
|
||||
if (type == HeadmaterialType.Reinforecement400) { return GetReinforcement400(); }
|
||||
if (type == HeadmaterialType.Reinforecement500) { return GetReinforcement500(); }
|
||||
if (type == HeadmaterialType.Elastic200) { return GetElastic200(); }
|
||||
if (type == HeadmaterialType.Carbon4000) { return GetCarbon4000(); }
|
||||
if (type == HeadmaterialType.Glass1200) { return GetGlass1200(); }
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + nameof(type));
|
||||
}
|
||||
|
||||
@@ -53,6 +57,20 @@ namespace StructureHelperLogics.Models.Materials
|
||||
return material;
|
||||
}
|
||||
|
||||
private static IHeadMaterial GetCarbon4000()
|
||||
{
|
||||
var material = new HeadMaterial();
|
||||
material.HelperMaterial = new FRMaterial(MaterialTypes.CarbonFiber) { Modulus = 2e11d, CompressiveStrength = 4e9d, TensileStrength = 4e9d };
|
||||
return material;
|
||||
}
|
||||
|
||||
private static IHeadMaterial GetGlass1200()
|
||||
{
|
||||
var material = new HeadMaterial();
|
||||
material.HelperMaterial = new FRMaterial(MaterialTypes.GlassFiber) { Modulus = 8e10d, CompressiveStrength = 1.2e9d, TensileStrength = 1.2e9d };
|
||||
return material;
|
||||
}
|
||||
|
||||
private static IHeadMaterial GetReinforcement400()
|
||||
{
|
||||
var material = new HeadMaterial() { Name = "New reinforcement" };
|
||||
|
||||
@@ -14,11 +14,17 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
public static List<IMaterialSafetyFactor> GetDefaultConcreteSafetyFactors(CodeTypes codeType)
|
||||
{
|
||||
if (codeType == CodeTypes.SP63_13330_2018) return GetConcreteFactorsSP63_2018();
|
||||
if (codeType == CodeTypes.SP63_2018) return GetConcreteFactorsSP63_2018();
|
||||
else if (codeType == CodeTypes.EuroCode_2_1990) return GetConcreteFactorsEC2_1990();
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + ": " + codeType);
|
||||
}
|
||||
|
||||
public static List<IMaterialSafetyFactor> GetDefaultFRSafetyFactors(CodeTypes codeType, MaterialTypes materialType)
|
||||
{
|
||||
if (codeType == CodeTypes.SP164_2014) return GetFRFactorsSP164_2014(materialType);
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + ": " + codeType);
|
||||
}
|
||||
|
||||
private static List<IMaterialSafetyFactor> GetConcreteFactorsEC2_1990()
|
||||
{
|
||||
List<IMaterialSafetyFactor> factors = new List<IMaterialSafetyFactor>();
|
||||
@@ -29,16 +35,56 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
List<IMaterialSafetyFactor> factors = new List<IMaterialSafetyFactor>();
|
||||
IMaterialSafetyFactor coefficient;
|
||||
coefficient = ConcreteFactorsFactory.GetFactor(FactorType.LongTermFactor);
|
||||
coefficient = ConcreteFactorsFactory.GetFactor(ConcreteFactorType.LongTermFactor);
|
||||
coefficient.Take = true;
|
||||
factors.Add(coefficient);
|
||||
coefficient = ConcreteFactorsFactory.GetFactor(FactorType.PlainConcreteFactor);
|
||||
coefficient = ConcreteFactorsFactory.GetFactor(ConcreteFactorType.PlainConcreteFactor);
|
||||
coefficient.Take = false;
|
||||
factors.Add(coefficient);
|
||||
coefficient = ConcreteFactorsFactory.GetFactor(FactorType.BleedingFactor);
|
||||
coefficient = ConcreteFactorsFactory.GetFactor(ConcreteFactorType.BleedingFactor);
|
||||
coefficient.Take = false;
|
||||
factors.Add(coefficient);
|
||||
return factors;
|
||||
}
|
||||
private static List<IMaterialSafetyFactor> GetFRFactorsSP164_2014(MaterialTypes materialType)
|
||||
{
|
||||
List<IMaterialSafetyFactor> factors = new List<IMaterialSafetyFactor>();
|
||||
if (materialType == MaterialTypes.CarbonFiber)
|
||||
{
|
||||
GetCarbonFactors(factors);
|
||||
}
|
||||
else if (materialType == MaterialTypes.GlassFiber)
|
||||
{
|
||||
GetGlassFactors(factors);
|
||||
}
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + ": " + materialType);
|
||||
return factors;
|
||||
}
|
||||
private static void GetCarbonFactors(List<IMaterialSafetyFactor> factors)
|
||||
{
|
||||
IMaterialSafetyFactor coefficient;
|
||||
coefficient = FRFactorsFactory.GetCarbonFactor(FRFactorType.ConditionFactor);
|
||||
coefficient.Take = true;
|
||||
factors.Add(coefficient);
|
||||
coefficient = FRFactorsFactory.GetCarbonFactor(FRFactorType.CohesionFactor);
|
||||
coefficient.Take = true;
|
||||
factors.Add(coefficient);
|
||||
coefficient = FRFactorsFactory.GetCarbonFactor(FRFactorType.LongTermFactor);
|
||||
coefficient.Take = true;
|
||||
factors.Add(coefficient);
|
||||
}
|
||||
private static void GetGlassFactors(List<IMaterialSafetyFactor> factors)
|
||||
{
|
||||
IMaterialSafetyFactor coefficient;
|
||||
coefficient = FRFactorsFactory.GetGlassFactor(FRFactorType.ConditionFactor);
|
||||
coefficient.Take = true;
|
||||
factors.Add(coefficient);
|
||||
coefficient = FRFactorsFactory.GetGlassFactor(FRFactorType.CohesionFactor);
|
||||
coefficient.Take = true;
|
||||
factors.Add(coefficient);
|
||||
coefficient = FRFactorsFactory.GetGlassFactor(FRFactorType.LongTermFactor);
|
||||
coefficient.Take = true;
|
||||
factors.Add(coefficient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -11,5 +12,6 @@ namespace StructureHelperLogics.Models.Materials
|
||||
double Modulus { get; set; }
|
||||
double CompressiveStrength { get; set; }
|
||||
double TensileStrength { get; set; }
|
||||
List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
materialOptions.CodesType = LCMB.CodesType.EC2_1990;
|
||||
}
|
||||
else if (codeType == CodeTypes.SP63_13330_2018)
|
||||
else if (codeType == CodeTypes.SP63_2018)
|
||||
{
|
||||
materialOptions.CodesType = LCMB.CodesType.SP63_2018;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using LoaderCalculator.Data.Materials;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
internal class ElasticMaterialLogic : IElasticMaterialLogic
|
||||
{
|
||||
public IMaterial GetLoaderMaterial(IElasticMaterial elasticMaterial, LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
IMaterial material = new Material();
|
||||
material.InitModulus = elasticMaterial.Modulus;
|
||||
IFactorLogic factorLogic = new FactorLogic(elasticMaterial.SafetyFactors);
|
||||
var factors = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||
IEnumerable<double> parameters = new List<double>()
|
||||
{
|
||||
elasticMaterial.Modulus,
|
||||
elasticMaterial.CompressiveStrength * factors.Compressive,
|
||||
elasticMaterial.TensileStrength * factors.Tensile
|
||||
};
|
||||
material.DiagramParameters = parameters;
|
||||
material.Diagram = GetStress;
|
||||
return material;
|
||||
}
|
||||
|
||||
private double GetStress(IEnumerable<double> parameters, double strain)
|
||||
{
|
||||
double modulus = parameters.First();
|
||||
double stress = modulus * strain;
|
||||
double compressiveStrength = (-1d) * parameters.ElementAt(1);
|
||||
double tensileStrength = parameters.ElementAt(2);
|
||||
if (stress > tensileStrength || stress < compressiveStrength) { return 0d; }
|
||||
else { return stress; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using LoaderCalculator.Data.Materials;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
internal interface IElasticMaterialLogic
|
||||
{
|
||||
IMaterial GetLoaderMaterial(IElasticMaterial material, LimitStates limitState, CalcTerms calcTerm);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
materialOptions.CodesType = LCMB.CodesType.EC2_1990;
|
||||
}
|
||||
else if (materialEntity.CodeType == CodeTypes.SP63_13330_2018)
|
||||
else if (materialEntity.CodeType == CodeTypes.SP63_2018)
|
||||
{
|
||||
materialOptions.CodesType = LCMB.CodesType.SP63_2018;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
public class ReinforcementLibMaterial : IReinforcementLibMaterial
|
||||
{
|
||||
private IFactorLogic factorLogic => new FactorLogic(SafetyFactors);
|
||||
public ILibMaterialEntity MaterialEntity { get; set; }
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
|
||||
@@ -33,26 +34,13 @@ namespace StructureHelperLogics.Models.Materials
|
||||
public Loadermaterials.IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
var materialOptions = optionLogic.SetMaterialOptions(MaterialEntity, limitState, calcTerm);
|
||||
var strength = GetStrengthFactors(limitState, calcTerm);
|
||||
materialOptions.ExternalFactor.Compressive = strength.Compressive;
|
||||
materialOptions.ExternalFactor.Tensile = strength.Tensile;
|
||||
var factors = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||
materialOptions.ExternalFactor.Compressive = factors.Compressive;
|
||||
materialOptions.ExternalFactor.Tensile = factors.Tensile;
|
||||
LoaderMaterialBuilders.IMaterialBuilder builder = new LoaderMaterialBuilders.ReinforcementBuilder(materialOptions);
|
||||
LoaderMaterialBuilders.IBuilderDirector director = new LoaderMaterialBuilders.BuilderDirector(builder);
|
||||
return director.BuildMaterial();
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrengthFactors(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
double compressionVal = 1d;
|
||||
double tensionVal = 1d;
|
||||
foreach (var item in SafetyFactors.Where(x => x.Take == true))
|
||||
{
|
||||
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
||||
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
||||
}
|
||||
return (compressionVal, tensionVal);
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
strengthLogic = new LoaderMaterialLogics.TrueStrengthReinforcementLogic(MaterialEntity.MainStrength);
|
||||
@@ -64,7 +52,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
compressionFactor /= 1.15d;
|
||||
tensionFactor /= 1.15d;
|
||||
}
|
||||
var factors = GetStrengthFactors(limitState, calcTerm);
|
||||
var factors = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||
compressionFactor *= factors.Compressive;
|
||||
tensionFactor *= factors.Tensile;
|
||||
var compressiveStrength = strength.Compressive * compressionFactor;
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
point2D = new Point2D() { X = loaderPoint.CenterX, Y = loaderPoint.CenterY };
|
||||
}
|
||||
else point2D = combination.ForcePoint;
|
||||
var newTuple = ForceTupleService.MoveTupleIntoPoint(tuple.ForceTuple, point2D);
|
||||
var newTuple = ForceTupleService.MoveTupleIntoPoint(tuple.ForceTuple, point2D) as ForceTuple;
|
||||
IForcesTupleResult result = GetPrimitiveStrainMatrix(ndms, newTuple);
|
||||
if (CompressedMember.Buckling == true)
|
||||
{
|
||||
@@ -145,9 +145,9 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
return bucklingCalculator;
|
||||
}
|
||||
|
||||
private IForceTuple CalculateBuckling(IForceTuple calcTuple, IConcreteBucklingResult bucklingResult)
|
||||
private ForceTuple CalculateBuckling(ForceTuple calcTuple, IConcreteBucklingResult bucklingResult)
|
||||
{
|
||||
var newTuple = calcTuple.Clone() as IForceTuple;
|
||||
var newTuple = calcTuple.Clone() as ForceTuple;
|
||||
newTuple.Mx *= bucklingResult.EtaFactorAlongY;
|
||||
newTuple.My *= bucklingResult.EtaFactorAlongX;
|
||||
return newTuple;
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
public double CenterX { get; set; }
|
||||
public double CenterY { get; set; }
|
||||
public IHeadMaterial? HeadMaterial { get; set; }
|
||||
public IStrainTuple UsersPrestrain { get; }
|
||||
public IStrainTuple AutoPrestrain { get; }
|
||||
public StrainTuple UsersPrestrain { get; }
|
||||
public StrainTuple AutoPrestrain { get; }
|
||||
public IVisualProperty VisualProperty { get; }
|
||||
public double Diameter { get; set; }
|
||||
public double NdmMaxSize { get; set; }
|
||||
|
||||
@@ -23,8 +23,8 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
/// Flag of triangulation
|
||||
/// </summary>
|
||||
bool Triangulate { get; set; }
|
||||
IStrainTuple UsersPrestrain { get; }
|
||||
IStrainTuple AutoPrestrain { get; }
|
||||
StrainTuple UsersPrestrain { get; }
|
||||
StrainTuple AutoPrestrain { get; }
|
||||
IVisualProperty VisualProperty {get; }
|
||||
|
||||
IEnumerable<INdm> GetNdms(IMaterial material);
|
||||
|
||||
@@ -34,9 +34,9 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
|
||||
public IVisualProperty VisualProperty => throw new NotImplementedException();
|
||||
|
||||
public IStrainTuple UsersPrestrain => throw new NotImplementedException();
|
||||
public StrainTuple UsersPrestrain => throw new NotImplementedException();
|
||||
|
||||
public IStrainTuple AutoPrestrain => throw new NotImplementedException();
|
||||
public StrainTuple AutoPrestrain => throw new NotImplementedException();
|
||||
|
||||
public bool ClearUnderlying { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public bool Triangulate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
@@ -23,8 +23,8 @@ namespace StructureHelperLogics.Models.Primitives
|
||||
public IHeadMaterial HeadMaterial { get; set; }
|
||||
public double NdmMaxSize { get; set; }
|
||||
public int NdmMinDivision { get; set; }
|
||||
public IStrainTuple UsersPrestrain { get; private set; }
|
||||
public IStrainTuple AutoPrestrain { get; private set; }
|
||||
public StrainTuple UsersPrestrain { get; private set; }
|
||||
public StrainTuple AutoPrestrain { get; private set; }
|
||||
public double Area { get; set; }
|
||||
|
||||
public IVisualProperty VisualProperty { get; }
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
public double CenterX { get; set; }
|
||||
public double CenterY { get; set; }
|
||||
public IHeadMaterial? HeadMaterial { get; set; }
|
||||
public IStrainTuple UsersPrestrain { get; private set; }
|
||||
public IStrainTuple AutoPrestrain { get; private set; }
|
||||
public StrainTuple UsersPrestrain { get; private set; }
|
||||
public StrainTuple AutoPrestrain { get; private set; }
|
||||
public double NdmMaxSize { get; set; }
|
||||
public int NdmMinDivision { get; set; }
|
||||
public double Width { get; set; }
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
public IHeadMaterial? HeadMaterial { get; set; }
|
||||
public bool Triangulate { get; set; }
|
||||
|
||||
public IStrainTuple UsersPrestrain { get; private set; }
|
||||
public StrainTuple UsersPrestrain { get; private set; }
|
||||
|
||||
public IStrainTuple AutoPrestrain { get; private set; }
|
||||
public StrainTuple AutoPrestrain { get; private set; }
|
||||
|
||||
public IVisualProperty VisualProperty { get; private set; }
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
|
||||
public int NdmMinDivision { get; }
|
||||
|
||||
public IStrainTuple Prestrain { get; set; }
|
||||
public StrainTuple Prestrain { get; set; }
|
||||
|
||||
public CircleTriangulationLogicOptions(ICirclePrimitive primitive)
|
||||
{
|
||||
@@ -29,9 +29,9 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
NdmMinDivision = primitive.NdmMinDivision;
|
||||
Prestrain = new StrainTuple
|
||||
{
|
||||
Kx = primitive.UsersPrestrain.Kx + primitive.AutoPrestrain.Kx,
|
||||
Ky = primitive.UsersPrestrain.Ky + primitive.AutoPrestrain.Ky,
|
||||
EpsZ = primitive.UsersPrestrain.EpsZ + primitive.AutoPrestrain.EpsZ
|
||||
Mx = primitive.UsersPrestrain.Mx + primitive.AutoPrestrain.Mx,
|
||||
My = primitive.UsersPrestrain.My + primitive.AutoPrestrain.My,
|
||||
Nz = primitive.UsersPrestrain.Nz + primitive.AutoPrestrain.Nz
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
{
|
||||
public interface ITriangulationLogicOptions
|
||||
{
|
||||
IStrainTuple Prestrain { get; set; }
|
||||
StrainTuple Prestrain { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
List<INdm> ndmCollection = new List<INdm>();
|
||||
INdm ndm = new Ndm { CenterX = center.X, CenterY = center.Y, Area = area, Material = material };
|
||||
ndmCollection.Add(ndm);
|
||||
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = options.Prestrain.Kx, Ky = options.Prestrain.Ky, EpsZ = options.Prestrain.EpsZ });
|
||||
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = options.Prestrain.Mx, Ky = options.Prestrain.My, EpsZ = options.Prestrain.Nz });
|
||||
return ndmCollection;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
public IPoint2D Center { get; }
|
||||
/// <inheritdoc />
|
||||
public double Area { get; }
|
||||
public IStrainTuple Prestrain { get; set; }
|
||||
public StrainTuple Prestrain { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -35,9 +35,9 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
Area = primitive.Area;
|
||||
Prestrain = new StrainTuple
|
||||
{
|
||||
Kx = primitive.UsersPrestrain.Kx + primitive.AutoPrestrain.Kx,
|
||||
Ky = primitive.UsersPrestrain.Ky + primitive.AutoPrestrain.Ky,
|
||||
EpsZ = primitive.UsersPrestrain.EpsZ + primitive.AutoPrestrain.EpsZ
|
||||
Mx = primitive.UsersPrestrain.Mx + primitive.AutoPrestrain.Mx,
|
||||
My = primitive.UsersPrestrain.My + primitive.AutoPrestrain.My,
|
||||
Nz = primitive.UsersPrestrain.Nz + primitive.AutoPrestrain.Nz
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
/// <inheritdoc />
|
||||
public int NdmMinDivision { get; }
|
||||
/// <inheritdoc />
|
||||
public IStrainTuple Prestrain { get; set; }
|
||||
public StrainTuple Prestrain { get; set; }
|
||||
|
||||
public RectangleTriangulationLogicOptions(IPoint2D center, IRectangleShape rectangle, double ndmMaxSize, int ndmMinDivision)
|
||||
{
|
||||
@@ -39,9 +39,9 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
NdmMinDivision = primitive.NdmMinDivision;
|
||||
Prestrain = new StrainTuple
|
||||
{
|
||||
Kx = primitive.UsersPrestrain.Kx + primitive.AutoPrestrain.Kx,
|
||||
Ky = primitive.UsersPrestrain.Ky + primitive.AutoPrestrain.Ky,
|
||||
EpsZ = primitive.UsersPrestrain.EpsZ + primitive.AutoPrestrain.EpsZ
|
||||
Mx = primitive.UsersPrestrain.Mx + primitive.AutoPrestrain.Mx,
|
||||
My = primitive.UsersPrestrain.My + primitive.AutoPrestrain.My,
|
||||
Nz = primitive.UsersPrestrain.Nz + primitive.AutoPrestrain.Nz
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
{
|
||||
internal static class TriangulationService
|
||||
{
|
||||
public static void SetPrestrain(IEnumerable<INdm> ndmCollection, IStrainTuple strainTuple)
|
||||
public static void SetPrestrain(IEnumerable<INdm> ndmCollection, StrainTuple strainTuple)
|
||||
{
|
||||
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = strainTuple.Kx, Ky = strainTuple.Ky, EpsZ = strainTuple.EpsZ });
|
||||
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = strainTuple.Mx, Ky = strainTuple.My, EpsZ = strainTuple.Nz });
|
||||
}
|
||||
|
||||
public static void CommonTransform(IEnumerable<INdm> ndmCollection, IShapeTriangulationLogicOptions options)
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace StructureHelperLogics.Services.NdmPrimitives
|
||||
target.CenterX = source.CenterX;
|
||||
target.CenterY = source.CenterY;
|
||||
target.Triangulate = source.Triangulate;
|
||||
StrainTupleService.CopyProperties(source.UsersPrestrain, target.UsersPrestrain);
|
||||
ForceTupleService.CopyProperties(source.UsersPrestrain, target.UsersPrestrain);
|
||||
}
|
||||
|
||||
public static void CopyDivisionProperties(IHasDivisionSize source, IHasDivisionSize target)
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace StructureHelperTests.FunctionalTests.Ndms.Calculators.ForceCalculatorT
|
||||
//Act
|
||||
foreach (var item in ndmPrimitives)
|
||||
{
|
||||
StrainTupleService.CopyProperties(source, item.AutoPrestrain);
|
||||
ForceTupleService.CopyProperties(source, item.AutoPrestrain);
|
||||
}
|
||||
calculator.Run();
|
||||
var result2 = calculator.Result as IForcesResults;
|
||||
|
||||
@@ -11,16 +11,16 @@ namespace StructureHelperTests.UnitTests.MaterialTests
|
||||
{
|
||||
public class MaterialStrengthTest
|
||||
{
|
||||
[TestCase(HeadmaterialType.Reinforecement400, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.ShortTerm, 347826086.95652175d, 347826086.95652175d)]
|
||||
[TestCase(HeadmaterialType.Reinforecement400, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.ShortTerm, 400000000d, 400000000d)]
|
||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.ShortTerm, 400000000.0d, 434782608.69565225d)]
|
||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.LongTerm, 434782608.69565225d, 434782608.69565225d)]
|
||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.ShortTerm, 22461538.46153846d, 1395297.0017909051d)]
|
||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.LongTerm, 20215384.615384616d, 1255767.3016118146d)]
|
||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.ShortTerm, 29200000.0d, 2092945.5026863578d)]
|
||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.LongTerm, 29200000.0d, 2092945.5026863578d)]
|
||||
[TestCase(HeadmaterialType.Reinforecement400, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 347826086.95652175d, 347826086.95652175d)]
|
||||
[TestCase(HeadmaterialType.Reinforecement400, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 400000000d, 400000000d)]
|
||||
[TestCase(HeadmaterialType.Reinforecement500, 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.Reinforecement500, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
||||
[TestCase(HeadmaterialType.Reinforecement500, 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.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.LongTerm, 29200000.0d, 2092945.5026863578d)]
|
||||
public void Run_ShouldPass(HeadmaterialType headmaterialType, CodeTypes code, LimitStates limitState, CalcTerms calcTerm, double expectedCompressive, double expectedTensile)
|
||||
{
|
||||
//Arrange
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Triangulations
|
||||
public void Run_Shouldpass_RectOpeningRect(double centerX, double centerY, double width, double height, bool triangOpening, double expectedArea, double expectedMomX, double expectedMomY)
|
||||
{
|
||||
//Arrange
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||
var mainBlock = new RectanglePrimitive() { CenterX = centerX, CenterY = centerY, Width = width, Height = height, HeadMaterial = material };
|
||||
mainBlock.VisualProperty.ZIndex = 0;
|
||||
var opening = new RectanglePrimitive()
|
||||
@@ -71,7 +71,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Triangulations
|
||||
public void Run_Shouldpass_RectOpeningCircle(double centerX, double centerY, double width, double height, bool triangOpening, double expectedArea, double expectedMomX, double expectedMomY)
|
||||
{
|
||||
//Arrange
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||
var mainBlock = new RectanglePrimitive() { CenterX = centerX, CenterY = centerY, Width = width, Height = height, HeadMaterial = material };
|
||||
mainBlock.VisualProperty.ZIndex = 0;
|
||||
var opening = new CirclePrimitive()
|
||||
@@ -101,7 +101,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Triangulations
|
||||
public void Run_Shouldpass_CircleOpeningRect(double centerX, double centerY, double diameter, bool triangOpening, double expectedArea, double expectedMomX, double expectedMomY)
|
||||
{
|
||||
//Arrange
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||
var mainBlock = new CirclePrimitive() { CenterX = centerX, CenterY = centerY, Diameter = diameter, HeadMaterial = material };
|
||||
mainBlock.VisualProperty.ZIndex = 0;
|
||||
var opening = new RectanglePrimitive()
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace StructureHelperTests.ViewModelTests
|
||||
public void Rectangle_Run_ShouldPass()
|
||||
{
|
||||
//Arrange
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||
var primitive = new RectanglePrimitive(material);
|
||||
var primitiveBase = new RectangleViewPrimitive(primitive);
|
||||
//Act
|
||||
@@ -36,7 +36,7 @@ namespace StructureHelperTests.ViewModelTests
|
||||
public void Circle_Run_ShouldPass()
|
||||
{
|
||||
//Arrange
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||
var primitive = new CirclePrimitive() { HeadMaterial = material};
|
||||
var primitiveBase = new CircleViewPrimitive(primitive);
|
||||
//Act
|
||||
@@ -49,7 +49,7 @@ namespace StructureHelperTests.ViewModelTests
|
||||
public void Point_Run_ShouldPass()
|
||||
{
|
||||
//Arrange
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||
var primitive = new PointPrimitive(material);
|
||||
var primitiveBase = new PointViewPrimitive(primitive);
|
||||
//Act
|
||||
@@ -61,7 +61,7 @@ namespace StructureHelperTests.ViewModelTests
|
||||
public void Reinforcement_Run_ShouldPass()
|
||||
{
|
||||
//Arrange
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||
var primitive = new ReinforcementPrimitive() { HeadMaterial = material };
|
||||
var primitiveBase = new ReinforcementViewPrimitive(primitive);
|
||||
//Act
|
||||
|
||||
Reference in New Issue
Block a user