Add beam shear window

This commit is contained in:
Evgeny Redikultsev
2025-03-02 21:30:39 +05:00
parent e4a23f5139
commit 382ff6ed36
63 changed files with 886 additions and 134 deletions

View File

@@ -0,0 +1,43 @@
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 StructureHelperLogics.Models.BeamShears
{
public enum ShearSectionTemplateTypes
{
Rectangle,
}
public static class BeamShearTemplatesFactory
{
public static IBeamShearRepository GetTemplateRepository(ShearSectionTemplateTypes templateType)
{
if (templateType is ShearSectionTemplateTypes.Rectangle)
{
return GetRectangleSection();
}
else
{
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(templateType));
}
}
private static IBeamShearRepository GetRectangleSection()
{
BeamShearRepository shearRepository = new(Guid.Empty);
BeamShearSection section = new(Guid.Empty) { Name = "New shear section"};
shearRepository.ShearSections.Add(section);
StirrupByUniformRebar stirrupByUniformRebar = new(Guid.Empty) { Name = "New uniform stirrup"};
shearRepository.Stirrups.Add(stirrupByUniformRebar);
BeamShearCalculator beamShearCalculator = new(Guid.Empty) { Name = "New shear calculator"};
beamShearCalculator.InputData.ShearSections.Add(section);
beamShearCalculator.InputData.Stirrups.Add(stirrupByUniformRebar);
shearRepository.Calculators.Add(beamShearCalculator);
return shearRepository;
}
}
}