Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RealityCaptureClient

Client providing access to Autodesk Forge reality capture APIs.

tutorial

realitycapture

Hierarchy

Index

Constructors

constructor

Properties

Protected Optional auth

auth: undefined | AuthenticationClient

Protected axios

axios: AxiosInstance

Protected host

host: string

Protected region

region: Region

Protected root

root: string

Protected Optional token

token: undefined | string

Methods

addImageURLs

  • Adds one or more files to a photoscene. Only JPEG images are supported. Maximum number of files in a single request: 20 Maximum size of a single file: 128 MB Maximum uncompressed size of image in memory: 512 MB Note: Uploaded files will be deleted after 30 days. docs.

    async
    throws

    Error when the request fails, for example, due to invalid request.

    Parameters

    • photosceneid: string

      Specifies the ID of the photoscene to add the files to.

    • type: FileType

      Specifies the type of file being uploaded: image (default) or survey

    • files: string[]

      Specifies the file URLs to be uploaded (i.e. http://, https://). For externally stored files, please verify that the URLs are publically accessible.

    Returns Promise<IPhotoSceneError | IFiles[]>

    A JSON object containing details of the image files uploaded to the photoscene.

addImages

  • Adds one or more files to a photoscene. Only JPEG images are supported. Maximum number of files in a single request: 20 Maximum size of a single file: 128 MB Maximum uncompressed size of image in memory: 512 MB Note: Uploaded files will be deleted after 30 days. docs.

    async
    throws

    Error when the request fails, for example, due to invalid request.

    Parameters

    • photosceneid: string

      Specifies the ID of the photoscene to add the files to.

    • type: FileType

      Specifies the type of file being uploaded: image (default) or survey

    • files: Buffer[]

      Specifies the local files to be uploaded.

    Returns Promise<IPhotoSceneError | IFiles[]>

    A JSON object containing details of the image files uploaded to the photoscene.

cancelPhotoScene

  • Aborts the processing of a photoscene and marks it as cancelled.

    async
    throws

    Error when the request fails, for example, due to invalid request.

    Parameters

    • photosceneid: string

      Specifices the ID of the photoscene to cancel.

    Returns Promise<IPhotoSceneCancelDelete | IPhotoSceneError>

    A JSON object containing information on cancelled job.

createPhotoScene

  • Creates new photoscene docs.

    async
    throws

    Error when the request fails, for example, due to invalid request.

    Parameters

    Returns Promise<IPhotoScene>

    A JSON object containing details of the photoscene that was created, with property 'photosceneid' ID of the photoscene that was created.

Protected delete

  • delete(endpoint: string, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

    • endpoint: string
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

deletePhotoScene

  • Deletes a photoscene and its associated assets (images, output files, ...).

    async
    throws

    Error when the request fails, for example, due to invalid request.

    Parameters

    • photosceneid: string

      Specifices the ID of the photoscene to delete.

    Returns Promise<IPhotoSceneCancelDelete | IPhotoSceneError>

    A JSON object containing information on deleted job.

Protected fetch

  • fetch(config: AxiosRequestConfig): Promise<AxiosResponse<any>>

Protected get

  • get(endpoint: string, headers?: {}, scopes: string[], repeatOn202?: boolean): Promise<any>
  • Parameters

    • endpoint: string
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]
    • repeatOn202: boolean = false

    Returns Promise<any>

Protected getBuffer

  • getBuffer(endpoint: string, headers?: {}, scopes: string[], repeatOn202?: boolean): Promise<any>
  • Parameters

    • endpoint: string
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]
    • repeatOn202: boolean = false

    Returns Promise<any>

getPhotoScene

  • Returns a time-limited HTTPS link to an output file of the specified format. Note: The link will expire 30 days after the date of processing completion.

    async
    throws

    Error when the request fails, for example, due to invalid request.

    Parameters

    • photosceneid: string

      Specifies the ID of the photoscene to download the output

    • format: OutputFormat

    Returns Promise<IPhotoSceneError | IPhotoSceneOutput>

    A JSON object containing time-bound HTTPS link to the output file.

getPhotoSceneProgress

  • Returns the processing progress and status of a photoscene.

    async
    throws

    Error when the request fails, for example, due to invalid request.

    Parameters

    • photosceneid: string

      Specifies the ID of the photoscene to retrieve status

    Returns Promise<IPhotoSceneError | IPhotoSceneProgress>

    A JSON object containing details of current progress status.

Protected getStream

  • getStream(endpoint: string, headers?: {}, scopes: string[], repeatOn202?: boolean): Promise<any>
  • Parameters

    • endpoint: string
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]
    • repeatOn202: boolean = false

    Returns Promise<any>

Protected patch

  • patch(endpoint: string, data: any, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

    • endpoint: string
    • data: any
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

Protected post

  • post(endpoint: string, data: any, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

    • endpoint: string
    • data: any
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

processPhotoScene

  • Starts photoscene processing. The main processing steps involve: camera calibration, mesh reconstruction, texturing, and any necessary output file format conversions, in that order. This method should not be called until a photoscene has been created and at least three images have been added to the photoscene. Note: Progress of the processing can be monitored with the GET photoscene/:photosceneid/progress method. docs.

    async
    throws

    Error when the request fails, for example, due to invalid request.

    Parameters

    • photosceneid: string

      Specifies the ID of the photoscene to start processing.

    Returns Promise<IPhotoSceneError | IPhotoSceneProcess>

    A JSON object containing a message for current processing job.

Protected put

  • put(endpoint: string, data: any, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

    • endpoint: string
    • data: any
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

reset

  • reset(auth?: { client_id: string; client_secret: string } | { token: string }, host?: string, region?: US | EMEA): void
  • Resets client to specific authentication method, Forge host, and availability region.

    Parameters

    • Optional auth: { client_id: string; client_secret: string } | { token: string }
    • Optional host: string
    • Optional region: US | EMEA

    Returns void

Protected setAuthorization

  • setAuthorization(options: any, scopes: string[]): Promise<void>

Generated using TypeDoc