Header menu logo Rhino.Scripting.Fsharp

AutoOpenBrep Module

This module provides functions to create or manipulate Rhino Breps/Polysurfaces. 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.CreateCounterSunkScrewVolume(plane, outerDiameter, innerDiameter, length)

Full Usage: RhinoScriptSyntax.CreateCounterSunkScrewVolume(plane, outerDiameter, innerDiameter, length)

Parameters:
    plane : Plane - (Plane) Origin is the center of the cone-base or head
    outerDiameter : float - (float) Diameter of the cone base
    innerDiameter : float - (float) Diameter of the cylinder
    length : float - (float) Total length of the screw Brep

Returns: Brep (Brep) Brep geometry.

Creates a Brep in the shape of a countersunk screw hole with 45 degrees slope. A capped cone and a cylinder. One closed Polysurface.

Extended Type: RhinoScriptSyntax

plane : Plane

(Plane) Origin is the center of the cone-base or head

outerDiameter : float

(float) Diameter of the cone base

innerDiameter : float

(float) Diameter of the cylinder

length : float

(float) Total length of the screw Brep

Returns: Brep

(Brep) Brep geometry.

RhinoScriptSyntax.CreateCylinder(plane, diameter, length)

Full Usage: RhinoScriptSyntax.CreateCylinder(plane, diameter, length)

Parameters:
    plane : Plane - (Plane) Origin is the center of the base of the cylinder
    diameter : float - (float) Diameter of the cylinder
    length : float - (float) Total length of the cylinder

Returns: Brep (Brep) Brep geometry.

Creates a solid Brep in the shape of a cylinder. Closed with caps.

Extended Type: RhinoScriptSyntax

plane : Plane

(Plane) Origin is the center of the base of the cylinder

diameter : float

(float) Diameter of the cylinder

length : float

(float) Total length of the cylinder

Returns: Brep

(Brep) Brep geometry.

RhinoScriptSyntax.CreateExtrusionAtPlane(curveToExtrudeInWorldXY, plane, height, extraHeightPerSide)

Full Usage: RhinoScriptSyntax.CreateExtrusionAtPlane(curveToExtrudeInWorldXY, plane, height, extraHeightPerSide)

Parameters:
    curveToExtrudeInWorldXY : Curve - (Curve) A curve in the world XY plane
    plane : Plane - (Plane) A plane with any orientation
    height : float - (float) The height to extrude along the Z-axis of the plane
    extraHeightPerSide : float - (float) Optional, Default Value: 0.0. Extra extension of the extrusion on both sides

Returns: Brep (Brep) Brep geometry.

Transforms a planar 2D curve in XY plane to the given plane and then extrudes it with CapPlanarHoles, with optional extensions at both ends.

Extended Type: RhinoScriptSyntax

curveToExtrudeInWorldXY : Curve

(Curve) A curve in the world XY plane

plane : Plane

(Plane) A plane with any orientation

height : float

(float) The height to extrude along the Z-axis of the plane

extraHeightPerSide : float

(float) Optional, Default Value: 0.0. Extra extension of the extrusion on both sides

Returns: Brep

(Brep) Brep geometry.

RhinoScriptSyntax.CreateSlottedHoleVolume(plane, length, width, height)

Full Usage: RhinoScriptSyntax.CreateSlottedHoleVolume(plane, length, width, height)

Parameters:
    plane : Plane - (Plane) Origin is the center of the hole
    length : float - (float) Total length of the slotted hole
    width : float - (float) Width (diameter) of the slotted hole
    height : float - (float) Height of the slotted hole volume

Returns: Brep (Brep) Closed Brep geometry.

Creates a Brep in the shape of a slotted hole. Closed with caps.

Extended Type: RhinoScriptSyntax

plane : Plane

(Plane) Origin is the center of the hole

length : float

(float) Total length of the slotted hole

width : float

(float) Width (diameter) of the slotted hole

height : float

(float) Height of the slotted hole volume

Returns: Brep

(Brep) Closed Brep geometry.

RhinoScriptSyntax.ExtractRenderMesh(brep, meshingParameters)

Full Usage: RhinoScriptSyntax.ExtractRenderMesh(brep, meshingParameters)

Parameters:
    brep : Brep - (Brep) The Polysurface to extract a Mesh from
    meshingParameters : MeshingParameters - (MeshingParameters) Optional. The meshing parameters; if omitted the current meshing parameters are used

Returns: Result<Mesh, Mesh> (Result) Ok Mesh, or Error Mesh if input brep is closed but output Mesh is not. Fails if no meshes can be extracted.

Calls Mesh.CreateFromBrep and Mesh.HealNakedEdges() to try to ensure Mesh is closed if input is closed.

Extended Type: RhinoScriptSyntax

brep : Brep

(Brep) The Polysurface to extract a Mesh from

meshingParameters : MeshingParameters

(MeshingParameters) Optional. The meshing parameters; if omitted the current meshing parameters are used

Returns: Result<Mesh, Mesh>

(Result) Ok Mesh, or Error Mesh if input brep is closed but output Mesh is not. Fails if no meshes can be extracted.

RhinoScriptSyntax.OrientBrep(brep)

Full Usage: RhinoScriptSyntax.OrientBrep(brep)

Parameters:
    brep : Brep - (Brep) The Brep to orient

Returns: Brep (Brep) The same Brep, flipped if needed.

If brep.SolidOrientation is inward then flip the brep.

Extended Type: RhinoScriptSyntax

brep : Brep

(Brep) The Brep to orient

Returns: Brep

(Brep) The same Brep, flipped if needed.

RhinoScriptSyntax.SubtractBrep(keep, trimmer, subtractionLocations)

Full Usage: RhinoScriptSyntax.SubtractBrep(keep, trimmer, subtractionLocations)

Parameters:
    keep : Brep - (Brep) The volume to keep
    trimmer : Brep - (Brep) The volume to cut out
    subtractionLocations : int - (int) Optional. The number of locations where the brep is expected to be cut. This is an optional safety check that makes it twice as slow. It ensures that the count of breps from Brep.CreateBooleanIntersection is equal to subtractionLocations

Returns: Brep (Brep) Brep geometry.

Subtracts trimmer from brep (Boolean Difference), so that a single brep is returned. Draws debug objects and zooms on them if an error occurs.

Extended Type: RhinoScriptSyntax

keep : Brep

(Brep) The volume to keep

trimmer : Brep

(Brep) The volume to cut out

subtractionLocations : int

(int) Optional. The number of locations where the brep is expected to be cut. This is an optional safety check that makes it twice as slow. It ensures that the count of breps from Brep.CreateBooleanIntersection is equal to subtractionLocations

Returns: Brep

(Brep) Brep geometry.

Type something to start searching.