@itwin/core-backend 4.0.0-dev.6 → 4.0.0-dev.60

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 (253) hide show
  1. package/CHANGELOG.md +89 -67
  2. package/lib/cjs/BackendHubAccess.d.ts +224 -224
  3. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  4. package/lib/cjs/BackendHubAccess.js +41 -41
  5. package/lib/cjs/BackendHubAccess.js.map +1 -1
  6. package/lib/cjs/BackendLoggerCategory.d.ts +90 -91
  7. package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -1
  8. package/lib/cjs/BackendLoggerCategory.js +98 -99
  9. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  10. package/lib/cjs/BisCoreSchema.d.ts +21 -21
  11. package/lib/cjs/BisCoreSchema.js +60 -60
  12. package/lib/cjs/BriefcaseManager.d.ts +170 -170
  13. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  14. package/lib/cjs/BriefcaseManager.js +408 -414
  15. package/lib/cjs/BriefcaseManager.js.map +1 -1
  16. package/lib/cjs/Category.d.ts +153 -153
  17. package/lib/cjs/Category.js +243 -243
  18. package/lib/cjs/Category.js.map +1 -1
  19. package/lib/cjs/ChangeSummaryManager.d.ts +187 -187
  20. package/lib/cjs/ChangeSummaryManager.js +444 -445
  21. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  22. package/lib/cjs/ChangedElementsDb.d.ts +99 -99
  23. package/lib/cjs/ChangedElementsDb.js +165 -165
  24. package/lib/cjs/ChangedElementsManager.d.ts +39 -39
  25. package/lib/cjs/ChangedElementsManager.js +88 -88
  26. package/lib/cjs/ChannelControl.d.ts +70 -0
  27. package/lib/cjs/ChannelControl.d.ts.map +1 -0
  28. package/lib/cjs/ChannelControl.js +89 -0
  29. package/lib/cjs/ChannelControl.js.map +1 -0
  30. package/lib/cjs/CheckpointManager.d.ts +121 -121
  31. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  32. package/lib/cjs/CheckpointManager.js +351 -349
  33. package/lib/cjs/CheckpointManager.js.map +1 -1
  34. package/lib/cjs/ClassRegistry.d.ts +79 -79
  35. package/lib/cjs/ClassRegistry.js +249 -245
  36. package/lib/cjs/ClassRegistry.js.map +1 -1
  37. package/lib/cjs/CloudSqlite.d.ts +355 -350
  38. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  39. package/lib/cjs/CloudSqlite.js +154 -153
  40. package/lib/cjs/CloudSqlite.js.map +1 -1
  41. package/lib/cjs/CodeService.d.ts +396 -396
  42. package/lib/cjs/CodeService.d.ts.map +1 -1
  43. package/lib/cjs/CodeService.js +63 -63
  44. package/lib/cjs/CodeService.js.map +1 -1
  45. package/lib/cjs/CodeSpecs.d.ts +55 -55
  46. package/lib/cjs/CodeSpecs.js +124 -124
  47. package/lib/cjs/ConcurrentQuery.d.ts +13 -13
  48. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  49. package/lib/cjs/ConcurrentQuery.js +36 -36
  50. package/lib/cjs/CustomViewState3dCreator.d.ts +21 -21
  51. package/lib/cjs/CustomViewState3dCreator.d.ts.map +1 -1
  52. package/lib/cjs/CustomViewState3dCreator.js +82 -81
  53. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  54. package/lib/cjs/DevTools.d.ts +74 -71
  55. package/lib/cjs/DevTools.d.ts.map +1 -1
  56. package/lib/cjs/DevTools.js +156 -154
  57. package/lib/cjs/DevTools.js.map +1 -1
  58. package/lib/cjs/DisplayStyle.d.ts +106 -106
  59. package/lib/cjs/DisplayStyle.js +253 -256
  60. package/lib/cjs/DisplayStyle.js.map +1 -1
  61. package/lib/cjs/ECDb.d.ts +194 -191
  62. package/lib/cjs/ECDb.d.ts.map +1 -1
  63. package/lib/cjs/ECDb.js +353 -350
  64. package/lib/cjs/ECDb.js.map +1 -1
  65. package/lib/cjs/ECSchemaXmlContext.d.ts +18 -18
  66. package/lib/cjs/ECSchemaXmlContext.d.ts.map +1 -1
  67. package/lib/cjs/ECSchemaXmlContext.js +41 -41
  68. package/lib/cjs/ECSqlStatement.d.ts +473 -473
  69. package/lib/cjs/ECSqlStatement.js +791 -791
  70. package/lib/cjs/Element.d.ts +1113 -1109
  71. package/lib/cjs/Element.d.ts.map +1 -1
  72. package/lib/cjs/Element.js +1424 -1427
  73. package/lib/cjs/Element.js.map +1 -1
  74. package/lib/cjs/ElementAspect.d.ts +176 -179
  75. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  76. package/lib/cjs/ElementAspect.js +203 -211
  77. package/lib/cjs/ElementAspect.js.map +1 -1
  78. package/lib/cjs/ElementGraphics.d.ts +9 -9
  79. package/lib/cjs/ElementGraphics.js +41 -41
  80. package/lib/cjs/ElementGraphics.js.map +1 -1
  81. package/lib/cjs/ElementTreeWalker.d.ts +162 -162
  82. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  83. package/lib/cjs/ElementTreeWalker.js +409 -409
  84. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  85. package/lib/cjs/Entity.d.ts +106 -106
  86. package/lib/cjs/Entity.d.ts.map +1 -1
  87. package/lib/cjs/Entity.js +134 -134
  88. package/lib/cjs/Entity.js.map +1 -1
  89. package/lib/cjs/EntityReferences.d.ts +49 -49
  90. package/lib/cjs/EntityReferences.d.ts.map +1 -1
  91. package/lib/cjs/EntityReferences.js +95 -95
  92. package/lib/cjs/ExportGraphics.d.ts +317 -317
  93. package/lib/cjs/ExportGraphics.d.ts.map +1 -1
  94. package/lib/cjs/ExportGraphics.js +208 -208
  95. package/lib/cjs/ExternalSource.d.ts +96 -96
  96. package/lib/cjs/ExternalSource.js +131 -131
  97. package/lib/cjs/ExternalSource.js.map +1 -1
  98. package/lib/cjs/GeoCoordConfig.d.ts +19 -19
  99. package/lib/cjs/GeoCoordConfig.js +85 -85
  100. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  101. package/lib/cjs/GeometrySummary.d.ts +4 -4
  102. package/lib/cjs/GeometrySummary.js +333 -333
  103. package/lib/cjs/GeometrySummary.js.map +1 -1
  104. package/lib/cjs/HubMock.d.ts +94 -94
  105. package/lib/cjs/HubMock.js +220 -222
  106. package/lib/cjs/HubMock.js.map +1 -1
  107. package/lib/cjs/IModelCloneContext.d.ts +8 -8
  108. package/lib/cjs/IModelCloneContext.d.ts.map +1 -1
  109. package/lib/cjs/IModelCloneContext.js +15 -15
  110. package/lib/cjs/IModelDb.d.ts +1216 -1196
  111. package/lib/cjs/IModelDb.d.ts.map +1 -1
  112. package/lib/cjs/IModelDb.js +2387 -2392
  113. package/lib/cjs/IModelDb.js.map +1 -1
  114. package/lib/cjs/IModelElementCloneContext.d.ts +89 -89
  115. package/lib/cjs/IModelElementCloneContext.js +159 -159
  116. package/lib/cjs/IModelHost.d.ts +356 -369
  117. package/lib/cjs/IModelHost.d.ts.map +1 -1
  118. package/lib/cjs/IModelHost.js +472 -496
  119. package/lib/cjs/IModelHost.js.map +1 -1
  120. package/lib/cjs/IModelJsFs.d.ts +62 -62
  121. package/lib/cjs/IModelJsFs.js +139 -140
  122. package/lib/cjs/IModelJsFs.js.map +1 -1
  123. package/lib/cjs/IpcHost.d.ts +104 -104
  124. package/lib/cjs/IpcHost.js +276 -278
  125. package/lib/cjs/IpcHost.js.map +1 -1
  126. package/lib/cjs/LineStyle.d.ts +311 -311
  127. package/lib/cjs/LineStyle.js +295 -295
  128. package/lib/cjs/LocalHub.d.ts +162 -162
  129. package/lib/cjs/LocalHub.d.ts.map +1 -1
  130. package/lib/cjs/LocalHub.js +579 -584
  131. package/lib/cjs/LocalHub.js.map +1 -1
  132. package/lib/cjs/LocalhostIpcHost.d.ts +20 -20
  133. package/lib/cjs/LocalhostIpcHost.js +79 -81
  134. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  135. package/lib/cjs/Material.d.ts +131 -131
  136. package/lib/cjs/Material.js +180 -181
  137. package/lib/cjs/Material.js.map +1 -1
  138. package/lib/cjs/Model.d.ts +392 -392
  139. package/lib/cjs/Model.d.ts.map +1 -1
  140. package/lib/cjs/Model.js +489 -485
  141. package/lib/cjs/Model.js.map +1 -1
  142. package/lib/cjs/NativeAppStorage.d.ts +51 -51
  143. package/lib/cjs/NativeAppStorage.js +202 -202
  144. package/lib/cjs/NativeAppStorage.js.map +1 -1
  145. package/lib/cjs/NativeHost.d.ts +52 -52
  146. package/lib/cjs/NativeHost.js +160 -163
  147. package/lib/cjs/NativeHost.js.map +1 -1
  148. package/lib/cjs/NavigationRelationship.d.ts +156 -156
  149. package/lib/cjs/NavigationRelationship.js +225 -225
  150. package/lib/cjs/NavigationRelationship.js.map +1 -1
  151. package/lib/cjs/PromiseMemoizer.d.ts +51 -51
  152. package/lib/cjs/PromiseMemoizer.d.ts.map +1 -1
  153. package/lib/cjs/PromiseMemoizer.js +101 -101
  154. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  155. package/lib/cjs/PropertyStore.d.ts +132 -132
  156. package/lib/cjs/PropertyStore.js +11 -11
  157. package/lib/cjs/Relationship.d.ts +416 -416
  158. package/lib/cjs/Relationship.js +494 -494
  159. package/lib/cjs/Relationship.js.map +1 -1
  160. package/lib/cjs/RpcBackend.d.ts +5 -5
  161. package/lib/cjs/RpcBackend.js +32 -32
  162. package/lib/cjs/SQLiteDb.d.ts +219 -219
  163. package/lib/cjs/SQLiteDb.js +212 -214
  164. package/lib/cjs/SQLiteDb.js.map +1 -1
  165. package/lib/cjs/Schema.d.ts +55 -55
  166. package/lib/cjs/Schema.js +83 -83
  167. package/lib/cjs/Schema.js.map +1 -1
  168. package/lib/cjs/ServerBasedLocks.d.ts +57 -57
  169. package/lib/cjs/ServerBasedLocks.js +168 -168
  170. package/lib/cjs/ServerBasedLocks.js.map +1 -1
  171. package/lib/cjs/SqliteStatement.d.ts +360 -360
  172. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  173. package/lib/cjs/SqliteStatement.js +586 -586
  174. package/lib/cjs/Texture.d.ts +58 -58
  175. package/lib/cjs/Texture.js +82 -82
  176. package/lib/cjs/Texture.js.map +1 -1
  177. package/lib/cjs/TileStorage.d.ts +18 -18
  178. package/lib/cjs/TileStorage.js +87 -90
  179. package/lib/cjs/TileStorage.js.map +1 -1
  180. package/lib/cjs/TxnManager.d.ts +202 -202
  181. package/lib/cjs/TxnManager.d.ts.map +1 -1
  182. package/lib/cjs/TxnManager.js +356 -356
  183. package/lib/cjs/TxnManager.js.map +1 -1
  184. package/lib/cjs/ViewDefinition.d.ts +435 -439
  185. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  186. package/lib/cjs/ViewDefinition.js +646 -646
  187. package/lib/cjs/ViewDefinition.js.map +1 -1
  188. package/lib/cjs/ViewStateHydrator.d.ts +13 -13
  189. package/lib/cjs/ViewStateHydrator.js +103 -103
  190. package/lib/cjs/core-backend.d.ts +183 -184
  191. package/lib/cjs/core-backend.d.ts.map +1 -1
  192. package/lib/cjs/core-backend.js +207 -204
  193. package/lib/cjs/core-backend.js.map +1 -1
  194. package/lib/cjs/domains/FunctionalElements.d.ts +101 -101
  195. package/lib/cjs/domains/FunctionalElements.js +145 -145
  196. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  197. package/lib/cjs/domains/FunctionalSchema.d.ts +13 -13
  198. package/lib/cjs/domains/FunctionalSchema.d.ts.map +1 -1
  199. package/lib/cjs/domains/FunctionalSchema.js +39 -40
  200. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  201. package/lib/cjs/domains/GenericElements.d.ts +177 -177
  202. package/lib/cjs/domains/GenericElements.js +263 -263
  203. package/lib/cjs/domains/GenericSchema.d.ts +10 -10
  204. package/lib/cjs/domains/GenericSchema.js +28 -28
  205. package/lib/cjs/rpc/multipart.d.ts +11 -11
  206. package/lib/cjs/rpc/multipart.js +71 -71
  207. package/lib/cjs/rpc/tracing.d.ts +28 -28
  208. package/lib/cjs/rpc/tracing.js +73 -74
  209. package/lib/cjs/rpc/tracing.js.map +1 -1
  210. package/lib/cjs/rpc/web/logging.d.ts +9 -9
  211. package/lib/cjs/rpc/web/logging.js +43 -43
  212. package/lib/cjs/rpc/web/request.d.ts +6 -6
  213. package/lib/cjs/rpc/web/request.js +73 -74
  214. package/lib/cjs/rpc/web/request.js.map +1 -1
  215. package/lib/cjs/rpc/web/response.d.ts +6 -6
  216. package/lib/cjs/rpc/web/response.js +105 -106
  217. package/lib/cjs/rpc/web/response.js.map +1 -1
  218. package/lib/cjs/rpc-impl/DevToolsRpcImpl.d.ts +15 -15
  219. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js +32 -32
  220. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +47 -47
  221. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +293 -294
  222. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  223. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts +20 -22
  224. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -1
  225. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +187 -205
  226. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  227. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +36 -36
  228. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +166 -168
  229. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  230. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +16 -16
  231. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +42 -43
  232. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  233. package/lib/cjs/rpc-impl/WipRpcImpl.d.ts +15 -15
  234. package/lib/cjs/rpc-impl/WipRpcImpl.js +37 -37
  235. package/lib/cjs/workspace/Settings.d.ts +186 -186
  236. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  237. package/lib/cjs/workspace/Settings.js +154 -155
  238. package/lib/cjs/workspace/Settings.js.map +1 -1
  239. package/lib/cjs/workspace/SettingsSchemas.d.ts +75 -75
  240. package/lib/cjs/workspace/SettingsSchemas.js +190 -191
  241. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  242. package/lib/cjs/workspace/Workspace.d.ts +414 -414
  243. package/lib/cjs/workspace/Workspace.js +537 -543
  244. package/lib/cjs/workspace/Workspace.js.map +1 -1
  245. package/package.json +19 -19
  246. package/lib/cjs/AliCloudStorageService.d.ts +0 -24
  247. package/lib/cjs/AliCloudStorageService.d.ts.map +0 -1
  248. package/lib/cjs/AliCloudStorageService.js +0 -72
  249. package/lib/cjs/AliCloudStorageService.js.map +0 -1
  250. package/lib/cjs/CloudStorageBackend.d.ts +0 -59
  251. package/lib/cjs/CloudStorageBackend.d.ts.map +0 -1
  252. package/lib/cjs/CloudStorageBackend.js +0 -174
  253. package/lib/cjs/CloudStorageBackend.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ExportGraphics.d.ts","sourceRoot":"","sources":["../../src/ExportGraphics.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAElE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,4EAA4E;IAC5E,OAAO,EAAE,UAAU,CAAC;IACpB,+DAA+D;IAC/D,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,SAAS,EAAE,UAAU,CAAC;IACtB,kEAAkE;IAClE,WAAW,EAAE,UAAU,CAAC;IACxB,oDAAoD;IACpD,KAAK,EAAE,aAAa,CAAC;IACrB,uCAAuC;IACvC,aAAa,EAAE,aAAa,CAAC;IAC7B,sCAAsC;IACtC,KAAK,EAAE,mBAAmB,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AO;IAUP;;;;;OAKG;WACW,MAAM,CAAC,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,GAAG,yBAAyB;IAG9F,sEAAsE;IAC/D,KAAK,IAAI,IAAI;IAIpB,sCAAsC;IAC/B,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAqD5C,eAAe,IAAI,OAAO;IAGjC,iEAAiE;IAC1D,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAExC,qEAAqE;IAC9D,gBAAgB,IAAI,MAAM;IACjC,2EAA2E;IACpE,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAC1C;;OAEG;IACI,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAC1C;;OAEG;IACI,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAC3C,2EAA2E;IACpE,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAC3C,8EAA8E;IACvE,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAEzC,iCAAiC;IAC1B,cAAc,IAAI,QAAQ;IACjC,6GAA6G;IACtG,WAAW,IAAI,IAAI;IAS1B;;OAEG;IACI,wBAAwB,CAAC,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAO/G,6FAA6F;IACtF,YAAY,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAUjE"}
@@ -1,209 +1,209 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module iModels
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ExportGraphicsMeshVisitor = exports.ExportGraphics = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- const core_geometry_1 = require("@itwin/core-geometry");
13
- /** Provides utility functions for working with data generated by [IModelDb.exportGraphics]($core-backend)
14
- * @public
15
- */
16
- var ExportGraphics;
17
- (function (ExportGraphics) {
18
- /** Test if ExportPartDisplayInfos have exactly the same values.
19
- * @public
20
- */
21
- function arePartDisplayInfosEqual(lhs, rhs) {
22
- if (lhs.categoryId !== rhs.categoryId)
23
- return false;
24
- if (lhs.subCategoryId !== rhs.subCategoryId)
25
- return false;
26
- if (lhs.materialId !== rhs.materialId)
27
- return false;
28
- if (lhs.elmTransparency !== rhs.elmTransparency)
29
- return false;
30
- if (lhs.lineColor !== rhs.lineColor)
31
- return false;
32
- return true;
33
- }
34
- ExportGraphics.arePartDisplayInfosEqual = arePartDisplayInfosEqual;
35
- /**
36
- * Convert an ExportGraphicsMesh to an IndexedPolyface usable by the geometry API.
37
- * @note The resulting IndexedPolyface may have duplicate points, normals and params. If problematic, call [PolyfaceData.compress]($core-geometry)
38
- * @public
39
- */
40
- function convertToIndexedPolyface(mesh) {
41
- const polyface = core_geometry_1.IndexedPolyface.create(true, true, false, mesh.isTwoSided);
42
- const p = mesh.points;
43
- for (let i = 0; i < p.length; i += 3)
44
- polyface.data.point.pushXYZ(p[i], p[i + 1], p[i + 2]);
45
- const n = mesh.normals;
46
- (0, core_bentley_1.assert)(undefined !== polyface.data.normal);
47
- for (let i = 0; i < n.length; i += 3)
48
- polyface.data.normal.pushXYZ(n[i], n[i + 1], n[i + 2]);
49
- const uv = mesh.params;
50
- (0, core_bentley_1.assert)(undefined !== polyface.data.param);
51
- for (let i = 0; i < uv.length; i += 2)
52
- polyface.data.param.pushXY(uv[i], uv[i + 1]);
53
- const indices = mesh.indices;
54
- const addIndex = (idx) => {
55
- polyface.addPointIndex(idx, true);
56
- polyface.addNormalIndex(idx);
57
- polyface.addParamIndex(idx);
58
- };
59
- for (let i = 0; i < indices.length; i += 3) {
60
- addIndex(indices[i]);
61
- addIndex(indices[i + 1]);
62
- addIndex(indices[i + 2]);
63
- polyface.terminateFacet(false);
64
- }
65
- return polyface;
66
- }
67
- ExportGraphics.convertToIndexedPolyface = convertToIndexedPolyface;
68
- })(ExportGraphics = exports.ExportGraphics || (exports.ExportGraphics = {}));
69
- /**
70
- * * Iterator to walk the facets of an ExportGraphicsMesh and present them to the world as if visiting a Polyface.
71
- * * Because the ExportGraphicsMesh has limited data:
72
- * * There is no auxData in this visitor.
73
- * * There is no color in this visitor.
74
- * * All edgeVisible are true.
75
- * @public
76
- */
77
- class ExportGraphicsMeshVisitor extends core_geometry_1.PolyfaceData {
78
- // to be called from static factory method that validates the polyface ...
79
- constructor(facets, numWrap) {
80
- super(facets.normals.length > 0, facets.params.length > 0, false, facets.isTwoSided);
81
- this._polyface = facets;
82
- this._numWrap = numWrap;
83
- this._nextFacetIndex = 0;
84
- this._currentFacetIndex = -1;
85
- this.twoSided = facets.isTwoSided;
86
- this.reset();
87
- }
88
- /** Create a visitor for iterating the facets of `polyface`, with indicated number of points to be added to each facet to produce closed point arrays
89
- * Typical wrap counts are:
90
- * * 0 -- leave the point arrays with "missing final edge"
91
- * * 1 -- add point 0 as closure point
92
- * * 2 -- add points 0 and 1 as closure and wrap point. This is useful when vertex visit requires two adjacent vectors, e.g. for cross products.
93
- */
94
- static create(polyface, numWrap) {
95
- return new ExportGraphicsMeshVisitor(polyface, numWrap);
96
- }
97
- /** Reset the iterator to start at the first facet of the polyface. */
98
- reset() {
99
- this.moveToReadIndex(0);
100
- this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.
101
- }
102
- /** Select a facet by simple index. */
103
- moveToReadIndex(facetIndex) {
104
- if (facetIndex < 0 || 2 + facetIndex * 3 >= this._polyface.indices.length)
105
- return false;
106
- this._currentFacetIndex = facetIndex;
107
- this._nextFacetIndex = facetIndex + 1;
108
- this.point.length = 0;
109
- const points = this.point;
110
- points.length = 0;
111
- this.pointIndex.length = 0;
112
- this.point.length = 0;
113
- this.edgeVisible.length = 0;
114
- const sourcePoints = this._polyface.points;
115
- const indices = this._polyface.indices;
116
- const i0 = 3 * facetIndex;
117
- for (let i = i0; i < i0 + 3; i++) {
118
- const k = 3 * indices[i];
119
- this.pointIndex.push(indices[i]);
120
- this.point.pushXYZ(sourcePoints[k], sourcePoints[k + 1], sourcePoints[k + 2]);
121
- this.edgeVisible.push(true);
122
- }
123
- for (let i = 0; i < this._numWrap; i++) {
124
- this.point.pushFromGrowableXYZArray(this.point, i);
125
- }
126
- const sourceParams = this._polyface.params;
127
- if (sourceParams.length > 0 && this.paramIndex && this.param) {
128
- this.paramIndex.length = 0;
129
- this.param.length = 0;
130
- for (let i = i0; i < i0 + 3; i++) {
131
- const k = 2 * indices[i];
132
- this.paramIndex.push(indices[i]);
133
- this.param.pushXY(sourceParams[k], sourceParams[k + 1]);
134
- }
135
- for (let i = 0; i < this._numWrap; i++) {
136
- this.param.pushFromGrowableXYArray(this.param, i);
137
- }
138
- }
139
- const sourceNormals = this._polyface.normals;
140
- if (sourceNormals.length > 0 && this.normalIndex && this.normal) {
141
- this.normalIndex.length = 0;
142
- this.normal.length = 0;
143
- for (let i = i0; i < i0 + 3; i++) {
144
- const k = 3 * indices[i];
145
- this.normalIndex.push(indices[i]);
146
- this.normal.pushXYZ(sourceNormals[k], sourceNormals[k + 1], sourceNormals[k + 2]);
147
- }
148
- for (let i = 0; i < this._numWrap; i++) {
149
- this.normal.pushFromGrowableXYZArray(this.normal, i);
150
- }
151
- }
152
- return true;
153
- }
154
- moveToNextFacet() {
155
- return this.moveToReadIndex(this._nextFacetIndex);
156
- }
157
- /** Set the number of vertices to replicate in visitor arrays. */
158
- setNumWrap(numWrap) { this._numWrap = numWrap; }
159
- /** Return the index (in the client polyface) of the current facet */
160
- currentReadIndex() { return this._currentFacetIndex; }
161
- /** Return the point index of vertex i within the currently loaded facet */
162
- clientPointIndex(i) { return this.pointIndex[i]; }
163
- /** Return the param index of vertex i within the currently loaded facet.
164
- * Use the artificial paramIndex, which matches pointIndex.
165
- */
166
- clientParamIndex(i) { return this.paramIndex ? this.paramIndex[i] : -1; }
167
- /** Return the normal index of vertex i within the currently loaded facet.
168
- * Use the artificial paramIndex, which matches pointIndex.
169
- */
170
- clientNormalIndex(i) { return this.normalIndex ? this.normalIndex[i] : -1; }
171
- /** Return the color index of vertex i within the currently loaded facet */
172
- clientColorIndex(_i) { return 1; }
173
- /** Return the aux data index of vertex i within the currently loaded facet */
174
- clientAuxIndex(_i) { return -1; }
175
- /** return the client polyface */
176
- clientPolyface() { return undefined; }
177
- /** clear the contents of all arrays. Use this along with transferDataFrom methods to build up new facets */
178
- clearArrays() {
179
- if (this.point !== undefined)
180
- this.point.length = 0;
181
- if (this.param !== undefined)
182
- this.param.length = 0;
183
- if (this.normal !== undefined)
184
- this.normal.length = 0;
185
- // ignore color and aux -- they never exist.
186
- }
187
- /** transfer interpolated data from the other visitor.
188
- * * all data values are interpolated at `fraction` between `other` values at index0 and index1.
189
- */
190
- pushInterpolatedDataFrom(other, index0, fraction, index1) {
191
- this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);
192
- if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)
193
- this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);
194
- if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)
195
- this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);
196
- }
197
- /** transfer data from a specified index of the other visitor as new data in this visitor. */
198
- pushDataFrom(other, index) {
199
- this.point.pushFromGrowableXYZArray(other.point, index);
200
- if (this.color && other.color && index < other.color.length)
201
- this.color.push(other.color[index]);
202
- if (this.param && other.param && index < other.param.length)
203
- this.param.pushFromGrowableXYArray(other.param, index);
204
- if (this.normal && other.normal && index < other.normal.length)
205
- this.normal.pushFromGrowableXYZArray(other.normal, index);
206
- }
207
- }
208
- exports.ExportGraphicsMeshVisitor = ExportGraphicsMeshVisitor;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module iModels
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ExportGraphicsMeshVisitor = exports.ExportGraphics = void 0;
11
+ const core_bentley_1 = require("@itwin/core-bentley");
12
+ const core_geometry_1 = require("@itwin/core-geometry");
13
+ /** Provides utility functions for working with data generated by [IModelDb.exportGraphics]($core-backend)
14
+ * @public
15
+ */
16
+ var ExportGraphics;
17
+ (function (ExportGraphics) {
18
+ /** Test if ExportPartDisplayInfos have exactly the same values.
19
+ * @public
20
+ */
21
+ function arePartDisplayInfosEqual(lhs, rhs) {
22
+ if (lhs.categoryId !== rhs.categoryId)
23
+ return false;
24
+ if (lhs.subCategoryId !== rhs.subCategoryId)
25
+ return false;
26
+ if (lhs.materialId !== rhs.materialId)
27
+ return false;
28
+ if (lhs.elmTransparency !== rhs.elmTransparency)
29
+ return false;
30
+ if (lhs.lineColor !== rhs.lineColor)
31
+ return false;
32
+ return true;
33
+ }
34
+ ExportGraphics.arePartDisplayInfosEqual = arePartDisplayInfosEqual;
35
+ /**
36
+ * Convert an ExportGraphicsMesh to an IndexedPolyface usable by the geometry API.
37
+ * @note The resulting IndexedPolyface may have duplicate points, normals and params. If problematic, call [PolyfaceData.compress]($core-geometry)
38
+ * @public
39
+ */
40
+ function convertToIndexedPolyface(mesh) {
41
+ const polyface = core_geometry_1.IndexedPolyface.create(true, true, false, mesh.isTwoSided);
42
+ const p = mesh.points;
43
+ for (let i = 0; i < p.length; i += 3)
44
+ polyface.data.point.pushXYZ(p[i], p[i + 1], p[i + 2]);
45
+ const n = mesh.normals;
46
+ (0, core_bentley_1.assert)(undefined !== polyface.data.normal);
47
+ for (let i = 0; i < n.length; i += 3)
48
+ polyface.data.normal.pushXYZ(n[i], n[i + 1], n[i + 2]);
49
+ const uv = mesh.params;
50
+ (0, core_bentley_1.assert)(undefined !== polyface.data.param);
51
+ for (let i = 0; i < uv.length; i += 2)
52
+ polyface.data.param.pushXY(uv[i], uv[i + 1]);
53
+ const indices = mesh.indices;
54
+ const addIndex = (idx) => {
55
+ polyface.addPointIndex(idx, true);
56
+ polyface.addNormalIndex(idx);
57
+ polyface.addParamIndex(idx);
58
+ };
59
+ for (let i = 0; i < indices.length; i += 3) {
60
+ addIndex(indices[i]);
61
+ addIndex(indices[i + 1]);
62
+ addIndex(indices[i + 2]);
63
+ polyface.terminateFacet(false);
64
+ }
65
+ return polyface;
66
+ }
67
+ ExportGraphics.convertToIndexedPolyface = convertToIndexedPolyface;
68
+ })(ExportGraphics = exports.ExportGraphics || (exports.ExportGraphics = {}));
69
+ /**
70
+ * * Iterator to walk the facets of an ExportGraphicsMesh and present them to the world as if visiting a Polyface.
71
+ * * Because the ExportGraphicsMesh has limited data:
72
+ * * There is no auxData in this visitor.
73
+ * * There is no color in this visitor.
74
+ * * All edgeVisible are true.
75
+ * @public
76
+ */
77
+ class ExportGraphicsMeshVisitor extends core_geometry_1.PolyfaceData {
78
+ // to be called from static factory method that validates the polyface ...
79
+ constructor(facets, numWrap) {
80
+ super(facets.normals.length > 0, facets.params.length > 0, false, facets.isTwoSided);
81
+ this._polyface = facets;
82
+ this._numWrap = numWrap;
83
+ this._nextFacetIndex = 0;
84
+ this._currentFacetIndex = -1;
85
+ this.twoSided = facets.isTwoSided;
86
+ this.reset();
87
+ }
88
+ /** Create a visitor for iterating the facets of `polyface`, with indicated number of points to be added to each facet to produce closed point arrays
89
+ * Typical wrap counts are:
90
+ * * 0 -- leave the point arrays with "missing final edge"
91
+ * * 1 -- add point 0 as closure point
92
+ * * 2 -- add points 0 and 1 as closure and wrap point. This is useful when vertex visit requires two adjacent vectors, e.g. for cross products.
93
+ */
94
+ static create(polyface, numWrap) {
95
+ return new ExportGraphicsMeshVisitor(polyface, numWrap);
96
+ }
97
+ /** Reset the iterator to start at the first facet of the polyface. */
98
+ reset() {
99
+ this.moveToReadIndex(0);
100
+ this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.
101
+ }
102
+ /** Select a facet by simple index. */
103
+ moveToReadIndex(facetIndex) {
104
+ if (facetIndex < 0 || 2 + facetIndex * 3 >= this._polyface.indices.length)
105
+ return false;
106
+ this._currentFacetIndex = facetIndex;
107
+ this._nextFacetIndex = facetIndex + 1;
108
+ this.point.length = 0;
109
+ const points = this.point;
110
+ points.length = 0;
111
+ this.pointIndex.length = 0;
112
+ this.point.length = 0;
113
+ this.edgeVisible.length = 0;
114
+ const sourcePoints = this._polyface.points;
115
+ const indices = this._polyface.indices;
116
+ const i0 = 3 * facetIndex;
117
+ for (let i = i0; i < i0 + 3; i++) {
118
+ const k = 3 * indices[i];
119
+ this.pointIndex.push(indices[i]);
120
+ this.point.pushXYZ(sourcePoints[k], sourcePoints[k + 1], sourcePoints[k + 2]);
121
+ this.edgeVisible.push(true);
122
+ }
123
+ for (let i = 0; i < this._numWrap; i++) {
124
+ this.point.pushFromGrowableXYZArray(this.point, i);
125
+ }
126
+ const sourceParams = this._polyface.params;
127
+ if (sourceParams.length > 0 && this.paramIndex && this.param) {
128
+ this.paramIndex.length = 0;
129
+ this.param.length = 0;
130
+ for (let i = i0; i < i0 + 3; i++) {
131
+ const k = 2 * indices[i];
132
+ this.paramIndex.push(indices[i]);
133
+ this.param.pushXY(sourceParams[k], sourceParams[k + 1]);
134
+ }
135
+ for (let i = 0; i < this._numWrap; i++) {
136
+ this.param.pushFromGrowableXYArray(this.param, i);
137
+ }
138
+ }
139
+ const sourceNormals = this._polyface.normals;
140
+ if (sourceNormals.length > 0 && this.normalIndex && this.normal) {
141
+ this.normalIndex.length = 0;
142
+ this.normal.length = 0;
143
+ for (let i = i0; i < i0 + 3; i++) {
144
+ const k = 3 * indices[i];
145
+ this.normalIndex.push(indices[i]);
146
+ this.normal.pushXYZ(sourceNormals[k], sourceNormals[k + 1], sourceNormals[k + 2]);
147
+ }
148
+ for (let i = 0; i < this._numWrap; i++) {
149
+ this.normal.pushFromGrowableXYZArray(this.normal, i);
150
+ }
151
+ }
152
+ return true;
153
+ }
154
+ moveToNextFacet() {
155
+ return this.moveToReadIndex(this._nextFacetIndex);
156
+ }
157
+ /** Set the number of vertices to replicate in visitor arrays. */
158
+ setNumWrap(numWrap) { this._numWrap = numWrap; }
159
+ /** Return the index (in the client polyface) of the current facet */
160
+ currentReadIndex() { return this._currentFacetIndex; }
161
+ /** Return the point index of vertex i within the currently loaded facet */
162
+ clientPointIndex(i) { return this.pointIndex[i]; }
163
+ /** Return the param index of vertex i within the currently loaded facet.
164
+ * Use the artificial paramIndex, which matches pointIndex.
165
+ */
166
+ clientParamIndex(i) { return this.paramIndex ? this.paramIndex[i] : -1; }
167
+ /** Return the normal index of vertex i within the currently loaded facet.
168
+ * Use the artificial paramIndex, which matches pointIndex.
169
+ */
170
+ clientNormalIndex(i) { return this.normalIndex ? this.normalIndex[i] : -1; }
171
+ /** Return the color index of vertex i within the currently loaded facet */
172
+ clientColorIndex(_i) { return 1; }
173
+ /** Return the aux data index of vertex i within the currently loaded facet */
174
+ clientAuxIndex(_i) { return -1; }
175
+ /** return the client polyface */
176
+ clientPolyface() { return undefined; }
177
+ /** clear the contents of all arrays. Use this along with transferDataFrom methods to build up new facets */
178
+ clearArrays() {
179
+ if (this.point !== undefined)
180
+ this.point.length = 0;
181
+ if (this.param !== undefined)
182
+ this.param.length = 0;
183
+ if (this.normal !== undefined)
184
+ this.normal.length = 0;
185
+ // ignore color and aux -- they never exist.
186
+ }
187
+ /** transfer interpolated data from the other visitor.
188
+ * * all data values are interpolated at `fraction` between `other` values at index0 and index1.
189
+ */
190
+ pushInterpolatedDataFrom(other, index0, fraction, index1) {
191
+ this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);
192
+ if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)
193
+ this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);
194
+ if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)
195
+ this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);
196
+ }
197
+ /** transfer data from a specified index of the other visitor as new data in this visitor. */
198
+ pushDataFrom(other, index) {
199
+ this.point.pushFromGrowableXYZArray(other.point, index);
200
+ if (this.color && other.color && index < other.color.length)
201
+ this.color.push(other.color[index]);
202
+ if (this.param && other.param && index < other.param.length)
203
+ this.param.pushFromGrowableXYArray(other.param, index);
204
+ if (this.normal && other.normal && index < other.normal.length)
205
+ this.normal.pushFromGrowableXYZArray(other.normal, index);
206
+ }
207
+ }
208
+ exports.ExportGraphicsMeshVisitor = ExportGraphicsMeshVisitor;
209
209
  //# sourceMappingURL=ExportGraphics.js.map
@@ -1,97 +1,97 @@
1
- /** @packageDocumentation
2
- * @module Elements
3
- */
4
- import { Id64String } from "@itwin/core-bentley";
5
- import { Point3d } from "@itwin/core-geometry";
6
- import { Code, EntityReferenceSet, ExternalSourceAttachmentProps, ExternalSourceAttachmentRole, ExternalSourceProps, SynchronizationConfigLinkProps } from "@itwin/core-common";
7
- import { InformationReferenceElement, UrlLink } from "./Element";
8
- import { IModelDb } from "./IModelDb";
9
- import { ExternalSourceAttachmentAttachesSource, ExternalSourceIsInRepository } from "./NavigationRelationship";
10
- /** An ExternalSource refers to an 'information container' found in a repository. In some cases, the container is the entire repository.
11
- * @note The associated ECClass was added to the BisCore schema in version 1.0.13
12
- * @beta
13
- */
14
- export declare class ExternalSource extends InformationReferenceElement {
15
- /** The repository that contains this ExternalSource. */
16
- repository?: ExternalSourceIsInRepository;
17
- /** The name of the iModel Connecter that processed this ExternalSource. */
18
- connectorName?: string;
19
- /** The version of the iModel Connecter that processed this ExternalSource. */
20
- connectorVersion?: string;
21
- /** @internal */
22
- static get className(): string;
23
- /** @internal */
24
- constructor(props: ExternalSourceProps, iModel: IModelDb);
25
- /** @internal */
26
- toJSON(): ExternalSourceProps;
27
- /** The [[CodeSpec]] for ExternalSource elements is not automatically created, so this method ensures that it exists. */
28
- static ensureCodeSpec(iModelDb: IModelDb): Id64String;
29
- /** Create a Code for an ExternalSource element given a name that is meant to be unique within the scope of the iModel.
30
- * @param iModelDb The IModelDb
31
- * @param codeValue The ExternalSource name
32
- * @see [[ensureCodeSpec]]
33
- */
34
- static createCode(iModelDb: IModelDb, codeValue: string): Code;
35
- /** @internal */
36
- protected collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void;
37
- }
38
- /** Attachment of an ExternalSource
39
- * @note The associated ECClass was added to the BisCore schema in version 1.0.13
40
- * @beta
41
- */
42
- export declare class ExternalSourceAttachment extends InformationReferenceElement {
43
- /** The [[ExternalSource]] that is attached by this ExternalSourceAttachment. */
44
- attaches?: ExternalSourceAttachmentAttachesSource;
45
- /** Specifies whether the attached [[ExternalSource]] provides context or models a part of the whole. */
46
- role?: ExternalSourceAttachmentRole;
47
- /** The translation or offset in global coordinates of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
48
- translation?: Point3d;
49
- /** The Yaw angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
50
- yaw?: number;
51
- /** The Pitch angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
52
- pitch?: number;
53
- /** The Roll angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
54
- roll?: number;
55
- /** The scale of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
56
- scale?: Point3d;
57
- /** @internal */
58
- static get className(): string;
59
- /** @internal */
60
- constructor(props: ExternalSourceAttachmentProps, iModel: IModelDb);
61
- /** @internal */
62
- toJSON(): ExternalSourceAttachmentProps;
63
- /** The [[CodeSpec]] for ExternalSourceAttachment elements is not automatically created, so this method ensures that it exists. */
64
- static ensureCodeSpec(iModelDb: IModelDb): Id64String;
65
- /** Create a Code for an ExternalSourceAttachment element given a name that is meant to be unique within the scope of its parent [[ExternalSource]].
66
- * @param iModelDb The IModelDb
67
- * @param scopeElementId The parent ExternalSource
68
- * @param codeValue The ExternalSourceAttachment name
69
- * @see [[ensureCodeSpec]]
70
- */
71
- static createCode(iModelDb: IModelDb, scopeElementId: Id64String, codeValue: string): Code;
72
- }
73
- /** A group of ExternalSources that are collectively a source of information for one or more elements.
74
- * @note The associated ECClass was added to the BisCore schema in version 1.0.13
75
- * @beta
76
- */
77
- export declare class ExternalSourceGroup extends ExternalSource {
78
- /** @internal */
79
- static get className(): string;
80
- /** @internal */
81
- constructor(props: ExternalSourceProps, iModel: IModelDb);
82
- }
83
- /** Link to the Configuration for an iModel Synchronization Job
84
- * @note The associated ECClass was added to the BisCore schema in version 1.0.13
85
- * @beta
86
- */
87
- export declare class SynchronizationConfigLink extends UrlLink {
88
- /** Date/Time of last successful run of this synchronization configuration */
89
- lastSuccessfulRun?: string;
90
- /** @internal */
91
- static get className(): string;
92
- /** @internal */
93
- constructor(props: SynchronizationConfigLinkProps, iModel: IModelDb);
94
- /** @internal */
95
- toJSON(): SynchronizationConfigLinkProps;
96
- }
1
+ /** @packageDocumentation
2
+ * @module Elements
3
+ */
4
+ import { Id64String } from "@itwin/core-bentley";
5
+ import { Point3d } from "@itwin/core-geometry";
6
+ import { Code, EntityReferenceSet, ExternalSourceAttachmentProps, ExternalSourceAttachmentRole, ExternalSourceProps, SynchronizationConfigLinkProps } from "@itwin/core-common";
7
+ import { InformationReferenceElement, UrlLink } from "./Element";
8
+ import { IModelDb } from "./IModelDb";
9
+ import { ExternalSourceAttachmentAttachesSource, ExternalSourceIsInRepository } from "./NavigationRelationship";
10
+ /** An ExternalSource refers to an 'information container' found in a repository. In some cases, the container is the entire repository.
11
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.13
12
+ * @beta
13
+ */
14
+ export declare class ExternalSource extends InformationReferenceElement {
15
+ /** The repository that contains this ExternalSource. */
16
+ repository?: ExternalSourceIsInRepository;
17
+ /** The name of the iModel Connecter that processed this ExternalSource. */
18
+ connectorName?: string;
19
+ /** The version of the iModel Connecter that processed this ExternalSource. */
20
+ connectorVersion?: string;
21
+ /** @internal */
22
+ static get className(): string;
23
+ /** @internal */
24
+ constructor(props: ExternalSourceProps, iModel: IModelDb);
25
+ /** @internal */
26
+ toJSON(): ExternalSourceProps;
27
+ /** The [[CodeSpec]] for ExternalSource elements is not automatically created, so this method ensures that it exists. */
28
+ static ensureCodeSpec(iModelDb: IModelDb): Id64String;
29
+ /** Create a Code for an ExternalSource element given a name that is meant to be unique within the scope of the iModel.
30
+ * @param iModelDb The IModelDb
31
+ * @param codeValue The ExternalSource name
32
+ * @see [[ensureCodeSpec]]
33
+ */
34
+ static createCode(iModelDb: IModelDb, codeValue: string): Code;
35
+ /** @internal */
36
+ protected collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void;
37
+ }
38
+ /** Attachment of an ExternalSource
39
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.13
40
+ * @beta
41
+ */
42
+ export declare class ExternalSourceAttachment extends InformationReferenceElement {
43
+ /** The [[ExternalSource]] that is attached by this ExternalSourceAttachment. */
44
+ attaches?: ExternalSourceAttachmentAttachesSource;
45
+ /** Specifies whether the attached [[ExternalSource]] provides context or models a part of the whole. */
46
+ role?: ExternalSourceAttachmentRole;
47
+ /** The translation or offset in global coordinates of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
48
+ translation?: Point3d;
49
+ /** The Yaw angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
50
+ yaw?: number;
51
+ /** The Pitch angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
52
+ pitch?: number;
53
+ /** The Roll angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
54
+ roll?: number;
55
+ /** The scale of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
56
+ scale?: Point3d;
57
+ /** @internal */
58
+ static get className(): string;
59
+ /** @internal */
60
+ constructor(props: ExternalSourceAttachmentProps, iModel: IModelDb);
61
+ /** @internal */
62
+ toJSON(): ExternalSourceAttachmentProps;
63
+ /** The [[CodeSpec]] for ExternalSourceAttachment elements is not automatically created, so this method ensures that it exists. */
64
+ static ensureCodeSpec(iModelDb: IModelDb): Id64String;
65
+ /** Create a Code for an ExternalSourceAttachment element given a name that is meant to be unique within the scope of its parent [[ExternalSource]].
66
+ * @param iModelDb The IModelDb
67
+ * @param scopeElementId The parent ExternalSource
68
+ * @param codeValue The ExternalSourceAttachment name
69
+ * @see [[ensureCodeSpec]]
70
+ */
71
+ static createCode(iModelDb: IModelDb, scopeElementId: Id64String, codeValue: string): Code;
72
+ }
73
+ /** A group of ExternalSources that are collectively a source of information for one or more elements.
74
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.13
75
+ * @beta
76
+ */
77
+ export declare class ExternalSourceGroup extends ExternalSource {
78
+ /** @internal */
79
+ static get className(): string;
80
+ /** @internal */
81
+ constructor(props: ExternalSourceProps, iModel: IModelDb);
82
+ }
83
+ /** Link to the Configuration for an iModel Synchronization Job
84
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.13
85
+ * @beta
86
+ */
87
+ export declare class SynchronizationConfigLink extends UrlLink {
88
+ /** Date/Time of last successful run of this synchronization configuration */
89
+ lastSuccessfulRun?: string;
90
+ /** @internal */
91
+ static get className(): string;
92
+ /** @internal */
93
+ constructor(props: SynchronizationConfigLinkProps, iModel: IModelDb);
94
+ /** @internal */
95
+ toJSON(): SynchronizationConfigLinkProps;
96
+ }
97
97
  //# sourceMappingURL=ExternalSource.d.ts.map