# Mesh Threshold Selector

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-f81c0a3c9290b02ae97da8ab705cfa95425ef8f8%2FMesh_Threshold_Selector.png?alt=media)

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-915c8ce3bffb8fbfc8901730dedce819ef4abe3f%2FMesh_Threshold_Selector.png?alt=media) - [\[source code\]](https://github.com/ladybug-tools/ladybug-grasshopper/blob/master/ladybug_grasshopper/src/LB%20Mesh%20Threshold%20Selector.py)

Select a sub-region of a mesh using aligned values and conditional criteria.

This has multiple uses and can be applied to any study that outputs a list of results that are aligned with a mesh. For example, quantifying the daylit area from a daylight analysis, selecting the portion of a roof with enough solar radiation for photovoltaic panels, etc.

### Inputs

* **values \[Required]**

A list of numbers that correspond to either the number of faces or vertices of the \_mesh.

* **mesh \[Required]**

The mesh from which a sub-region will be selected. This is typically a colored mesh output from a study.

* **operator**

A text string representing an operator for the the conditional statement. The default is greater than (>). This must be an operator in python and examples include the following:

```
* > - Greater Than

* < - Less Than

* >= - Greater or Equal

* <= - Less or Equal

* == - Equals

* != - Does not Equal
```

* **pct\_threshold**

A number between 0 and 100 that represents the percentage of the mesh faces or vertices to be included in the resulting sub\_mesh. (Default: 25%).

* **abs\_threshold**

An optional number that represents the absolute threshold above which a given mesh face or vertex is included in the resulting sub\_mesh. An input here will override the percent threshold input above.

### Outputs

* **report**

Reports, errors, warnings, etc.

* **total\_value**

The sum of each value that meets the criteria multiplied by the corresponding mesh face area. This can generally be used to understand how much value is captured according to the conditional critera. For example, if the input \_mesh is a radiation study, this is equal to the total radiation falling on the sub\_mesh. This may or may not be meaningful depending on the units of the connected \_values. This output will always be zero for cases where values correspond to mesh vertices and not faces.

* **total\_area**

The area of the sub\_mesh that meets the criteria.

* **sub\_mesh**

A new mesh with the faces or vertices removed to reveal just the portion that satisfies the conditional criteria. By default, this is hidden to that just the outline appears in the geometry preview.

* **outline**

A set of lines outlining the portion of the mesh that is above the threshold.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ladybug.tools/ladybug-primer/components/4_extra/mesh_threshold_selector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
