Reference·JavaScript · @bimworks/viewercommonJavaScript

VersionFrames

Class in @bimworks/viewercommon.

API catalogue · @bimworks/viewercommon · Class

TypeScript#
class VersionFrames

viewer3d.frames of both 3D viewers: a loaded version's own frame (its coordinates before alignment and placement, in metres) and the render frame (the camera's and the section planes', mm). What a stored value keeps its coordinates in, as the render frame moves with the first loaded model (docs/ui-api-wp4/1-frames-and-placement.md F3)

Members#

Member Kind Description
constructor Method
fromVersion Method A point in the version frame of vid in the render frame; null when vid is not loaded
fromVersionDirection Method A direction in the version frame of vid in the render frame, the same length; null when vid is not loaded
measurementToVersion Method A point of the measurement frame (where the measuring tools work, mm) in the version frame of vid; null when vid is not loaded
toVersion Method A render point in the version frame of vid; null when vid is not loaded
toVersionDirection Method A render direction in the version frame of vid, the same length; null when vid is not loaded
versionToMeasurement Method A point in the version frame of vid in the measurement frame (mm); null when vid is not loaded

constructor#

TypeScript#
constructor(viewer3d: object)

Parameters#

Name Type Description
viewer3d object

fromVersion#

TypeScript#
fromVersion(vid: string, point: ArrayLike<number>): (number)[] | null

A point in the version frame of vid in the render frame; null when vid is not loaded

Parameters#

Name Type Description
vid string
point ArrayLike<number>

fromVersionDirection#

TypeScript#
fromVersionDirection(vid: string, direction: ArrayLike<number>): (number)[] | null

A direction in the version frame of vid in the render frame, the same length; null when vid is not loaded

Parameters#

Name Type Description
vid string
direction ArrayLike<number>

measurementToVersion#

TypeScript#
measurementToVersion(vid: string, point: ArrayLike<number>): [number, number, number] | null

A point of the measurement frame (where the measuring tools work, mm) in the version frame of vid; null when vid is not loaded

Parameters#

Name Type Description
vid string
point ArrayLike<number>

toVersion#

TypeScript#
toVersion(vid: string, point: ArrayLike<number>): [number, number, number] | null

A render point in the version frame of vid; null when vid is not loaded

Parameters#

Name Type Description
vid string
point ArrayLike<number>

toVersionDirection#

TypeScript#
toVersionDirection(vid: string, direction: ArrayLike<number>): (number)[] | null

A render direction in the version frame of vid, the same length; null when vid is not loaded

Parameters#

Name Type Description
vid string
direction ArrayLike<number>

versionToMeasurement#

TypeScript#
versionToMeasurement(vid: string, point: ArrayLike<number>): (number)[] | null

A point in the version frame of vid in the measurement frame (mm); null when vid is not loaded

Parameters#

Name Type Description
vid string
point ArrayLike<number>