Face
using Autodesk.DesignScript.Interfaces;
using Autodesk.DesignScript.Runtime;
using System.Collections.Generic;
using System.Linq;
namespace Autodesk.DesignScript.Geometry
{
public class Face : DesignScriptEntity
{
internal IFaceEntity FaceEntity => HostImpl as IFaceEntity;
public Edge[] Edges => Track(Edge.Wrap(FaceEntity.get_Edges(), true));
public Vertex[] Vertices => Track(Vertex.Wrap(FaceEntity.get_Vertices(), true));
[IsVisibleInDynamoLibrary(false)]
public Loop[] Loops {
get {
return Loop.Wrap(FaceEntity.get_Loops(), true);
}
}
internal Face(IFaceEntity host, bool persist)
: base(host, persist)
{
}
public override string ToString()
{
return "Face";
}
internal static Face Wrap(IFaceEntity host, bool persist = true)
{
if (host == null)
return null;
return new Face(host, persist);
}
internal static Face[] Wrap(IFaceEntity[] hosts, bool persist = true)
{
return (from x in hosts
select Wrap(x, persist)).ToArray();
}
internal static Face[][] Wrap(IFaceEntity[][] hosts, bool persist = true)
{
return (from x in hosts
select Wrap(x, persist)).ToArray();
}
internal static IFaceEntity[][] Unwrap(Face[][] o)
{
return (from x in o
select Unwrap(x)).ToArray();
}
internal static IFaceEntity[] Unwrap(Face[] o)
{
return (from x in o
select Unwrap(x)).ToArray();
}
internal static IFaceEntity[] Unwrap(IEnumerable<Face> o)
{
return (from x in o
select Unwrap(x)).ToArray();
}
internal static IFaceEntity Unwrap(Face o)
{
return o.FaceEntity;
}
public Surface SurfaceGeometry()
{
return Surface.Wrap(FaceEntity.SurfaceGeometry(), true);
}
}
}