Force combination was added

This commit is contained in:
Evgeny Redikultsev
2022-11-27 17:04:34 +05:00
parent c5e503252e
commit 96b331f14c
52 changed files with 427 additions and 214 deletions

View File

@@ -41,19 +41,19 @@ namespace StructureHelperTests.FunctionalTests.Ndms.RCSections
ITriangulationOptions options = new TriangulationOptions { LimiteState = StructureHelperLogics.Infrastructures.CommonEnums.LimitStates.Collapse, CalcTerm = StructureHelperLogics.Infrastructures.CommonEnums.CalcTerms.ShortTerm };
var ndmPrimitives = new List<INdmPrimitive>();
//Добавляем прямоугольник бетонного сечения
var concreteRectangle = new dContext.Rectangle(new Center { X = 0, Y = 0 }, new Rectangle { Width = width, Height = height, Angle = 0 });
var concreteRectangle = new dContext.Rectangle(new Point2D { X = 0, Y = 0 }, new Rectangle { Width = width, Height = height, Angle = 0 });
ndmPrimitives.Add(concreteRectangle.GetNdmPrimitive());
//Добавляем 4 точки для арматуры
// 0.05 - величина защитного слоя (расстояние от грани прямоугольника до центра арматуры
//С площадью нижней арматуры
var leftBottomReinforcementPoint = new dContext.Point(new Center { X = -width / 2 + 0.05d, Y = -height / 2 + 0.05 }, new Point { Area = bottomArea });
var leftBottomReinforcementPoint = new dContext.Point(new Point2D { X = -width / 2 + 0.05d, Y = -height / 2 + 0.05 }, new Point { Area = bottomArea });
ndmPrimitives.Add(leftBottomReinforcementPoint.GetNdmPrimitive());
var rightBottomReinforcementPoint = new Point(new Center { X = width / 2 - 0.05d, Y = -height / 2 + 0.05 }, new Point { Area = bottomArea });
var rightBottomReinforcementPoint = new Point(new Point2D { X = width / 2 - 0.05d, Y = -height / 2 + 0.05 }, new Point { Area = bottomArea });
ndmPrimitives.Add(rightBottomReinforcementPoint.GetNdmPrimitive());
//С площадью верхней арматуры
var leftTopReinforcementPoint = new dContext.Point(new Center { X = -width / 2 + 0.05d, Y = height / 2 - 0.05 }, new Point { Area = topArea });
var leftTopReinforcementPoint = new dContext.Point(new Point2D { X = -width / 2 + 0.05d, Y = height / 2 - 0.05 }, new Point { Area = topArea });
ndmPrimitives.Add(leftTopReinforcementPoint.GetNdmPrimitive());
var rightTopReinforcementPoint = new dContext.Point(new Center { X = width / 2 - 0.05d, Y = height / 2 - 0.05 }, new Point { Area = topArea });
var rightTopReinforcementPoint = new dContext.Point(new Point2D { X = width / 2 - 0.05d, Y = height / 2 - 0.05 }, new Point { Area = topArea });
ndmPrimitives.Add(rightTopReinforcementPoint.GetNdmPrimitive());
//Формируем коллекцию элементарных участков для расчета в библитеке (т.е. выполняем триангуляцию)
ndmCollection.AddRange(Triangulation.GetNdms(ndmPrimitives, options));

View File

@@ -61,7 +61,7 @@ namespace StructureHelperTests.FunctionalTests.Ndms.RCSections
private IEnumerable<INdmPrimitive> GetConcreteNdms(double width, double height)
{
double strength = 40e6;
ICenter center = new Center { X = 0, Y = 0 };
IPoint2D center = new Point2D { X = 0, Y = 0 };
IRectangleShape rectangle = new RectangleShape { Width = width, Height = height, Angle = 0 };
IPrimitiveMaterial material = new PrimitiveMaterial { MaterialType = MaterialTypes.Concrete, ClassName = "С40", Strength = strength };
//ITriangulationOptions options = new TriangulationOptions() { LimiteState = StructureHelperLogics.Infrastructures.CommonEnums.LimitStates.Collapse, CalcTerm = StructureHelperLogics.Infrastructures.CommonEnums.CalcTerms.ShortTerm };
@@ -78,10 +78,10 @@ namespace StructureHelperTests.FunctionalTests.Ndms.RCSections
IShape bottomReinforcement = new PointShape { Area = bottomArea };
IPrimitiveMaterial primitiveMaterial = new PrimitiveMaterial { MaterialType = MaterialTypes.Reinforcement, ClassName = "S400", Strength = strength };
//ITriangulationOptions options = new TriangulationOptions() { LimiteState = StructureHelperLogics.Infrastructures.CommonEnums.LimitStates.Collapse, CalcTerm = StructureHelperLogics.Infrastructures.CommonEnums.CalcTerms.ShortTerm };
ICenter centerRT = new Center { X = width / 2 - gap, Y = height / 2 - gap };
ICenter centerLT = new Center { X = - (width / 2 - gap), Y = height / 2 - gap };
ICenter centerRB = new Center { X = width / 2 - gap, Y = - (height / 2 - gap) };
ICenter centerLB = new Center { X = -(width / 2 - gap), Y = - (height / 2 - gap) };
IPoint2D centerRT = new Point2D { X = width / 2 - gap, Y = height / 2 - gap };
IPoint2D centerLT = new Point2D { X = - (width / 2 - gap), Y = height / 2 - gap };
IPoint2D centerRB = new Point2D { X = width / 2 - gap, Y = - (height / 2 - gap) };
IPoint2D centerLB = new Point2D { X = -(width / 2 - gap), Y = - (height / 2 - gap) };
List<INdmPrimitive> primitives = new List<INdmPrimitive>();
INdmPrimitive primitive;
//Right top bar

View File

@@ -21,7 +21,7 @@ namespace StructureHelperTests.FunctionalTests.Ndms.SteelSections
public void Run_ShouldPass(double width, double height, double strength, double mx, double my, double nz, double expectedKx, double expectedKy, double expectedEpsilonZ)
{
//Arrange
ICenter center = new Center { X = 0, Y = 0 };
IPoint2D center = new Point2D { X = 0, Y = 0 };
IRectangleShape rectangle = new RectangleShape { Width = width, Height = height, Angle = 0 };
IPrimitiveMaterial material = new PrimitiveMaterial { MaterialType = MaterialTypes.Reinforcement, ClassName = "S400", Strength = strength };
ITriangulationOptions options = new TriangulationOptions { LimiteState = StructureHelperLogics.Infrastructures.CommonEnums.LimitStates.Collapse, CalcTerm = StructureHelperLogics.Infrastructures.CommonEnums.CalcTerms.ShortTerm };

View File

@@ -21,7 +21,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Triangulations
{
//Arrange
IMaterial material = new Material();
ICenter center = new Center { X = centerX, Y = centerY };
IPoint2D center = new Point2D { X = centerX, Y = centerY };
IRectangleShape rectangle = new RectangleShape { Width = width, Height = height, Angle = angle };
IRectangleTriangulationLogicOptions options = new StructureHelperLogics.NdmCalculations.Triangulations.RectangleTriangulationLogicOptions(center, rectangle, ndmMaxSize, ndmMinDivision);
IRectangleTriangulationLogic logic = new StructureHelperLogics.NdmCalculations.Triangulations.RectangleTriangulationLogic(options);