DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="4.1.2.5356" />

 TSplineReflection

using Autodesk.DesignScript.Interfaces; using Autodesk.DesignScript.Runtime; using ProtoGeometryGenerator; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Autodesk.DesignScript.Geometry.TSpline { [GenerateFromInterface(typeof(ITSplineReflectionEntity), typeof(IGeometryFactory), new Type[] { })] public class TSplineReflection : DesignScriptEntity { internal ITSplineReflectionEntity TSplineReflectionEntity => HostImpl as ITSplineReflectionEntity; public bool IsRadial => TSplineReflectionEntity.get_IsRadial(); public int SegmentsCount => TSplineReflectionEntity.get_SegmentsCount(); public double SegmentAngle => TSplineReflectionEntity.get_SegmentAngle(); public Plane Plane => Plane.Wrap(TSplineReflectionEntity.get_Plane()); [Scaling()] public Vector Axis { get { return Vector.Wrap(TSplineReflectionEntity.get_Axis().Scale(1 / DesignScriptEntity.scaleFactor)); } } internal TSplineReflection(ITSplineReflectionEntity host) : base(host) { } public static TSplineReflection ByAxial([DefaultArgument("Autodesk.DesignScript.Geometry.Plane.XY()")] Plane plane) { return Wrap(HostFactory.Factory.TSplineReflectionByAxial(Plane.Unwrap(plane))); } public static TSplineReflection ByRadial([DefaultArgument("Autodesk.DesignScript.Geometry.Plane.XY()")] Plane plane, int segmentsCount = 8, double segmentAngle = 0) { return Wrap(HostFactory.Factory.TSplineReflectionByRadial(Plane.Unwrap(plane), segmentsCount, segmentAngle)); } internal static TSplineReflection Wrap(ITSplineReflectionEntity host) { if (host != null) return new TSplineReflection(host); return null; } internal static TSplineReflection[] Wrap(ITSplineReflectionEntity[] hosts) { return hosts.Select(Wrap).ToArray(); } internal static TSplineReflection[][] Wrap(ITSplineReflectionEntity[][] hosts) { return hosts.Select(Wrap).ToArray(); } internal static ITSplineReflectionEntity Unwrap(TSplineReflection o) { return o.TSplineReflectionEntity; } internal static ITSplineReflectionEntity[] Unwrap(IEnumerable<TSplineReflection> o) { return o.Select(Unwrap).ToArray(); } internal static ITSplineReflectionEntity[] Unwrap(TSplineReflection[] o) { return o.Select(Unwrap).ToArray(); } internal static ITSplineReflectionEntity[][] Unwrap(TSplineReflection[][] o) { return o.Select(Unwrap).ToArray(); } public override string ToString() { StringBuilder builder = DesignScriptEntity.GetBuilder(); AppendTo(builder); return builder.ToString(); } internal override void AppendTo(StringBuilder builder) { builder.Add("TSplineReflection(IsRadial = ", IsRadial).Add(", SegmentsCount = ", SegmentsCount).Add(", SegmentAngle = ", SegmentAngle) .Add(", Plane = ", Plane) .Add(", Axis = ", Axis) .Append(")"); } } }