DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="3.3.0-beta5480" />

 TSplineReflection

using Autodesk.DesignScript.Interfaces; using Autodesk.DesignScript.Runtime; using System.Collections.Generic; using System.Globalization; using System.Linq; namespace Autodesk.DesignScript.Geometry.TSpline { 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(), true); [Scaling()] public Vector Axis { get { return Vector.Wrap(TSplineReflectionEntity.get_Axis().Scale(1 / DesignScriptEntity.scaleFactor), true); } } internal TSplineReflection(ITSplineReflectionEntity host, bool persist) : base(host, persist) { } public override string ToString() { return "TSplineReflection(IsRadial = " + IsRadial.ToString() + ", SegmentsCount = " + SegmentsCount.ToString() + ", SegmentAngle = " + SegmentAngle.ToString(GeometryExtension.DoublePrintFormat, CultureInfo.InvariantCulture) + ", Plane = " + Plane?.ToString() + ", Axis = " + Axis?.ToString() + ")"; } internal static TSplineReflection Wrap(ITSplineReflectionEntity host, bool persist = true) { if (host == null) return null; return new TSplineReflection(host, persist); } internal static TSplineReflection[] Wrap(ITSplineReflectionEntity[] hosts, bool persist = true) { return (from x in hosts select Wrap(x, persist)).ToArray(); } internal static TSplineReflection[][] Wrap(ITSplineReflectionEntity[][] hosts, bool persist = true) { return (from x in hosts select Wrap(x, persist)).ToArray(); } internal static ITSplineReflectionEntity[][] Unwrap(TSplineReflection[][] o) { return (from x in o select Unwrap(x)).ToArray(); } internal static ITSplineReflectionEntity[] Unwrap(TSplineReflection[] o) { return (from x in o select Unwrap(x)).ToArray(); } internal static ITSplineReflectionEntity[] Unwrap(IEnumerable<TSplineReflection> o) { return (from x in o select Unwrap(x)).ToArray(); } internal static ITSplineReflectionEntity Unwrap(TSplineReflection o) { return o.TSplineReflectionEntity; } public static TSplineReflection ByAxial([DefaultArgument("Autodesk.DesignScript.Geometry.Plane.XY()")] Plane plane) { return Wrap(HostFactory.Factory.TSplineReflectionByAxial(Plane.Unwrap(plane)), true); } 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), true); } } }