Templates was added

This commit is contained in:
Evgeny Redikultsev
2022-11-13 15:46:50 +05:00
parent ba609091aa
commit 1e98e2cc57
20 changed files with 550 additions and 161 deletions

View File

@@ -33,12 +33,12 @@ namespace StructureHelperLogics.Models.Materials
if (MaterialType == MaterialTypes.Concrete)
{ return GetConcrete();}
else if (MaterialType == MaterialTypes.Reinforcement)
{ return GetReinfrocemente();}
{ return GetReinfrocement();}
else throw new StructureHelperException($"{ErrorStrings.ObjectTypeIsUnknown}: material type = {MaterialType}, code type = {codeType}");
}
private LCM.IMaterial GetReinfrocemente()
private LCM.IMaterial GetReinfrocement()
{
materialOptions = new LCMB.ReinforcementOptions();
SetMaterialOptions();

View File

@@ -0,0 +1,19 @@
using StructureHelperCommon.Models.Shapes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.Models.Templates.RCs
{
public interface IRectangleBeamTemplate
{
IShape Shape { get; }
double CoverGap { get; set; }
double TopDiameter { get; set; }
double BottomDiameter { get; set; }
int WidthCount { get; set; }
int HeightCount { get; set; }
}
}

View File

@@ -0,0 +1,39 @@
using StructureHelperCommon.Models.Shapes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.Models.Templates.RCs
{
public class RectangleBeamTemplate : IRectangleBeamTemplate
{
public IShape Shape { get; }
public double CoverGap { get; set; }
public double TopDiameter { get; set; }
public double BottomDiameter { get; set; }
public int WidthCount { get; set; }
public int HeightCount { get; set; }
public RectangleBeamTemplate()
{
Shape = new Rectangle() { Width = 0.4d, Height = 0.6d };
CoverGap = 0.05d;
TopDiameter = 0.016d;
BottomDiameter = 0.025d;
WidthCount = 2;
HeightCount = 2;
}
public RectangleBeamTemplate(double width, double height)
{
Shape = new Rectangle() { Width = width, Height = height };
CoverGap = 0.05d;
TopDiameter = 0.016d;
BottomDiameter = 0.025d;
WidthCount = 2;
HeightCount = 2;
}
}
}