Change shear calculator add crack export to excel

This commit is contained in:
Evgeny Redikultsev
2025-06-21 21:34:20 +05:00
parent 4fbb3f3658
commit 1ebe1bbcd1
47 changed files with 980 additions and 378 deletions

View File

@@ -35,7 +35,7 @@ namespace StructureHelperLogics.Models.BeamShears.Logics
}
else
{
if (Entity.Material is null)
if (Entity.ConcreteMaterial is null)
{
result = false;
TraceMessage($"\nMaterial of cross-section is not assigned");

View File

@@ -0,0 +1,50 @@
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Models;
namespace StructureHelperLogics.Models.BeamShears
{
internal class CheckSectionLogicInputDataLogic : ICheckInputDataLogic<IBeamShearSectionLogicInputData>
{
private bool result;
private string checkResult;
public CheckSectionLogicInputDataLogic(IShiftTraceLogger? traceLogger)
{
TraceLogger = traceLogger;
}
public IBeamShearSectionLogicInputData InputData { get; set; }
public string CheckResult => checkResult;
public IShiftTraceLogger? TraceLogger { get; set; }
public bool Check()
{
result = true;
checkResult = string.Empty;
if (InputData is null)
{
result = false;
string errorString = ErrorStrings.ParameterIsNull + ": Input data";
throw new StructureHelperException(errorString);
}
if (InputData.ForceTuple is null)
{
result = false;
TraceMessage("Force tuple is null");
}
if (InputData.ForceTuple.Qy < 0)
{
result = false;
TraceMessage($"Shear force Qy = {InputData.ForceTuple.Qy} must be positive");
}
return result;
}
private void TraceMessage(string errorString)
{
checkResult += errorString;
TraceLogger?.AddMessage(errorString);
}
}
}