User's Reference - Measure

### Measure

Category

Transformation

Function

Performs length, area, and volume measurements on an input object.

Syntax

    output = Measure(input, what);

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`input` | field | none | data to be measured
`what` | string | input dependent | measurement to be performed

Outputs

Name | Type | Description
--- | --- | ---
`output` | value | result of the measurement

Functional Details

`input` | is the field to be measured. It is expected to have a "connections" component consisting of lines, surfaces, or volumes.
`what` | specifies the type of measurement to be performed. Unless the parameter value is "element," the module performs a measurements of the field as a whole. The structure of the output is identical to that of the input, with each field (or composite field) replaced by an array containing a simple scalar floating-point measurement of that field. The default value of `what` is determined by the "connections"-component element type. If the connections element type is: "lines," the parameter defaults to "length." "triangles" or "quads," the parameter defaults to "area." is "cubes" or "tetrahedra," the parameter defaults to "volume." If `what` is "element," the module performs element-by-element measurement on `input,` replacing the "data" component with scalar arrays that are connection dependent and contain the measurement of each connection element. If the connections element type is: "lines," the resulting "data" component will contain the length of each line segment. "triangles" or "quads," the resulting "data" component will contain the area of each triangle or quad. is "cubes" or "tetrahedra," the resulting "data" component will contain the volume of each cube or tetrahedron.

The options for `what` are shown in the following table:

Table 7. Options for Measure's What Parameter

Connection element | What | Measurement
--- | --- | ---
lines | "length" | total length of line segments
"element" | length of each line segment
"area" | 2-D area enclosed by connected line segments. If a series of segments is not closed, a segment connecting the first and final points of the sequence is added.
faces | "area" | total area of all faces
"element" | area of each face
triangles, quads | "area" | total area of all surface elements
"element" | area of each surface element
"volume" | 3-D volume enclosed by connected sets of surface elements. If a connected set of surface elements is not closed, the approximate closing surface(s) is(are) found by triangulating the openings in the surface (defined by loops of unshared edges).
polylines | "length" | total length of all lines
"element" | length of each line
tetrahedra, cubes | "element" | volume of each 3-D element
"volume" | total volume of all 3-D elements
Notes: The default value for lines and polylines is "length"; "area" is the default for triangles, quads, and faces; and "volume" is the default for tetrahedra and cubes. All sequences of line segments are handled independently when measuring area. Sequences are defined by following exactly identical coordinate points, rather than by following identical point indices. Overlapping volumes are not detected. Similarly for volumes enclosed by surface elements, a volume is defined by triangles consisting of identical vertex positions, rather than by triangles consisting of identical point indices. Overlapping volume is not detected. Be aware of the following: Curves are closed by straight lines regardless of the geometry from which they were derived. The surfaces added to close volumes are triangulated as if planar. This module ignores any transforms in the object. For example, if the object is scaled by 2 (with the Scale module), the volume will not increase.

Example Visual Program

    ThunderGlyphSheet.net

See Also

Compute

[ OpenDX Home at IBM | OpenDX.org ]