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


###########
IBcfService
###########

.. js:class:: wvc.IBcfService

   
   Index
   =====
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wvc.IBcfService.serviceName`
   * :js:data:`~wvc.IBcfService.webViewer`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wvc.IBcfService.activateTopicAndRestoreMarkup`
   * :js:meth:`~wvc.IBcfService.addBCFFromBuffer`
   * :js:meth:`~wvc.IBcfService.addTopicComment`
   * :js:meth:`~wvc.IBcfService.captureSnapshotPng`
   * :js:meth:`~wvc.IBcfService.clearActiveTopicMarkup`
   * :js:meth:`~wvc.IBcfService.clearTopicMarkupAutoDeactivate`
   * :js:meth:`~wvc.IBcfService.createBCFData`
   * :js:meth:`~wvc.IBcfService.createTopic`
   * :js:meth:`~wvc.IBcfService.createViewpoint`
   * :js:meth:`~wvc.IBcfService.getBCFData`
   * :js:meth:`~wvc.IBcfService.getBCFMap`
   * :js:meth:`~wvc.IBcfService.getMarkupViewForBcfCapture`
   * :js:meth:`~wvc.IBcfService.removeBCFData`
   * :js:meth:`~wvc.IBcfService.setupTopic`
   
   



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

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


.. js:data:: wvc.IBcfService.serviceName

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



.. js:data:: wvc.IBcfService.webViewer

      .. rst-class:: sig-pretty-signature
      
         | webViewer: (*undefined* | *WebViewer*\ )
      



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

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


.. js:method:: wvc.IBcfService.activateTopicAndRestoreMarkup

      .. rst-class:: sig-pretty-signature
      
         | activateTopicAndRestoreMarkup(**topic**\ : *BCFTopic*\ , **markupViewId**\ : *string*\ ): *Promise*
      
      Activates the first viewpoint of the given topic and, if a markup view ID is provided, restores the corresponding markup overlay and arms the camera auto-deactivation callback.
      
      **Parameters**
      
      
         **topic**\ : *BCFTopic*
      
      
            The BCF topic whose viewpoint should be activated.
      
      
         **markupViewId**\ : *string*
      
      
            Optional ID of the markup view to restore.
      
      
      
      **Returns**\ : *Promise*
      
      .. rubric:: Throws
      
      
      If the viewer is not initialized.
      



.. js:method:: wvc.IBcfService.addBCFFromBuffer

      .. rst-class:: sig-pretty-signature
      
         | addBCFFromBuffer(**buffer**\ : *ArrayBuffer*\ , **fileName**\ : *string*\ ): *Promise*
      
      Imports a BCF archive from an ``ArrayBuffer`` (e.g., from a file upload) and registers its contents.
      
      **Parameters**
      
      
         **buffer**\ : *ArrayBuffer*
      
      
            The raw BCF archive data.
      
      
         **fileName**\ : *string*
      
      
            The original file name, used as the BCF data set identifier.
      
      
      
      **Returns**\ : *Promise*
      
      .. rubric:: Throws
      
      
      If the viewer is not initialized.
      



.. js:method:: wvc.IBcfService.addTopicComment

      .. rst-class:: sig-pretty-signature
      
         | addTopicComment(**topic**\ : *BCFTopic*\ , **text**\ : *string*\ , **captureView**\ : *unknown*\ ): *Promise*
      
      Creates a comment on a BCF topic, including its viewpoint and snapshot.
      
      **Parameters**
      
      
         **topic**\ : *BCFTopic*
      
      
            The BCF topic to add the comment to.
      
      
         **text**\ : *string*
      
      
            The comment text.
      
      
         **captureView**\ : *unknown*
      
      
            The active markup view to capture in the comment viewpoint, or null/undefined.
      
      
      
      **Returns**\ : *Promise*
      
      
         An object containing the new comment's ID.
      
      



.. js:method:: wvc.IBcfService.captureSnapshotPng

      .. rst-class:: sig-pretty-signature
      
         | captureSnapshotPng(): *Promise*
      
      Captures the current rendered frame as a PNG and returns the raw bytes.
      
      **Returns**\ : *Promise*
      
      
         PNG bytes of the snapshot, or ``null`` if the viewer is uninitialized or capture fails.
      
      



.. js:method:: wvc.IBcfService.clearActiveTopicMarkup

      .. rst-class:: sig-pretty-signature
      
         | clearActiveTopicMarkup(): *Promise*
      
      Clears all active markup overlays and lines from the viewer.
      
      **Returns**\ : *Promise*
      



.. js:method:: wvc.IBcfService.clearTopicMarkupAutoDeactivate

      .. rst-class:: sig-pretty-signature
      
         | clearTopicMarkupAutoDeactivate(): *void*
      
      Cancels the camera-change callback that automatically deactivates markup overlays when the camera moves after topic activation.
      
      **Returns**\ : *void*
      



.. js:method:: wvc.IBcfService.createBCFData

      .. rst-class:: sig-pretty-signature
      
         | createBCFData(**name**\ : *string*\ ): *BCFData*
      
      Creates a new, empty BCF data set with the provided name and registers it with the viewer.
      
      **Parameters**
      
      
         **name**\ : *string*
      
      
            The display name for the new BCF data set.
      
      
      
      **Returns**\ : *BCFData*
      
      .. rubric:: Throws
      
      
      If the viewer is not initialized.
      



.. js:method:: wvc.IBcfService.createTopic

      .. rst-class:: sig-pretty-signature
      
         | createTopic(**bcfData**\ : *BCFData*\ , **topicId**\ : *string*\ ): *BCFTopic*
      
      Creates a bare BCF topic shell within the given data set. Prefer :js:meth:`setupTopic <wvc.IBcfService.setupTopic>` for creating a fully initialized topic with markup, viewpoint, and snapshot.
      
      **Parameters**
      
      
         **bcfData**\ : *BCFData*
      
      
            The BCF data set to add the topic to.
      
      
         **topicId**\ : *string*
      
      
            The unique ID (UUID) to assign to the new topic.
      
      
      
      **Returns**\ : *BCFTopic*
      
      .. rubric:: Throws
      
      
      If the viewer is not initialized.
      



.. js:method:: wvc.IBcfService.createViewpoint

      .. rst-class:: sig-pretty-signature
      
         | createViewpoint(**viewpointFilename**\ : *string*\ , **captureView**\ : *unknown*\ ): *Promise*
      
      Creates and returns a BCF viewpoint capturing the current viewer camera state, optionally including markup from ``captureView``\ .
      
      **Parameters**
      
      
         **viewpointFilename**\ : *string*
      
      
            The filename to assign to the viewpoint within the BCF archive.
      
      
         **captureView**\ : *unknown*
      
      
            The markup view to include in the viewpoint, or null/undefined.
      
      
      
      **Returns**\ : *Promise*
      
      .. rubric:: Throws
      
      
      If the viewer is not initialized.
      



.. js:method:: wvc.IBcfService.getBCFData

      .. rst-class:: sig-pretty-signature
      
         | getBCFData(**id**\ : *number*\ ): (*None* | *BCFData*\ )
      
      Returns the BCF data set with the given ID, or ``null`` if not found or the viewer is unavailable.
      
      **Parameters**
      
      
         **id**\ : *number*
      
      
            The numeric ID of the BCF data set to retrieve.
      
      
      
      **Returns**\ : (*None* \| *BCFData*\ )
      



.. js:method:: wvc.IBcfService.getBCFMap

      .. rst-class:: sig-pretty-signature
      
         | getBCFMap(): *Map*
      
      Returns all BCF data sets currently loaded in the viewer, keyed by their numeric IDs.
      
      **Returns**\ : *Map*
      



.. js:method:: wvc.IBcfService.getMarkupViewForBcfCapture

      .. rst-class:: sig-pretty-signature
      
         | getMarkupViewForBcfCapture(): *unknown*
      
      Resolves the best available markup view for viewpoint capture.
      
      Returns the currently active markup view if one exists, or falls back to the most recently modified non-empty view. Returns ``null`` if no suitable view is found.
      
      **Returns**\ : *unknown*
      



.. js:method:: wvc.IBcfService.removeBCFData

      .. rst-class:: sig-pretty-signature
      
         | removeBCFData(**id**\ : *number*\ ): *void*
      
      Removes the BCF data set with the given ID from the viewer.
      
      **Parameters**
      
      
         **id**\ : *number*
      
      
            The numeric ID of the BCF data set to remove.
      
      
      
      **Returns**\ : *void*
      
      .. rubric:: Throws
      
      
      If the viewer is not initialized.
      



.. js:method:: wvc.IBcfService.setupTopic

      .. rst-class:: sig-pretty-signature
      
         | setupTopic(**bcfData**\ : *BCFData*\ , **title**\ : *string*\ , **captureView**\ : *unknown*\ ): *Promise*
      
      Creates a fully initialized BCF topic: markup, title, viewpoint, snapshot, and registers it on the BCF data.
      
      **Parameters**
      
      
         **bcfData**\ : *BCFData*
      
      
            The BCF data set to add the topic to.
      
      
         **title**\ : *string*
      
      
            The human-readable topic title.
      
      
         **captureView**\ : *unknown*
      
      
            The active markup view to capture in the topic viewpoint, or null/undefined.
      
      
      
      **Returns**\ : *Promise*
      
      
         The fully initialized BCF topic.
      
      




