Force crack calculator was fixed

This commit is contained in:
RedikultsevEvg
2024-08-04 23:01:10 +05:00
parent e7c7211f54
commit 3eb5aa2b96
54 changed files with 1031 additions and 300 deletions

View File

@@ -0,0 +1,39 @@
using LoaderCalculator;
using LoaderCalculator.Data.Ndms;
using StructureHelperCommon.Models;
using StructureHelperCommon.Models.Forces;
using StructureHelperCommon.Services.Forces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.NdmCalculations.Cracking
{
public class IsSectionCrackedByFactorLogic : IIsSectionCrackedByFactorLogic
{
public IIsSectionCrackedByForceLogic IsSectionCrackedByForceLogic { get; set; }
public IForceTuple StartTuple { get; set; }
public IForceTuple EndTuple { get; set; }
public IShiftTraceLogger? TraceLogger { get; set; }
public IsSectionCrackedByFactorLogic(IIsSectionCrackedByForceLogic sectionLogic)
{
IsSectionCrackedByForceLogic = sectionLogic;
}
public IsSectionCrackedByFactorLogic() : this(new IsSectionCrackedByForceLogic())
{
}
public bool IsSectionCracked(double factor)
{
IsSectionCrackedByForceLogic.TraceLogger ??= TraceLogger?.GetSimilarTraceLogger(50);
var actualTuple = ForceTupleService.InterpolateTuples(EndTuple, StartTuple, factor);
IsSectionCrackedByForceLogic.Tuple = actualTuple;
return IsSectionCrackedByForceLogic.IsSectionCracked();
}
}
}