# BCFTopic

class Bcf.BCFTopic()

  This class contains data corresponding to a BCF file topic.

Constructors

- `constructor()`

Methods

- `addMarkup()`

- `addSnapshot()`

- `addViewpoint()`

- `getMarkup()`

- `getSnapshot()`

- `getSnapshotMap()`

- `getTopicId()`

- `getViewpoint()`

- `getViewpointMap()`

- `setSnapshot()`

- `setViewpoint()`

- `createTopic()`

## Constructors

BCFTopic.constructor(bcfDataId, bcfFilename, topicId, viewer)
  Arguments

    - bcfDataId (`number()`) – None

    - bcfFilename (`string()`) – None

    - topicId (`string()`) – None

    - viewer (`WebViewer()`) – None

  Return type

    BCFTopic

## Methods

### addMarkup

BCFTopic.addMarkup(filename, document)
  Arguments

    - filename (`string()`) – None

    - document (`null | Document()`) – None

  Adds a BCF markup.

  Return type

    BCFMarkup

### addSnapshot

BCFTopic.addSnapshot(filename, png)
  Arguments

    - filename (`string()`) – None

    - png (`Uint8Array()`) – Image data.

  Creates and adds a Snapshot.

  Return type

    void

### addViewpoint

BCFTopic.addViewpoint(filename, document, version, modelBounding, modelUnits)
  Arguments

    - filename (`string()`) – None

    - document (`null | Document()`) – None

    - version (`BCFVersion()`) – None

    - modelBounding (`Box()`) – None

    - modelUnits (`number()`) – None

  Creates and adds BCF viewpoint.

  Return type

    BCFViewpoint

### getMarkup

BCFTopic.getMarkup()
  Returns

    BCF markup data.

  Return type

    BCFMarkup

### getSnapshot

BCFTopic.getSnapshot(filename)
  Arguments

    - filename (`string()`) – snapshot or corresponding viewpoint filename

  Gets snapshot data.

  Return type

    null | BCFSnapshot

### getSnapshotMap

BCFTopic.getSnapshotMap()
  Returns

    A map associating snapshot filenames with snapshot data.

  Return type

    Map <string, BCFSnapshot>

### getTopicId

BCFTopic.getTopicId()

  Gets the topic id corresponding to the BCF topic folder.

  Return type

    string

### getViewpoint

BCFTopic.getViewpoint(filename)
  Arguments

    - filename (`string()`) – viewpoint filename.

  Gets viewpoint data.

  Return type

    null | BCFViewpoint

### getViewpointMap

BCFTopic.getViewpointMap()
  Returns

    A map associating viewpoint filenames with viewpoint data.

  Return type

    Map <string, BCFViewpoint>

### setSnapshot

BCFTopic.setSnapshot(filename, snapshot)
  Arguments

    - filename (`string()`) – None

    - snapshot (`BCFSnapshot()`) – None

  Adds a BCF Snapshot. If there is already a snapshot with the smae filename, it will be replaced.

  Return type

    void

### setViewpoint

BCFTopic.setViewpoint(filename, viewpoint)
  Arguments

    - filename (`string()`) – None

    - viewpoint (`BCFViewpoint()`) – None

  Adds a BCF Viewpoint. If there is a already a viewpoint with the same filename, it will be replaced.

  Return type

    void

### static createTopic

BCFTopic.createTopic(viewer, bcfDataId, bcfFilename, topicTitle, markupView)
  Arguments

    - viewer (`WebViewer()`) – None

    - bcfDataId (`number()`) – None

    - bcfFilename (`string()`) – None

    - topicTitle (`string()`) – None

    - markupView (`null | MarkupView()`) – None

  Takes a MarkupView and creates a BCF Topic from it.

  Return type

    Promise <BCFTopic>