Add beam shear converting to DTO
This commit is contained in:
@@ -9,9 +9,9 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
private ICloneStrategy<IBeamShearRepository> cloneStrategy;
|
||||
public Guid Id { get; }
|
||||
public List<IBeamShearAction> Actions { get; } = new();
|
||||
public List<ICalculator> Calculators { get; } = new();
|
||||
public List<IBeamShearSection> Sections { get; } = new();
|
||||
public List<IStirrup> Stirrups { get; } = new();
|
||||
public List<ICalculator> Calculators { get; } = new();
|
||||
|
||||
|
||||
public BeamShearRepository(Guid id)
|
||||
|
||||
@@ -33,11 +33,11 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
IBeamShearAction shearAction = BeamShearActionFactory.GetBeamShearAction(ShearActionTypes.DistributedLoad);
|
||||
shearAction.Name = "New shear action";
|
||||
shearRepository.Actions.Add(shearAction);
|
||||
BeamShearSection section = new(Guid.Empty) { Name = "New shear section"};
|
||||
BeamShearSection section = new(Guid.NewGuid()) { Name = "New shear section"};
|
||||
shearRepository.Sections.Add(section);
|
||||
StirrupByRebar stirrupByUniformRebar = new(Guid.Empty) { Name = "New uniform stirrup"};
|
||||
StirrupByRebar stirrupByUniformRebar = new(Guid.NewGuid()) { Name = "New uniform stirrup"};
|
||||
shearRepository.Stirrups.Add(stirrupByUniformRebar);
|
||||
BeamShearCalculator beamShearCalculator = new(Guid.Empty) { Name = "New shear calculator"};
|
||||
BeamShearCalculator beamShearCalculator = new(Guid.NewGuid()) { Name = "New shear calculator"};
|
||||
beamShearCalculator.InputData.Sections.Add(section);
|
||||
beamShearCalculator.InputData.Stirrups.Add(stirrupByUniformRebar);
|
||||
beamShearCalculator.InputData.Actions.Add(shearAction);
|
||||
|
||||
@@ -10,6 +10,5 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
public interface IBeamShearCalculator : ICalculator
|
||||
{
|
||||
IBeamShearCalculatorInputData InputData { get; set; }
|
||||
bool ShowTraceData { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using StructureHelperCommon.Models.Calculators;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
public interface IBeamShearRepository : ISaveable, IHasBeamShearActions, IHasCalculators, IHasBeamShearSections, IHasStirrups, ICloneable
|
||||
public interface IBeamShearRepository : ISaveable, IHasBeamShearActions, IHasBeamShearSections, IHasStirrups,IHasCalculators, ICloneable
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IResult Result { get; private set; }
|
||||
|
||||
public bool ShowTraceData { get; set; }
|
||||
|
||||
public ForceCalculator(
|
||||
ICheckInputDataLogic<IForceCalculatorInputData> checkInputDataLogic,
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
private IForceTupleCalcLogic calcLogic;
|
||||
|
||||
public IForceTupleInputData InputData { get; set; }
|
||||
public string Name { get; set; }
|
||||
public IResult Result => result;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
/// <summary>
|
||||
/// Calculator for obtaining solution from loader calculator
|
||||
/// </summary>
|
||||
public interface IForceTupleCalculator : ICalculator, IHasActionByResult
|
||||
public interface IForceTupleCalculator : ILogicCalculator, IHasActionByResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Input data for analysis
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface ILimitCurveCalculator : ICalculator, IHasActionByResult
|
||||
public interface ILimitCurveCalculator : ILogicCalculator, IHasActionByResult
|
||||
{
|
||||
Action<IResult> ActionToOutputResults { get; set; }
|
||||
ISurroundData SurroundData { get; set; }
|
||||
|
||||
@@ -20,18 +20,14 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
private LimitCurvesCalculatorUpdateStrategy updateStrategy => new();
|
||||
|
||||
public Guid Id { get; }
|
||||
public string Name { get; set; }
|
||||
public ILimitCurvesCalculatorInputData InputData { get; set; }
|
||||
public string Name { get; set; } = "New calculator";
|
||||
public ILimitCurvesCalculatorInputData InputData { get; set; } = new LimitCurvesCalculatorInputData();
|
||||
public IResult Result => result;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
public bool ShowTraceData { get; set; } = false;
|
||||
|
||||
public LimitCurvesCalculator()
|
||||
{
|
||||
Name = "New calculator";
|
||||
InputData = new LimitCurvesCalculatorInputData();
|
||||
}
|
||||
public void Run()
|
||||
{
|
||||
TraceLogger?.AddMessage($"Calculator type: {GetType()}", TraceLogStatuses.Service);
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Sections;
|
||||
using StructureHelperCommon.Services;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics
|
||||
@@ -19,6 +17,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.Name = sourceObject.Name;
|
||||
targetObject.ShowTraceData = sourceObject.ShowTraceData;
|
||||
targetObject.InputData ??= new ForceCalculatorInputData();
|
||||
inputDataUpdateStrategy.Update(targetObject.InputData, sourceObject.InputData);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Geometry
|
||||
{
|
||||
IParametersLogic parametersLogic;
|
||||
IGeometryResult geometryResult;
|
||||
public string Name { get; set; }
|
||||
|
||||
public IResult Result => geometryResult;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.Geometry
|
||||
{
|
||||
public interface IGeometryCalculator : ICalculator
|
||||
public interface IGeometryCalculator : ILogicCalculator
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,6 @@ namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||
IForcesTupleResult forcesResults;
|
||||
private ITriangulatePrimitiveLogic triangulateLogic;
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public IResult Result { get; private set; }
|
||||
|
||||
public IAccuracy Accuracy { get; set; }
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||
{
|
||||
internal interface IConcreteBucklingCalculator : ICalculator
|
||||
internal interface IConcreteBucklingCalculator : ILogicCalculator
|
||||
{
|
||||
IAccuracy Accuracy { get; set; }
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
public IResult Result => result;
|
||||
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public bool ShowTraceData { get; set; }
|
||||
|
||||
public CrackCalculator(ICheckInputDataLogic<ICrackCalculatorInputData> checkInputDataLogic,
|
||||
IUpdateStrategy<ICrackCalculator> updateStrategy,
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
@@ -22,8 +17,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
|
||||
targetObject.Name = sourceObject.Name;
|
||||
targetObject.ShowTraceData = sourceObject.ShowTraceData;
|
||||
targetObject.InputData ??= new CrackCalculatorInputData();
|
||||
inputDataUpdateStrategy.Update(targetObject.InputData, sourceObject.InputData);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Infrastructures.Settings;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Services;
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics;
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class CrackForceSteppedSearchCalculator : ICrackForceCalculator
|
||||
{
|
||||
public ICrackForceCalculatorInputData InputData { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public IResult Result => throw new NotImplementedException();
|
||||
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public Guid Id => throw new NotImplementedException();
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Run()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public interface ICrackForceCalculator : ICalculator
|
||||
public interface ICrackForceCalculator : ILogicCalculator
|
||||
{
|
||||
ICrackForceCalculatorInputData InputData { get; set; }
|
||||
string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using StructureHelperCommon.Models.Calculators;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public interface IRebarCrackCalculator : ICalculator
|
||||
public interface IRebarCrackCalculator : ILogicCalculator
|
||||
{
|
||||
Action<IResult> ActionToOutputResults { get; set; }
|
||||
RebarCrackCalculatorInputData InputData { get; set; }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public interface IRebarStressCalculator : ICalculator
|
||||
public interface IRebarStressCalculator : ILogicCalculator
|
||||
{
|
||||
IRebarStressCalculatorInputData InputData { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Loggers;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
@@ -15,7 +11,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
private RebarCrackResult result;
|
||||
private ICheckInputDataLogic<IRebarCrackCalculatorInputData> checkInputDataLogic;
|
||||
|
||||
public string Name { get; set; }
|
||||
public RebarCrackCalculatorInputData InputData { get; set; }
|
||||
public IResult Result => result;
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
private RebarStressResult result;
|
||||
|
||||
public IRebarStressCalculatorInputData InputData { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public IResult Result => result;
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
@@ -10,15 +8,13 @@ using StructureHelperCommon.Models.Loggers;
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using StructureHelperLogics.Services.NdmPrimitives;
|
||||
|
||||
//Copyright (c) 2024 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class TupleCrackCalculator : ICalculator
|
||||
public class TupleCrackCalculator : ILogicCalculator
|
||||
{
|
||||
private const CalcTerms crackingTerm = CalcTerms.ShortTerm;
|
||||
private const LimitStates crackingLimitState = LimitStates.SLS;
|
||||
@@ -37,7 +33,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
private double shortLength;
|
||||
private ICheckInputDataLogic<TupleCrackInputData> checkInputDataLogic;
|
||||
|
||||
public string Name { get; set; }
|
||||
public TupleCrackInputData InputData { get; set; }
|
||||
public IResult Result => result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user