Vertex
using Autodesk.DesignScript.Interfaces;
using System.Collections.Generic;
using System.Linq;
namespace Autodesk.DesignScript.Geometry
{
    public class Vertex : DesignScriptEntity
    {
        internal IVertexEntity VertexEntity => HostImpl as IVertexEntity;
        public Point PointGeometry => Point.Wrap(VertexEntity.get_PointGeometry());
        public Edge[] AdjacentEdges => Track(Edge.Wrap(VertexEntity.get_AdjacentEdges()));
        public Face[] AdjacentFaces => Track(Face.Wrap(VertexEntity.get_AdjacentFaces()));
        internal Vertex(IVertexEntity host)
            : base(host)
        {
        }
        public override string ToString()
        {
            return "Vertex(PointGeometry = " + PointGeometry?.ToString() + ")";
        }
        internal static Vertex Wrap(IVertexEntity host)
        {
            if (host == null)
                return null;
            return new Vertex(host);
        }
        internal static Vertex[] Wrap(IVertexEntity[] hosts)
        {
            return (from x in hosts
            select Wrap(x)).ToArray();
        }
        internal static Vertex[][] Wrap(IVertexEntity[][] hosts)
        {
            return (from x in hosts
            select Wrap(x)).ToArray();
        }
        internal static IVertexEntity[][] Unwrap(Vertex[][] o)
        {
            return (from x in o
            select Unwrap(x)).ToArray();
        }
        internal static IVertexEntity[] Unwrap(Vertex[] o)
        {
            return (from x in o
            select Unwrap(x)).ToArray();
        }
        internal static IVertexEntity[] Unwrap(IEnumerable<Vertex> o)
        {
            return (from x in o
            select Unwrap(x)).ToArray();
        }
        internal static IVertexEntity Unwrap(Vertex o)
        {
            return o.VertexEntity;
        }
    }
}
            