Loop
using Autodesk.DesignScript.Interfaces;
using Autodesk.DesignScript.Runtime;
using System.Collections.Generic;
using System.Linq;
namespace Autodesk.DesignScript.Geometry
{
[IsVisibleInDynamoLibrary(false)]
public class Loop : DesignScriptEntity
{
internal ILoopEntity LoopEntity => HostImpl as ILoopEntity;
public Face Face => Face.Wrap(LoopEntity.get_Face());
public CoEdge[] CoEdges => CoEdge.Wrap(LoopEntity.get_CoEdges());
public bool IsExternal => LoopEntity.get_IsExternal();
internal Loop(ILoopEntity host)
: base(host)
{
}
public override string ToString()
{
return "Loop(Face = " + Face?.ToString() + ", IsExternal = " + IsExternal.ToString() + ")";
}
internal static Loop Wrap(ILoopEntity host)
{
if (host == null)
return null;
return new Loop(host);
}
internal static Loop[] Wrap(ILoopEntity[] hosts)
{
return (from x in hosts
select Wrap(x)).ToArray();
}
internal static Loop[][] Wrap(ILoopEntity[][] hosts)
{
return (from x in hosts
select Wrap(x)).ToArray();
}
internal static ILoopEntity[][] Unwrap(Loop[][] o)
{
return (from x in o
select Unwrap(x)).ToArray();
}
internal static ILoopEntity[] Unwrap(Loop[] o)
{
return (from x in o
select Unwrap(x)).ToArray();
}
internal static ILoopEntity[] Unwrap(IEnumerable<Loop> o)
{
return (from x in o
select Unwrap(x)).ToArray();
}
internal static ILoopEntity Unwrap(Loop o)
{
return o.LoopEntity;
}
}
}