DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

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

 PanelSurface

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 { [GenerateFromInterface(typeof(IPanelSurfaceEntity), typeof(IGeometryFactory), new Type[] { })] public class PanelSurface : DesignScriptEntity { internal IPanelSurfaceEntity PanelSurfaceEntity => HostImpl as IPanelSurfaceEntity; public int NumVertices => PanelSurfaceEntity.get_NumVertices(); public int NumPanels => PanelSurfaceEntity.get_NumPanels(); internal PanelSurface(IPanelSurfaceEntity host) : base(host) { } [AllowRankReduction] public int[] GetNumPanelVertices([DefaultArgument("null")] int[] panelIndices) { return PanelSurfaceEntity.GetNumPanelVertices(panelIndices); } public Vertex GetVertex(int vertexIndex) { return Vertex.Wrap(PanelSurfaceEntity.GetVertex(vertexIndex)); } public Point GetPoint(int vertexIndex) { return Point.Wrap(PanelSurfaceEntity.GetPoint(vertexIndex)); } public int GetVertexIndex(int panelIndex, int vertexNumber) { return PanelSurfaceEntity.GetVertexIndex(panelIndex, vertexNumber); } [AllowRankReduction] public Vertex[][] GetPanelVertices([DefaultArgument("null")] int[] panelIndices) { return Vertex.Wrap(PanelSurfaceEntity.GetPanelVertices(panelIndices)); } [AllowRankReduction] public Point[][] GetPanelPoints([DefaultArgument("null")] int[] panelIndices) { return Point.Wrap(PanelSurfaceEntity.GetPanelPoints(panelIndices)); } [AllowRankReduction] public Polygon[] GetPanelPolygon([DefaultArgument("null")] int[] panelIndices) { return Polygon.Wrap(PanelSurfaceEntity.GetPanelPolygon(panelIndices)); } public PanelSurface SetTransform([DefaultArgument("1.0")] double scale, [DefaultArgument("0.0")] double uOffset, [DefaultArgument("0.0")] double vOffset, [DefaultArgument("0.0")] double rotation, [DefaultArgument("Autodesk.DesignScript.Geometry.Point.ByCoordinates(0, 0, 0)")] Point rotationPoint) { return Wrap(PanelSurfaceEntity.SetTransform(scale, uOffset, vOffset, rotation, Point.Unwrap(rotationPoint))); } public static PanelSurface ByQuads(Surface surface, int numU, int numV, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceByQuads(Surface.Unwrap(surface), numU, numV, boundaryCondition)); } public static PanelSurface ByCrossSplitSquares(Surface surface, int numU, int numV, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceByCrossSplitSquares(Surface.Unwrap(surface), numU, numV, boundaryCondition)); } public static PanelSurface ByDiagonallySplitSquares(Surface surface, int numU, int numV, bool alternativeDiagonal = false, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceByDiagonallySplitSquares(Surface.Unwrap(surface), numU, numV, alternativeDiagonal, boundaryCondition)); } public static PanelSurface ByDiamonds(Surface surface, int numU, int numV, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceByDiamonds(Surface.Unwrap(surface), numU, numV, boundaryCondition)); } public static PanelSurface BySplitDiamonds(Surface surface, int numU, int numV, bool splitHorizontally = false, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceBySplitDiamonds(Surface.Unwrap(surface), numU, numV, splitHorizontally, boundaryCondition)); } public static PanelSurface ByParallelograms(Surface surface, int numU, int numV, double shearFactor, bool alignWithUAxis = false, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceByParallelograms(Surface.Unwrap(surface), numU, numV, shearFactor, alignWithUAxis, boundaryCondition)); } public static PanelSurface ByStaggeredQuads(Surface surface, int numU, int numV, bool staggerVertically = false, double displacementFactor = 0.5, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceByStaggeredQuads(Surface.Unwrap(surface), numU, numV, staggerVertically, displacementFactor, boundaryCondition)); } public static PanelSurface ByHexagons(Surface surface, int numU, int numV, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceByHexagons(Surface.Unwrap(surface), numU, numV, boundaryCondition)); } public static PanelSurface ByRhombiTriHexagonals(Surface surface, int numU, int numV, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceByRhombiTriHexagonals(Surface.Unwrap(surface), numU, numV, boundaryCondition)); } public static PanelSurface ByCustomOrthogonalLattice(Surface surface, int numU, int numV, double uDisplacement, double vDisplacement, UV[][] tileUVs, PanelSurfaceBoundaryCondition boundaryCondition = PanelSurfaceBoundaryCondition.Keep) { return Wrap(HostFactory.Factory.PanelSurfaceByCustomOrthogonalLattice(Surface.Unwrap(surface), numU, numV, uDisplacement, vDisplacement, UV.Unwrap(tileUVs), boundaryCondition)); } internal static PanelSurface Wrap(IPanelSurfaceEntity host) { if (host != null) return new PanelSurface(host); return null; } internal static PanelSurface[] Wrap(IPanelSurfaceEntity[] hosts) { return hosts.Select(Wrap).ToArray(); } internal static PanelSurface[][] Wrap(IPanelSurfaceEntity[][] hosts) { return hosts.Select(Wrap).ToArray(); } internal static IPanelSurfaceEntity Unwrap(PanelSurface o) { return o.PanelSurfaceEntity; } internal static IPanelSurfaceEntity[] Unwrap(IEnumerable<PanelSurface> o) { return o.Select(Unwrap).ToArray(); } internal static IPanelSurfaceEntity[] Unwrap(PanelSurface[] o) { return o.Select(Unwrap).ToArray(); } internal static IPanelSurfaceEntity[][] Unwrap(PanelSurface[][] 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("PanelSurface(NumVertices = ", NumVertices).Add(", NumPanels = ", NumPanels).Append(")"); } } }