
############
PartSettings
############

.. js: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 :js:func:`visible <cee.ug.PartSettings.visible>`\ , the :js:func:`drawStyle <cee.ug.PartSettings.drawStyle>`\ , :js:func:`color <cee.ug.PartSettings.color>`\ , :js:func:`opacity <cee.ug.PartSettings.opacity>`\ , and if the part should be :js:func:`smooth <cee.ug.PartSettings.smooth>` or flat shaded. You can also set :js:func:`showFringes <cee.ug.PartSettings.showFringes>` to specify if the part should show the current scalar result (if a scalar result is specified in the :js:class:`ModelSpec <cee.ug.ModelSpec>`\ ) and set :js:func:`showVectors <cee.ug.PartSettings.showVectors>` to specify if vector arrows should be drawn for the surface of this part (if a vector result is specified in the :js:class:`ModelSpec <cee.ug.ModelSpec>`\ ).
   
   You can access PartSettings objects with :js:meth:`RemoteModel.getPartSettingsAt <cee.ug.RemoteModel.getPartSettingsAt>`\ .
   
   **Example:** Show all parts as transparent
   
   .. code-block:: javascript
   
      for (var i = 0; i < myModel.partCount; ++i) {
          var partSettings = myModel.getPartSettingsAt(i);
          partSettings.drawStyle = cee.ug.DrawStyle.SURFACE;
          partSettings.opacity = 0.5;
      }
   
   or
   
   .. code-block:: javascript
   
      for (var ps of myModel.getPartSettingsArray()) {
          ps.drawStyle = cee.ug.DrawStyle.SURFACE;
          ps.opacity = 0.5;
      }
   
   
   Index
   =====
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.ug.PartSettings.color`
   * :js:func:`~cee.ug.PartSettings.disableElementSetFiltering`
   * :js:func:`~cee.ug.PartSettings.disableExpandElements`
   * :js:func:`~cee.ug.PartSettings.disableFeatureExtraction`
   * :js:func:`~cee.ug.PartSettings.disableMirroring`
   * :js:func:`~cee.ug.PartSettings.drawStyle`
   * :js:func:`~cee.ug.PartSettings.eyeLift`
   * :js:func:`~cee.ug.PartSettings.geometryIndex`
   * :js:func:`~cee.ug.PartSettings.highlight`
   * :js:func:`~cee.ug.PartSettings.opacity`
   * :js:func:`~cee.ug.PartSettings.partId`
   * :js:func:`~cee.ug.PartSettings.showFringes`
   * :js:func:`~cee.ug.PartSettings.showVectors`
   * :js:func:`~cee.ug.PartSettings.smooth`
   * :js:func:`~cee.ug.PartSettings.visible`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.ug.PartSettings.getAsProperties`
   * :js:meth:`~cee.ug.PartSettings.setFromProperties`
   
   



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


.. js:method:: cee.ug.PartSettings.color

      .. rst-class:: sig-pretty-signature
      
         | *get* color(): :js:class:`Color3Like <cee.Color3Like>`
      
      The color of the part.
      
      **Returns**\ : :js:class:`Color3Like <cee.Color3Like>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* color(**clr**\ : :js:class:`Color3Like <cee.Color3Like>`\ ): *void*
      
      **Parameters**
      
      
         **clr**\ : :js:class:`Color3Like <cee.Color3Like>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.disableElementSetFiltering

      .. rst-class:: sig-pretty-signature
      
         | *get* disableElementSetFiltering(): *boolean*
      
      Disables element set filtering for this part. See :js:func:`ModelSpec.visibleSetIdArray <cee.ug.ModelSpec.visibleSetIdArray>`
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* disableElementSetFiltering(**disable**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **disable**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.disableExpandElements

      .. rst-class:: sig-pretty-signature
      
         | *get* disableExpandElements(): *boolean*
      
      Disables element expansion for this part. Beams will be shown as lines regardless of if they have cross section data defined or not.
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* disableExpandElements(**disable**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **disable**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.disableFeatureExtraction

      .. rst-class:: sig-pretty-signature
      
         | *get* disableFeatureExtraction(): *boolean*
      
      Disables feature extraction for this part. It will be excluded when computing e.g. isosurfaces.
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* disableFeatureExtraction(**disable**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **disable**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.disableMirroring

      .. rst-class:: sig-pretty-signature
      
         | *get* disableMirroring(): *boolean*
      
      Disable mirroring for this part.
      
      If set to true, this part will not be included in the mirroring of the model.
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* disableMirroring(**disable**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **disable**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.drawStyle

      .. rst-class:: sig-pretty-signature
      
         | *get* drawStyle(): :js:data:`DrawStyle <cee.ug.DrawStyle>`
      
      The specification of how to render the part (surface, lines, points, mesh, etc).
      
      **Returns**\ : :js:data:`DrawStyle <cee.ug.DrawStyle>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* drawStyle(**drawStyle**\ : :js:data:`DrawStyle <cee.ug.DrawStyle>`\ ): *void*
      
      **Parameters**
      
      
         **drawStyle**\ : :js:data:`DrawStyle <cee.ug.DrawStyle>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.eyeLift

      .. rst-class:: sig-pretty-signature
      
         | *get* eyeLift(): :js:data:`EyeLift <cee.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.
      
      **Returns**\ : :js:data:`EyeLift <cee.EyeLift>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* eyeLift(**mode**\ : :js:data:`EyeLift <cee.EyeLift>`\ ): *void*
      
      **Parameters**
      
      
         **mode**\ : :js:data:`EyeLift <cee.EyeLift>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.geometryIndex

      .. rst-class:: sig-pretty-signature
      
         | *get* 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.
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.PartSettings.highlight

      .. rst-class:: sig-pretty-signature
      
         | *get* highlight(): *boolean*
      
      Whether the part should be highlighted.
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* highlight(**highlight**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **highlight**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.opacity

      .. rst-class:: sig-pretty-signature
      
         | *get* opacity(): *number*
      
      The opacity of the part. 1.0 is fully opaque, 0.0 if fully transparent (invisible).
      
      **Returns**\ : *number*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* opacity(**opacity**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **opacity**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.partId

      .. rst-class:: sig-pretty-signature
      
         | *get* 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.
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.PartSettings.showFringes

      .. rst-class:: sig-pretty-signature
      
         | *get* showFringes(): *boolean*
      
      Whether scalar fringes (filled contours) should be shown on this part. This flag only applies if the :js:func:`ModelSpec.fringesResultId <cee.ug.ModelSpec.fringesResultId>` is set to a valid scalar result id.
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* showFringes(**show**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **show**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.showVectors

      .. rst-class:: sig-pretty-signature
      
         | *get* showVectors(): *boolean*
      
      Whether vector arrows should be rendered on the surface of this part. This flag only applies if the :js:func:`ModelSpec.vectorResultIdArray <cee.ug.ModelSpec.vectorResultIdArray>` is set to valid vector result id(s).
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* showVectors(**show**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **show**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.smooth

      .. rst-class:: sig-pretty-signature
      
         | *get* 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.
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* smooth(**smooth**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **smooth**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.PartSettings.visible

      .. rst-class:: sig-pretty-signature
      
         | *get* visible(): *boolean*
      
      Visibility of the part. Use this to show or hide a part in the 3D Viewer.
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* visible(**visible**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **visible**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: cee.ug.PartSettings.getAsProperties

      .. rst-class:: sig-pretty-signature
      
         | getAsProperties(): :js:class:`PartSettingsProperties <cee.ug.PartSettingsProperties>`
      
      Gets the settings for this part as a Plain Old JavaScript Object (POJO).
      
      **Returns**\ : :js:class:`PartSettingsProperties <cee.ug.PartSettingsProperties>`
      



.. js:method:: cee.ug.PartSettings.setFromProperties

      .. rst-class:: sig-pretty-signature
      
         | setFromProperties(**props**\ : *Partial*\ ): *void*
      
      Applies the settings in the given properties object to this part
      
      **Parameters**
      
      
         **props**\ : *Partial*
      
      
      **Returns**\ : *void*
      




