Crack Calculator was added
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses;
|
||||
@@ -16,14 +17,14 @@ namespace StructureHelperLogics.Models.CrossSections
|
||||
public List<IForceAction> ForceActions { get; private set; }
|
||||
public List<IHeadMaterial> HeadMaterials { get; private set; }
|
||||
public List<INdmPrimitive> Primitives { get; }
|
||||
public List<INdmCalculator> CalculatorsList { get; private set; }
|
||||
public List<ICalculator> CalculatorsList { get; private set; }
|
||||
|
||||
public CrossSectionRepository()
|
||||
{
|
||||
ForceActions = new List<IForceAction>();
|
||||
HeadMaterials = new List<IHeadMaterial>();
|
||||
Primitives = new List<INdmPrimitive>();
|
||||
CalculatorsList = new List<INdmCalculator>();
|
||||
CalculatorsList = new List<ICalculator>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
@@ -15,6 +16,6 @@ namespace StructureHelperLogics.Models.CrossSections
|
||||
public interface ICrossSectionRepository : IHasHeadMaterials, IHasPrimitives
|
||||
{
|
||||
List<IForceAction> ForceActions { get; }
|
||||
List<INdmCalculator> CalculatorsList { get; }
|
||||
List<ICalculator> CalculatorsList { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StructureHelperLogics.NdmCalculations.Analyses;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -10,9 +11,9 @@ namespace StructureHelperLogics.Models.Templates.CrossSections
|
||||
{
|
||||
internal class CalculatorLogic : ICalculatorLogic
|
||||
{
|
||||
public IEnumerable<INdmCalculator> GetNdmCalculators()
|
||||
public IEnumerable<ICalculator> GetNdmCalculators()
|
||||
{
|
||||
var calculators = new List<INdmCalculator>();
|
||||
var calculators = new List<ICalculator>();
|
||||
calculators.Add(new ForceCalculator() { Name = "New Force Calculator"});
|
||||
return calculators;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
using StructureHelperLogics.NdmCalculations.Analyses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
|
||||
namespace StructureHelperLogics.Models.Templates.CrossSections
|
||||
{
|
||||
internal interface ICalculatorLogic
|
||||
{
|
||||
IEnumerable<INdmCalculator> GetNdmCalculators();
|
||||
IEnumerable<ICalculator> GetNdmCalculators();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,13 +52,14 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
var angle = i * dAngle;
|
||||
var x = radius * Math.Sin(angle);
|
||||
var y = radius * Math.Cos(angle);
|
||||
var point = new ReinforcementPrimitive()
|
||||
{ CenterX = x,
|
||||
CenterY = y,
|
||||
var point = new RebarPrimitive()
|
||||
{
|
||||
Area = barArea,
|
||||
Name = "Left bottom point",
|
||||
HeadMaterial = reinforcementMaterial,
|
||||
HostPrimitive=concreteBlock };
|
||||
point.Center.X = x;
|
||||
point.Center.Y = y;
|
||||
primitives.Add(point);
|
||||
}
|
||||
return primitives;
|
||||
|
||||
@@ -59,13 +59,45 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
double[] ys = new double[] { -height / 2 + gap, height / 2 - gap };
|
||||
|
||||
List<INdmPrimitive> primitives = new List<INdmPrimitive>();
|
||||
var point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[0], Area = area1, Name = "Left bottom point", HeadMaterial = reinforcement, HostPrimitive=concreteBlock };
|
||||
var point = new RebarPrimitive()
|
||||
{
|
||||
Area = area1,
|
||||
Name = "Left bottom point",
|
||||
HeadMaterial = reinforcement,
|
||||
HostPrimitive=concreteBlock
|
||||
};
|
||||
point.Center.X = xs[0];
|
||||
point.Center.Y = ys[0];
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[0], Area = area1, Name = "Right bottom point", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
point = new RebarPrimitive()
|
||||
{
|
||||
Area = area1,
|
||||
Name = "Right bottom point",
|
||||
HeadMaterial = reinforcement,
|
||||
HostPrimitive = concreteBlock
|
||||
};
|
||||
point.Center.X = xs[1];
|
||||
point.Center.Y = ys[0];
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[1], Area = area2, Name = "Left top point", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
point = new RebarPrimitive()
|
||||
{
|
||||
Area = area2,
|
||||
Name = "Left top point",
|
||||
HeadMaterial = reinforcement,
|
||||
HostPrimitive = concreteBlock
|
||||
};
|
||||
point.Center.X = xs[0];
|
||||
point.Center.Y = ys[1];
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[1], Area = area2, Name = "Right top point", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
point = new RebarPrimitive()
|
||||
{
|
||||
Area = area2,
|
||||
Name = "Right top point",
|
||||
HeadMaterial = reinforcement,
|
||||
HostPrimitive = concreteBlock
|
||||
};
|
||||
point.Center.X = xs[1];
|
||||
point.Center.Y = ys[1];
|
||||
primitives.Add(point);
|
||||
return primitives;
|
||||
}
|
||||
@@ -83,10 +115,14 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
double dist = (xs[1] - xs[0]) / count;
|
||||
for (int i = 1; i < count; i++)
|
||||
{
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0] + dist * i, CenterY = ys[0], Area = area1, Name = $"Bottom point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0] + dist * i, CenterY = ys[1], Area = area2, Name = $"Top point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
point = new RebarPrimitive() { Area = area1, Name = $"Bottom point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
point.Center.X = xs[0] + dist * i;
|
||||
point.Center.Y = ys[0];
|
||||
primitives.Add(point);
|
||||
point = new RebarPrimitive() {Area = area2, Name = $"Top point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
point.Center.X = xs[0] + dist * i;
|
||||
point.Center.Y = ys[1];
|
||||
primitives.Add(point);
|
||||
}
|
||||
}
|
||||
if (template.HeightCount > 2)
|
||||
@@ -95,9 +131,25 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
double dist = (ys[1] - ys[0]) / count;
|
||||
for (int i = 1; i < count; i++)
|
||||
{
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[0] + dist * i, Area = area1, Name = $"Left point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
point = new RebarPrimitive()
|
||||
{
|
||||
Area = area1,
|
||||
Name = $"Left point {i}",
|
||||
HeadMaterial = reinforcement,
|
||||
HostPrimitive = concreteBlock
|
||||
};
|
||||
point.Center.X = xs[0];
|
||||
point.Center.Y = ys[0] + dist * i;
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[0] + dist * i, Area = area1, Name = $"Right point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
point = new RebarPrimitive()
|
||||
{
|
||||
Area = area1,
|
||||
Name = $"Right point {i}",
|
||||
HeadMaterial = reinforcement,
|
||||
HostPrimitive = concreteBlock
|
||||
};
|
||||
point.Center.X = xs[1];
|
||||
point.Center.Y = ys[0] + dist * i;
|
||||
primitives.Add(point);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.CrossSections;
|
||||
using StructureHelperLogics.Models.Templates.RCs;
|
||||
@@ -20,7 +21,7 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
ICalculatorLogic calculatorLogic;
|
||||
IEnumerable<INdmPrimitive> primitives;
|
||||
IEnumerable<IForceAction> combinations;
|
||||
IEnumerable<INdmCalculator> calculators;
|
||||
IEnumerable<ICalculator> calculators;
|
||||
|
||||
public SectionTemplate(IRCGeometryLogic geometryLogic)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user