Surrounding property was added
This commit is contained in:
@@ -25,12 +25,12 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public string Name { get; set; }
|
||||
public List<LimitStates> LimitStatesList { get; }
|
||||
public List<CalcTerms> CalcTermsList { get; }
|
||||
public List<IForceCombinationList> ForceCombinationLists { get; }
|
||||
public List<IForceAction> ForceActions { get; }
|
||||
public List<INdmPrimitive> Primitives { get; }
|
||||
public INdmResult Result { get; private set; }
|
||||
public ICompressedMember CompressedMember { get; }
|
||||
public IAccuracy Accuracy { get; set; }
|
||||
|
||||
public List<IForceCombinationList> ForceCombinationLists { get; private set; }
|
||||
public void Run()
|
||||
{
|
||||
var checkResult = CheckInputData();
|
||||
@@ -39,7 +39,11 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
Result = new ForcesResults() { IsValid = false, Desctription = checkResult };
|
||||
return;
|
||||
}
|
||||
else { CalculateResult(); }
|
||||
else
|
||||
{
|
||||
GetCombinations();
|
||||
CalculateResult();
|
||||
}
|
||||
}
|
||||
|
||||
private void CalculateResult()
|
||||
@@ -103,6 +107,15 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
Result = ndmResult;
|
||||
}
|
||||
|
||||
private void GetCombinations()
|
||||
{
|
||||
ForceCombinationLists = new List<IForceCombinationList>();
|
||||
foreach (var item in ForceActions)
|
||||
{
|
||||
ForceCombinationLists.Add(item.GetCombinations());
|
||||
}
|
||||
}
|
||||
|
||||
private IForceTuple GetLongTuple(List<IDesignForceTuple> designForces, LimitStates limitState)
|
||||
{
|
||||
IForceTuple longTuple;
|
||||
@@ -143,7 +156,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
string result = "";
|
||||
NdmPrimitivesService.CheckPrimitives(Primitives);
|
||||
if (ForceCombinationLists.Count == 0) { result += "Calculator does not contain any forces \n"; }
|
||||
if (ForceActions.Count == 0) { result += "Calculator does not contain any forces \n"; }
|
||||
if (LimitStatesList.Count == 0) { result += "Calculator does not contain any limit states \n"; }
|
||||
if (CalcTermsList.Count == 0) { result += "Calculator does not contain any duration \n"; }
|
||||
return result;
|
||||
@@ -151,7 +164,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
public ForceCalculator()
|
||||
{
|
||||
ForceCombinationLists = new List<IForceCombinationList>();
|
||||
ForceActions = new List<IForceAction>();
|
||||
Primitives = new List<INdmPrimitive>();
|
||||
CompressedMember = new CompressedMember() { Buckling = false };
|
||||
Accuracy = new Accuracy() { IterationAccuracy = 0.001d, MaxIterationCount = 1000 };
|
||||
@@ -177,7 +190,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
AccuracyService.CopyProperties(Accuracy, target.Accuracy);
|
||||
CompressedMemberServices.CopyProperties(CompressedMember, target.CompressedMember);
|
||||
target.Primitives.AddRange(Primitives);
|
||||
target.ForceCombinationLists.AddRange(ForceCombinationLists);
|
||||
target.ForceActions.AddRange(ForceActions);
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,5 +15,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
List<LimitStates> LimitStatesList { get; }
|
||||
ICompressedMember CompressedMember { get; }
|
||||
IAccuracy Accuracy { get; set; }
|
||||
List<IForceCombinationList> ForceCombinationLists { get;}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using StructureHelper.Models.Materials;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperCommon.Services.ShapeServices;
|
||||
using StructureHelperLogics.Models.CrossSections;
|
||||
using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using StructureHelperLogics.Services.NdmPrimitives;
|
||||
using System;
|
||||
@@ -29,6 +30,7 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
public int NdmMinDivision { get; set; }
|
||||
public bool ClearUnderlying { get; set; }
|
||||
public bool Triangulate { get; set; }
|
||||
public ICrossSection? CrossSection { get; set; }
|
||||
|
||||
public CirclePrimitive()
|
||||
{
|
||||
|
||||
@@ -6,8 +6,8 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
{
|
||||
public interface IHasSorroundingPrimitive
|
||||
public interface IHasSurroundingPrimitive
|
||||
{
|
||||
INdmPrimitive SorroundingPrimitive { get; set; }
|
||||
INdmPrimitive? SurroundingPrimitive { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ using System.Collections.Generic;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.CrossSections;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
{
|
||||
@@ -16,6 +17,7 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
string? Name { get; set; }
|
||||
double CenterX { get; set; }
|
||||
double CenterY { get; set; }
|
||||
ICrossSection? CrossSection { get; set; }
|
||||
IHeadMaterial? HeadMaterial { get; set; }
|
||||
/// <summary>
|
||||
/// Flag of triangulation
|
||||
|
||||
@@ -10,6 +10,7 @@ using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using StructureHelperLogics.Services.NdmPrimitives;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.CrossSections;
|
||||
|
||||
namespace StructureHelperLogics.Models.Primitives
|
||||
{
|
||||
@@ -28,6 +29,7 @@ namespace StructureHelperLogics.Models.Primitives
|
||||
|
||||
public IVisualProperty VisualProperty { get; }
|
||||
public bool Triangulate { get; set; }
|
||||
public ICrossSection? CrossSection { get; set; }
|
||||
|
||||
public PointPrimitive()
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperCommon.Services.ShapeServices;
|
||||
using StructureHelperLogics.Models.CrossSections;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using StructureHelperLogics.Services.NdmPrimitives;
|
||||
@@ -33,7 +34,7 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
public bool ClearUnderlying { get; set; }
|
||||
public bool Triangulate { get; set; }
|
||||
public IVisualProperty VisualProperty { get; }
|
||||
|
||||
public ICrossSection? CrossSection { get; set; }
|
||||
|
||||
public RectanglePrimitive()
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.CrossSections;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using StructureHelperLogics.Services.NdmPrimitives;
|
||||
@@ -15,7 +16,7 @@ using System.Windows.Media.Media3D;
|
||||
namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class ReinforcementPrimitive : IPointPrimitive, IHasSorroundingPrimitive
|
||||
public class ReinforcementPrimitive : IPointPrimitive, IHasSurroundingPrimitive
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name { get; set; }
|
||||
@@ -35,7 +36,8 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
|
||||
public int Id { get; set; }
|
||||
public double Area { get; set; }
|
||||
public INdmPrimitive SorroundingPrimitive { get; set; }
|
||||
public INdmPrimitive SurroundingPrimitive { get; set; }
|
||||
public ICrossSection? CrossSection { get; set; }
|
||||
|
||||
public ReinforcementPrimitive()
|
||||
{
|
||||
@@ -52,7 +54,7 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
var primitive = new ReinforcementPrimitive();
|
||||
NdmPrimitivesService.CopyNdmProperties(this, primitive);
|
||||
primitive.Area = Area;
|
||||
primitive.SorroundingPrimitive = this.SorroundingPrimitive;
|
||||
primitive.SurroundingPrimitive = SurroundingPrimitive;
|
||||
return primitive;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user