Files
StructureHelper/StructureHelperLogics/Models/BeamShears/Factories/SectionEffectivenessFactory.cs
Evgeny Redikultsev f60d031f91 Add beam section logic
2025-02-09 17:28:33 +05:00

53 lines
1.6 KiB
C#

using StructureHelperCommon.Infrastructures.Exceptions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.Models.BeamShears
{
public static class SectionEffectivenessFactory
{
public static ISectionEffectiveness GetSheaEffectiveness(BeamShearSectionType sectionType)
{
if (sectionType == BeamShearSectionType.Rectangle)
{
return GetRectangleEffectiveness();
}
else if (sectionType == BeamShearSectionType.Circle)
{
return GetCircleEffectiveness();
}
else
{
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(sectionType));
}
}
private static ISectionEffectiveness GetCircleEffectiveness()
{
SectionEffectiveness sectionEffectiveness = new()
{
BaseShapeFactor = 1.5,
MaxCrackLengthRatio = 3,
MinCrackLengthRatio = 0.6,
ShapeFactor = 0.6
};
return sectionEffectiveness;
}
private static ISectionEffectiveness GetRectangleEffectiveness()
{
SectionEffectiveness sectionEffectiveness = new()
{
BaseShapeFactor = 1.5,
MaxCrackLengthRatio = 3,
MinCrackLengthRatio = 0.6,
ShapeFactor = 1
};
return sectionEffectiveness;
}
}
}