Options
All
  • Public
  • Public/Protected
  • All
Menu

Class 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;
   }

Hierarchy

  • PartSettings

Index

Accessors

color

color: Color3Like

The color of the part.

drawStyle

drawStyle: DrawStyle

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

eyeLift

eyeLift: 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.

Readonly geometryIndex

geometryIndex: number

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.

highlight

highlight: boolean

Whether the part should be highlighted.

opacity

opacity: number

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

Readonly partId

partId: number

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.

showFringes

showFringes: boolean

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.

showVectors

showVectors: boolean

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).

smooth

smooth: boolean

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.

visible

visible: boolean

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

Methods

getAsProperties

setFromProperties

  • Applies the settings in the given properties object to this part

    Parameters

    Returns void

Generated using TypeDoc