Add converting beam shear analysis from DTOs

This commit is contained in:
Evgeny Redikultsev
2025-06-15 21:11:02 +05:00
parent 4845a35ba5
commit 87996cf37b
48 changed files with 992 additions and 105 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -26,8 +26,8 @@ namespace StructureHelperLogics.Models.BeamShears
private void InitializeStrategies()
{
repositoryUpdateStrategy ??= new BeamShearRepositoryAddUpdateStrategy();
clearStrategy ??= new BeamShearReporitoryClearStrategy();
repositoryUpdateStrategy ??= new BeamShearRepositoryAddUpdateStrategy();
}
}
}

View File

@@ -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>

View File

@@ -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;

View File

@@ -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)