using StructureHelperCommon.Infrastructures.Exceptions; using System; namespace StructureHelperCommon.Models.Shapes { public class Vertex : IVertex { public Guid Id { get; } public Vertex(Guid id) { Id = id; } /// /// Creates new vertex with id = new Guid /// /// Coordinate x of vertex /// Coordinate y of vertex public Vertex(double x, double y) : this(Guid.NewGuid()) { Point = new Point2D() { X = x, Y = y }; } public IPoint2D Point { get; set; } = new Point2D(Guid.NewGuid()) { X = 0, Y = 0}; } }