Add converting beam shear analysis from DTOs
This commit is contained in:
@@ -73,13 +73,18 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
private void GetSections()
|
||||
{
|
||||
actionResults = new();
|
||||
List<IStirrup> stirrups = inputData.Stirrups.ToList();
|
||||
if (stirrups.Any() == false)
|
||||
{
|
||||
stirrups.Add(new StirrupByDensity(Guid.NewGuid()) { StirrupDensity = 0 });
|
||||
}
|
||||
foreach (var beamShearAction in inputData.Actions)
|
||||
{
|
||||
foreach (var calcTerm in calcTerms)
|
||||
{
|
||||
foreach (var section in inputData.Sections)
|
||||
{
|
||||
foreach (var stirrup in inputData.Stirrups)
|
||||
foreach (var stirrup in stirrups)
|
||||
{
|
||||
List<IInclinedSection> inclinedSections = GetInclinedSections(section);
|
||||
List<IBeamShearSectionLogicInputData> sectionInputDatas = GetSectionInputDatas(beamShearAction, calcTerm, section, stirrup, inclinedSections);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
/// <inheritdoc/>
|
||||
public IConcreteLibMaterial Material { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IShape Shape { get; } = new RectangleShape(Guid.NewGuid()) { Height = 0.6, Width = 0.4};
|
||||
public IShape Shape { get; set; } = new RectangleShape(Guid.NewGuid()) { Height = 0.6, Width = 0.4};
|
||||
|
||||
public double CenterCover { get; set; } = 0.05;
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
|
||||
private void InitializeStrategies()
|
||||
{
|
||||
repositoryUpdateStrategy ??= new BeamShearRepositoryAddUpdateStrategy();
|
||||
clearStrategy ??= new BeamShearReporitoryClearStrategy();
|
||||
repositoryUpdateStrategy ??= new BeamShearRepositoryAddUpdateStrategy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
/// <summary>
|
||||
/// Shape of cross-section
|
||||
/// </summary>
|
||||
IShape Shape { get; }
|
||||
IShape Shape { get; set; }
|
||||
/// <summary>
|
||||
/// Distance from edge of tension zone to center of the nearest reinforcement bar
|
||||
/// </summary>
|
||||
|
||||
@@ -4,7 +4,7 @@ using StructureHelperCommon.Services;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
internal class BeamShearCalculatorInputDataUpdateStrategy : IUpdateStrategy<IBeamShearCalculatorInputData>
|
||||
public class BeamShearCalculatorInputDataUpdateStrategy : IUpdateStrategy<IBeamShearCalculatorInputData>
|
||||
{
|
||||
private IUpdateStrategy<IHasBeamShearActions>? hasActionUpdateStrategy;
|
||||
private IUpdateStrategy<IHasStirrups>? hasStirrupsUpdateStrategy;
|
||||
|
||||
@@ -4,6 +4,9 @@ using StructureHelperCommon.Services;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
/// <summary>
|
||||
/// Add objects from one repository to another one without deleting previous objects
|
||||
/// </summary>
|
||||
public class BeamShearRepositoryAddUpdateStrategy : IUpdateStrategy<IBeamShearRepository>
|
||||
{
|
||||
public void Update(IBeamShearRepository targetObject, IBeamShearRepository sourceObject)
|
||||
|
||||
Reference in New Issue
Block a user