DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="1.0.0-beta2" />

 EllipseArc

public class EllipseArc : Curve
using Autodesk.DesignScript.Interfaces; using System.Collections.Generic; using System.Globalization; using System.Linq; namespace Autodesk.DesignScript.Geometry { public class EllipseArc : Curve { internal IEllipseArcEntity EllipseArcEntity => HostImpl as IEllipseArcEntity; public Point CenterPoint => Point.Wrap(EllipseArcEntity.get_CenterPoint(), true); public Vector MajorAxis => Vector.Wrap(EllipseArcEntity.get_MajorAxis(), true); public Vector MinorAxis => Vector.Wrap(EllipseArcEntity.get_MinorAxis(), true); public double StartAngle => EllipseArcEntity.get_StartAngle(); public double SweepAngle => EllipseArcEntity.get_SweepAngle(); internal EllipseArc(IEllipseArcEntity host, bool persist) : base(host, persist) { } public override string ToString() { object[] obj = new object[13] { "EllipseArc(Normal = ", base.Normal, ", CenterPoint = ", CenterPoint, ", MajorAxis = ", MajorAxis, ", MinorAxis = ", MinorAxis, ", StartAngle = ", null, null, null, null }; double num = StartAngle; obj[9] = num.ToString(GeometryExtension.DoublePrintFormat, CultureInfo.InvariantCulture); obj[10] = ", SweepAngle = "; num = SweepAngle; obj[11] = num.ToString(GeometryExtension.DoublePrintFormat, CultureInfo.InvariantCulture); obj[12] = ")"; return string.Concat(obj); } internal new static void InitType() { Geometry.RegisterHostType(typeof(IEllipseArcEntity), (IGeometryEntity host, bool persist) => new EllipseArc(host as IEllipseArcEntity, persist)); } internal static EllipseArc Wrap(IEllipseArcEntity host, bool persist = true) { return Geometry.Wrap(host, false, null) as EllipseArc; } internal static EllipseArc[] Wrap(IEllipseArcEntity[] hosts, bool persist = true) { return (from x in hosts select Wrap(x, persist)).ToArray(); } internal static EllipseArc[][] Wrap(IEllipseArcEntity[][] hosts, bool persist = true) { return (from x in hosts select Wrap(x, persist)).ToArray(); } internal static IEllipseArcEntity[][] Unwrap(EllipseArc[][] o) { return (from x in o select Unwrap(x)).ToArray(); } internal static IEllipseArcEntity[] Unwrap(EllipseArc[] o) { return (from x in o select Unwrap(x)).ToArray(); } internal static IEllipseArcEntity[] Unwrap(IEnumerable<EllipseArc> o) { return (from x in o select Unwrap(x)).ToArray(); } internal static IEllipseArcEntity Unwrap(EllipseArc o) { return o.EllipseArcEntity; } public static EllipseArc ByPlaneRadiiStartAngleSweepAngle(Plane plane, double xRadius = 1, double yRadius = 1, double startAngle = 0, double sweepAngle = 180) { return Wrap(HostFactory.Factory.EllipseArcByPlaneRadiiStartAngleSweepAngle(Plane.Unwrap(plane), xRadius, yRadius, startAngle, sweepAngle), true); } } }