DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="1.2.2-beta93" />

 Arc

public class Arc : Curve
using Autodesk.DesignScript.Interfaces; using System.Collections.Generic; using System.Globalization; using System.Linq; namespace Autodesk.DesignScript.Geometry { public class Arc : Curve { internal IArcEntity ArcEntity => HostImpl as IArcEntity; public Point CenterPoint => Point.Wrap(ArcEntity.get_CenterPoint(), true); public double Radius => ArcEntity.get_Radius(); public double StartAngle => ArcEntity.get_StartAngle(); public double SweepAngle => ArcEntity.get_SweepAngle(); internal Arc(IArcEntity host, bool persist) : base(host, persist) { } public override string ToString() { object[] obj = new object[11] { "Arc(Normal = ", base.Normal, ", CenterPoint = ", CenterPoint, ", Radius = ", null, null, null, null, null, null }; double num = Radius; obj[5] = num.ToString(GeometryExtension.DoublePrintFormat, CultureInfo.InvariantCulture); obj[6] = ", StartAngle = "; num = StartAngle; obj[7] = num.ToString(GeometryExtension.DoublePrintFormat, CultureInfo.InvariantCulture); obj[8] = ", SweepAngle = "; num = SweepAngle; obj[9] = num.ToString(GeometryExtension.DoublePrintFormat, CultureInfo.InvariantCulture); obj[10] = ")"; return string.Concat(obj); } internal new static void InitType() { Geometry.RegisterHostType(typeof(IArcEntity), (IGeometryEntity host, bool persist) => new Arc(host as IArcEntity, persist)); } internal static Arc Wrap(IArcEntity host, bool persist = true) { return Geometry.Wrap(host, false, null) as Arc; } internal static Arc[] Wrap(IArcEntity[] hosts, bool persist = true) { return (from x in hosts select Wrap(x, persist)).ToArray(); } internal static Arc[][] Wrap(IArcEntity[][] hosts, bool persist = true) { return (from x in hosts select Wrap(x, persist)).ToArray(); } internal static IArcEntity[][] Unwrap(Arc[][] o) { return (from x in o select Unwrap(x)).ToArray(); } internal static IArcEntity[] Unwrap(Arc[] o) { return (from x in o select Unwrap(x)).ToArray(); } internal static IArcEntity[] Unwrap(IEnumerable<Arc> o) { return (from x in o select Unwrap(x)).ToArray(); } internal static IArcEntity Unwrap(Arc o) { return o.ArcEntity; } public static Arc ByThreePoints(Point firstPoint, Point secondPoint, Point thirdPoint) { return Wrap(HostFactory.Factory.ArcByThreePoints(Point.Unwrap(firstPoint), Point.Unwrap(secondPoint), Point.Unwrap(thirdPoint)), true); } public static Arc ByCenterPointRadiusAngle(Point center, double radius, double startAngle, double endAngle, Vector normal) { return Wrap(HostFactory.Factory.ArcByCenterPointRadiusAngle(Point.Unwrap(center), radius, startAngle, endAngle, Vector.Unwrap(normal)), true); } public static Arc ByCenterPointStartPointSweepAngle(Point centerPoint, Point startPoint, double sweepAngle, Vector normal) { return Wrap(HostFactory.Factory.ArcByCenterPointStartPointSweepAngle(Point.Unwrap(centerPoint), Point.Unwrap(startPoint), sweepAngle, Vector.Unwrap(normal)), true); } public static Arc ByCenterPointStartPointEndPoint(Point centerPoint, Point startPoint, Point endPoint) { return Wrap(HostFactory.Factory.ArcByCenterPointStartPointEndPoint(Point.Unwrap(centerPoint), Point.Unwrap(startPoint), Point.Unwrap(endPoint)), true); } public static Arc ByFillet(Curve curve1, Curve curve2, double radius) { return Wrap(HostFactory.Factory.ArcByFillet(Curve.Unwrap(curve1), Curve.Unwrap(curve2), radius), true); } public static Arc ByFilletTangentToCurve(Curve curve1, Curve curveTangentTo, Curve curve2) { return Wrap(HostFactory.Factory.ArcByFilletTangentToCurve(Curve.Unwrap(curve1), Curve.Unwrap(curveTangentTo), Curve.Unwrap(curve2)), true); } public static Arc ByBestFitThroughPoints(IEnumerable<Point> points) { return Wrap(HostFactory.Factory.ArcByBestFitThroughPoints(Point.Unwrap(points)), true); } public static Arc[] ByStartEndAndTangencies(Point point1, Vector vector1, Point point2, Vector vector2) { return Wrap(HostFactory.Factory.ArcByStartEndAndTangencies(Point.Unwrap(point1), Vector.Unwrap(vector1), Point.Unwrap(point2), Vector.Unwrap(vector2)), true); } public static Arc ByStartPointEndPointStartTangent(Point startPoint, Point endPoint, Vector startTangent) { return Wrap(HostFactory.Factory.ArcByStartPointEndPointStartTangent(Point.Unwrap(startPoint), Point.Unwrap(endPoint), Vector.Unwrap(startTangent)), true); } } }