.. role:: clio-readonly
   :class: clio-flag clio-flag-readonly


##############
CuttingManager
##############

.. js:class:: wv.CuttingManager

   Main interface into the cutting functionality of the viewer. The object manages a number of individual CuttingSections which can be activated individually.
   
   
   Index
   =====
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wv.CuttingManager.viewer`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wv.CuttingManager.activateCuttingSections`
   * :js:meth:`~wv.CuttingManager.clearAllCuttingSections`
   * :js:meth:`~wv.CuttingManager.createReferenceGeometryFromAxis`
   * :js:meth:`~wv.CuttingManager.createReferenceGeometryFromFaceNormal`
   * :js:meth:`~wv.CuttingManager.deactivateAllCuttingSections`
   * :js:meth:`~wv.CuttingManager.delayCapping`
   * :js:meth:`~wv.CuttingManager.enableCappingIdleCallback`
   * :js:meth:`~wv.CuttingManager.fromJson`
   * :js:meth:`~wv.CuttingManager.getActiveCuttingSectionCount`
   * :js:meth:`~wv.CuttingManager.getCappingFaceColor`
   * :js:meth:`~wv.CuttingManager.getCappingGeometryVisibility`
   * :js:meth:`~wv.CuttingManager.getCappingLineColor`
   * :js:meth:`~wv.CuttingManager.getCuttingSection`
   * :js:meth:`~wv.CuttingManager.getCuttingSectionCapacity`
   * :js:meth:`~wv.CuttingManager.getCuttingSectionCount`
   * :js:meth:`~wv.CuttingManager.getCuttingSectionFromNodeId`
   * :js:meth:`~wv.CuttingManager.getNodesWithCapping`
   * :js:meth:`~wv.CuttingManager.getStandinGeometryPickable`
   * :js:meth:`~wv.CuttingManager.hasActiveCuttingSection`
   * :js:meth:`~wv.CuttingManager.refreshPlaneGeometry`
   * :js:meth:`~wv.CuttingManager.setCappingDelay`
   * :js:meth:`~wv.CuttingManager.setCappingFaceColor`
   * :js:meth:`~wv.CuttingManager.setCappingGeometryVisibility`
   * :js:meth:`~wv.CuttingManager.setCappingLineColor`
   * :js:meth:`~wv.CuttingManager.setCuttingPlaneColor`
   * :js:meth:`~wv.CuttingManager.setStandinGeometryPickable`
   * :js:meth:`~wv.CuttingManager.toJson`
   * :js:meth:`~wv.CuttingManager.waitForCappingIdle`
   
   



.. rst-class:: kind-group kind-properties

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


.. js:data:: wv.CuttingManager.viewer

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | viewer: :js:class:`IWebViewer <wv.IWebViewer>`
      



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

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


.. js:method:: wv.CuttingManager.activateCuttingSections

      .. rst-class:: sig-pretty-signature
      
         | activateCuttingSections(): *Promise*
      
      Activates all cutting sections, and restores any planes contained to the scene.
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.clearAllCuttingSections

      .. rst-class:: sig-pretty-signature
      
         | clearAllCuttingSections(): *Promise*
      
      Clears all cutting sections. This causes all cutting sections to be deactivated and all their cutting planes removed.
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.createReferenceGeometryFromAxis

      .. rst-class:: sig-pretty-signature
      
         | createReferenceGeometryFromAxis(**axis**\ : :js:data:`Axis <wv.Axis>`\ , **modelBounding**\ : :js:class:`Box <wv.Box>`\ ): :js:class:`Point3 <wv.Point3>`\ []
      
      generates reference geometry for a cutting plane.
      
      **Parameters**
      
      
         **axis**\ : :js:data:`Axis <wv.Axis>`
      
      
            axis for reference geometry.
      
      
         **modelBounding**\ : :js:class:`Box <wv.Box>`
      
      
            modelBounding for geometry size.
      
      
      
      **Returns**\ : :js:class:`Point3 <wv.Point3>`\ []
      



.. js:method:: wv.CuttingManager.createReferenceGeometryFromFaceNormal

      .. rst-class:: sig-pretty-signature
      
         | createReferenceGeometryFromFaceNormal(**normal**\ : :js:class:`Point3 <wv.Point3>`\ , **position**\ : :js:class:`Point3 <wv.Point3>`\ , **modelBounding**\ : :js:class:`Box <wv.Box>`\ ): :js:class:`Point3 <wv.Point3>`\ []
      
      Uses a selection normal and position to create reference geometry for a cutting plane.
      
      **Parameters**
      
      
         **normal**\ : :js:class:`Point3 <wv.Point3>`
      
      
            face normal.
      
      
         **position**\ : :js:class:`Point3 <wv.Point3>`
      
      
            face position.
      
      
         **modelBounding**\ : :js:class:`Box <wv.Box>`
      
      
            model bounding for geometry size.
      
      
      
      **Returns**\ : :js:class:`Point3 <wv.Point3>`\ []
      



.. js:method:: wv.CuttingManager.deactivateAllCuttingSections

      .. rst-class:: sig-pretty-signature
      
         | deactivateAllCuttingSections(): *Promise*
      
      Deactivates all cutting sections. Cutting planes are not removed from section and can be restored using [[activateCuttingSections]]
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.delayCapping

      .. rst-class:: sig-pretty-signature
      
         | delayCapping(): *void*
      
      Delays capping processing by a fixed time interval.
      
      **Returns**\ : *void*
      



.. js:method:: wv.CuttingManager.enableCappingIdleCallback

      .. rst-class:: sig-pretty-signature
      
         | enableCappingIdleCallback(**enable**\ : *boolean*\ ): *Promise*
      
      Enables or disables activation of "cappingIdle" callback event.
      
      **Parameters**
      
      
         **enable**\ : *boolean*
      
      
            Enables or disables activation of "cappingIdle" callback event.
      
      
      
      **Returns**\ : *Promise*
      
      
         A promise returning whether or not capping generation was idle when this call resolves.
      
      



.. js:method:: wv.CuttingManager.fromJson

      .. rst-class:: sig-pretty-signature
      
         | fromJson(**json**\ : *any*\ ): *Promise*
      
      Removes any cutting planes in the scene, and restores cutting planes from a json object.
      
      **Parameters**
      
      
         **json**\ : *any*
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.getActiveCuttingSectionCount

      .. rst-class:: sig-pretty-signature
      
         | getActiveCuttingSectionCount(): *number*
      
      **Returns**\ : *number*
      
      
         the number of active cutting sections.
      
      



.. js:method:: wv.CuttingManager.getCappingFaceColor

      .. rst-class:: sig-pretty-signature
      
         | getCappingFaceColor(): (*None* | :js:class:`Color <wv.Color>`\ )
      
      Gets the color used for capping geometry faces.
      
      **Returns**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
         color used for capping geometry faces.
      
      



.. js:method:: wv.CuttingManager.getCappingGeometryVisibility

      .. rst-class:: sig-pretty-signature
      
         | getCappingGeometryVisibility(): *boolean*
      
      Gets whether capping geometry will show
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating whether capping geometry will show
      
      



.. js:method:: wv.CuttingManager.getCappingLineColor

      .. rst-class:: sig-pretty-signature
      
         | getCappingLineColor(): (*None* | :js:class:`Color <wv.Color>`\ )
      
      Gets the color used for capping geometry lines.
      
      **Returns**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
         color used for capping geometry lines.
      
      



.. js:method:: wv.CuttingManager.getCuttingSection

      .. rst-class:: sig-pretty-signature
      
         | getCuttingSection(**index**\ : *number*\ ): (*None* | :js:class:`ICuttingSection <wv.ICuttingSection>`\ )
      
      Gets a cutting section by index. Cutting sections are created automatically by the system and may be queried at any point during or after the sceneReady callback has been triggered.
      
      **Parameters**
      
      
         **index**\ : *number*
      
      
      **Returns**\ : (*None* \| :js:class:`ICuttingSection <wv.ICuttingSection>`\ )
      
      
         the cutting section for the given index.
      
      



.. js:method:: wv.CuttingManager.getCuttingSectionCapacity

      .. rst-class:: sig-pretty-signature
      
         | getCuttingSectionCapacity(): *number*
      
      Gets the total number of planes supported by each cutting section. Cutting planes contained in the same cutting section will work together (an object is only cut if all cutting planes in a section would cut it). Cutting planes in separate cutting sections do not work together when cutting (an object is cut if any one of the cutting sections would cut it).
      
      **Returns**\ : *number*
      
      
         the number of planes each cutting section may contain.
      
      



.. js:method:: wv.CuttingManager.getCuttingSectionCount

      .. rst-class:: sig-pretty-signature
      
         | getCuttingSectionCount(): *number*
      
      Gets the total number of cutting sections supported by the system.
      
      **Returns**\ : *number*
      
      
         the number of cutting sections supported by the system.
      
      



.. js:method:: wv.CuttingManager.getCuttingSectionFromNodeId

      .. rst-class:: sig-pretty-signature
      
         | getCuttingSectionFromNodeId(**nodeId**\ : (*None* | *number*\ )): (*None* | :js:class:`ICuttingSection <wv.ICuttingSection>`\ )
      
      Gets the cutting section containing the cutting plane with the given node ID. If the supplied node ID is not contained by any cutting section null will be returned.
      
      **Parameters**
      
      
         **nodeId**\ : (*None* \| *number*\ )
      
      
            a node ID for cutting plane stand-in geometry.
      
      
      
      **Returns**\ : (*None* \| :js:class:`ICuttingSection <wv.ICuttingSection>`\ )
      
      
         the ICuttingSection that contains the plane with the given node id or null if none contain it.
      
      



.. js:method:: wv.CuttingManager.getNodesWithCapping

      .. rst-class:: sig-pretty-signature
      
         | getNodesWithCapping(): *Promise*
      
      Gets all nodes that have capping drawn for them.
      
      **Returns**\ : *Promise*
      
      
         an array of node IDs that have capping drawn for them
      
      



.. js:method:: wv.CuttingManager.getStandinGeometryPickable

      .. rst-class:: sig-pretty-signature
      
         | getStandinGeometryPickable(): *boolean*
      
      Gets whether stand-in geometry for cutting sections is pickable.
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating whether stand-in geometry for cutting sections is pickable.
      
      



.. js:method:: wv.CuttingManager.hasActiveCuttingSection

      .. rst-class:: sig-pretty-signature
      
         | hasActiveCuttingSection(): *boolean*
      
      **Returns**\ : *boolean*
      
      
         true if there is an active cutting section.
      
      



.. js:method:: wv.CuttingManager.refreshPlaneGeometry

      .. rst-class:: sig-pretty-signature
      
         | refreshPlaneGeometry(): *Promise*
      
      Updates all cutting plane geometry.
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.setCappingDelay

      .. rst-class:: sig-pretty-signature
      
         | setCappingDelay(**delayInMilliseconds**\ : *number*\ ): *void*
      
      Sets the delay used by delayCapping() in milliseconds.
      
      **Parameters**
      
      
         **delayInMilliseconds**\ : *number*
      
      
            The delay amount.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.CuttingManager.setCappingFaceColor

      .. rst-class:: sig-pretty-signature
      
         | setCappingFaceColor(**color**\ : (*None* | :js:class:`Color <wv.Color>`\ )): *Promise*
      
      Sets the color to be used for capping geometry faces. If null is passed in as the color object, no capping face will be shown.
      
      **Parameters**
      
      
         **color**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
            color to use for capping geometry faces.
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.setCappingGeometryVisibility

      .. rst-class:: sig-pretty-signature
      
         | setCappingGeometryVisibility(**cappingGeometryVisibility**\ : *boolean*\ ): *Promise*
      
      Sets whether capping geometry will show. The default value is true.
      
      **Parameters**
      
      
         **cappingGeometryVisibility**\ : *boolean*
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.setCappingLineColor

      .. rst-class:: sig-pretty-signature
      
         | setCappingLineColor(**color**\ : (*None* | :js:class:`Color <wv.Color>`\ )): *Promise*
      
      Sets the color to be used for capping geometry lines. If null is passed in as the color object, no capping line will be shown.
      
      **Parameters**
      
      
         **color**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
            color to use for capping geometry lines.
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.setCuttingPlaneColor

      .. rst-class:: sig-pretty-signature
      
         | setCuttingPlaneColor(**color**\ : :js:class:`Color <wv.Color>`\ ): *Promise*
      
      Sets the color for all cutting plane reference geometry.
      
      **Parameters**
      
      
         **color**\ : :js:class:`Color <wv.Color>`
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.setStandinGeometryPickable

      .. rst-class:: sig-pretty-signature
      
         | setStandinGeometryPickable(**pickable**\ : *boolean*\ ): *Promise*
      
      Sets whether stand-in geometry for cutting sections should be pickable. If this option is set to false, picking rays will pass though stand-in geometry for cutting planes. The default value is not pickable.
      
      **Parameters**
      
      
         **pickable**\ : *boolean*
      
      
            boolean value indicating whether stand-in geometry should be pickable in the scene.
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.CuttingManager.toJson

      .. rst-class:: sig-pretty-signature
      
         | toJson(): *object*
      
      Creates an object ready for JSON serialization.
      
      **Returns**\ : *object*
      
      
         The prepared object.
      
      



.. js:method:: wv.CuttingManager.waitForCappingIdle

      .. rst-class:: sig-pretty-signature
      
         | waitForCappingIdle(): *Promise*
      
      **Returns**\ : *Promise*
      




