@itwin/core-backend 5.1.0-dev.3 → 5.1.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/lib/cjs/Category.d.ts +37 -0
  2. package/lib/cjs/Category.d.ts.map +1 -1
  3. package/lib/cjs/Category.js +73 -0
  4. package/lib/cjs/Category.js.map +1 -1
  5. package/lib/cjs/DisplayStyle.d.ts +5 -0
  6. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  7. package/lib/cjs/DisplayStyle.js +27 -0
  8. package/lib/cjs/DisplayStyle.js.map +1 -1
  9. package/lib/cjs/Element.d.ts +166 -10
  10. package/lib/cjs/Element.d.ts.map +1 -1
  11. package/lib/cjs/Element.js +510 -9
  12. package/lib/cjs/Element.js.map +1 -1
  13. package/lib/cjs/Entity.d.ts +41 -1
  14. package/lib/cjs/Entity.d.ts.map +1 -1
  15. package/lib/cjs/Entity.js +58 -0
  16. package/lib/cjs/Entity.js.map +1 -1
  17. package/lib/cjs/IModelDb.d.ts +19 -36
  18. package/lib/cjs/IModelDb.d.ts.map +1 -1
  19. package/lib/cjs/IModelDb.js +129 -69
  20. package/lib/cjs/IModelDb.js.map +1 -1
  21. package/lib/cjs/IModelHost.d.ts +13 -0
  22. package/lib/cjs/IModelHost.d.ts.map +1 -1
  23. package/lib/cjs/IModelHost.js +6 -0
  24. package/lib/cjs/IModelHost.js.map +1 -1
  25. package/lib/cjs/Material.d.ts +19 -0
  26. package/lib/cjs/Material.d.ts.map +1 -1
  27. package/lib/cjs/Material.js +29 -0
  28. package/lib/cjs/Material.js.map +1 -1
  29. package/lib/cjs/Model.d.ts +42 -6
  30. package/lib/cjs/Model.d.ts.map +1 -1
  31. package/lib/cjs/Model.js +93 -5
  32. package/lib/cjs/Model.js.map +1 -1
  33. package/lib/cjs/TxnManager.d.ts.map +1 -1
  34. package/lib/cjs/TxnManager.js +1 -0
  35. package/lib/cjs/TxnManager.js.map +1 -1
  36. package/lib/cjs/ViewDefinition.d.ts +100 -0
  37. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  38. package/lib/cjs/ViewDefinition.js +208 -0
  39. package/lib/cjs/ViewDefinition.js.map +1 -1
  40. package/lib/cjs/ViewStateHydrator.js +3 -3
  41. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  42. package/lib/cjs/internal/ElementLRUCache.d.ts +28 -0
  43. package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -0
  44. package/lib/cjs/internal/ElementLRUCache.js +120 -0
  45. package/lib/cjs/internal/ElementLRUCache.js.map +1 -0
  46. package/lib/cjs/internal/Symbols.d.ts +1 -0
  47. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  48. package/lib/cjs/internal/Symbols.js +2 -1
  49. package/lib/cjs/internal/Symbols.js.map +1 -1
  50. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +2 -2
  51. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  52. package/lib/esm/Category.d.ts +37 -0
  53. package/lib/esm/Category.d.ts.map +1 -1
  54. package/lib/esm/Category.js +73 -0
  55. package/lib/esm/Category.js.map +1 -1
  56. package/lib/esm/DisplayStyle.d.ts +5 -0
  57. package/lib/esm/DisplayStyle.d.ts.map +1 -1
  58. package/lib/esm/DisplayStyle.js +27 -0
  59. package/lib/esm/DisplayStyle.js.map +1 -1
  60. package/lib/esm/Element.d.ts +166 -10
  61. package/lib/esm/Element.d.ts.map +1 -1
  62. package/lib/esm/Element.js +513 -12
  63. package/lib/esm/Element.js.map +1 -1
  64. package/lib/esm/Entity.d.ts +41 -1
  65. package/lib/esm/Entity.d.ts.map +1 -1
  66. package/lib/esm/Entity.js +58 -0
  67. package/lib/esm/Entity.js.map +1 -1
  68. package/lib/esm/IModelDb.d.ts +19 -36
  69. package/lib/esm/IModelDb.d.ts.map +1 -1
  70. package/lib/esm/IModelDb.js +132 -72
  71. package/lib/esm/IModelDb.js.map +1 -1
  72. package/lib/esm/IModelHost.d.ts +13 -0
  73. package/lib/esm/IModelHost.d.ts.map +1 -1
  74. package/lib/esm/IModelHost.js +6 -0
  75. package/lib/esm/IModelHost.js.map +1 -1
  76. package/lib/esm/Material.d.ts +19 -0
  77. package/lib/esm/Material.d.ts.map +1 -1
  78. package/lib/esm/Material.js +30 -1
  79. package/lib/esm/Material.js.map +1 -1
  80. package/lib/esm/Model.d.ts +42 -6
  81. package/lib/esm/Model.d.ts.map +1 -1
  82. package/lib/esm/Model.js +94 -6
  83. package/lib/esm/Model.js.map +1 -1
  84. package/lib/esm/TxnManager.d.ts.map +1 -1
  85. package/lib/esm/TxnManager.js +1 -0
  86. package/lib/esm/TxnManager.js.map +1 -1
  87. package/lib/esm/ViewDefinition.d.ts +100 -0
  88. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  89. package/lib/esm/ViewDefinition.js +209 -1
  90. package/lib/esm/ViewDefinition.js.map +1 -1
  91. package/lib/esm/ViewStateHydrator.js +3 -3
  92. package/lib/esm/ViewStateHydrator.js.map +1 -1
  93. package/lib/esm/internal/ElementLRUCache.d.ts +28 -0
  94. package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -0
  95. package/lib/esm/internal/ElementLRUCache.js +116 -0
  96. package/lib/esm/internal/ElementLRUCache.js.map +1 -0
  97. package/lib/esm/internal/Symbols.d.ts +1 -0
  98. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  99. package/lib/esm/internal/Symbols.js +1 -0
  100. package/lib/esm/internal/Symbols.js.map +1 -1
  101. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +2 -2
  102. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  103. package/lib/esm/test/ElementLRUCache.test.d.ts +2 -0
  104. package/lib/esm/test/ElementLRUCache.test.d.ts.map +1 -0
  105. package/lib/esm/test/ElementLRUCache.test.js +212 -0
  106. package/lib/esm/test/ElementLRUCache.test.js.map +1 -0
  107. package/lib/esm/test/ecdb/ECSqlQuery.test.js +0 -23
  108. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  109. package/lib/esm/test/imodel/IModel.test.js +22 -11
  110. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  111. package/lib/esm/test/standalone/SnapshotDb.test.js +1 -0
  112. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  113. package/lib/esm/test/standalone/TxnManager.test.js +1 -1
  114. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  115. package/package.json +12 -12
@@ -30,6 +30,33 @@ class ModelSelector extends Element_1.DefinitionElement {
30
30
  val.models = this.models;
31
31
  return val;
32
32
  }
33
+ /**
34
+ * ModelSelector custom HandledProps includes 'models'.
35
+ * @inheritdoc
36
+ * @beta
37
+ */
38
+ static _customHandledProps = [
39
+ { propertyName: "models", source: "Class" },
40
+ ];
41
+ /**
42
+ * ModelSelector deserializes 'models'.
43
+ * @inheritdoc
44
+ * @beta
45
+ */
46
+ static deserialize(props) {
47
+ const elProps = super.deserialize(props);
48
+ const instance = props.row;
49
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
50
+ elProps.models = props.iModel.withPreparedStatement("SELECT TargetECInstanceId FROM Bis.ModelSelectorRefersToModels WHERE SourceECInstanceId=?", (statement) => {
51
+ statement.bindId(1, instance.id);
52
+ const ids = [];
53
+ while (core_bentley_1.DbResult.BE_SQLITE_ROW === statement.step()) {
54
+ ids.push(statement.getValue(0).getId());
55
+ }
56
+ return ids;
57
+ });
58
+ return elProps;
59
+ }
33
60
  collectReferenceIds(referenceIds) {
34
61
  super.collectReferenceIds(referenceIds);
35
62
  this.models.forEach((modelId) => referenceIds.addModel(modelId));
@@ -95,6 +122,33 @@ class CategorySelector extends Element_1.DefinitionElement {
95
122
  val.categories = this.categories;
96
123
  return val;
97
124
  }
125
+ /**
126
+ * CategorySelector custom HandledProps includes 'categories'.
127
+ * @inheritdoc
128
+ * @beta
129
+ */
130
+ static _customHandledProps = [
131
+ { propertyName: "categories", source: "Class" },
132
+ ];
133
+ /**
134
+ * CategorySelector deserializes 'categories'.
135
+ * @inheritdoc
136
+ * @beta
137
+ */
138
+ static deserialize(props) {
139
+ const elProps = super.deserialize(props);
140
+ const instance = props.row;
141
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
142
+ elProps.categories = props.iModel.withPreparedStatement("SELECT TargetECInstanceId FROM Bis.CategorySelectorRefersToCategories WHERE SourceECInstanceId=?", (statement) => {
143
+ statement.bindId(1, instance.id);
144
+ const ids = [];
145
+ while (core_bentley_1.DbResult.BE_SQLITE_ROW === statement.step()) {
146
+ ids.push(statement.getValue(0).getId());
147
+ }
148
+ return ids;
149
+ });
150
+ return elProps;
151
+ }
98
152
  collectReferenceIds(referenceIds) {
99
153
  super.collectReferenceIds(referenceIds);
100
154
  this.categories.forEach((categoryId) => referenceIds.addElement(categoryId));
@@ -164,6 +218,40 @@ class ViewDefinition extends Element_1.DefinitionElement {
164
218
  if (!core_bentley_1.Id64.isValid(this.displayStyleId))
165
219
  throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadArg, `displayStyleId is invalid`);
166
220
  }
221
+ /**
222
+ * ViewDefinition custom HandledProps includes 'categorySelector', and 'displayStyle'.
223
+ * @inheritdoc
224
+ * @beta
225
+ */
226
+ static _customHandledProps = [
227
+ { propertyName: "categorySelector", source: "Class" },
228
+ { propertyName: "displayStyle", source: "Class" },
229
+ ];
230
+ /**
231
+ * ViewDefinition deserializes 'categorySelector', and 'displayStyle'.
232
+ * @inheritdoc
233
+ * @beta
234
+ */
235
+ static deserialize(props) {
236
+ const elProps = super.deserialize(props);
237
+ const instance = props.row;
238
+ if (instance.isPrivate !== undefined)
239
+ elProps.isPrivate = instance.isPrivate;
240
+ elProps.categorySelectorId = instance.categorySelector.id;
241
+ elProps.displayStyleId = instance.displayStyle.id;
242
+ return elProps;
243
+ }
244
+ /**
245
+ * ViewDefinition serializes 'categorySelector', and 'displayStyle'.
246
+ * @inheritdoc
247
+ * @beta
248
+ */
249
+ static serialize(props, _iModel) {
250
+ const inst = super.serialize(props, _iModel);
251
+ inst.categorySelector.id = props.categorySelectorId;
252
+ inst.displayStyle.id = props.displayStyleId;
253
+ return inst;
254
+ }
167
255
  toJSON() {
168
256
  const json = super.toJSON();
169
257
  json.categorySelectorId = this.categorySelectorId;
@@ -255,6 +343,59 @@ class ViewDefinition3d extends ViewDefinition {
255
343
  this.camera = new core_common_1.Camera(props.camera);
256
344
  this._details = new core_common_1.ViewDetails3d(this.jsonProperties);
257
345
  }
346
+ /**
347
+ * ViewDefinition3d custom HandledProps includes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',
348
+ * 'origin', 'extents', and 'isCameraOn'.
349
+ * @inheritdoc
350
+ * @beta
351
+ */
352
+ static _customHandledProps = [
353
+ { propertyName: "eyePoint", source: "Class" },
354
+ { propertyName: "focusDistance", source: "Class" },
355
+ { propertyName: "lensAngle", source: "Class" },
356
+ { propertyName: "yaw", source: "Class" },
357
+ { propertyName: "roll", source: "Class" },
358
+ { propertyName: "pitch", source: "Class" },
359
+ { propertyName: "origin", source: "Class" },
360
+ { propertyName: "extents", source: "Class" },
361
+ { propertyName: "isCameraOn", source: "Class" },
362
+ ];
363
+ /**
364
+ * ViewDefinition3d deserializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',
365
+ * 'origin', 'extents', and 'isCameraOn'.
366
+ * @inheritdoc
367
+ * @beta
368
+ */
369
+ static deserialize(props) {
370
+ const instance = props.row;
371
+ const elProps = super.deserialize(props);
372
+ // ViewDefinition3dProps
373
+ elProps.cameraOn = instance.isCameraOn;
374
+ elProps.origin = [instance.origin.x, instance.origin.y, instance.origin.z];
375
+ elProps.extents = [instance.extents.x, instance.extents.y, instance.extents.z];
376
+ elProps.camera = { eye: [instance.eyePoint.x, instance.eyePoint.y, instance.eyePoint.z], focusDist: instance.focusDistance, lens: core_geometry_1.Angle.createRadians(instance.lensAngle).toJSON() };
377
+ elProps.angles = core_geometry_1.YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON();
378
+ return elProps;
379
+ }
380
+ /**
381
+ * ViewDefinition3d serializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',
382
+ * 'origin', 'extents', and 'isCameraOn'.
383
+ * @inheritdoc
384
+ * @beta
385
+ */
386
+ static serialize(props, _iModel) {
387
+ const row = super.serialize(props, _iModel);
388
+ row.isCameraOn = props.cameraOn;
389
+ row.eyePoint = props.camera.eye;
390
+ row.focusDistance = props.camera.focusDist;
391
+ row.lensAngle = props.camera.lens;
392
+ if (props.angles) {
393
+ row.yaw = props.angles.yaw;
394
+ row.roll = props.angles.roll;
395
+ row.pitch = props.angles.pitch;
396
+ }
397
+ return row;
398
+ }
258
399
  toJSON() {
259
400
  const val = super.toJSON();
260
401
  val.cameraOn = this.cameraOn;
@@ -301,6 +442,35 @@ class SpatialViewDefinition extends ViewDefinition3d {
301
442
  json.modelSelectorId = this.modelSelectorId;
302
443
  return json;
303
444
  }
445
+ /**
446
+ * SpatialViewDefinition custom HandledProps includes 'modelSelector'.
447
+ * @inheritdoc
448
+ * @beta
449
+ */
450
+ static _customHandledProps = [
451
+ { propertyName: "modelSelector", source: "Class" },
452
+ ];
453
+ /**
454
+ * SpatialViewDefinition deserializes 'modelSelector'.
455
+ * @inheritdoc
456
+ * @beta
457
+ */
458
+ static deserialize(props) {
459
+ const elProps = super.deserialize(props);
460
+ const instance = props.row;
461
+ elProps.modelSelectorId = instance.modelSelector.id;
462
+ return elProps;
463
+ }
464
+ /**
465
+ * SpatialViewDefinition serializes 'modelSelector'.
466
+ * @inheritdoc
467
+ * @beta
468
+ */
469
+ static serialize(props, _iModel) {
470
+ const inst = super.serialize(props, _iModel);
471
+ inst.modelSelector.id = props.modelSelectorId;
472
+ return inst;
473
+ }
304
474
  collectReferenceIds(referenceIds) {
305
475
  super.collectReferenceIds(referenceIds);
306
476
  referenceIds.addElement(this.modelSelectorId);
@@ -461,6 +631,44 @@ class ViewDefinition2d extends ViewDefinition {
461
631
  val.angle = this.angle;
462
632
  return val;
463
633
  }
634
+ /**
635
+ * ViewDefinition2d custom HandledProps includes 'baseModel', 'origin', 'extents', and 'rotationAngle'.
636
+ * @inheritdoc
637
+ * @beta
638
+ */
639
+ static _customHandledProps = [
640
+ { propertyName: "baseModel", source: "Class" },
641
+ { propertyName: "origin", source: "Class" },
642
+ { propertyName: "extents", source: "Class" },
643
+ { propertyName: "rotationAngle", source: "Class" },
644
+ ];
645
+ /**
646
+ * ViewDefinition2d deserializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.
647
+ * @inheritdoc
648
+ * @beta
649
+ */
650
+ static deserialize(props) {
651
+ const elProps = super.deserialize(props);
652
+ const instance = props.row;
653
+ elProps.baseModelId = instance.baseModel.id;
654
+ elProps.origin = [instance.origin.x, instance.origin.y];
655
+ elProps.delta = [instance.extents.x, instance.extents.y];
656
+ elProps.angle = instance.rotationAngle;
657
+ return elProps;
658
+ }
659
+ /**
660
+ * ViewDefinition2d serializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.
661
+ * @inheritdoc
662
+ * @beta
663
+ */
664
+ static serialize(props, _iModel) {
665
+ const inst = super.serialize(props, _iModel);
666
+ inst.baseModel.id = props.baseModelId;
667
+ inst.origin = props.origin;
668
+ inst.extents = props.delta;
669
+ inst.rotationAngle = props.angle;
670
+ return inst;
671
+ }
464
672
  collectReferenceIds(referenceIds) {
465
673
  super.collectReferenceIds(referenceIds);
466
674
  referenceIds.addElement(this.baseModelId);
@@ -1 +1 @@
1
- {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2F;AAC3F,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAK1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAC3C,MAAM,KAAc,SAAS,KAAa,OAAO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OAAO,uBAAuB,CAAC,CAAC,CAAC;IAClF;;;;OAIG;IACI,MAAM,CAAU,UAAU,CAAC,MAAgB,EAAE,YAA4B,EAAE,SAAiB;QACjG,MAAM,QAAQ,GAAa,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,yBAAW,CAAC,qBAAqB,CAAC,CAAC;QACzF,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAXD,sDAWC;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,4BAAkB;IAC7C,MAAM,KAAc,SAAS,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IACpE,IAAI,CAAiB;IAC5B,YAAmB,KAA0B,EAAE,MAAgB;QAC7D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,4BAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,0GAA0G;IAC5G,CAAC;IACkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAZD,wCAYC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IAChD,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAC1E,iDAAiD;IAC1C,OAAO,CAAW;IAEzB,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;CACF;AATD,sCASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ViewDefinitions\n */\n\nimport { Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\n} from \"@itwin/core-geometry\";\nimport {\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\n ViewDetails3d,\n} from \"@itwin/core-common\";\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\n\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\n * @see [ModelSelectorState]($frontend)\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\n * @public\n */\nexport class ModelSelector extends DefinitionElement {\n public static override get className(): string { return \"ModelSelector\"; }\n\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\n public models: Id64String[];\n\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.models = props.models;\n }\n\n public override toJSON(): ModelSelectorProps {\n const val = super.toJSON() as ModelSelectorProps;\n val.models = this.models;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\n }\n\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\n * @param codeValue The ModelSelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The newly constructed ModelSelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\n const modelSelectorProps: ModelSelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n models,\n isPrivate: false,\n };\n return new ModelSelector(modelSelectorProps, iModelDb);\n }\n /**\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The Id of the newly inserted ModelSelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\n return iModelDb.elements.insertElement(modelSelector.toJSON());\n }\n}\n\n/** Holds a list of Ids of Categories to be displayed in a view.\n * @see [CategorySelectorState]($frontend)\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\n * @public\n */\nexport class CategorySelector extends DefinitionElement {\n public static override get className(): string { return \"CategorySelector\"; }\n /** The array of element Ids of the Categories selected by this CategorySelector */\n public categories: Id64String[];\n\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.categories = props.categories;\n }\n\n public override toJSON(): CategorySelectorProps {\n const val = super.toJSON() as CategorySelectorProps;\n val.categories = this.categories;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\n }\n\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\n * @param codeValue The CategorySelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The newly constructed CategorySelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\n const categorySelectorProps: CategorySelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n categories,\n isPrivate: false,\n };\n return new CategorySelector(categorySelectorProps, iModelDb);\n }\n\n /**\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The Id of the newly inserted CategorySelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\n return iModelDb.elements.insertElement(categorySelector.toJSON());\n }\n}\n\n/**\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\n * Subclasses of ViewDefinition determine which model(s) are viewed.\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\n * @public\n */\nexport abstract class ViewDefinition extends DefinitionElement {\n public static override get className(): string { return \"ViewDefinition\"; }\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\n public categorySelectorId: Id64String;\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\n public displayStyleId: Id64String;\n\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\n if (!Id64.isValid(this.categorySelectorId))\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\n\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\n if (!Id64.isValid(this.displayStyleId))\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\n }\n\n public override toJSON(): ViewDefinitionProps {\n const json = super.toJSON() as ViewDefinitionProps;\n json.categorySelectorId = this.categorySelectorId;\n json.displayStyleId = this.displayStyleId;\n return json;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.categorySelectorId);\n referenceIds.addElement(this.displayStyleId);\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\n if (Id64.isValidId64(acsId)) {\n referenceIds.addElement(acsId);\n }\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n categorySelectorId: ConcreteEntityTypes.Element,\n displayStyleId: ConcreteEntityTypes.Element,\n };\n\n /** @beta */\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\n super.onCloned(context, sourceElementProps, targetElementProps);\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\n if (Id64.isValidId64(acsId)) {\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\n }\n }\n }\n\n /** Type guard for `instanceof ViewDefinition3d` */\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\n /** Type guard for 'instanceof ViewDefinition2d` */\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\n /** Type guard for `instanceof SpatialViewDefinition` */\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\n /** Type guard for 'instanceof DrawingViewDefinition' */\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\n\n /** Load this view's DisplayStyle from the IModelDb. */\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\n\n /** Load this view's CategorySelector from the IModelDb. */\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\n\n /** Provides access to optional detail settings for this view. */\n public abstract get details(): ViewDetails;\n\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\n public getAuxiliaryCoordinateSystemId(): Id64String {\n return this.details.auxiliaryCoordinateSystemId;\n }\n\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\n */\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\n this.details.auxiliaryCoordinateSystemId = acsId;\n }\n\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\n * @param codeValue The ViewDefinition name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a view of one or more 3d models.\n * @public\n */\nexport abstract class ViewDefinition3d extends ViewDefinition {\n private readonly _details: ViewDetails3d;\n public static override get className(): string { return \"ViewDefinition3d\"; }\n /** If true, camera is used. Otherwise, use an orthographic projection. */\n public cameraOn: boolean;\n /** The lower left back corner of the view frustum. */\n public origin: Point3d;\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\n public extents: Vector3d;\n /** Rotation from world coordinates to view coordinates. */\n public angles: YawPitchRollAngles;\n /** The camera used for this view, if `cameraOn` is true. */\n public camera: Camera;\n\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\n this.origin = Point3d.fromJSON(props.origin);\n this.extents = Vector3d.fromJSON(props.extents);\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\n this.camera = new Camera(props.camera);\n this._details = new ViewDetails3d(this.jsonProperties);\n }\n\n public override toJSON(): ViewDefinition3dProps {\n const val = super.toJSON() as ViewDefinition3dProps;\n val.cameraOn = this.cameraOn;\n val.origin = this.origin;\n val.extents = this.extents;\n val.angles = this.angles;\n val.camera = this.camera;\n return val;\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails3d { return this._details; }\n\n /** Load this view's DisplayStyle3d from the IModelDb. */\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\n}\n\n/** Defines a view of one or more SpatialModels.\n * The list of viewed models is stored by the ModelSelector.\n *\n * This is how a SpatialViewDefinition selects the elements to display:\n *\n * SpatialViewDefinition\n * * ModelSelector\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\n * * CategorySelector\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\n * @public\n */\nexport class SpatialViewDefinition extends ViewDefinition3d {\n public static override get className(): string { return \"SpatialViewDefinition\"; }\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\n public modelSelectorId: Id64String;\n\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\n if (!Id64.isValid(this.modelSelectorId))\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\n }\n\n /** Construct a SpatialViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n public override toJSON(): SpatialViewDefinitionProps {\n const json = super.toJSON() as SpatialViewDefinitionProps;\n json.modelSelectorId = this.modelSelectorId;\n return json;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.modelSelectorId);\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\n\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n modelSelectorId: ConcreteEntityTypes.Element,\n };\n\n /** Load this view's ModelSelector from the IModelDb. */\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\n /**\n * Create a SpatialViewDefinition with the camera turned on.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @param cameraAngle Camera angle in radians.\n * @returns The newly constructed SpatialViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\n cameraLocation.z += cameraDistance; // Back up by camera distance.\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\n\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: true,\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\n };\n\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\n }\n /**\n * Insert an SpatialViewDefinition with the camera turned on.\n * @see [[createWithCamera]] for details.\n * @returns The Id of the newly inserted SpatialViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\n * @public\n */\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\n\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\n\n /**\n * Create an OrthographicViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The newly constructed OrthographicViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: false,\n camera: new Camera(), // not used when cameraOn === false\n };\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /**\n * Insert an OrthographicViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The Id of the newly inserted OrthographicViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n\n /** Set a new viewed range without changing the rotation or any other properties. */\n public setRange(range: Range3d): void {\n const rotation = this.angles.toMatrix3d();\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\n this.extents = rotatedRange.diagonal();\n }\n}\n\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\n * @public\n */\nexport class ViewDefinition2d extends ViewDefinition {\n private readonly _details: ViewDetails;\n\n public static override get className(): string { return \"ViewDefinition2d\"; }\n /** The Id of the Model displayed by this view. */\n public baseModelId: Id64String;\n /** The lower-left corner of this view in Model coordinates. */\n public origin: Point2d;\n /** The delta (size) of this view, in meters, aligned with view x,y. */\n public delta: Point2d;\n /** The rotation of this view. */\n public angle: Angle;\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.baseModelId = Id64.fromJSON(props.baseModelId);\n this.origin = Point2d.fromJSON(props.origin);\n this.delta = Point2d.fromJSON(props.delta);\n this.angle = Angle.fromJSON(props.angle);\n this._details = new ViewDetails(this.jsonProperties);\n }\n\n public override toJSON(): ViewDefinition2dProps {\n const val = super.toJSON() as ViewDefinition2dProps;\n val.baseModelId = this.baseModelId;\n val.origin = this.origin;\n val.delta = this.delta;\n val.angle = this.angle;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.baseModelId);\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails { return this._details; }\n\n /** Load this view's DisplayStyle2d from the IModelDb. */\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\n}\n\n/** Defines a view of a [[DrawingModel]].\n * @public\n */\nexport class DrawingViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"DrawingViewDefinition\"; }\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n /** Create a DrawingViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is a problem creating the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\n const viewDefinitionProps: ViewDefinition2dProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n baseModelId,\n categorySelectorId,\n displayStyleId,\n origin: { x: range.low.x, y: range.low.y },\n delta: range.diagonal(),\n angle: 0,\n };\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /** Construct a DrawingViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n /** Insert a DrawingViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a view of a [[SheetModel]].\n * @public\n */\nexport class SheetViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"SheetViewDefinition\"; }\n}\n\n/** A ViewDefinition used to display a 2d template model.\n * @internal\n */\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\n}\n\n/** A ViewDefinition used to display a 3d template model.\n * @internal\n */\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\n}\n\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\n * coordinate information in different units and/or orientations.\n * @public\n */\nexport abstract class AuxCoordSystem extends DefinitionElement {\n public static override get className(): string { return \"AuxCoordSystem\"; }\n public type?: number;\n public description?: string;\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) {\n super(props, iModel);\n this.type = props.type;\n this.description = props.description;\n }\n}\n\n/** A 2d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem2d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\n public origin?: Point2d;\n public angle?: number;\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point2d.fromJSON(props.origin) : undefined;\n this.angle = props.angle ? Angle.fromJSON(props.angle).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A 3d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem3d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\n public origin?: Point3d;\n public yaw?: number;\n public pitch?: number;\n public roll?: number;\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point3d.fromJSON(props.origin) : undefined;\n this.yaw = props.yaw ? Angle.fromJSON(props.yaw).degrees : undefined;\n this.pitch = props.pitch ? Angle.fromJSON(props.pitch).degrees : undefined;\n this.roll = props.roll ? Angle.fromJSON(props.roll).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem3d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A spatial auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\n * @param codeValue The AuxCoordSystemSpatial name\n */\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\n * @public\n */\nexport class ViewAttachment extends GraphicalElement2d {\n public static override get className(): string { return \"ViewAttachment\"; }\n public view: RelatedElement;\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\n super(props, iModel);\n this.view = new RelatedElement(props.view);\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\n }\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.view.id);\n }\n}\n\n/** The position in space of a Light.\n * @internal\n */\nexport class LightLocation extends SpatialLocationElement {\n public static override get className(): string { return \"LightLocation\"; }\n /** Whether this light is currently turned on. */\n public enabled?: boolean;\n\n protected constructor(props: LightLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.enabled = props.enabled;\n }\n}\n"]}
1
+ {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AA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ACH,MAAa,cAAe,SAAQ,4BAAkB;IAC7C,MAAM,KAAc,SAAS,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IACpE,IAAI,CAAiB;IAC5B,YAAmB,KAA0B,EAAE,MAAgB;QAC7D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,4BAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,0GAA0G;IAC5G,CAAC;IACkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAZD,wCAYC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IAChD,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAC1E,iDAAiD;IAC1C,OAAO,CAAW;IAEzB,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;CACF;AATD,sCASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ViewDefinitions\n */\n\nimport { DbResult, Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\n} from \"@itwin/core-geometry\";\nimport {\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\n ViewDetails3d,\n} from \"@itwin/core-common\";\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\n\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\n * @see [ModelSelectorState]($frontend)\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\n * @public\n */\nexport class ModelSelector extends DefinitionElement {\n public static override get className(): string { return \"ModelSelector\"; }\n\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\n public models: Id64String[];\n\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.models = props.models;\n }\n\n public override toJSON(): ModelSelectorProps {\n const val = super.toJSON() as ModelSelectorProps;\n val.models = this.models;\n return val;\n }\n\n /**\n * ModelSelector custom HandledProps includes 'models'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"models\", source: \"Class\" },\n ];\n\n /**\n * ModelSelector deserializes 'models'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ModelSelectorProps {\n const elProps = super.deserialize(props) as ModelSelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.models = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.ModelSelectorRefersToModels WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\n }\n\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\n * @param codeValue The ModelSelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The newly constructed ModelSelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\n const modelSelectorProps: ModelSelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n models,\n isPrivate: false,\n };\n return new ModelSelector(modelSelectorProps, iModelDb);\n }\n /**\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The Id of the newly inserted ModelSelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\n return iModelDb.elements.insertElement(modelSelector.toJSON());\n }\n}\n\n/** Holds a list of Ids of Categories to be displayed in a view.\n * @see [CategorySelectorState]($frontend)\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\n * @public\n */\nexport class CategorySelector extends DefinitionElement {\n public static override get className(): string { return \"CategorySelector\"; }\n /** The array of element Ids of the Categories selected by this CategorySelector */\n public categories: Id64String[];\n\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.categories = props.categories;\n }\n\n public override toJSON(): CategorySelectorProps {\n const val = super.toJSON() as CategorySelectorProps;\n val.categories = this.categories;\n return val;\n }\n\n /**\n * CategorySelector custom HandledProps includes 'categories'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categories\", source: \"Class\" },\n ];\n\n /**\n * CategorySelector deserializes 'categories'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): CategorySelectorProps {\n const elProps = super.deserialize(props) as CategorySelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.categories = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.CategorySelectorRefersToCategories WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\n }\n\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\n * @param codeValue The CategorySelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The newly constructed CategorySelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\n const categorySelectorProps: CategorySelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n categories,\n isPrivate: false,\n };\n return new CategorySelector(categorySelectorProps, iModelDb);\n }\n\n /**\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The Id of the newly inserted CategorySelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\n return iModelDb.elements.insertElement(categorySelector.toJSON());\n }\n}\n\n/**\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\n * Subclasses of ViewDefinition determine which model(s) are viewed.\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\n * @public\n */\nexport abstract class ViewDefinition extends DefinitionElement {\n public static override get className(): string { return \"ViewDefinition\"; }\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\n public categorySelectorId: Id64String;\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\n public displayStyleId: Id64String;\n\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\n if (!Id64.isValid(this.categorySelectorId))\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\n\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\n if (!Id64.isValid(this.displayStyleId))\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\n }\n\n /**\n * ViewDefinition custom HandledProps includes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categorySelector\", source: \"Class\" },\n { propertyName: \"displayStyle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition deserializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinitionProps {\n const elProps = super.deserialize(props) as ViewDefinitionProps;\n const instance = props.row;\n if (instance.isPrivate !== undefined)\n elProps.isPrivate = instance.isPrivate;\n elProps.categorySelectorId = instance.categorySelector.id;\n elProps.displayStyleId = instance.displayStyle.id;\n return elProps;\n }\n\n /**\n * ViewDefinition serializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.categorySelector.id = props.categorySelectorId;\n inst.displayStyle.id = props.displayStyleId;\n return inst;\n }\n\n public override toJSON(): ViewDefinitionProps {\n const json = super.toJSON() as ViewDefinitionProps;\n json.categorySelectorId = this.categorySelectorId;\n json.displayStyleId = this.displayStyleId;\n return json;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.categorySelectorId);\n referenceIds.addElement(this.displayStyleId);\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\n if (Id64.isValidId64(acsId)) {\n referenceIds.addElement(acsId);\n }\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n categorySelectorId: ConcreteEntityTypes.Element,\n displayStyleId: ConcreteEntityTypes.Element,\n };\n\n /** @beta */\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\n super.onCloned(context, sourceElementProps, targetElementProps);\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\n if (Id64.isValidId64(acsId)) {\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\n }\n }\n }\n\n /** Type guard for `instanceof ViewDefinition3d` */\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\n /** Type guard for 'instanceof ViewDefinition2d` */\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\n /** Type guard for `instanceof SpatialViewDefinition` */\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\n /** Type guard for 'instanceof DrawingViewDefinition' */\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\n\n /** Load this view's DisplayStyle from the IModelDb. */\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\n\n /** Load this view's CategorySelector from the IModelDb. */\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\n\n /** Provides access to optional detail settings for this view. */\n public abstract get details(): ViewDetails;\n\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\n public getAuxiliaryCoordinateSystemId(): Id64String {\n return this.details.auxiliaryCoordinateSystemId;\n }\n\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\n */\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\n this.details.auxiliaryCoordinateSystemId = acsId;\n }\n\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\n * @param codeValue The ViewDefinition name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a view of one or more 3d models.\n * @public\n */\nexport abstract class ViewDefinition3d extends ViewDefinition {\n private readonly _details: ViewDetails3d;\n public static override get className(): string { return \"ViewDefinition3d\"; }\n /** If true, camera is used. Otherwise, use an orthographic projection. */\n public cameraOn: boolean;\n /** The lower left back corner of the view frustum. */\n public origin: Point3d;\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\n public extents: Vector3d;\n /** Rotation from world coordinates to view coordinates. */\n public angles: YawPitchRollAngles;\n /** The camera used for this view, if `cameraOn` is true. */\n public camera: Camera;\n\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\n this.origin = Point3d.fromJSON(props.origin);\n this.extents = Vector3d.fromJSON(props.extents);\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\n this.camera = new Camera(props.camera);\n this._details = new ViewDetails3d(this.jsonProperties);\n }\n\n /**\n * ViewDefinition3d custom HandledProps includes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"eyePoint\", source: \"Class\" },\n { propertyName: \"focusDistance\", source: \"Class\" },\n { propertyName: \"lensAngle\", source: \"Class\" },\n { propertyName: \"yaw\", source: \"Class\" },\n { propertyName: \"roll\", source: \"Class\" },\n { propertyName: \"pitch\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"isCameraOn\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition3d deserializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition3dProps {\n const instance = props.row;\n const elProps = super.deserialize(props) as ViewDefinition3dProps;\n // ViewDefinition3dProps\n elProps.cameraOn = instance.isCameraOn as boolean;\n elProps.origin = [ instance.origin.x, instance.origin.y, instance.origin.z ];\n elProps.extents = [ instance.extents.x, instance.extents.y, instance.extents.z ];\n elProps.camera = { eye: [instance.eyePoint.x, instance.eyePoint.y, instance.eyePoint.z], focusDist: instance.focusDistance, lens: Angle.createRadians(instance.lensAngle).toJSON() };\n elProps.angles = YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON();\n return elProps;\n }\n\n /**\n * ViewDefinition3d serializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition3dProps, _iModel: IModelDb): ECSqlRow {\n const row = super.serialize(props, _iModel);\n row.isCameraOn = props.cameraOn;\n row.eyePoint = props.camera.eye;\n row.focusDistance = props.camera.focusDist;\n row.lensAngle = props.camera.lens;\n if (props.angles) {\n row.yaw = props.angles.yaw;\n row.roll = props.angles.roll;\n row.pitch = props.angles.pitch;\n }\n return row;\n }\n\n public override toJSON(): ViewDefinition3dProps {\n const val = super.toJSON() as ViewDefinition3dProps;\n val.cameraOn = this.cameraOn;\n val.origin = this.origin;\n val.extents = this.extents;\n val.angles = this.angles;\n val.camera = this.camera;\n return val;\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails3d { return this._details; }\n\n /** Load this view's DisplayStyle3d from the IModelDb. */\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\n}\n\n/** Defines a view of one or more SpatialModels.\n * The list of viewed models is stored by the ModelSelector.\n *\n * This is how a SpatialViewDefinition selects the elements to display:\n *\n * SpatialViewDefinition\n * * ModelSelector\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\n * * CategorySelector\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\n * @public\n */\nexport class SpatialViewDefinition extends ViewDefinition3d {\n public static override get className(): string { return \"SpatialViewDefinition\"; }\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\n public modelSelectorId: Id64String;\n\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\n if (!Id64.isValid(this.modelSelectorId))\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\n }\n\n /** Construct a SpatialViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n public override toJSON(): SpatialViewDefinitionProps {\n const json = super.toJSON() as SpatialViewDefinitionProps;\n json.modelSelectorId = this.modelSelectorId;\n return json;\n }\n\n /**\n * SpatialViewDefinition custom HandledProps includes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"modelSelector\", source: \"Class\" },\n ];\n\n /**\n * SpatialViewDefinition deserializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): SpatialViewDefinitionProps {\n const elProps = super.deserialize(props) as SpatialViewDefinitionProps;\n const instance = props.row;\n elProps.modelSelectorId = instance.modelSelector.id;\n return elProps;\n }\n\n /**\n * SpatialViewDefinition serializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: SpatialViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.modelSelector.id = props.modelSelectorId;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.modelSelectorId);\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\n\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n modelSelectorId: ConcreteEntityTypes.Element,\n };\n\n /** Load this view's ModelSelector from the IModelDb. */\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\n /**\n * Create a SpatialViewDefinition with the camera turned on.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @param cameraAngle Camera angle in radians.\n * @returns The newly constructed SpatialViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\n cameraLocation.z += cameraDistance; // Back up by camera distance.\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\n\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: true,\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\n };\n\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\n }\n /**\n * Insert an SpatialViewDefinition with the camera turned on.\n * @see [[createWithCamera]] for details.\n * @returns The Id of the newly inserted SpatialViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\n * @public\n */\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\n\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\n\n /**\n * Create an OrthographicViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The newly constructed OrthographicViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: false,\n camera: new Camera(), // not used when cameraOn === false\n };\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /**\n * Insert an OrthographicViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The Id of the newly inserted OrthographicViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n\n /** Set a new viewed range without changing the rotation or any other properties. */\n public setRange(range: Range3d): void {\n const rotation = this.angles.toMatrix3d();\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\n this.extents = rotatedRange.diagonal();\n }\n}\n\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\n * @public\n */\nexport class ViewDefinition2d extends ViewDefinition {\n private readonly _details: ViewDetails;\n\n public static override get className(): string { return \"ViewDefinition2d\"; }\n /** The Id of the Model displayed by this view. */\n public baseModelId: Id64String;\n /** The lower-left corner of this view in Model coordinates. */\n public origin: Point2d;\n /** The delta (size) of this view, in meters, aligned with view x,y. */\n public delta: Point2d;\n /** The rotation of this view. */\n public angle: Angle;\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.baseModelId = Id64.fromJSON(props.baseModelId);\n this.origin = Point2d.fromJSON(props.origin);\n this.delta = Point2d.fromJSON(props.delta);\n this.angle = Angle.fromJSON(props.angle);\n this._details = new ViewDetails(this.jsonProperties);\n }\n\n public override toJSON(): ViewDefinition2dProps {\n const val = super.toJSON() as ViewDefinition2dProps;\n val.baseModelId = this.baseModelId;\n val.origin = this.origin;\n val.delta = this.delta;\n val.angle = this.angle;\n return val;\n }\n\n /**\n * ViewDefinition2d custom HandledProps includes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"baseModel\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"rotationAngle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition2d deserializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition2dProps {\n const elProps = super.deserialize(props) as ViewDefinition2dProps;\n const instance = props.row;\n elProps.baseModelId = instance.baseModel.id;\n elProps.origin = [ instance.origin.x, instance.origin.y ];\n elProps.delta = [ instance.extents.x, instance.extents.y ];\n elProps.angle = instance.rotationAngle;\n return elProps;\n }\n\n /**\n * ViewDefinition2d serializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition2dProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.baseModel.id = props.baseModelId;\n inst.origin = props.origin;\n inst.extents = props.delta;\n inst.rotationAngle = props.angle;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.baseModelId);\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails { return this._details; }\n\n /** Load this view's DisplayStyle2d from the IModelDb. */\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\n}\n\n/** Defines a view of a [[DrawingModel]].\n * @public\n */\nexport class DrawingViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"DrawingViewDefinition\"; }\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n /** Create a DrawingViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is a problem creating the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\n const viewDefinitionProps: ViewDefinition2dProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n baseModelId,\n categorySelectorId,\n displayStyleId,\n origin: { x: range.low.x, y: range.low.y },\n delta: range.diagonal(),\n angle: 0,\n };\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /** Construct a DrawingViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n /** Insert a DrawingViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a view of a [[SheetModel]].\n * @public\n */\nexport class SheetViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"SheetViewDefinition\"; }\n}\n\n/** A ViewDefinition used to display a 2d template model.\n * @internal\n */\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\n}\n\n/** A ViewDefinition used to display a 3d template model.\n * @internal\n */\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\n}\n\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\n * coordinate information in different units and/or orientations.\n * @public\n */\nexport abstract class AuxCoordSystem extends DefinitionElement {\n public static override get className(): string { return \"AuxCoordSystem\"; }\n public type?: number;\n public description?: string;\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) {\n super(props, iModel);\n this.type = props.type;\n this.description = props.description;\n }\n}\n\n/** A 2d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem2d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\n public origin?: Point2d;\n public angle?: number;\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point2d.fromJSON(props.origin) : undefined;\n this.angle = props.angle ? Angle.fromJSON(props.angle).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A 3d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem3d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\n public origin?: Point3d;\n public yaw?: number;\n public pitch?: number;\n public roll?: number;\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point3d.fromJSON(props.origin) : undefined;\n this.yaw = props.yaw ? Angle.fromJSON(props.yaw).degrees : undefined;\n this.pitch = props.pitch ? Angle.fromJSON(props.pitch).degrees : undefined;\n this.roll = props.roll ? Angle.fromJSON(props.roll).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem3d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A spatial auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\n * @param codeValue The AuxCoordSystemSpatial name\n */\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\n * @public\n */\nexport class ViewAttachment extends GraphicalElement2d {\n public static override get className(): string { return \"ViewAttachment\"; }\n public view: RelatedElement;\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\n super(props, iModel);\n this.view = new RelatedElement(props.view);\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\n }\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.view.id);\n }\n}\n\n/** The position in space of a Light.\n * @internal\n */\nexport class LightLocation extends SpatialLocationElement {\n public static override get className(): string { return \"LightLocation\"; }\n /** Whether this light is currently turned on. */\n public enabled?: boolean;\n\n protected constructor(props: LightLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.enabled = props.enabled;\n }\n}\n"]}
@@ -32,7 +32,7 @@ class ViewStateHydrator {
32
32
  async handleBaseModelId(response, baseModelId) {
33
33
  let modelProps;
34
34
  try {
35
- modelProps = this._imodel.models.getModelJson({ id: baseModelId });
35
+ modelProps = this._imodel.models.getModelProps(baseModelId);
36
36
  }
37
37
  catch (err) {
38
38
  core_bentley_1.Logger.logError(BackendLoggerCategory_1.BackendLoggerCategory.ViewStateHydrator, `Error getting modelProps for baseModelId: ${baseModelId}`, () => ({ error: core_bentley_1.BentleyError.getErrorProps(err) }));
@@ -44,7 +44,7 @@ class ViewStateHydrator {
44
44
  const modelJsonArray = [];
45
45
  for (const id of decompressedModelIds) {
46
46
  try {
47
- const modelProps = this._imodel.models.getModelJson({ id });
47
+ const modelProps = this._imodel.models.getModelProps(id);
48
48
  modelJsonArray.push(modelProps);
49
49
  }
50
50
  catch { }
@@ -66,7 +66,7 @@ class ViewStateHydrator {
66
66
  const attachmentProps = [];
67
67
  for (const id of decompressedIds) {
68
68
  try {
69
- attachmentProps.push(this._imodel.elements.getElementJson({ id }));
69
+ attachmentProps.push(this._imodel.elements.getElementProps({ id }));
70
70
  }
71
71
  catch { }
72
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ViewStateHydrator.js","sourceRoot":"","sources":["../../src/ViewStateHydrator.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,sDAA0F;AAE1F,mEAAgE;AAGhE,gBAAgB;AAChB,MAAa,iBAAiB;IACpB,OAAO,CAAW;IAC1B,YAAmB,MAAgB;QACjC,IAAI,CAAC,OAAO,GAAG,MAAM,CA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uC,EAAE,sBAAyC,EAAE,kBAAuC;QACpK,MAAM,eAAe,GAAG,gCAAiB,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;QAChF,MAAM,eAAe,GAA0B,EAAE,CAAC;QAClD,KAAK,MAAM,EAAE,IAAI,eAAe,EAAE,CAAC;YACjC,IAAI,CAAC;gBACH,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YACrE,CAAC;YAAC,MAAM,CAAC,CAAC,CAAC;QACb,CAAC;QAED,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,KAAK,MAAM,UAAU,IAAI,eAAe,EAAE,CAAC;YACzC,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;gBAC1B,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;oBAChG,OAAO,IAAI,CAAC;gBACd,CAAC;gBAAC,MAAM,CAAC;oBACP,OAAO,SAAS,CAAC;gBACnB,CAAC;YACH,CAAC,CAAC;YAEF,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC5B,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1C,QAAQ,CAAC,cAAc,GAAG,KAAK,CAAC;QAChC,QAAQ,CAAC,wBAAwB,GAAG,eAAe,CAAC;QAEpD,OAAO;IACT,CAAC;CAEF;AAvFD,8CAuFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { BentleyError, CompressedId64Set, Id64String, Logger } from \"@itwin/core-bentley\";\nimport { HydrateViewStateRequestProps, HydrateViewStateResponseProps, ModelProps, ViewAttachmentProps, ViewStateLoadProps } from \"@itwin/core-common\";\nimport { BackendLoggerCategory } from \"./BackendLoggerCategory\";\nimport { IModelDb } from \"./IModelDb\";\n\n/** @internal */\nexport class ViewStateHydrator {\n private _imodel: IModelDb;\n public constructor(iModel: IModelDb) {\n this._imodel = iModel;\n }\n\n public async getHydrateResponseProps(options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> {\n const response: HydrateViewStateResponseProps = {};\n const promises = [];\n if (options.acsId)\n promises.push(this.handleAcsId(response, options.acsId));\n if (options.sheetViewAttachmentIds)\n promises.push(this.handleSheetViewAttachmentIds(response, options.sheetViewAttachmentIds, options.viewStateLoadProps));\n if (options.spatialViewId)\n promises.push(this.handleSpatialViewId(response, options.spatialViewId, options.viewStateLoadProps));\n if (options.notLoadedModelSelectorStateModels)\n promises.push(this.handleModelSelectorStateModels(response, options.notLoadedModelSelectorStateModels));\n if (options.baseModelId)\n promises.push(this.handleBaseModelId(response, options.baseModelId));\n await Promise.all(promises);\n return response;\n }\n\n private async handleBaseModelId(response: HydrateViewStateResponseProps, baseModelId: Id64String) {\n let modelProps;\n try {\n modelProps = this._imodel.models.getModelJson({ id: baseModelId });\n } catch (err) {\n Logger.logError(BackendLoggerCategory.ViewStateHydrator, `Error getting modelProps for baseModelId: ${baseModelId}`, () => ({error: BentleyError.getErrorProps(err)}));\n }\n response.baseModelProps = modelProps;\n }\n\n private async handleModelSelectorStateModels(response: HydrateViewStateResponseProps, models: CompressedId64Set) {\n const decompressedModelIds = CompressedId64Set.decompressSet(models);\n\n const modelJsonArray: ModelProps[] = [];\n for (const id of decompressedModelIds) {\n try {\n const modelProps = this._imodel.models.getModelJson({ id });\n modelJsonArray.push(modelProps);\n } catch { }\n }\n\n response.modelSelectorStateModels = modelJsonArray;\n }\n\n private async handleSpatialViewId(response: HydrateViewStateResponseProps, spatialViewId: Id64String, viewStateLoadProps?: ViewStateLoadProps) {\n response.spatialViewProps = await this._imodel.views.getViewStateProps(spatialViewId, viewStateLoadProps);\n }\n\n private async handleAcsId(response: HydrateViewStateResponseProps, acsId: string) {\n try {\n const props = this._imodel.elements.getElementProps(acsId);\n response.acsElementProps = props;\n } catch { }\n }\n\n private async handleSheetViewAttachmentIds(response: HydrateViewStateResponseProps, sheetViewAttachmentIds: CompressedId64Set, viewStateLoadProps?: ViewStateLoadProps) {\n const decompressedIds = CompressedId64Set.decompressSet(sheetViewAttachmentIds);\n const attachmentProps: ViewAttachmentProps[] = [];\n for (const id of decompressedIds) {\n try {\n attachmentProps.push(this._imodel.elements.getElementJson({ id }));\n } catch { }\n }\n\n const promises = [];\n for (const attachment of attachmentProps) {\n const loadView = async () => {\n try {\n const view = await this._imodel.views.getViewStateProps(attachment.view.id, viewStateLoadProps);\n return view;\n } catch {\n return undefined;\n }\n };\n\n promises.push(loadView());\n }\n const views = await Promise.all(promises);\n response.sheetViewViews = views;\n response.sheetViewAttachmentProps = attachmentProps;\n\n return;\n }\n\n}\n"]}
1
+ {"version":3,"file":"ViewStateHydrator.js","sourceRoot":"","sources":["../../src/ViewStateHydrator.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,sDAA0F;AAE1F,mEAAgE;AAGhE,gBAAgB;AAChB,MAAa,iBAAiB;IACpB,OAAO,CAAW;IAC1B,YAAmB,MAAgB;QACjC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,OAAqC;QACxE,MAAM,QAAQ,GAAkC,EAAE,CAAC;QACnD,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,IAAI,OAAO,CAAC,KAAK;YACf,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3D,IAAI,OAAO,CAAC,sBAAsB;YAChC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC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QAED,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,KAAK,MAAM,UAAU,IAAI,eAAe,EAAE,CAAC;YACzC,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;gBAC1B,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;oBAChG,OAAO,IAAI,CAAC;gBACd,CAAC;gBAAC,MAAM,CAAC;oBACP,OAAO,SAAS,CAAC;gBACnB,CAAC;YACH,CAAC,CAAC;YAEF,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC5B,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1C,QAAQ,CAAC,cAAc,GAAG,KAAK,CAAC;QAChC,QAAQ,CAAC,wBAAwB,GAAG,eAAe,CAAC;QAEpD,OAAO;IACT,CAAC;CAEF;AAvFD,8CAuFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { BentleyError, CompressedId64Set, Id64String, Logger } from \"@itwin/core-bentley\";\nimport { HydrateViewStateRequestProps, HydrateViewStateResponseProps, ModelProps, ViewAttachmentProps, ViewStateLoadProps } from \"@itwin/core-common\";\nimport { BackendLoggerCategory } from \"./BackendLoggerCategory\";\nimport { IModelDb } from \"./IModelDb\";\n\n/** @internal */\nexport class ViewStateHydrator {\n private _imodel: IModelDb;\n public constructor(iModel: IModelDb) {\n this._imodel = iModel;\n }\n\n public async getHydrateResponseProps(options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> {\n const response: HydrateViewStateResponseProps = {};\n const promises = [];\n if (options.acsId)\n promises.push(this.handleAcsId(response, options.acsId));\n if (options.sheetViewAttachmentIds)\n promises.push(this.handleSheetViewAttachmentIds(response, options.sheetViewAttachmentIds, options.viewStateLoadProps));\n if (options.spatialViewId)\n promises.push(this.handleSpatialViewId(response, options.spatialViewId, options.viewStateLoadProps));\n if (options.notLoadedModelSelectorStateModels)\n promises.push(this.handleModelSelectorStateModels(response, options.notLoadedModelSelectorStateModels));\n if (options.baseModelId)\n promises.push(this.handleBaseModelId(response, options.baseModelId));\n await Promise.all(promises);\n return response;\n }\n\n private async handleBaseModelId(response: HydrateViewStateResponseProps, baseModelId: Id64String) {\n let modelProps;\n try {\n modelProps = this._imodel.models.getModelProps(baseModelId);\n } catch (err) {\n Logger.logError(BackendLoggerCategory.ViewStateHydrator, `Error getting modelProps for baseModelId: ${baseModelId}`, () => ({ error: BentleyError.getErrorProps(err) }));\n }\n response.baseModelProps = modelProps;\n }\n\n private async handleModelSelectorStateModels(response: HydrateViewStateResponseProps, models: CompressedId64Set) {\n const decompressedModelIds = CompressedId64Set.decompressSet(models);\n\n const modelJsonArray: ModelProps[] = [];\n for (const id of decompressedModelIds) {\n try {\n const modelProps = this._imodel.models.getModelProps(id);\n modelJsonArray.push(modelProps);\n } catch { }\n }\n\n response.modelSelectorStateModels = modelJsonArray;\n }\n\n private async handleSpatialViewId(response: HydrateViewStateResponseProps, spatialViewId: Id64String, viewStateLoadProps?: ViewStateLoadProps) {\n response.spatialViewProps = await this._imodel.views.getViewStateProps(spatialViewId, viewStateLoadProps);\n }\n\n private async handleAcsId(response: HydrateViewStateResponseProps, acsId: string) {\n try {\n const props = this._imodel.elements.getElementProps(acsId);\n response.acsElementProps = props;\n } catch { }\n }\n\n private async handleSheetViewAttachmentIds(response: HydrateViewStateResponseProps, sheetViewAttachmentIds: CompressedId64Set, viewStateLoadProps?: ViewStateLoadProps) {\n const decompressedIds = CompressedId64Set.decompressSet(sheetViewAttachmentIds);\n const attachmentProps: ViewAttachmentProps[] = [];\n for (const id of decompressedIds) {\n try {\n attachmentProps.push(this._imodel.elements.getElementProps({ id }));\n } catch { }\n }\n\n const promises = [];\n for (const attachment of attachmentProps) {\n const loadView = async () => {\n try {\n const view = await this._imodel.views.getViewStateProps(attachment.view.id, viewStateLoadProps);\n return view;\n } catch {\n return undefined;\n }\n };\n\n promises.push(loadView());\n }\n const views = await Promise.all(promises);\n response.sheetViewViews = views;\n response.sheetViewAttachmentProps = attachmentProps;\n\n return;\n }\n\n}\n"]}
@@ -0,0 +1,28 @@
1
+ import { Id64String } from "@itwin/core-bentley";
2
+ import { ElementLoadOptions, ElementLoadProps, ElementProps } from "@itwin/core-common";
3
+ export interface CachedElement {
4
+ loadOptions: ElementLoadOptions;
5
+ elProps: ElementProps;
6
+ }
7
+ /**
8
+ * A LRU cache for entities. Cache contains the ElementProps and the load options used to load it.
9
+ * Cache can be searched by id, code or federationGuid.
10
+ */
11
+ export declare class ElementLRUCache {
12
+ readonly capacity: number;
13
+ static readonly DEFAULT_CAPACITY = 2000;
14
+ private _elementCache;
15
+ private _cacheByCode;
16
+ private _cacheByFederationGuid;
17
+ private static makeCodeKey;
18
+ private findElement;
19
+ constructor(capacity?: number);
20
+ clear(): void;
21
+ get size(): number;
22
+ deleteWithModel(modelId: Id64String): void;
23
+ delete(key: ElementLoadProps): boolean;
24
+ get(key: ElementLoadProps): CachedElement | undefined;
25
+ set(el: CachedElement): this;
26
+ get [Symbol.toStringTag](): string;
27
+ }
28
+ //# sourceMappingURL=ElementLRUCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementLRUCache.d.ts","sourceRoot":"","sources":["../../../src/internal/ElementLRUCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAa,kBAAkB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGnG,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,OAAO,EAAE,YAAY,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,eAAe;aA6BS,QAAQ;IA5B3C,gBAAuB,gBAAgB,QAAQ;IAC/C,OAAO,CAAC,aAAa,CAAwC;IAC7D,OAAO,CAAC,YAAY,CAAqC;IACzD,OAAO,CAAC,sBAAsB,CAAiC;IAE/D,OAAO,CAAC,MAAM,CAAC,WAAW;IAO1B,OAAO,CAAC,WAAW;gBAgBgB,QAAQ,SAAmC;IACvE,KAAK,IAAI,IAAI;IAKpB,IAAW,IAAI,IAAI,MAAM,CAExB;IACM,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI;IAM1C,MAAM,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO;IAYtC,GAAG,CAAC,GAAG,EAAE,gBAAgB,GAAG,aAAa,GAAG,SAAS;IAoBrD,GAAG,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI;IA6BnC,IAAW,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAExC;CACF"}