Header menu logo Rhino.Scripting.Fsharp

AutoOpenBrep Module

This module provides functions to create or manipulate Rhino Breps/ Polysurface 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 center of cone-base or head
    outerDiameter : float - (float) Diameter of cone base
    innerDiameter : float - (float) Diameter of 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, 45 degrees slope. A capped cone and a cylinder. One closed Polysurface.

Extended Type: RhinoScriptSyntax

plane : Plane

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

outerDiameter : float

(float) Diameter of cone base

innerDiameter : float

(float) Diameter of 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 center of base of cylinder
    diameter : float - (float) Diameter of cylinder
    length : float - (float) total length of the screw brep

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 center of base of cylinder

diameter : float

(float) Diameter of cylinder

length : float

(float) total length of the screw brep

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 world XY plane
    plane : Plane - (Plane) A plane with any orientation
    height : float - (float) The height to extrude along the Z axis of 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 world XY plane

plane : Plane

(Plane) A plane with any orientation

height : float

(float) The height to extrude along the Z axis of 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 = center of hole
    length : float - (float) total length of slotted hole
    width : float - (float) width = radius of slotted hole
    height : float - (float) height of 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 = center of hole

length : float

(float) total length of slotted hole

width : float

(float) width = radius of slotted hole

height : float

(float) height of 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 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 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 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 not. Fails if no meshes can be extracted.

RhinoScriptSyntax.OrientBrep(brep)

Full Usage: RhinoScriptSyntax.OrientBrep(brep)

Parameters:
Returns: Brep

If brep.SolidOrientation is inward then flip brep.

Extended Type: RhinoScriptSyntax

brep : Brep
Returns: Brep

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 (= BooleanDifference), so that a single brep is returned, draws 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.