Value point graph was added

This commit is contained in:
Evgeny Redikultsev
2024-03-16 21:46:24 +05:00
parent b81b7a0929
commit f2f6840ffb
28 changed files with 383 additions and 107 deletions

View File

@@ -109,7 +109,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
forcelogic = new ForceTupleMoveToPointDecorator(forcelogic) { Point2D = point2D};
}
var newTuple = forcelogic.GetValue();
TraceLogger?.AddMessage($"Input force combination");
TraceLogger?.AddMessage("Input force combination");
TraceLogger?.AddEntry(new TraceTablesFactory().GetByForceTuple(newTuple));
if (CompressedMember.Buckling == true)
{

View File

@@ -46,7 +46,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
var concreteNdm = ndms[0];
var rebarNdm = ndms[1];
data.ConcreteStrain = concreteNdm.Prestrain;// stressLogic.GetTotalStrain(strainMatrix, concreteNdm) - stressLogic.GetTotalStrainWithPresrain(strainMatrix, concreteNdm);
data.RebarStrain = stressLogic.GetTotalStrainWithPresrain(strainMatrix, rebarNdm);
data.RebarStrain = stressLogic.GetTotalStrainWithPrestrain(strainMatrix, rebarNdm);
data.Length = inputData.Length;
}
}

View File

@@ -32,7 +32,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
var concreteArea = concreteCollection
.Sum(x => x.Area * x.StressScale);
var concreteTensileArea = concreteCollection
.Where(x => stressLogic.GetTotalStrainWithPresrain(StrainMatrix, x) > 0d)
.Where(x => stressLogic.GetTotalStrainWithPrestrain(StrainMatrix, x) > 0d)
.Sum(x => x.Area * x.StressScale);
concreteTensileArea = Math.Max(concreteTensileArea, rebarArea * minRebarFactor);

View File

@@ -74,14 +74,43 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
return true;
}
List<NamedValue<IPoint2D>> INdmPrimitive.GetValuePoints()
List<INamedAreaPoint> INdmPrimitive.GetValuePoints()
{
var points = new List<NamedValue<IPoint2D>>();
NamedValue<IPoint2D> newPoint;
newPoint = new NamedValue<IPoint2D>()
var points = new List<INamedAreaPoint>();
INamedAreaPoint newPoint;
newPoint = new NamedAreaPoint
{
Name = "Center",
Value = Center.Clone() as Point2D
Point = Center.Clone() as Point2D,
Area = 0d
};
points.Add(newPoint);
newPoint = new NamedAreaPoint
{
Name = "Left",
Point = new Point2D() { X = Center.X - Diameter / 2d, Y = Center.Y},
Area = 0d
};
points.Add(newPoint);
newPoint = new NamedAreaPoint
{
Name = "Top",
Point = new Point2D() { X = Center.X, Y = Center.Y + Diameter / 2d },
Area = 0d
};
points.Add(newPoint);
newPoint = new NamedAreaPoint
{
Name = "Right",
Point = new Point2D() { X = Center.X + Diameter / 2d, Y = Center.Y },
Area = 0d
};
points.Add(newPoint);
newPoint = new NamedAreaPoint
{
Name = "Bottom",
Point = new Point2D() { X = Center.X, Y = Center.Y - Diameter / 2d },
Area = 0d
};
points.Add(newPoint);
return points;

View File

@@ -0,0 +1,11 @@
using StructureHelperCommon.Models.Shapes;
namespace StructureHelperLogics.NdmCalculations.Primitives
{
public interface INamedAreaPoint
{
double Area { get; set; }
string Name { get; set; }
Point2D Point { get; set; }
}
}

View File

@@ -29,6 +29,6 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
IVisualProperty VisualProperty {get; }
IEnumerable<INdm> GetNdms(ITriangulationOptions triangulationOptions);
List<NamedValue<IPoint2D>> GetValuePoints();
List<INamedAreaPoint> GetValuePoints();
}
}

View File

@@ -0,0 +1,17 @@
using StructureHelperCommon.Models.Shapes;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.NdmCalculations.Primitives
{
public class NamedAreaPoint : INamedAreaPoint
{
public string Name { get; set; }
public Point2D Point { get; set; }
public double Area { get; set; }
}
}

View File

@@ -56,14 +56,14 @@ namespace StructureHelperLogics.Models.Primitives
return logic.GetNdmCollection();
}
public List<NamedValue<IPoint2D>> GetValuePoints()
public List<INamedAreaPoint> GetValuePoints()
{
var points = new List<NamedValue<IPoint2D>>();
NamedValue<IPoint2D> newPoint;
newPoint = new NamedValue<IPoint2D>()
var points = new List<INamedAreaPoint>();
var newPoint = new NamedAreaPoint()
{
Name = "Center",
Value = Center.Clone() as Point2D
Point = Center.Clone() as Point2D,
Area = Area
};
points.Add(newPoint);
return points;

View File

@@ -77,14 +77,14 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
return logic.GetNdmCollection();
}
public List<NamedValue<IPoint2D>> GetValuePoints()
public List<INamedAreaPoint> GetValuePoints()
{
var points = new List<NamedValue<IPoint2D>>();
NamedValue<IPoint2D> newPoint;
newPoint = new NamedValue<IPoint2D>()
var points = new List<INamedAreaPoint>();
var newPoint = new NamedAreaPoint
{
Name = "Center",
Value = Center.Clone() as Point2D
Point = Center.Clone() as Point2D,
Area = Area
};
points.Add(newPoint);
return points;

View File

@@ -82,20 +82,38 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
return true;
}
public List<NamedValue<IPoint2D>> GetValuePoints()
public List<INamedAreaPoint> GetValuePoints()
{
var points = new List<NamedValue<IPoint2D>>();
NamedValue<IPoint2D> newPoint;
newPoint = new NamedValue<IPoint2D>()
var points = new List<INamedAreaPoint>();
INamedAreaPoint newPoint;
newPoint = new NamedAreaPoint()
{
Name = "Center",
Value = Center.Clone() as Point2D
Point = Center.Clone() as Point2D
};
points.Add(newPoint);
newPoint = new NamedValue<IPoint2D>()
newPoint = new NamedAreaPoint()
{
Name = "LeftTop",
Value = new Point2D() { X = Center.X - Width / 2d, Y = Center.Y + Height / 2d}
Point = new Point2D() { X = Center.X - Width / 2d, Y = Center.Y + Height / 2d}
};
points.Add(newPoint);
newPoint = new NamedAreaPoint()
{
Name = "RightTop",
Point = new Point2D() { X = Center.X + Width / 2d, Y = Center.Y + Height / 2d }
};
points.Add(newPoint);
newPoint = new NamedAreaPoint()
{
Name = "LeftBottom",
Point = new Point2D() { X = Center.X - Width / 2d, Y = Center.Y - Height / 2d }
};
points.Add(newPoint);
newPoint = new NamedAreaPoint()
{
Name = "RightBottom",
Point = new Point2D() { X = Center.X + Width / 2d, Y = Center.Y - Height / 2d }
};
points.Add(newPoint);
return points;