Skip to main content

DrawingApi <Change>

Use this API to load and visualize drawings.

Index

Constructors

publicconstructor

  • new DrawingApi<Change>(_api: BimCoreApi, _textureSize?: number, _grayscaleDefault?: boolean, _invertedBackgroundDefault?: boolean): DrawingApi<Change>
  • Constructor


    Type parameters

    • Change: BimChangeBlob | BimChangeDwg = BimChangeDwg

    Parameters

    • _api: BimCoreApi

      Api

    • _textureSize: number = 1024

      Defines size of texture used to render drawings. Recommended value is power of two. Higher resolution gives better visuals but costs more memory (a pixel takes 4 bytes).

    • _grayscaleDefault: boolean = false
    • _invertedBackgroundDefault: boolean = false

    Returns DrawingApi<Change>

Properties

publicstaticreadonlydefaultPosition

defaultPosition: DeepImmutableObject<Vector3> = Vector3.ZeroReadOnly

publicstaticreadonlydefaultScale

defaultScale: DeepImmutableObject<Vector3> = ...

publicstaticreadonlypdfDefaultBackgroundColor

pdfDefaultBackgroundColor: Color3 = ...

Accessors

publicboundingInfo

  • get boundingInfo(): BoundingInfo
  • Bounding information for the currently loaded DWG’s


    Returns BoundingInfo

publicdrawingParentNode

  • get drawingParentNode(): TransformNode
  • Returns TransformNode

publicgrayscaleDefault

  • get grayscaleDefault(): boolean
  • set grayscaleDefault(value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

publicinvertedBackgroundDefault

  • get invertedBackgroundDefault(): boolean
  • set invertedBackgroundDefault(value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

Methods

[iterator]

publicclear

  • clear(): void
  • Remove all loaded drawings


    Returns void

publicfitDrawingsToCamera

  • fitDrawingsToCamera(camera: ViewerCamera): Promise<void>
  • Parameters

    • camera: ViewerCamera

    Returns Promise<void>

publicforeach

publicload

  • Load one or more drawings. Only PDF and 2D DWG files are supported. Note that 3D DWG’s are not supported.


    Parameters

    Returns Promise<void>

    Promise