using TraceCad.Core.Geometry;

namespace TraceCad.Core.Model;

public sealed record LineEntity(
    Guid Id,
    string Layer,
    Point2 Start,
    Point2 End) : Entity(Id, Layer)
{
    public double Length => Start.DistanceTo(End);

    public override IEnumerable<Point2> SnapPoints
    {
        get
        {
            yield return Start;
            yield return End;
        }
    }
}
