Skip to content

BH.oM.Matter.Options.DensityExtractionOptions

Settings for extraction of Density from a List of IDensityProviders.

Class structure

Implemented interfaces and base types

The DensityExtractionOptions is inheriting from the following base type(s) and implements the following interfaces:

Properties

Defining properties

The following properties are defined on the class

Name Type Description Quantity
Type Type A specific type of IDensityProvider to limit the search to. If null all IDensityProviders on the material are considered.
Errors will be raised if the type provided is not a IDensityProvider type.
-
AllowFallbackIfNoType bool If true, and material does not contain a IDensityProvider of the specified type, DensityExtraction falls back to look for other densities. If false and material does not contain the type DensityExtraction exits. -
ExtractionType DensityExtractionType - -
EqualTolerance double The ratio tolerance for considering the value of the densities as equal. Density values are deemed equal if (max - min / mean) is smaller than this value, where mean = (max + min)/2, i.e. a tolerance of 0.01 means an allowable difference of 1% normalised to the mean value of found densities. Ratio [-]
IgnoreZeroValues bool Ignores densities of 0 if true when computing average or checking for equality. -
ZeroTolerance double Threshold for density values to be seen as 0. -

Code and Schema

C# implementation

C#
public class DensityExtractionOptions : BH.oM.Base.IObject

Assembly: Matter_oM.dll

The C# class definition is available on github:

All history and changes of the class can be found by inspection the history.

JSON Schema implementation

The object is defined as a JSON schema. You can validate a JSON instance against this schema by reference. To do this, use the schema reference below in a validator like this one.

JSON Schema
{
 "$ref" : "https://raw.githubusercontent.com/BHoM/BHoM_JSONSchema/develop/Matter_oM/Options/DensityExtractionOptions.json"
}

The JSON Schema is available on github here: