Header menu logo Rhino.Scripting.Fsharp

AutoOpenVectors Module

This module provides functions to manipulate Rhino Vector3d This module is automatically opened when Rhino.Scripting.FSharp namespace is opened. These type extensions are only visible in F#.

Type extensions

Type extension Description

RhinoScriptSyntax.DistPt(fromPt, dirPt, distance)

Full Usage: RhinoScriptSyntax.DistPt(fromPt, dirPt, distance)

Parameters:
Returns: Point3d

returns a point that is at a given distance from a point in the direction of another point.

Extended Type: RhinoScriptSyntax

fromPt : Point3d
dirPt : Point3d
distance : float
Returns: Point3d

RhinoScriptSyntax.DivPt(fromPt, toPt, rel)

Full Usage: RhinoScriptSyntax.DivPt(fromPt, toPt, rel)

Parameters:
Returns: Point3d

returns a Point by evaluating a line between two points with a normalized parameter. e.g. rel=0.5 will return the middle point, rel=1.0 the endPoint if the rel parameter is omitted it is set to 0.5

Extended Type: RhinoScriptSyntax

fromPt : Point3d
toPt : Point3d
rel : float
Returns: Point3d

RhinoScriptSyntax.DrawPlane(pl, axLength, suffixInDot, layer)

Full Usage: RhinoScriptSyntax.DrawPlane(pl, axLength, suffixInDot, layer)

Parameters:
    pl : Plane - (Plane)
    axLength : float - (float) Optional, Default Value: 1.0, the size of the drawn lines
    suffixInDot : string - (string) Optional, Default Value: no suffix, text to add to x TextDot label do of x axis. And y and z too.
    layer : string - (string) Optional, Default Value: the current layer, String for layer to draw plane on. The Layer will be created if it does not exist.

Returns: ResizeArray<Guid> List of Guids of added Objects

Draws the axes of a Plane and adds TextDots to label them.

Extended Type: RhinoScriptSyntax

pl : Plane

(Plane)

axLength : float

(float) Optional, Default Value: 1.0, the size of the drawn lines

suffixInDot : string

(string) Optional, Default Value: no suffix, text to add to x TextDot label do of x axis. And y and z too.

layer : string

(string) Optional, Default Value: the current layer, String for layer to draw plane on. The Layer will be created if it does not exist.

Returns: ResizeArray<Guid>

List of Guids of added Objects

RhinoScriptSyntax.DrawVector(vector, fromPoint, layer)

Full Usage: RhinoScriptSyntax.DrawVector(vector, fromPoint, layer)

Parameters:
Returns: Guid

Draws a line with Curve Arrows from a given point.

Extended Type: RhinoScriptSyntax

vector : Vector3d
fromPoint : Point3d
layer : string
Returns: Guid

RhinoScriptSyntax.DrawVector(vector)

Full Usage: RhinoScriptSyntax.DrawVector(vector)

Parameters:
Returns: Guid

Draws a line with Curve Arrows from World Origin.

Extended Type: RhinoScriptSyntax

vector : Vector3d
Returns: Guid

RhinoScriptSyntax.LineTriangleIntersect(line, p1, p2, p3)

Full Usage: RhinoScriptSyntax.LineTriangleIntersect(line, p1, p2, p3)

Parameters:
Returns: Point3d option

Calculates the intersection of a finite line with a triangle (without using Rhinocommon) Returns Some(Point3d) or None if no intersection found

Extended Type: RhinoScriptSyntax

line : Line
p1 : Point3d
p2 : Point3d
p3 : Point3d
Returns: Point3d option

RhinoScriptSyntax.MeanPoint(pts)

Full Usage: RhinoScriptSyntax.MeanPoint(pts)

Parameters:
Returns: Point3d

Returns the average of many points.

Extended Type: RhinoScriptSyntax

pts : Point3d seq
Returns: Point3d

RhinoScriptSyntax.NormalOfPoints(pts)

Full Usage: RhinoScriptSyntax.NormalOfPoints(pts)

Parameters:
Returns: Vector3d

Finds the mean normal of many points. It finds the center point and then takes cross-products iterating all points in pairs of two. The first two points define the orientation of the normal. Considers current order of points too, counterclockwise in xy plane is z.

Extended Type: RhinoScriptSyntax

pts : IList<Point3d>
Returns: Vector3d

RhinoScriptSyntax.OffsetPoints(points, offsetDistances, normalDistances, loop)

Full Usage: RhinoScriptSyntax.OffsetPoints(points, offsetDistances, normalDistances, loop)

Parameters:
    points : IList<Point3d> - List of points to offset. Auto detects if given points are from a closed Polyline (first point = last point) and loops them.
    offsetDistances : float seq - Offset distances can vary per segment, Positive distance is offset inwards, negative outwards. Distances Sequence must have exact count , be a singleton ( for repeating) or empty seq ( for ignoring)
    normalDistances : float seq - Normal distances define a perpendicular offset at each corner. Distances Sequence must have exact count , be a singleton ( for repeating) or empty seq ( for ignoring)
    loop : bool - Consider last point and first point to be from a closed loop, even if they are not at the same location.

Returns: ResizeArray<Point3d> A list of points that has the same length as the input list.

Offsets a Polyline in 3D space by finding the local offset in each corner.

Extended Type: RhinoScriptSyntax

points : IList<Point3d>

List of points to offset. Auto detects if given points are from a closed Polyline (first point = last point) and loops them.

offsetDistances : float seq

Offset distances can vary per segment, Positive distance is offset inwards, negative outwards. Distances Sequence must have exact count , be a singleton ( for repeating) or empty seq ( for ignoring)

normalDistances : float seq

Normal distances define a perpendicular offset at each corner. Distances Sequence must have exact count , be a singleton ( for repeating) or empty seq ( for ignoring)

loop : bool

Consider last point and first point to be from a closed loop, even if they are not at the same location.

Returns: ResizeArray<Point3d>

A list of points that has the same length as the input list.

RhinoScriptSyntax.OffsetPoints(points, offsetDistance, normalDistance, loop)

Full Usage: RhinoScriptSyntax.OffsetPoints(points, offsetDistance, normalDistance, loop)

Parameters:
    points : IList<Point3d>
    offsetDistance : float
    normalDistance : float
    loop : bool

Returns: ResizeArray<Point3d>

Offsets a Polyline in 3D space by finding the local offset in each corner. Positive distance is offset inwards, negative outwards. Normal distances define a perpendicular offset at each corner. Auto detects if given points are from a closed Polyline (first point = last point) and loops them. Auto detects points from closed polylines and loops them.

Extended Type: RhinoScriptSyntax

points : IList<Point3d>
offsetDistance : float
normalDistance : float
loop : bool
Returns: ResizeArray<Point3d>

Type something to start searching.