# Grasshopper2 namespace

Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

## Classes

- [Arithmetic](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.md): This static class collects and maintains all arithmetic operators.
- [Arithmetic.Details](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.details.md): Exposes geeky details about the arithmetic class.
- [Arithmetic.FunctionAttribute](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute.md): Any function method inside an [ArithmeticRepository](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmeticrepository.md) must be decorated with this attribute to identify it as such. The method signature must follow: TResult Method(TA a, TB b)
- [Arithmetic.OperatorAttribute](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.operatorattribute.md): Any operator method inside an [ArithmeticRepository](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmeticrepository.md) must be decorated with this attribute to identify it as such. The method signature must follow: TResult Method(TA a, TB b)
- [ArithmeticRepository](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmeticrepository.md): Derive from this class to provide custom arithmetic operator methods. Add any number of public, *static* methods which represent either binary operator logic, or unary/binary/ternary arithmetic function logic and decorate them with the appropriate [Arithmetic.OperatorAttribute](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.operatorattribute.md) or [Arithmetic.FunctionAttribute](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.functionattribute.md) respectively.
- [AuthorAttribute](https://developer.rhino3d.com/api/gh2/type/grasshopper2.authorattribute.md): Any final component, parameter or other canvas object must be attributed to a specific author, so the resident proofreader knows who to turn to for questions and comments.
- [BeforeAfterEventArgs<TOwner, TData>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.beforeaftereventargs-2.md): Utility event arguments for events that provide both before and after values.
- [Folders](https://developer.rhino3d.com/api/gh2/type/grasshopper2.folders.md): Provides static properties for files and folders relevant to the Grasshopper process.
- [InlineTest](https://developer.rhino3d.com/api/gh2/type/grasshopper2.inlinetest.md)
- [Instances](https://developer.rhino3d.com/api/gh2/type/grasshopper2.instances.md): Access to various primary instances of classes in the Grasshopper plugin.
- [MaassField](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maassfield.md)
- [Maths](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.md): Mathematical trig functions.
- [Maths.AbstractSearch<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.abstractsearch-1.md): Utility class for performing extreme searches.
- [Maths.BarChart2D](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.barchart2d.md)
- [Maths.Boundary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.boundary.md): Methods for finding various kinds of boundaries.
- [Maths.Boundary.ConvexHull2D](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.boundary.convexhull2d.md): Encapsulates the indices (in anti-clockwise order) of all the points in a 2D point set which lie on the convex hull polygon.
- [Maths.Boundary.SpanningSphere](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.boundary.spanningsphere.md): Encapsulates all the fields used in a bounding (or 'spanning') sphere.
- [Maths.Constant](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.constant.md): A constant, named value registered with the centralised [Maths.Constants](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.constants.md) repo.
- [Maths.Constants](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.constants.md): Central collection of all constant values known to Grasshopper. Plugins may add constant values on load. Note that is primarily a User-Interface collection, the [Maths.Constants](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.constants.md) class contains a lot of the numeric constants directly usable in code.
- [Maths.EllipseFitting](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.ellipsefitting.md): Static ellipse fitting methods.
- [Maths.FlatTriangleTrigonometry](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.flattriangletrigonometry.md): A class for finding unknown triangle properties based on known properties. This class solves for triangles in flat Euclidean space where the sum of the angles is known to equal pi radians.
- [Maths.Flow](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.flow.md)
- [Maths.Flow.EdgeStatus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.flow.edgestatus.md)
- [Maths.Flow.VertexStatus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.flow.vertexstatus.md)
- [Maths.Histogram2d](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.histogram2d.md): Static class for creating 2D mesh histograms.
- [Maths.IndexMap](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.indexmap.md): An integer array of length N containing all the integers from 0 to N-1. This map encodes a specific (re)ordering of items in an array. Grasshopper uses index mapping instead of in-place sorting so that a specific ordering can be cheaply applied to more than one collection.
- [Maths.Maps](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.maps.md): Utility class for mapping coordinates between various spaces.
- [Maths.MaximumSearch<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.maximumsearch-1.md): Utility class for performing far searches.
- [Maths.MaximumSearchMultiple<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.maximumsearchmultiple-1.md): Utility class for performing multiple far searches.
- [Maths.MeshHeight](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.meshheight.md): Vertical "how high is the mesh over this spot" queries, answered in bulk.
- [Maths.MinimumSearch<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.minimumsearch-1.md): Utility class for performing near searches.
- [Maths.MinimumSearchMultiple<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.minimumsearchmultiple-1.md): Utility class for performing multiple near searches.
- [Maths.PseudoRandom](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.pseudorandom.md): Central utilities for creating random engines and random collections.
- [Maths.PseudoRandom.PoissonSetup](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.pseudorandom.poissonsetup.md): Describes the initial setup for a two-dimensional Poisson sampling.
- [Maths.PseudoRandom.RandomWithAvoidance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.pseudorandom.randomwithavoidance.md): A class for generating random values which are never too close to previously generated values.
- [Maths.Sampling](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.sampling.md): Confidence intervals for quantities estimated from a single sample. The bounds agree with those of the equivalent commands in R, i.e. `t.test` and `binom.test`.
- [Maths.Spirals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.spirals.md): Spiral utility methods. Very much unfinished.
- [Maths.Tesselation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.tesselation.md)
- [Maths.ThinPlate2D](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.thinplate2d.md): A two-dimensional thin-plate implementation for interpolating unstructured samples.
- [Maths.ThinPlate3D](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.thinplate3d.md): A three-dimensional thin-plate implementation for interpolating unstructured samples.
- [Maths.Voronoi2d](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.voronoi2d.md): Planar Voronoi diagrams of weighted point sites (RH-79405), through RHC_GH2_WeightedVoronoi2d. The weighted distance from site i is (t*A_i + 1 - t) * |x - r_i| + (1 - t) * B_i: t = 0 is purely additive (hyperbolic arcs), t = 1 purely multiplicative (circular arcs).
- [Maths.Voronoi2d.Result](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.voronoi2d.result.md): The clipped diagram.
- [NumericRange](https://developer.rhino3d.com/api/gh2/type/grasshopper2.numericrange.md): A single numeric sequence. This wraps either a double[], an int[] or a BigInteger[].
- [Prose](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.md): Utility class for various textual and linguistic operations.
- [Prose.CharIndexer](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.charindexer.md): CharIndexer which always return the null char if the index is out of bounds. It's a good class for getting string characters without having to worry about out-of-bounds indices.
- [Prose.Graphemes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.graphemes.md): A string made up of complete graphemes. That is, instead of an array of [char](https://learn.microsoft.com/dotnet/api/system.char) values, it consists of an array of string symbols which consists of base chars and their combining chars.
- [Prose.MaskPattern](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.maskpattern.md): Defines a masking pattern.
- [Prose.SequenceSymbols](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.sequencesymbols.md): Symbols used for composing string sequences.
- [Prose.Text](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.text.md): Represents a string with alternating textual and numeric fragments. This makes mixed number/text comparisons much faster and more reliable.
- [Prose.TextWithCaret](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.textwithcaret.md): Represents a string with caret location and block selection. This is useful for mimicking text area inputs that are not tied to specific controls. All positions ([Prose.TextWithCaret.Caret](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.textwithcaret/caret.md), [Prose.TextWithCaret.Block](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.textwithcaret/block.md) and the block bounds) are measured in grapheme clusters, not [char](https://learn.microsoft.com/dotnet/api/system.char) code units. The text is segmented into complete grapheme runs (base character plus any combining marks, and whole surrogate pairs) via [Prose.Graphemes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.graphemes.md), so the caret can never land inside a cluster and no edit can split one into invalid UTF-16.
- [RangeNotation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.rangenotation.md): Utility methods for creating numeric ranges.
- [Settings](https://developer.rhino3d.com/api/gh2/type/grasshopper2.settings.md): Provides static properties and events for central Grasshopper settings.
- [Settings.Setting<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.settings.setting-1.md): A single setting in Grasshopper settings collections.
- [SettingsFile](https://developer.rhino3d.com/api/gh2/type/grasshopper2.settingsfile.md): A class for caching settings which are stored in a file.
- [SettingsFolder](https://developer.rhino3d.com/api/gh2/type/grasshopper2.settingsfolder.md): Wrapper class for accessing various settings files in a single folder.
- [Turing](https://developer.rhino3d.com/api/gh2/type/grasshopper2.turing.md): A 2D Turing state machine.
- [Turing.Instruction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.turing.instruction.md): Represents a single instruction in a two-dimensional Turing machine.
- [Turing.Sheet](https://developer.rhino3d.com/api/gh2/type/grasshopper2.turing.sheet.md): A Turing sheet, or two dimensional Turing tape.

## Enums

- [Arithmetic.Binary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.binary.md): List of standard binary arithmetic functions.
- [Arithmetic.Operation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.operation.md): Enumerates the defined arithmetic operators.
- [Arithmetic.Ternary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.ternary.md): List of standard ternary arithmetic functions.
- [Arithmetic.Unary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.arithmetic.unary.md): List of standard unary arithmetic functions.
- [Maths.AiryKind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.airykind.md): Enumerates the defined Airy implementations.
- [Maths.BesselKind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.besselkind.md): Enumerates the defined Bessel implementations.
- [Maths.ColourMetric](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.colourmetric.md): Enumerates the defined colour difference metrics used in the [Maths.Distance(Maths.ColourMetric, Color, Color)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths/distance.md)> like functions.
- [Maths.CorrelationMethod](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.correlationmethod.md): Enumerates the defined correlation algorithms.
- [Maths.DistanceMetric](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.distancemetric.md): Enumerates the available distance metrics used in the [Maths.Distance(Maths.DistanceMetric, double[], double[])](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths/distance.md) like functions.
- [Maths.Engine](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.engine.md): Enumerates the available random number generators.
- [Maths.Flow.EdgeDirection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.flow.edgedirection.md)
- [Maths.Flow.EffectiveEdgeType](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.flow.effectiveedgetype.md)
- [Maths.Flow.NakedEdgeType](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.flow.nakededgetype.md)
- [Maths.Maps.DiscMapping](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.maps.discmapping.md): Enumerates the various kinds of disc → square mapping algorithms.
- [Maths.Maps.PlaneMapping](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.maps.planemapping.md): Enumerates the possible mappings between planar coordinates.
- [Maths.Maps.SphereProjection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.maps.sphereprojection.md): Enumerates the possible mapping mappings for spheres.
- [Maths.MeanKind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.meankind.md): Enumerates the defined types of average.
- [Maths.MultipleMethod](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.multiplemethod.md): Enumerates the different ways in which the [Maths.Multiple(double, double, Maths.MultipleMethod)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths/multiple.md) return can be computed.
- [Maths.SmoothEdge](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.smoothedge.md): Enumerates the ways smoothing can treat values beyond the ends of a sequence.
- [Maths.SmoothKind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.smoothkind.md): Enumerates the way a number can be smoothed based on its neighbours.
- [Maths.SmoothLimit](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.smoothlimit.md): Enumerates the possible smoothing function for [Maths.SmoothMin(double, double, Maths.SmoothLimit, double)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths/smoothmin.md) and [Maths.SmoothMax(double, double, Maths.SmoothLimit, double)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths/smoothmax.md) functions. In every mode except [Maths.SmoothLimit.None](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.smoothlimit.md) the `k` parameter represents the width of the blend zone, measured in the same units as `a` and `b`.
- [Prose.CaretDeparture](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.caretdeparture.md): The ways a key press can ask to leave a single-line text context: a plain movement or deletion which cannot be absorbed because the caret already sits at the boundary it points past, or a vertical step which a single line can never absorb. Whoever hosts the text decides whether a neighbouring context exists and what landing there means.
- [Prose.GrammarArticle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.grammararticle.md): Enumerates the possible articles that can be prefixed to a term.
- [Prose.GrammarCasing](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.grammarcasing.md): Enumerates the possible casings for a word group.
- [Prose.GrammarNumber](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.grammarnumber.md): Enumerates the grammatical numbers in which terms can occur.
- [Prose.SequenceTrimming](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.sequencetrimming.md): Enumerates the possible trimming types when composing sequence strings.
- [Prose.StringMetric](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.stringmetric.md): Enumerates the possible string distance metrics.
- [ResourceFolder](https://developer.rhino3d.com/api/gh2/type/grasshopper2.resourcefolder.md): Enumerates the pre-defined Grasshopper2 resources sub-folders.

## Structs

- [Maths.Histogram](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.histogram.md): A complete historgram for a data set.
- [Maths.HistogramBucket](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.histogrambucket.md): Represents a single bucket in a histogram.
- [Prose.ByteSize](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize.md): Provides utility methods for converting and formatting bits and bytes. Code copied from: https://github.com/omar/ByteSize
- [Prose.KeyValueFragment](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.keyvaluefragment.md)
- [Prose.Mask](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.mask.md): Represents a boolean mask for each character in a string.

## Delegates

- [Maths.HowManyBuckets](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.howmanybuckets.md): Bucket resolver delegate.
