# Isosurface

class `cee.ug.``Isosurface`()

  Specification of an isosurface (both parameters and attributes) in a `RemoteModel`.

  Use this object to control the settings and attributes of an isosurface. The isosurface is defined by specifying the scalar to compute from (with `isoScalarResultId`) and the value to compute the surface for (with `isoValue`). The result is a surface within the model containing all points where the scalar result has the given value.

  You can map any scalar result onto the isosurface with `mapScalarResultId` and also map a vector result with `mapVectorResultId`. The settings for the mapped results can be controlled with the `ScalarSettings` and `VectorSettings` objects.

  To create an isosurface, use `RemoteModel.addIsosurface`.

  Example: Show an isosurface

      var modelDir = myModel.modelDirectory;

      // Add iso surface if we have a scalar result
      if (modelDir.scalarResultArray.length > 0) {
          var iso = myModel.addIsosurface();
          iso.isoScalarResultId = modelDir.scalarResultArray[0].id;

          if (myModel.getScalarResultMinimumValue(iso.isoScalarResultId) != undefined) {
              iso.isoValue = (myModel.getScalarResultMinimumValue(iso.isoScalarResultId)
                    + myModel.getScalarResultMaximumValue(iso.isoScalarResultId))/2;
          } else {
              iso.isoValue = 0.5;
          }

          if (modelDir.scalarResultArray.length > 1) {
              iso.mapScalarResultId = modelDir.scalarResultArray[1].id;
          } else {
              iso.mapScalarResultId = modelDir.scalarResultArray[0].id;
          }
      }

      // Set model to outline to show the cutting planes
      myModel.setDrawStyleAllParts(cee.ug.DrawStyle.OUTLINE);

  This code sample produces the following image in the 3D Viewer:

Accessors

- `computeFromVisibleParts`
- `highlight`
- `id`
- `isPrecomputed`
- `isoScalarResultId`
- `isoValue`
- `mapContourLinesResultId`
- `mapScalarResultId`
- `mapVectorResultId`
- `opacity`
- `surfaceColor`
- `visible`

Methods

- `getAsProperties`
- `setFromProperties`

## Accessors

`Isosurface.``computeFromVisibleParts`()

  If set to true, the isosurface will be computed from only the visible parts. Any part that is not visible will not contribute to the isosurface.

  Return type: | boolean

`Isosurface.``computeFromVisibleParts`(visiblePartsOnly)

  Arguments: | visiblePartsOnly (`boolean`) – None
  Return type: | void

`Isosurface.``highlight`()

  Whether the isosurface should be highlighted.

  Return type: | boolean

`Isosurface.``highlight`(highlight)

  Arguments: | highlight (`boolean`) – None
  Return type: | void

`Isosurface.``id`()

  The id of the isosurface. This is assigned by the system when you call `RemoteModel.addIsosurface` and is used to identify the isosurface.

  Return type: | number

`Isosurface.``isPrecomputed`()

  Is true if the isosurface is precomputed and cannot be changed

  Return type: | boolean

`Isosurface.``isoScalarResultId`()

  The scalar result to compute the isosurface from. This property is mandatory and must refer to one of the scalar results in `ModelDirectory.scalarResultArray`.

  Return type: | number

`Isosurface.``isoScalarResultId`(isoScalarResultId)

  Arguments: | isoScalarResultId (`number`) – None
  Return type: | void

`Isosurface.``isoValue`()

  The value to compute the isosurface from. The value of the scalar result with id `isoScalarResultId` will be equal to this value at all points on the isosurface.

  Return type: | number

`Isosurface.``isoValue`(isoValue)

  Arguments: | isoValue (`number`) – None
  Return type: | void

`Isosurface.``mapScalarResultId`()

  The id of the scalar result to show on the isosurface.

  This id must refer to one of the scalar results in `ModelDirectory.scalarResultArray`. You can change the settings for the scalar with the `ScalarSettings` object.

  Set to -1 to show no scalars on the isosurface.

  Return type: | number

`Isosurface.``mapScalarResultId`(mapScalarResultId)

  Arguments: | mapScalarResultId (`number`) – None
  Return type: | void

`Isosurface.``mapVectorResultId`()

  The id of the vector result to show on the isosurface. One vector will be shown in each node of the surface.

  This id must refer to one of the vector results in `ModelDirectory.vectorResultArray`. The settings for the vector arrows can be changed with the `VectorSettings` object.

  Set to -1 to show no vectors on the isosurface.

  Return type: | number

`Isosurface.``mapVectorResultId`(mapVectorResultId)

  Arguments: | mapVectorResultId (`number`) – None
  Return type: | void

`Isosurface.``opacity`()

  Opacity of the isosurface. 0.0 means fully transparent (invisible), 1.0 means fully opaque.

  Return type: | number

`Isosurface.``opacity`(opacity)

  Arguments: | opacity (`number`) – None
  Return type: | void

`Isosurface.``surfaceColor`()

  The color of the isosurface if not showing a result (mapScalarResultId = -1)

  Return type: | Color3Like

`Isosurface.``surfaceColor`(clr)

  Arguments: | clr (`Color3Like`) – None
  Return type: | void

`Isosurface.``visible`()

  Visibility of the isosurface. Use this to show or hide an isosurface in the 3D Viewer.

  Return type: | boolean

`Isosurface.``visible`(visible)

  Arguments: | visible (`boolean`) – None
  Return type: | void

## Methods

### getAsProperties

`Isosurface.``getAsProperties`()

  Gets the settings for this isosurface as a Plain Old JavaScript Object (POJO).

  Return type: | IsosurfaceProperties

### setFromProperties

`Isosurface.``setFromProperties`(props)

  Arguments: | props (`Partial`) – None

  Applies the settings in the given properties object to this isosurface.

  Return type: | void

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Envision for Web or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...