# PartSettings

class `cee.ug.``PartSettings`()

  Specification of the visual appearance of a part in a RemoteModel

  Use this object to control how the part will be rendered in the 3D viewer. You can set whether the part is `visible`, the `drawStyle`, `color`, `opacity`, and if the part should be `smooth` or flat shaded. You can also set `showFringes` to specify if the part should show the current scalar result (if a scalar result is specified in the `ModelSpec`) and set `showVectors` to specify if vector arrows should be drawn for the surface of this part (if a vector result is specified in the `ModelSpec`).

  You can access PartSettings objects with `RemoteModel.getPartSettingsAt`.

  Example: Show all parts as transparent

      for (var i = 0; i < myModel.partCount; ++i) {
          var partSettings = myModel.getPartSettingsAt(i);
          partSettings.drawStyle = cee.ug.DrawStyle.SURFACE;
          partSettings.opacity = 0.5;
      }

  or

      for (var ps of myModel.getPartSettingsArray()) {
          ps.drawStyle = cee.ug.DrawStyle.SURFACE;
          ps.opacity = 0.5;
      }

Accessors

- `color`
- `disableElementSetFiltering`
- `disableExpandElements`
- `disableFeatureExtraction`
- `disableMirroring`
- `drawStyle`
- `eyeLift`
- `geometryIndex`
- `highlight`
- `opacity`
- `partId`
- `showFringes`
- `showVectors`
- `smooth`
- `visible`

Methods

- `getAsProperties`
- `setFromProperties`

## Accessors

`PartSettings.``color`()

  The color of the part.

  Return type: | Color3Like

`PartSettings.``color`(clr)

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

`PartSettings.``disableElementSetFiltering`()

  Disables element set filtering for this part. See `ModelSpec.visibleSetIdArray`

  Return type: | boolean

`PartSettings.``disableElementSetFiltering`(disable)

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

`PartSettings.``disableExpandElements`()

  Disables element expansion for this part. Beams will be shown as lines regardless of if they have cross section data defined or not.

  Return type: | boolean

`PartSettings.``disableExpandElements`(disable)

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

`PartSettings.``disableFeatureExtraction`()

  Disables feature extraction for this part. It will be excluded when computing e.g. isosurfaces.

  Return type: | boolean

`PartSettings.``disableFeatureExtraction`(disable)

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

`PartSettings.``disableMirroring`()

  Disable mirroring for this part.

  If set to true, this part will not be included in the mirroring of the model.

  Return type: | boolean

`PartSettings.``disableMirroring`(disable)

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

`PartSettings.``drawStyle`()

  The specification of how to render the part (surface, lines, points, mesh, etc).

  Return type: | DrawStyle

`PartSettings.``drawStyle`(drawStyle)

  Arguments: | drawStyle (`DrawStyle`) – None
  Return type: | void

`PartSettings.``eyeLift`()

  The eye lift mode to use for this part.

  Eye lift can be used when facing z fighting issues (triangles rendered in the same plane). By applying eye lift to one part, it will be moved slightly towards the eye, resolving the z fighting issues. The current version offers 3 eye lift factors to choose from.

  Return type: | EyeLift

`PartSettings.``eyeLift`(mode)

  Arguments: | mode (`EyeLift`) – None
  Return type: | void

`PartSettings.``geometryIndex`()

  The zero-based geometryIndex of the part. A RemoteModel might have more than one geometry, but in most cases there is only one. The combination of geometryIndex and partId uniquely identifies the part.

  Return type: | number

`PartSettings.``highlight`()

  Whether the part should be highlighted.

  Return type: | boolean

`PartSettings.``highlight`(highlight)

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

`PartSettings.``opacity`()

  The opacity of the part. 1.0 is fully opaque, 0.0 if fully transparent (invisible).

  Return type: | number

`PartSettings.``opacity`(opacity)

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

`PartSettings.``partId`()

  The id of the part. The id is >=0 and unique within the part’s geometry. The combination of geometryIndex and partId uniquely identifies the part.

  Return type: | number

`PartSettings.``showFringes`()

  Whether scalar fringes (filled contours) should be shown on this part. This flag only applies if the `ModelSpec.fringesResultId` is set to a valid scalar result id.

  Return type: | boolean

`PartSettings.``showFringes`(show)

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

`PartSettings.``showVectors`()

  Whether vector arrows should be rendered on the surface of this part. This flag only applies if the `ModelSpec.vectorResultIdArray` is set to valid vector result id(s).

  Return type: | boolean

`PartSettings.``showVectors`(show)

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

`PartSettings.``smooth`()

  Flag controlling the shading model of the part.

  If true, smooth shading will be used for the part, where it is rendered with a smoothed out surface with a per pixel lighting. If false, a flat shading rendering will be applied where the surface of an element is rendered with the same color.

  Return type: | boolean

`PartSettings.``smooth`(smooth)

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

`PartSettings.``visible`()

  Visibility of the part. Use this to show or hide a part in the 3D Viewer.

  Return type: | boolean

`PartSettings.``visible`(visible)

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

## Methods

### getAsProperties

`PartSettings.``getAsProperties`()

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

  Return type: | PartSettingsProperties

### setFromProperties

`PartSettings.``setFromProperties`(props)

  Arguments: | props (`Partial`) – None

  Applies the settings in the given properties object to this part

  Return type: | void

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Web in your own language, 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...