LinePrimitive and RectanglePrimitive was added

This commit is contained in:
Evgeny Redikultsev
2022-11-19 21:12:55 +05:00
parent 667b91cbfa
commit b566373f16
37 changed files with 544 additions and 69 deletions

View File

@@ -10,11 +10,11 @@
/// Coordinate of center of rectangle by local axis X, m
/// Координата центра вдоль локальной оси X, м
/// </summary>
double X { get;}
double X { get; set; }
/// <summary>
/// Coordinate of center of rectangle by local axis Y, m
/// Координата центра вдоль локальной оси Y, м
/// </summary>
double Y { get;}
double Y { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Shapes
{
public interface ILineShape : IShape
{
ICenter StartPoint { get; set; }
ICenter EndPoint { get; set; }
double Thickness { get; set; }
}
}

View File

@@ -1,18 +1,18 @@
namespace StructureHelperCommon.Models.Shapes
{
public interface IRectangle : IShape
public interface IRectangleShape : IShape
{
/// <summary>
/// Width of rectangle, m
/// </summary>
double Width { get; }
double Width { get; set; }
/// <summary>
/// Height of rectangle, m
/// </summary>
double Height { get; }
double Height { get; set; }
/// <summary>
/// Angle of rotating rectangle, rad
/// </summary>
double Angle { get; }
double Angle { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Shapes
{
/// <inheritdoc />
public class LineShape : ILineShape
{
/// <inheritdoc />
public ICenter StartPoint { get; set; }
/// <inheritdoc />
public ICenter EndPoint { get; set; }
/// <inheritdoc />
public double Thickness { get; set; }
public LineShape()
{
StartPoint = new Center();
EndPoint = new Center();
Thickness = 0;
}
}
}

View File

@@ -1,6 +1,6 @@
namespace StructureHelperCommon.Models.Shapes
{
public class Point : IPoint
public class PointShape : IPoint
{
public double Area { get; set; }
}

View File

@@ -1,7 +1,7 @@
namespace StructureHelperCommon.Models.Shapes
{
/// <inheritdoc />
public class Rectangle : IRectangle
public class RectangleShape : IRectangleShape
{
/// <inheritdoc />
public double Width { get; set; }