Value point graph was added
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,6 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
IVisualProperty VisualProperty {get; }
|
||||
|
||||
IEnumerable<INdm> GetNdms(ITriangulationOptions triangulationOptions);
|
||||
List<NamedValue<IPoint2D>> GetValuePoints();
|
||||
List<INamedAreaPoint> GetValuePoints();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user