DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="3.0.0-beta7064" />

 Curve

public class Curve : Geometry
public Point EndPoint { get; }

Get the end Point along the Curve

public bool IsClosed { get; }

Returns True if a curve is closed, False otherwise.

public bool IsPlanar { get; }

Returns True if a curve is planar, False otherwise.

public double Length { get; }

Returns the total arc length of the curve

public Vector Normal { get; }

The normal to the plane the curve lies in. Only valid for planar curves.

public Point StartPoint { get; }

Get the start Point along the Curve

public static Curve ByBlendBetweenCurves(Curve curve1, Curve curve2, bool endOrStart1 = true, bool endOrStart2 = false, bool isG2Continuous = false)

Create a curve that blends between two curves

public static Curve ByIsoCurveOnSurface(Surface baseSurface, int direction = 0, double parameter = 0)

Create a curve by isoline of surface

public static Curve ByParameterLineOnSurface(Surface baseSurface, UV startParams, UV endParams)

Create a curve by line of surface in uv space

Approximate a Curve with a collection of Arcs and Lines

public CoordinateSystem CoordinateSystemAtDistance(double segmentLength = 0)

Returns a CoordinateSystem at specified distance from Curve start Point. Y Axis lies tangent to the Curve, X Axis is the curvature.

Get a CoordinateSystem with origin at the point at the given parameter. The XAxis is aligned with the curve normal, the YAxis is aligned with the curve tangent at this point, and the ZAxis is aligned with the up-vector or binormal at this point

public CoordinateSystem CoordinateSystemAtSegmentLength(double segmentLength = 0)

Returns a CoordinateSystem at specified distance from Curve start Point. Y Axis lies tangent to the Curve, X Axis is the curvature.

public double DistanceAtParameter(double param = 0)

Get the segment length measured from the curve's start point to the given parameter.

public Curve[] DivideByDistance(int divisions = 10)

Divides curve into given number of curves with equal distances between start and end of each curve (equal chords).

public Curve[] DivideByDistanceFromParameter(double distance = 1, double parameter = 0)

Divides curve into curves of given chord length measured from given parameter location

public Curve[] DivideByLengthFromParameter(double length = 1, double parameter = 0)

Divides curve into curves of given length measured from the given parameter location

public Curve[] DivideEqually(int divisions = 10)

Divides curve into given number of equal length curves

public double EndParameter()

Get the parameter at the end point of a curve

public Curve Extend(double distance, Point pickSide)

Extend a Curve by a given distance at a particular end determined by a pick Point. The picked side will be extended. Closed curves like Circles and Ellipses cannot be extended. If the curve being extended is linear, the extension will also be linear.

public Curve ExtendEnd(double distance = 1)

Extend a Curve by a given distance on its end. Closed curves like Circles and Ellipses cannot be extended. If the curve being extended is linear, the extension will also be linear.

public Curve ExtendStart(double distance = 1)

Extend a Curve by a given distance on its start side. Closed curves like Circles and Ellipses cannot be extended. If the curve being extended is linear, the extension will also be linear.

public Surface Extrude(double distance = 1)

Extrudes a Curve in the normal Vector direction

public Surface Extrude(Vector direction)

Extrudes a Curve in the specified direction, by the length of the input Vector

public Surface Extrude(Vector direction, double distance = 1)

Extrudes a Curve in the specified direction, by the specified distance

public Solid ExtrudeAsSolid(double distance = 1)

Extrudes a Curve in the Normal direction by the specified distance. Curve must be closed.

public Solid ExtrudeAsSolid(Vector direction)

Extrudes a Curve in the specified direction, by the length of the input Vector. Curve must be closed.

public Solid ExtrudeAsSolid(Vector direction, double distance = 1)

Extrudes a Curve in the specified direction, by the specified distance. Curve must be closed.

Get a CoordinateSystem with origin at the point at the given parameter

public PolyCurve Join(IEnumerable<Curve> curves)

Join set of curves to the end of the polycurve. Flips curves to assure connectivity.

public PolyCurve Join(Curve curve)

Join this curve and the input curve into a new PolyCurve, maintaining the original curves exactly.

public double LengthBetweenParameters(double startParam = 0, double endParam = 1)

Get the arc length between two parameter points on the curve

public Vector NormalAtParameter(double param = 0)

Get a Vector perpendicular to the curve at a specified parameter between StartParameter() and EndParameter()

public Vector NormalAtParameter(double param = 0, bool side = false)

Get a Vector perpendicular to the curve at a specified parameter between StartParameter() and EndParameter() The curve must be planar. The resulting normal will be consistent across the entire curvature of the curve.

public Curve Offset(double distance = 1)

Offset a Curve by a specified amount. Curve must be planar.

public Curve[] OffsetMany(double signedDistance, Vector planeNormal)

Create one or more curves by offsetting a planar curve by the given distance in a plane defined by the plane normal. If there are gaps between the offset component curves then, they are filled by extending the offset curves. The "planeNormal" input argument defaults to the normal of the plane containing the curve but an explicit normal parallel to the original curve normal can be provided to better control the direction of the offset. For example, if a consistent offset direction is required for multiple curves sharing the same plane, the "planeNormal" can be used to override individual curve normals and force all curves to be offset in the same direction. Reversing the normal reverses the direction of the offset.

public double ParameterAtChordLength(double chordLength = 0.5, double parameter = 0, bool forward = true)

Get the parameter at a particular chord length along the curve from given location.

public double ParameterAtDistance(double segmentLength = 0)

Get the parameter at a particular arc length along the curve.

public double ParameterAtPoint(Point point)

Get the parameter at a given point along the curve. If the point is not on the curve then ParameterAtPoint will still return a value which will correspond to a nearby point on the curve, but the point is not in general the closest point.

public double ParameterAtSegmentLength(double segmentLength = 0)

Get the parameter at a particular arc length along the curve.

public Curve[] ParameterSplit(double parameter = 0.5)

Split a Curve into two pieces at the given parameter

public Curve[] ParameterSplit(double[] parameters)

Split a Curve into multiple pieces at the given parameters

public Curve ParameterTrim(double startParameter = 0, double endParameter = 1)

Removes the beginning and end of the Curve at the specified parameters.

public Curve ParameterTrimEnd(double endParameter = 1)

Removes the end of the Curve at the specified parameter

public Curve[] ParameterTrimInterior(double startParameter = 0, double endParameter = 1)

Removes the interior portion of a Curve at the specified parameters

public Curve[] ParameterTrimSegments(double[] parameters)

Removes several segments of the curve, discarding the 1st, 3rd, 5th ... segments

public Curve ParameterTrimStart(double startParameter = 0)

Removes the start of the Curve at the specified parameter

public Surface Patch()

Patch a closed Curve

public Plane PlaneAtDistance(double segmentLength = 0)

Returns a Plane at the specified distance along the Curve from the start Point. The normal of the Plane aligns with the tangent of the Curve.

public Plane PlaneAtParameter(double param = 0)

Returns a Plane whose normal aligns with the tangent of the Curve. Parameters are adjusted such that 0 is always the start Point and 1 is always the end Point.

public Plane PlaneAtSegmentLength(double segmentLength = 0)

Returns a Plane at the specified distance along the Curve from the start Point. The normal of the Plane aligns with the tangent of the Curve.

public Point PointAtChordLength(double chordLength = 1, double parameterLocation = 0, bool forward = true)

Get the point at a particular chord length of the curve from given parameter location.

public Point PointAtDistance(double segmentLength = 0)

Get a Point at a particular arc length along the curve

public Point PointAtParameter(double param = 0)

Get a Point on the Curve at a specified parameter between StartParameter() and EndParameter()

public Point PointAtSegmentLength(double segmentLength = 0)

Get a Point at a particular arc length along the curve

public Point[] PointsAtChordLengthFromPoint(Point point, double chordLength = 1)

Returns points spaced equally on the curve at given chord length from the given point

public Point[] PointsAtEqualChordLength(int divisions = 10)

Returns points spaced along curve at equal chord length based on the input number of divisions

public Point[] PointsAtEqualSegmentLength(int divisions = 10)

Returns points spaced equally along the curve length based on the input number of divisions

public Point[] PointsAtSegmentLengthFromPoint(Point point, double segmentLength = 1)

Returns points spaced equally along the curve at given segment length from the given point

public Geometry[] Project(Geometry baseGeometry, Vector projectionDirection)

Projects an input curve along a given projection direction onto a specified base geometry.

public Curve PullOntoPlane(Plane plane)

Create a curve by pulling onto plane

public Curve PullOntoSurface(Surface surface)

Pull this Curve onto the input Surface, in the direction of the Surface normals.

public Curve Reverse()

Reverse the direction of the curve

public double SegmentLengthAtParameter(double parameter = 0)

Get the segment length measured from the start point of the curve to the given parameter.

public double SegmentLengthBetweenParameters(double startParam = 0, double endParam = 1)

Get the segment length between two parameters on the curve

public Curve Simplify(double tolerance)

Returns a new Curve approximated with the supplied tolerance

public Curve[] SplitByParameter(double parameter = 0.5)

Split a Curve into two pieces at the given parameter

public Curve[] SplitByParameter(double[] parameters)

Split a Curve into multiple pieces at the given parameters

Split a Curve into multiple pieces at the given points

public double StartParameter()

Get the parameter at the start point of a curve

public Solid SweepAsSolid(Curve path)

Sweeps this closed Curve along the path Curve, creating a Solid

public Solid SweepAsSolid(Curve path, bool cutEndOff = false)

Sweeps this closed Curve along the path Curve, creating a Solid

Sweeps this Curve along the path Curve, creating a Surface

public Vector TangentAtParameter(double param = 0)

Get a Vector tangent to the curve at a specified parameter between StartParameter() and EndParameter()

Converts the Curve to a NurbsCurve approximation

public Curve TrimByEndParameter(double endParameter = 1)

Removes the end of the Curve at the specified parameter

public Curve TrimByParameter(double startParameter = 0, double endParameter = 1)

Removes the beginning and end of the Curve at the specified parameters.

public Curve TrimByStartParameter(double startParameter = 0)

Removes the start of the Curve at the specified parameter

public Curve[] TrimInteriorByParameter(double startParameter = 0, double endParameter = 1)

Removes the interior portion of a Curve at the specified parameters

public Curve[] TrimSegmentsByParameter(double[] parameters)

Removes several segments of the curve, discarding the 1st, 3rd, 5th ... segments

public Curve[] TrimSegmentsByParameter(double[] parameters, bool discardEvenSegments = true)

Removes even or odd segments of the Curve split at the given parameters depending on whether the 'discardEvenSegments' flag is true or false respectively.