Add steel material saving

This commit is contained in:
Evgeny Redikultsev
2025-12-20 21:32:02 +05:00
parent 68b15682bb
commit 7e82e5ee9d
47 changed files with 1160 additions and 381 deletions

View File

@@ -1,6 +1,7 @@
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Models.Materials.Libraries;
using StructureHelperCommon.Models.Materials.Libraries.Factories;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -18,6 +19,22 @@ namespace StructureHelperLogics.Models.Materials
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + ": " + codeType);
}
public static List<IMaterialSafetyFactor> GetDefaultSteelSafetyFactors(CodeTypes codeType)
{
if (codeType == CodeTypes.SP16_2017) return GetSteelFactorsSP16_2017();
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + ": " + codeType);
}
private static List<IMaterialSafetyFactor> GetSteelFactorsSP16_2017()
{
List<IMaterialSafetyFactor> factors = new List<IMaterialSafetyFactor>();
IMaterialSafetyFactor coefficient;
coefficient = SteelFactorsFactory.GetFactor(SteelFactorTypes.WorkCondition);
coefficient.Take = true;
factors.Add(coefficient);
return factors;
}
public static List<IMaterialSafetyFactor> GetDefaultFRSafetyFactors(CodeTypes codeType, MaterialTypes materialType)
{
if (codeType == CodeTypes.SP164_2014) return GetFRFactorsSP164_2014(materialType);