CompareResult
Class in @bimworks/jssdk.
API catalogue · @bimworks/jssdk · Class
class CompareResultA model compare result: the document CompareModels and GetCompareResult answer, with the object sets as QidSets and the correspondence between the sides. Object sets need details "objects" or more, records "changes" or more, layers "full".
Members#
| Member | Kind | Description |
|---|---|---|
| constructor | Method | |
| alignment | Property | The rigid move most matched objects share, null when there is none |
| cached | Property | |
| categories | Property | |
| clusters | Property | Units that changed alike, the largest first |
| document | Property | |
| error | Property | |
| federated | Property | Whether either side is a federation |
| groups | Property | The summary by the definition's group by |
| hiddenFeatures | Property | |
| layers | Property | |
| left | Property | The left side; a federation's has its models, and its version_uuid names no Version |
| leftVid | Property | The left Version; a federation's first model |
| leftVids | Property | The Versions of each side: one, or a federation's models |
| moves | Property | The pairs that moved (details "full" with layers): items [left oid, right oid, from x, y, z, to x, y, z] in world mm |
| paging | Property | |
| ready | Property | |
| records | Property | |
| resultUuid | Property | |
| right | Property | |
| rightVid | Property | |
| rightVids | Property | |
| stats | Property | |
| status | Property | |
| warnings | Property | |
| category | Method | |
| categoryOf | Method | The category an object is in |
| clusterObjects | Method | The objects of a cluster (details "objects" and up) |
| counterpart | Method | The paired object on the other side; null for added, removed or unknown objects |
| loadRecords | Method | Loads a page of records from the server |
| moveQids | Method | The qids of the pair of moves item i |
| objects | Method | The objects of a category on one side or both |
| recordQid | Method | The qid ("vid-oid") of one side of a record, null when it has none there |
| whenReady | Method | Waits until a compare that was still running is ready |
constructor#
constructor()alignment#
readonly alignment: CompareAlignment | nullThe rigid move most matched objects share, null when there is none
cached#
readonly cached: booleancategories#
readonly categories: (CompareCategory)[]clusters#
readonly clusters: (CompareCluster)[]Units that changed alike, the largest first
document#
readonly document: Record<string, unknown>error#
readonly error?: stringfederated#
readonly federated: booleanWhether either side is a federation
groups#
readonly groups: ({ counts: Record<string, number>; key: Record<string, string | null>; total: number })[]The summary by the definition's group by
hiddenFeatures#
readonly hiddenFeatures: (string)[]layers#
readonly layers: (CompareLayer)[]left#
readonly left: CompareResultSide | nullThe left side; a federation's has its models, and its version_uuid names no Version
leftVid#
readonly leftVid: stringThe left Version; a federation's first model
leftVids#
readonly leftVids: (string)[]The Versions of each side: one, or a federation's models
moves#
readonly moves: { count: number; items: ((number)[])[]; left_v?: (number)[]; right_v?: (number)[]; truncated?: boolean } | nullThe pairs that moved (details "full" with layers): items [left oid, right oid, from x, y, z, to x, y, z] in world mm
paging#
readonly paging: { category?: string; limit: number; offset: number; returned: number; total: number } | nullready#
readonly ready: booleanrecords#
readonly records: (CompareRecord)[]resultUuid#
readonly resultUuid: stringright#
readonly right: CompareResultSide | nullrightVid#
readonly rightVid: stringrightVids#
readonly rightVids: (string)[]stats#
readonly stats: Record<string, unknown>status#
readonly status: "FAILED" | "PENDING" | "RUNNING" | "READY"warnings#
readonly warnings: ({ code: string; details?: unknown; message: string })[]category#
category(id: string): CompareCategory | nullParameters#
| Name | Type | Description |
|---|---|---|
id |
string |
categoryOf#
The category an object is in
Parameters#
| Name | Type | Description |
|---|---|---|
qid |
string | Qid |
clusterObjects#
The objects of a cluster (details "objects" and up)
Parameters#
| Name | Type | Description |
|---|---|---|
clusterId |
string |
|
side |
"both" | "left" | "right" |
counterpart#
The paired object on the other side; null for added, removed or unknown objects
Parameters#
| Name | Type | Description |
|---|---|---|
qid |
string | Qid |
loadRecords#
loadRecords(page?: { category?: string; details?: "changes" | "full"; limit?: number; offset?: number }): Promise<(CompareRecord)[]>Loads a page of records from the server
Parameters#
| Name | Type | Description |
|---|---|---|
page |
{ category?: string; details?: "changes" | "full"; limit?: number; offset?: number } |
moveQids#
moveQids(i: number): { left: string; right: string }The qids of the pair of moves item i
Parameters#
| Name | Type | Description |
|---|---|---|
i |
number |
objects#
The objects of a category on one side or both
Parameters#
| Name | Type | Description |
|---|---|---|
categoryId |
string |
|
side |
"both" | "left" | "right" |
recordQid#
recordQid(record: CompareRecord, side: "left" | "right"): string | nullThe qid ("vid-oid") of one side of a record, null when it has none there
Parameters#
| Name | Type | Description |
|---|---|---|
record |
CompareRecord | |
side |
"left" | "right" |
whenReady#
whenReady(options?: { details?: "summary" | "objects" | "changes" | "full"; intervalMs?: number; timeoutMs?: number }): Promise<CompareResult>Waits until a compare that was still running is ready
Parameters#
| Name | Type | Description |
|---|---|---|
options |
{ details?: "summary" | "objects" | "changes" | "full"; intervalMs?: number; timeoutMs?: number } |