BCFViewpoint

class Bcf.BCFViewpoint()

Constructors


Constructors

BCFViewpoint.constructor(filename, document, version, modelBounding, modelUnits, viewer)
Arguments:
  • filename (string()) – None
  • document (null | Document()) – None
  • version (BCFVersion()) – None
  • modelBounding (Box()) – None
  • modelUnits (number()) – None
  • viewer (WebViewer()) – None
Return type:

BCFViewpoint

Methods

activate

BCFViewpoint.activate()

Activates viewpoint. Sets the camera, visibility, cutting planes, colors, and markup.

Return type:Promise <void>

export

BCFViewpoint.export()
Returns:XML document containing the viewpoint data.
Return type:XMLDocument

getCamera

BCFViewpoint.getCamera()

Gets the viewpoint camera, or null if none is set.

Return type:null | Camera

getClippingPlanes

BCFViewpoint.getClippingPlanes()

Gets the clipping planes.

Returns:Array containing position and direction pairs.
Return type:[(Point3, Point3)]

getColors

BCFViewpoint.getColors()
Returns:Map correlating color to components.
Return type:Map <Color, Set <string>>

getColorsToNodes

BCFViewpoint.getColorsToNodes()
Returns:Map correlating color to nodes.
Return type:Map <Color, Set <number>>

getFilename

BCFViewpoint.getFilename()

Gets the viewpoint filename.

Return type:string

getLines

BCFViewpoint.getLines()

Gets markup lines.

Returns:Array containing start point and end point line pairs.
Return type:[(Point3, Point3)]

getSelection

BCFViewpoint.getSelection()

Gets a list of generic IDs that are in the selection set.

Return type:[string]

getSelectionNodes

BCFViewpoint.getSelectionNodes()

Gets a list of node IDs that are in the selection set.

Return type:[number]

getViewpointGuid

BCFViewpoint.getViewpointGuid()

Gets the GUID associated with the viewpoint.

Return type:null | string

getVisibilityExceptionNodes

BCFViewpoint.getVisibilityExceptionNodes()

Gets the visibility exception node ids.

Returns:Array of NodeIds corresponding to components.
Return type:[number]

getVisibilityExceptions

BCFViewpoint.getVisibilityExceptions()

Gets the visibility exception generic ids.

Returns:Array of GenericIds corresponding to components.
Return type:[string]

setCamera

BCFViewpoint.setCamera(camera)
Arguments:

Sets the viewpoint camera.

Return type:void

setClippingPlanes

BCFViewpoint.setClippingPlanes(planes)
Arguments:
  • planes ([(Point3, Point3)]()) – array containing position and direction pairs.

Sets the clipping planes.

Return type:void

setColorNodes

BCFViewpoint.setColorNodes(colorNodeMap)
Arguments:
  • colorNodeMap (Map) – Map correlating color to BfcNodes.

Sets the colors.

Return type:void

setColors

BCFViewpoint.setColors(colorGenericIdMap)
Arguments:
  • colorGenericIdMap (Map) – Map correlating color to GenericIds.

Sets the colors.

Return type:void

setDefaultVisibility

BCFViewpoint.setDefaultVisibility(defaultVisibility)
Arguments:
  • defaultVisibility (boolean()) – None

Sets the default visibility. If true, visibility exceptions are hidden. If false, visibility exceptions are shown.

Return type:void

setLines

BCFViewpoint.setLines(lines)
Arguments:
  • lines ([(Point3, Point3)]()) – array of start point and end point line pairs.

Sets the markup lines.

Return type:void

setSelection

BCFViewpoint.setSelection(selection)
Arguments:
  • selection ([string]()) – None

Sets a list of items to be added to the selection set.

Return type:void

setSelectionNodes

BCFViewpoint.setSelectionNodes(selection)
Arguments:
  • selection ([BcfNode]()) – None

Sets a list of items to be added to the selection set.

Return type:void

setVisibilityExceptionNodes

BCFViewpoint.setVisibilityExceptionNodes(visibilityExceptions)
Arguments:
  • visibilityExceptions ([BcfNode]()) – Array of BcfNodes corresponding to components.

Sets the visibility exceptions. These nodes will be shown or hidden based on the default visibility setting.

Return type:void

setVisibilityExceptions

BCFViewpoint.setVisibilityExceptions(visibilityExceptions)
Arguments:
  • visibilityExceptions ([string]()) – Array of GenericIds corresponding to components.

Sets the visibility exceptions. These nodes will be shown or hidden based on the default visibility setting.

Return type:void

static createViewpoint

BCFViewpoint.createViewpoint(viewer, viewpointFilename, markupView)
Arguments:
  • viewer (WebViewer()) – None
  • viewpointFilename (string()) – None
  • markupView (null | MarkupView()) – None
Return type:

Promise <BCFViewpoint>