Files
StructureHelper/StructureHelperLogics/Models/Materials/FunctionMaterial.cs
2025-01-28 14:31:34 +05:00

50 lines
1.5 KiB
C#

using LoaderCalculator.Data.Materials;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Models.Materials.Libraries;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.Models.Materials
{
public class FunctionMaterial
{
private IElasticMaterialLogic elasticMaterialLogic => new ElasticMaterialLogic();
public double Modulus { get; set; }
public double CompressiveStrength { get; set; }
public double TensileStrength { get; set; }
public List<IMaterialSafetyFactor> SafetyFactors { get; } = new();
public Guid Id { get; }
public FunctionMaterial(Guid id)
{
Id = id;
}
public FunctionMaterial() : this(Guid.NewGuid())
{
}
public IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
{
var material = elasticMaterialLogic.GetLoaderMaterial(this, limitState, calcTerm);
return material;
}
public object Clone()
{
var newItem = new ElasticMaterial();
var updateStrategy = new ElasticUpdateStrategy();
updateStrategy.Update(newItem, this);
return newItem;
}
public IMaterial GetCrackedLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
{
return GetLoaderMaterial(limitState, calcTerm);
}
}
}