.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


###############
ICuttingService
###############

.. js:class:: wvc.ICuttingService

   Service interface for managing cutting operations in 3D models.
   
   Extends the base IService and IResettableConfigurationService interfaces to provide comprehensive cutting plane and section management capabilities.
   
   This interface defines methods for:
   
   
   - Managing cutting sections (groups of cutting planes)
   - Creating, modifying, and removing individual cutting planes
   - Controlling visual properties (colors, opacity, visibility)
   - Configuring capping geometry for cut surfaces
   - Handling face selections for plane creation
   
   ICuttingService
   
   
   Index
   =====
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wvc.ICuttingService.serviceName`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wvc.ICuttingService.addCuttingPlane`
   * :js:meth:`~wvc.ICuttingService.addEventListener`
   * :js:meth:`~wvc.ICuttingService.clearCuttingSection`
   * :js:meth:`~wvc.ICuttingService.dispatchEvent`
   * :js:meth:`~wvc.ICuttingService.getCappingFaceColor`
   * :js:meth:`~wvc.ICuttingService.getCappingGeometryVisibility`
   * :js:meth:`~wvc.ICuttingService.getCappingLineColor`
   * :js:meth:`~wvc.ICuttingService.getCuttingPlane`
   * :js:meth:`~wvc.ICuttingService.getCuttingPlaneCount`
   * :js:meth:`~wvc.ICuttingService.getCuttingPlanes`
   * :js:meth:`~wvc.ICuttingService.getCuttingSection`
   * :js:meth:`~wvc.ICuttingService.getCuttingSectionCount`
   * :js:meth:`~wvc.ICuttingService.getCuttingSections`
   * :js:meth:`~wvc.ICuttingService.getModelBounding`
   * :js:meth:`~wvc.ICuttingService.getSelectedFace`
   * :js:meth:`~wvc.ICuttingService.removeCuttingPlane`
   * :js:meth:`~wvc.ICuttingService.removeEventListener`
   * :js:meth:`~wvc.ICuttingService.resetConfiguration`
   * :js:meth:`~wvc.ICuttingService.setCappingFaceColor`
   * :js:meth:`~wvc.ICuttingService.setCappingGeometryVisibility`
   * :js:meth:`~wvc.ICuttingService.setCappingLineColor`
   * :js:meth:`~wvc.ICuttingService.setCuttingPlaneColor`
   * :js:meth:`~wvc.ICuttingService.setCuttingPlaneLineColor`
   * :js:meth:`~wvc.ICuttingService.setCuttingPlaneOpacity`
   * :js:meth:`~wvc.ICuttingService.setCuttingPlaneVisibility`
   * :js:meth:`~wvc.ICuttingService.setCuttingSectionGeometryVisibility`
   * :js:meth:`~wvc.ICuttingService.setCuttingSectionState`
   * :js:meth:`~wvc.ICuttingService.setModelBounding`
   * :js:meth:`~wvc.ICuttingService.updateCuttingPlane`
   
   



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

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


.. js:data:: wvc.ICuttingService.serviceName

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | serviceName: :js:data:`ServiceName <wvc.ServiceName>`
      



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

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


.. js:method:: wvc.ICuttingService.addCuttingPlane

      .. rst-class:: sig-pretty-signature
      
         | addCuttingPlane(**sectionIndex**\ : *number*\ , **cuttingPlane**\ : :js:data:`CuttingPlane <wvc.CuttingPlane>`\ ): *Promise*
      
      Adds a cutting plane to a cutting section.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section to add the plane to
      
      
         **cuttingPlane**\ : :js:data:`CuttingPlane <wvc.CuttingPlane>`
      
      
            The cutting plane to add
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wvc.ICuttingService.addEventListener

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | addEventListener(**type**\ : *string*\ , **callback**\ : (*None* | *EventListenerOrEventListenerObject*\ ), **options**\ : (*boolean* | *AddEventListenerOptions*\ )): *void*
      
      Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
      
      The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
      
      When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
      
      When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
      
      When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
      
      If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
      
      The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
      
      `MDN Reference <https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener>`__
      
      **Parameters**
      
      
         **type**\ : *string*
      
         **callback**\ : (*None* \| *EventListenerOrEventListenerObject*\ )
      
         **options**\ : (*boolean* \| *AddEventListenerOptions*\ )
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ICuttingService.clearCuttingSection

      .. rst-class:: sig-pretty-signature
      
         | clearCuttingSection(**sectionIndex**\ : *number*\ ): *Promise*
      
      Clears all cutting planes from a cutting section.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section to clear
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wvc.ICuttingService.dispatchEvent

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | dispatchEvent(**event**\ : *Event*\ ): *boolean*
      
      Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
      
      `MDN Reference <https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent>`__
      
      **Parameters**
      
      
         **event**\ : *Event*
      
      
      **Returns**\ : *boolean*
      



.. js:method:: wvc.ICuttingService.getCappingFaceColor

      .. rst-class:: sig-pretty-signature
      
         | getCappingFaceColor(): (*undefined* | *string*\ )
      
      Gets the current capping face color.
      
      **Returns**\ : (*undefined* \| *string*\ )
      
      
         The capping face color as a hex string, or undefined if no color is set
      
      



.. js:method:: wvc.ICuttingService.getCappingGeometryVisibility

      .. rst-class:: sig-pretty-signature
      
         | getCappingGeometryVisibility(): *boolean*
      
      Gets the current capping geometry visibility state.
      
      **Returns**\ : *boolean*
      
      
         True if capping geometry is visible, false otherwise
      
      



.. js:method:: wvc.ICuttingService.getCappingLineColor

      .. rst-class:: sig-pretty-signature
      
         | getCappingLineColor(): (*undefined* | *string*\ )
      
      Gets the current capping line color.
      
      **Returns**\ : (*undefined* \| *string*\ )
      
      
         The capping line color as a hex string, or undefined if no color is set
      
      



.. js:method:: wvc.ICuttingService.getCuttingPlane

      .. rst-class:: sig-pretty-signature
      
         | getCuttingPlane(**sectionIndex**\ : *number*\ , **planeIndex**\ : *number*\ ): (*undefined* | :js:data:`CuttingPlane <wvc.CuttingPlane>`\ )
      
      Gets a specific cutting plane from a cutting section.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section
      
      
         **planeIndex**\ : *number*
      
      
            The index of the cutting plane within the section
      
      
      
      **Returns**\ : (*undefined* \| :js:data:`CuttingPlane <wvc.CuttingPlane>`\ )
      
      
         The cutting plane at the specified indices, or undefined if not found
      
      



.. js:method:: wvc.ICuttingService.getCuttingPlaneCount

      .. rst-class:: sig-pretty-signature
      
         | getCuttingPlaneCount(**sectionIndex**\ : *number*\ ): *number*
      
      Gets the number of cutting planes in a cutting section.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section
      
      
      
      **Returns**\ : *number*
      
      
         The number of cutting planes in the section
      
      



.. js:method:: wvc.ICuttingService.getCuttingPlanes

      .. rst-class:: sig-pretty-signature
      
         | getCuttingPlanes(**sectionIndex**\ : *number*\ ): :js:data:`CuttingPlane <wvc.CuttingPlane>`\ []
      
      Gets all cutting planes from a cutting section.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section
      
      
      
      **Returns**\ : :js:data:`CuttingPlane <wvc.CuttingPlane>`\ []
      
      
         Array of cutting planes in the section
      
      



.. js:method:: wvc.ICuttingService.getCuttingSection

      .. rst-class:: sig-pretty-signature
      
         | getCuttingSection(**index**\ : *number*\ ): (*undefined* | :js:data:`Section <wvc.Section>`\ )
      
      Gets a specific cutting section by index.
      
      **Parameters**
      
      
         **index**\ : *number*
      
      
            The index of the cutting section to retrieve
      
      
      
      **Returns**\ : (*undefined* \| :js:data:`Section <wvc.Section>`\ )
      
      
         The cutting section at the specified index, or undefined if not found
      
      



.. js:method:: wvc.ICuttingService.getCuttingSectionCount

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



.. js:method:: wvc.ICuttingService.getCuttingSections

      .. rst-class:: sig-pretty-signature
      
         | getCuttingSections(): :js:data:`Section <wvc.Section>`\ []
      
      Gets all cutting sections.
      
      **Returns**\ : :js:data:`Section <wvc.Section>`\ []
      
      
         Array of all cutting sections
      
      



.. js:method:: wvc.ICuttingService.getModelBounding

      .. rst-class:: sig-pretty-signature
      
         | getModelBounding(): *Box*
      
      Gets the current model bounding box.
      
      **Returns**\ : *Box*
      
      
         The model's bounding box for reference geometry sizing
      
      



.. js:method:: wvc.ICuttingService.getSelectedFace

      .. rst-class:: sig-pretty-signature
      
         | getSelectedFace(): (*undefined* | :js:data:`SelectedFace <wvc.SelectedFace>`\ )
      
      Gets the currently selected face for cutting plane creation.
      
      **Returns**\ : (*undefined* \| :js:data:`SelectedFace <wvc.SelectedFace>`\ )
      
      
         The selected face data, or undefined if no face is selected
      
      



.. js:method:: wvc.ICuttingService.removeCuttingPlane

      .. rst-class:: sig-pretty-signature
      
         | removeCuttingPlane(**sectionIndex**\ : *number*\ , **planeIndex**\ : *number*\ ): *Promise*
      
      Removes a cutting plane from a cutting section.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section containing the plane
      
      
         **planeIndex**\ : *number*
      
      
            The index of the cutting plane to remove
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wvc.ICuttingService.removeEventListener

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | removeEventListener(**type**\ : *string*\ , **callback**\ : (*None* | *EventListenerOrEventListenerObject*\ ), **options**\ : (*boolean* | *EventListenerOptions*\ )): *void*
      
      Removes the event listener in target's event listener list with the same type, callback, and options.
      
      `MDN Reference <https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener>`__
      
      **Parameters**
      
      
         **type**\ : *string*
      
         **callback**\ : (*None* \| *EventListenerOrEventListenerObject*\ )
      
         **options**\ : (*boolean* \| *EventListenerOptions*\ )
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ICuttingService.resetConfiguration

      .. rst-class:: sig-pretty-signature
      
         | resetConfiguration(**obj**\ : *object*\ ): *Promise*
      
      Resets the cutting service configuration to default values or provided configuration.
      
      **Parameters**
      
      
         **obj**\ : *object*
      
      
            Optional configuration object to apply, or undefined to use default configuration
      
      
      
      **Returns**\ : *Promise*
      
      
         Promise that resolves when the configuration is applied
      
      



.. js:method:: wvc.ICuttingService.setCappingFaceColor

      .. rst-class:: sig-pretty-signature
      
         | setCappingFaceColor(**color**\ : *string*\ ): *Promise*
      
      Sets the capping face color.
      
      **Parameters**
      
      
         **color**\ : *string*
      
      
            Optional hex color string (e.g., "#ff0000"), or undefined to clear
      
      
      
      **Returns**\ : *Promise*
      
      
         Promise that resolves when the operation completes
      
      



.. js:method:: wvc.ICuttingService.setCappingGeometryVisibility

      .. rst-class:: sig-pretty-signature
      
         | setCappingGeometryVisibility(**cappingGeometryVisibility**\ : *boolean*\ ): *Promise*
      
      Sets the capping geometry visibility state.
      
      **Parameters**
      
      
         **cappingGeometryVisibility**\ : *boolean*
      
      
            True to show capping geometry, false to hide
      
      
      
      **Returns**\ : *Promise*
      
      
         Promise that resolves when the operation completes
      
      



.. js:method:: wvc.ICuttingService.setCappingLineColor

      .. rst-class:: sig-pretty-signature
      
         | setCappingLineColor(**color**\ : *string*\ ): *Promise*
      
      Sets the capping line color.
      
      **Parameters**
      
      
         **color**\ : *string*
      
      
            Optional hex color string (e.g., "#000000"), or undefined to clear
      
      
      
      **Returns**\ : *Promise*
      
      
         Promise that resolves when the operation completes
      
      



.. js:method:: wvc.ICuttingService.setCuttingPlaneColor

      .. rst-class:: sig-pretty-signature
      
         | setCuttingPlaneColor(**sectionIndex**\ : *number*\ , **planeIndex**\ : *number*\ , **color**\ : *IColor*\ ): *void*
      
      Sets the face color of a specific cutting plane.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section containing the plane
      
      
         **planeIndex**\ : *number*
      
      
            The index of the cutting plane to modify
      
      
         **color**\ : *IColor*
      
      
            The new face color (RGB values between 0 and 1)
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ICuttingService.setCuttingPlaneLineColor

      .. rst-class:: sig-pretty-signature
      
         | setCuttingPlaneLineColor(**sectionIndex**\ : *number*\ , **planeIndex**\ : *number*\ , **lineColor**\ : *IColor*\ ): *void*
      
      Sets the line color of a specific cutting plane.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section containing the plane
      
      
         **planeIndex**\ : *number*
      
      
            The index of the cutting plane to modify
      
      
         **lineColor**\ : *IColor*
      
      
            The new line color (RGB values between 0 and 1)
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ICuttingService.setCuttingPlaneOpacity

      .. rst-class:: sig-pretty-signature
      
         | setCuttingPlaneOpacity(**sectionIndex**\ : *number*\ , **planeIndex**\ : *number*\ , **opacity**\ : *number*\ ): *void*
      
      Sets the opacity of a specific cutting plane.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section containing the plane
      
      
         **planeIndex**\ : *number*
      
      
            The index of the cutting plane to modify
      
      
         **opacity**\ : *number*
      
      
            The new opacity value (between 0.0 and 1.0)
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ICuttingService.setCuttingPlaneVisibility

      .. rst-class:: sig-pretty-signature
      
         | setCuttingPlaneVisibility(**sectionIndex**\ : *number*\ , **planeIndex**\ : *number*\ , **visible**\ : *boolean*\ ): *Promise*
      
      Sets the visibility of reference geometry for a specific cutting plane.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section containing the plane
      
      
         **planeIndex**\ : *number*
      
      
            The index of the cutting plane to modify
      
      
         **visible**\ : *boolean*
      
      
            True to show reference geometry, false to hide
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wvc.ICuttingService.setCuttingSectionGeometryVisibility

      .. rst-class:: sig-pretty-signature
      
         | setCuttingSectionGeometryVisibility(**sectionIndex**\ : *number*\ , **visible**\ : *boolean*\ ): *Promise*
      
      Sets the reference geometry visibility for a cutting section.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section to modify
      
      
         **visible**\ : *boolean*
      
      
            True to show reference geometry, false to hide
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wvc.ICuttingService.setCuttingSectionState

      .. rst-class:: sig-pretty-signature
      
         | setCuttingSectionState(**sectionIndex**\ : *number*\ , **active**\ : *boolean*\ ): *Promise*
      
      Sets the active state of a cutting section.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section to modify
      
      
         **active**\ : *boolean*
      
      
            True to activate the section, false to deactivate
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wvc.ICuttingService.setModelBounding

      .. rst-class:: sig-pretty-signature
      
         | setModelBounding(**modelBounding**\ : *Box*\ ): *void*
      
      Sets the model bounding box.
      
      **Parameters**
      
      
         **modelBounding**\ : *Box*
      
      
            The new model bounding box
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ICuttingService.updateCuttingPlane

      .. rst-class:: sig-pretty-signature
      
         | updateCuttingPlane(**sectionIndex**\ : *number*\ , **planeIndex**\ : *number*\ , **cuttingPlane**\ : *Partial*\ ): *Promise*
      
      Updates properties of an existing cutting plane.
      
      **Parameters**
      
      
         **sectionIndex**\ : *number*
      
      
            The index of the cutting section containing the plane
      
      
         **planeIndex**\ : *number*
      
      
            The index of the cutting plane to update
      
      
         **cuttingPlane**\ : *Partial*
      
      
            Partial cutting plane object with properties to update
      
      
      
      **Returns**\ : *Promise*
      




