Table of Contents

Class Curve

Namespace
OpenMEPSandbox.Geometry
Assembly
OpenMEPSandbox.dll
public class Curve
Inheritance
Curve
Inherited Members

Methods

AsLine(Curve)

Convert a curve simple to line

public static Line AsLine(Curve curve)

Parameters

curve Curve

curve need to convert

Returns

Line

Line

Examples

Curve.AsLine.dyn

BezierSegment(Point, Point, Point, Point, int)

Generates a Bézier curve segment based on four control points.

public static List<Point> BezierSegment(Point start, Point startHandler, Point endHandler, Point end, int numPoints = 20)

Parameters

start Point

The starting point of the segment.

startHandler Point

The control point that determines the tangent of the curve at the starting point.

endHandler Point

The control point that determines the tangent of the curve at the ending point.

end Point

The ending point of the segment.

numPoints int

The number of points to generate on the curve.

Returns

List<Point>

A list of Point3D objects representing the points on the Bézier curve segment.

Examples

Curve.BezierSegment.dyn

DeconstructPolyCurve(PolyCurve)

Get segment and vertices of a polycurve Use Open Source From lunchbox package : https://bitbucket.org/provingground-io/lunchbox-for-dynamo/src/master/

[MultiReturn(new string[] { "Segments", "Points" })]
public static Dictionary<string, object> DeconstructPolyCurve(PolyCurve polycurve)

Parameters

polycurve PolyCurve

PolyCurve

Returns

Dictionary<string, object>

PolyCurve segments.

DivideCurve(Curve, double)

Divides a curve evenly along the parameter space Use Open Source From lunchbox package : https://bitbucket.org/provingground-io/lunchbox-for-dynamo/src/master/

[MultiReturn(new string[] { "Points", "Planes", "Tangents", "Parameters" })]
public static Dictionary<string, object> DivideCurve(Curve curve, double Number)

Parameters

curve Curve

Curve to divide

Number double

Number of divisions

Returns

Dictionary<string, object>

A list of points

DivideCurveByDistance(Curve, double)

Divides a curve using a distance between segments Use Open Source From lunchbox package : https://bitbucket.org/provingground-io/lunchbox-for-dynamo/src/master/

[MultiReturn(new string[] { "Points", "Planes", "Tangents", "Distances", "Parameters" })]
public static Dictionary<string, object> DivideCurveByDistance(Curve curve, double Distance)

Parameters

curve Curve

Curve to divide

Distance double

Distance between curve segments

Returns

Dictionary<string, object>

A list of points

EndPoints(Curve)

Gets start and end points and parameter values Use Open Source From lunchbox package : https://bitbucket.org/provingground-io/lunchbox-for-dynamo/src/master/

[MultiReturn(new string[] { "StartPoint", "EndPoint", "StartParameter", "EndParameter" })]
public static Dictionary<string, object> EndPoints(Curve curve)

Parameters

curve Curve

Curve

Returns

Dictionary<string, object>

Start point.

SplitByPoints(Curve, List<Point>)

splits the curve at each point in the input list, creating a new curve between each adjacent pair of points

public static List<Curve> SplitByPoints(Curve curve, List<Point> points)

Parameters

curve Curve

The input curve to be split.

points List<Point>

A list of points that represent the locations at which to split the curve.

Returns

List<Curve>

A list of curves that result from splitting the input curve at the specified points

Examples

Curve.SplitByPoints.dyn

SplitBySegmentsLength(Curve, double)

splits a curve into segments of a specified length

public static List<Curve> SplitBySegmentsLength(Curve curve, double segmentLength)

Parameters

curve Curve

The input curve to be split.

segmentLength double

A number that represents the length of each segment to split the curve into, or a list of numbers that represent the lengths of the segments to split the curve into.

Returns

List<Curve>

A list of curves that result from splitting the input curve at the specified segment lengths.

Examples

Curve.SplitBySegmentsLength.dyn

SplitBySegmentsLengths(Curve, List<double>)

splits a curve into segments of varying lengths specified by a list of segment lengths

public static List<Curve> SplitBySegmentsLengths(Curve curve, List<double> segmentLengths)

Parameters

curve Curve

The input curve to be split.

segmentLengths List<double>

A list of numbers that represent the lengths of the segments to split the curve into.

Returns

List<Curve>

A list of curves that result from splitting the input curve at the specified segment lengths.

Examples

Curve.SplitBySegmentsLengths.dyn

ToPoints(Curve, int)

Converts a curve to a list of points based on the specified number of points.

public static List<Point> ToPoints(Curve curve, int numPoints)

Parameters

curve Curve

The curve to convert to a list of points.

numPoints int

The number of points to generate on the curve.

Returns

List<Point>

A list of Point3D objects representing the points on the curve.

Examples

Curve.ToPoints.dyn