@itwin/core-backend 5.5.0-dev.1 → 5.5.0-dev.2

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 (381) hide show
  1. package/lib/cjs/BackendHubAccess.js.map +1 -1
  2. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  3. package/lib/cjs/BisCoreSchema.js.map +1 -1
  4. package/lib/cjs/BlobContainerService.js.map +1 -1
  5. package/lib/cjs/BriefcaseManager.js.map +1 -1
  6. package/lib/cjs/CatalogDb.js.map +1 -1
  7. package/lib/cjs/Category.js.map +1 -1
  8. package/lib/cjs/ChangeSummaryManager.js +2 -2
  9. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  10. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  11. package/lib/cjs/ChangesetECAdaptor.js +248 -248
  12. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  13. package/lib/cjs/ChannelControl.js.map +1 -1
  14. package/lib/cjs/CheckpointManager.js.map +1 -1
  15. package/lib/cjs/ClassRegistry.js +5 -5
  16. package/lib/cjs/ClassRegistry.js.map +1 -1
  17. package/lib/cjs/CloudSqlite.js.map +1 -1
  18. package/lib/cjs/CodeService.js.map +1 -1
  19. package/lib/cjs/CodeSpecs.js.map +1 -1
  20. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  21. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  22. package/lib/cjs/DevTools.js.map +1 -1
  23. package/lib/cjs/DisplayStyle.js.map +1 -1
  24. package/lib/cjs/ECDb.js.map +1 -1
  25. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  26. package/lib/cjs/ECSqlStatement.js.map +1 -1
  27. package/lib/cjs/Element.js.map +1 -1
  28. package/lib/cjs/ElementAspect.js.map +1 -1
  29. package/lib/cjs/ElementGraphics.js.map +1 -1
  30. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  31. package/lib/cjs/Entity.js.map +1 -1
  32. package/lib/cjs/EntityReferences.js.map +1 -1
  33. package/lib/cjs/ExportGraphics.js.map +1 -1
  34. package/lib/cjs/ExternalSource.js.map +1 -1
  35. package/lib/cjs/FontFile.js.map +1 -1
  36. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  37. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  38. package/lib/cjs/GeometrySummary.js +47 -47
  39. package/lib/cjs/GeometrySummary.js.map +1 -1
  40. package/lib/cjs/IModelDb.js +8 -8
  41. package/lib/cjs/IModelDb.js.map +1 -1
  42. package/lib/cjs/IModelDbFonts.js.map +1 -1
  43. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  44. package/lib/cjs/IModelHost.js.map +1 -1
  45. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
  46. package/lib/cjs/IModelJsFs.js.map +1 -1
  47. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  48. package/lib/cjs/IpcHost.js.map +1 -1
  49. package/lib/cjs/LineStyle.js.map +1 -1
  50. package/lib/cjs/LocalHub.js +1 -1
  51. package/lib/cjs/LocalHub.js.map +1 -1
  52. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  53. package/lib/cjs/LockControl.js.map +1 -1
  54. package/lib/cjs/Material.js.map +1 -1
  55. package/lib/cjs/Model.js.map +1 -1
  56. package/lib/cjs/NativeAppStorage.js.map +1 -1
  57. package/lib/cjs/NativeHost.js.map +1 -1
  58. package/lib/cjs/NavigationRelationship.js.map +1 -1
  59. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  60. package/lib/cjs/PropertyStore.js.map +1 -1
  61. package/lib/cjs/Relationship.js.map +1 -1
  62. package/lib/cjs/RpcBackend.js.map +1 -1
  63. package/lib/cjs/SQLiteDb.js.map +1 -1
  64. package/lib/cjs/Schema.js.map +1 -1
  65. package/lib/cjs/SchemaSync.js.map +1 -1
  66. package/lib/cjs/SchemaUtils.js.map +1 -1
  67. package/lib/cjs/SheetIndex.js.map +1 -1
  68. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  69. package/lib/cjs/SqliteStatement.js.map +1 -1
  70. package/lib/cjs/StashManager.js.map +1 -1
  71. package/lib/cjs/Texture.js.map +1 -1
  72. package/lib/cjs/TileStorage.js.map +1 -1
  73. package/lib/cjs/TxnManager.js.map +1 -1
  74. package/lib/cjs/ViewDefinition.js.map +1 -1
  75. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  76. package/lib/cjs/ViewStore.js.map +1 -1
  77. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  78. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  79. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  80. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  81. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
  82. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
  83. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
  84. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  85. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  86. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  87. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  88. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  89. package/lib/cjs/core-backend.js.map +1 -1
  90. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  91. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  92. package/lib/cjs/domains/GenericElements.js.map +1 -1
  93. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  94. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  95. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  96. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  97. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  98. package/lib/cjs/internal/HubMock.js.map +1 -1
  99. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  100. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  101. package/lib/cjs/internal/NoLocks.js.map +1 -1
  102. package/lib/cjs/internal/OnlineStatus.js.map +1 -1
  103. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  104. package/lib/cjs/internal/Symbols.js.map +1 -1
  105. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  106. package/lib/cjs/internal/cross-package.js.map +1 -1
  107. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  108. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  109. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  110. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  111. package/lib/cjs/rpc/multipart.js.map +1 -1
  112. package/lib/cjs/rpc/tracing.js.map +1 -1
  113. package/lib/cjs/rpc/web/logging.js.map +1 -1
  114. package/lib/cjs/rpc/web/request.js.map +1 -1
  115. package/lib/cjs/rpc/web/response.js.map +1 -1
  116. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  117. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  118. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  119. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  120. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  121. package/lib/cjs/workspace/Settings.js.map +1 -1
  122. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  123. package/lib/cjs/workspace/Workspace.js.map +1 -1
  124. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  125. package/lib/esm/BackendHubAccess.js.map +1 -1
  126. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  127. package/lib/esm/BisCoreSchema.js.map +1 -1
  128. package/lib/esm/BlobContainerService.js.map +1 -1
  129. package/lib/esm/BriefcaseManager.js.map +1 -1
  130. package/lib/esm/CatalogDb.js.map +1 -1
  131. package/lib/esm/Category.js.map +1 -1
  132. package/lib/esm/ChangeSummaryManager.js +2 -2
  133. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  134. package/lib/esm/ChangedElementsDb.js.map +1 -1
  135. package/lib/esm/ChangesetECAdaptor.js +248 -248
  136. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  137. package/lib/esm/ChannelControl.js.map +1 -1
  138. package/lib/esm/CheckpointManager.js.map +1 -1
  139. package/lib/esm/ClassRegistry.js +5 -5
  140. package/lib/esm/ClassRegistry.js.map +1 -1
  141. package/lib/esm/CloudSqlite.js.map +1 -1
  142. package/lib/esm/CodeService.js.map +1 -1
  143. package/lib/esm/CodeSpecs.js.map +1 -1
  144. package/lib/esm/ConcurrentQuery.js.map +1 -1
  145. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  146. package/lib/esm/DevTools.js.map +1 -1
  147. package/lib/esm/DisplayStyle.js.map +1 -1
  148. package/lib/esm/ECDb.js.map +1 -1
  149. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  150. package/lib/esm/ECSqlStatement.js.map +1 -1
  151. package/lib/esm/Element.js.map +1 -1
  152. package/lib/esm/ElementAspect.js.map +1 -1
  153. package/lib/esm/ElementGraphics.js.map +1 -1
  154. package/lib/esm/ElementTreeWalker.js.map +1 -1
  155. package/lib/esm/Entity.js.map +1 -1
  156. package/lib/esm/EntityReferences.js.map +1 -1
  157. package/lib/esm/ExportGraphics.js.map +1 -1
  158. package/lib/esm/ExternalSource.js.map +1 -1
  159. package/lib/esm/FontFile.js.map +1 -1
  160. package/lib/esm/GeoCoordConfig.js.map +1 -1
  161. package/lib/esm/GeographicCRSServices.js.map +1 -1
  162. package/lib/esm/GeometrySummary.js +47 -47
  163. package/lib/esm/GeometrySummary.js.map +1 -1
  164. package/lib/esm/IModelDb.js +8 -8
  165. package/lib/esm/IModelDb.js.map +1 -1
  166. package/lib/esm/IModelDbFonts.js.map +1 -1
  167. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  168. package/lib/esm/IModelHost.js.map +1 -1
  169. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
  170. package/lib/esm/IModelJsFs.js.map +1 -1
  171. package/lib/esm/ImageSourceConversion.js.map +1 -1
  172. package/lib/esm/IpcHost.js.map +1 -1
  173. package/lib/esm/LineStyle.js.map +1 -1
  174. package/lib/esm/LocalHub.js +1 -1
  175. package/lib/esm/LocalHub.js.map +1 -1
  176. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  177. package/lib/esm/LockControl.js.map +1 -1
  178. package/lib/esm/Material.js.map +1 -1
  179. package/lib/esm/Model.js.map +1 -1
  180. package/lib/esm/NativeAppStorage.js.map +1 -1
  181. package/lib/esm/NativeHost.js.map +1 -1
  182. package/lib/esm/NavigationRelationship.js.map +1 -1
  183. package/lib/esm/PromiseMemoizer.js.map +1 -1
  184. package/lib/esm/PropertyStore.js.map +1 -1
  185. package/lib/esm/Relationship.js.map +1 -1
  186. package/lib/esm/RpcBackend.js.map +1 -1
  187. package/lib/esm/SQLiteDb.js.map +1 -1
  188. package/lib/esm/Schema.js.map +1 -1
  189. package/lib/esm/SchemaSync.js.map +1 -1
  190. package/lib/esm/SchemaUtils.js.map +1 -1
  191. package/lib/esm/SheetIndex.js.map +1 -1
  192. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  193. package/lib/esm/SqliteStatement.js.map +1 -1
  194. package/lib/esm/StashManager.js.map +1 -1
  195. package/lib/esm/Texture.js.map +1 -1
  196. package/lib/esm/TileStorage.js.map +1 -1
  197. package/lib/esm/TxnManager.js.map +1 -1
  198. package/lib/esm/ViewDefinition.js.map +1 -1
  199. package/lib/esm/ViewStateHydrator.js.map +1 -1
  200. package/lib/esm/ViewStore.js.map +1 -1
  201. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  202. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  203. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  204. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  205. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
  206. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
  207. package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
  208. package/lib/esm/core-backend.js.map +1 -1
  209. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  210. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  211. package/lib/esm/domains/GenericElements.js.map +1 -1
  212. package/lib/esm/domains/GenericSchema.js.map +1 -1
  213. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  214. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  215. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  216. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  217. package/lib/esm/internal/HubMock.js.map +1 -1
  218. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  219. package/lib/esm/internal/NativePlatform.js.map +1 -1
  220. package/lib/esm/internal/NoLocks.js.map +1 -1
  221. package/lib/esm/internal/OnlineStatus.js.map +1 -1
  222. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  223. package/lib/esm/internal/Symbols.js.map +1 -1
  224. package/lib/esm/internal/annotations/fields.js.map +1 -1
  225. package/lib/esm/internal/cross-package.js.map +1 -1
  226. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  227. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  228. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  229. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  230. package/lib/esm/rpc/multipart.js.map +1 -1
  231. package/lib/esm/rpc/tracing.js.map +1 -1
  232. package/lib/esm/rpc/web/logging.js.map +1 -1
  233. package/lib/esm/rpc/web/request.js.map +1 -1
  234. package/lib/esm/rpc/web/response.js.map +1 -1
  235. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  236. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  237. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  238. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  239. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  240. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  241. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  242. package/lib/esm/test/AttachDb.test.js +11 -11
  243. package/lib/esm/test/AttachDb.test.js.map +1 -1
  244. package/lib/esm/test/ElementDrivesElement.test.js +23 -23
  245. package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
  246. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  247. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  248. package/lib/esm/test/IModelHost.test.js.map +1 -1
  249. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  250. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  251. package/lib/esm/test/IpcHost.test.js.map +1 -1
  252. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  253. package/lib/esm/test/PrintElementTree.js.map +1 -1
  254. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  255. package/lib/esm/test/RevisionUtility.js.map +1 -1
  256. package/lib/esm/test/SchemaUtils.test.js +25 -25
  257. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  258. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  259. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  260. package/lib/esm/test/TestUtils.js.map +1 -1
  261. package/lib/esm/test/annotations/Fields.test.js +53 -53
  262. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  263. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  264. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  265. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  266. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  267. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  268. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  269. package/lib/esm/test/categories/Category.test.js.map +1 -1
  270. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  271. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  272. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  273. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +15 -15
  274. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  275. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
  276. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  277. package/lib/esm/test/ecdb/ECDb.test.js +72 -72
  278. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  279. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  280. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  281. package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
  282. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  283. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  284. package/lib/esm/test/ecdb/ECSqlReader.test.js +16 -16
  285. package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -1
  286. package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -332
  287. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  288. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  289. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  290. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  291. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  292. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  293. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  294. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  295. package/lib/esm/test/element/ElementAspect.test.js +22 -22
  296. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  297. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  298. package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
  299. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  300. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  301. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  302. package/lib/esm/test/element/NullStructArray.test.js +13 -13
  303. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  304. package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
  305. package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
  306. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  307. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  308. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  309. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +32 -32
  310. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  311. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  312. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  313. package/lib/esm/test/hubaccess/Rebase.test.js +40 -40
  314. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  315. package/lib/esm/test/imageData.js.map +1 -1
  316. package/lib/esm/test/imodel/Code.test.js.map +1 -1
  317. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  318. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  319. package/lib/esm/test/imodel/IModel.test.js +44 -44
  320. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  321. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  322. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  323. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  324. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  325. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -1
  326. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -1
  327. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -1
  328. package/lib/esm/test/index.js.map +1 -1
  329. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  330. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  331. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  332. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  333. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  334. package/lib/esm/test/rpc/response.test.js.map +1 -1
  335. package/lib/esm/test/schema/ClassRegistry.test.js +99 -99
  336. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  337. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  338. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  339. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  340. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  341. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  342. package/lib/esm/test/standalone/ChangesetReader.test.js +124 -124
  343. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  344. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  345. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  346. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  347. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  348. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  349. package/lib/esm/test/standalone/ExportGraphics.test.js +14 -14
  350. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  351. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  352. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  353. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  354. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  355. package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
  356. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  357. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  358. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  359. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  360. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  361. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  362. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  363. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  364. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  365. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  366. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  367. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  368. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  369. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  370. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  371. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  372. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  373. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  374. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  375. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  376. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  377. package/lib/esm/workspace/Settings.js.map +1 -1
  378. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  379. package/lib/esm/workspace/Workspace.js.map +1 -1
  380. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  381. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3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Ae,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACrD,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,8CAA8C;IAC9B,KAAK;QACnB,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,+DAA+D;YACvF,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;YACxB,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC,0CAA0C;QACvE,CAAC;IACH,CAAC;IACD;;;;OAIG;IACI,gBAAgB,CAAC,WAAoB;QAC1C,IAAI,SAAS,KAAK,WAAW;YAC3B,WAAW,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACzC,OAAO,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5F,CAAC;IACD,iEAAiE;IACjD,sBAAsB;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;IACnC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ExportGraphics\r\n */\r\n\r\nimport { assert, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { IndexedPolyface, Polyface, PolyfaceData, PolyfaceVisitor } from \"@itwin/core-geometry\";\r\nimport { ColorDefProps, GeometryClass } from \"@itwin/core-common\";\r\n\r\n/** A collection of line segments, suitable for direct use with graphics APIs.\r\n * The structure of this data matches GL_LINES in OpenGL.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportGraphicsLines {\r\n /** Zero-based vertex indices, every two indices represent a line segment */\r\n indices: Int32Array;\r\n /** Vertices for these lines, laid out in the pattern XYZXYZ */\r\n points: Float64Array;\r\n}\r\n\r\n/** Info provided to ExportLinesFunction about linework graphics.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportLinesInfo {\r\n /** The element ID for the element the graphics originated from */\r\n elementId: Id64String;\r\n /** ID for the [SubCategory]($core-backend) for these graphics */\r\n subCategory: Id64String;\r\n /** The color and transparency for these graphics */\r\n color: ColorDefProps;\r\n /** GeometryClass for these graphics */\r\n geometryClass: GeometryClass;\r\n /** The linework for these graphics */\r\n lines: ExportGraphicsLines;\r\n}\r\n\r\n/** A callback function that receives generated line graphics.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport type ExportLinesFunction = (info: ExportLinesInfo) => void;\r\n\r\n/** A triangulated mesh with unified indices, suitable for direct use with graphics APIs.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportGraphicsMesh {\r\n /** Zero-based vertex indices, every three indices represent a triangle */\r\n indices: Int32Array;\r\n /** Vertices for this mesh, laid out in the pattern XYZXYZ */\r\n points: Float64Array;\r\n /** Normals for this mesh, laid out in the pattern XYZXYZ */\r\n normals: Float32Array;\r\n /** Parameters (uvs) for this mesh, laid out in the pattern XYXY */\r\n params: Float32Array;\r\n /** If true, clients should assume both sides of the mesh are visible and not cull back faces. */\r\n isTwoSided: boolean;\r\n}\r\n\r\n/** Info provided to ExportGraphicsFunction about graphics.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportGraphicsInfo {\r\n /** The element ID for the element the graphics originated from */\r\n elementId: Id64String;\r\n /** ID for the [SubCategory]($core-backend) for these graphics */\r\n subCategory: Id64String;\r\n /** The color and transparency for these graphics */\r\n color: ColorDefProps;\r\n /** GeometryClass for these graphics */\r\n geometryClass: GeometryClass;\r\n /** If defined, ID for the [RenderMaterialElement]($core-backend) for these graphics */\r\n materialId?: Id64String;\r\n /** If defined, ID for the [Texture]($core-backend) for these graphics */\r\n textureId?: Id64String;\r\n /** The mesh for these graphics */\r\n mesh: ExportGraphicsMesh;\r\n}\r\n\r\n/** Information about the base display properties when a [GeometryPart]($core-backend) was\r\n * referenced. This is intended to be used with [IModelDb.exportPartGraphics]($core-backend).\r\n * * If two ExportPartInstanceInfo have the same ExportPartDisplayInfos, they will result in the\r\n * same graphics (with a different transform).\r\n * * If two ExportPartInstanceInfo have different ExportPartDisplayInfos, they may result in different\r\n * graphics.\r\n * @public\r\n */\r\nexport interface ExportPartDisplayInfo {\r\n categoryId: Id64String;\r\n subCategoryId: Id64String;\r\n geometryClass: GeometryClass;\r\n materialId: Id64String;\r\n elmTransparency: number;\r\n lineColor: number;\r\n}\r\n\r\n/** Information about references to [GeometryPart]($core-backend) elements found during\r\n * a call to [IModelDb.exportGraphics]($core-backend).\r\n * See [IModelDb.exportPartGraphics]($core-backend) for the intended use case.\r\n * @public\r\n */\r\nexport interface ExportPartInstanceInfo {\r\n /** ID for the [GeometryPart]($core-backend) */\r\n partId: Id64String;\r\n /** ID for the element that contained the reference to the [GeometryPart]($core-backend) */\r\n partInstanceId: Id64String;\r\n /** The base display properties when the [GeometryPart]($core-backend) was referenced. */\r\n displayProps: ExportPartDisplayInfo;\r\n /** A row-major storage 4x3 transform for this instance.\r\n * See export-gltf under test-apps in the iTwin.js monorepo for a working reference.\r\n */\r\n transform?: Float64Array;\r\n}\r\n\r\n/** A callback function that receives generated graphics.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport type ExportGraphicsFunction = (info: ExportGraphicsInfo) => void;\r\n\r\n/** Parameters for [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportGraphicsOptions {\r\n /** The source elements for the exported graphics */\r\n elementIdArray: Id64Array;\r\n /** A function to call for each unique element ID, color and texture combination */\r\n onGraphics: ExportGraphicsFunction;\r\n /** An optional function to call if line graphics are desired. */\r\n onLineGraphics?: ExportLinesFunction;\r\n /** If supplied, any references to [GeometryPart]($core-backend) elements found will be\r\n * recorded in this array. In this case, graphics that would result from the GeometryPart\r\n * will not be supplied via onGraphics. See [IModelDb.exportPartGraphics]($core-backend)\r\n */\r\n partInstanceArray?: ExportPartInstanceInfo[];\r\n /** Max distance from a face to the original geometry, see [StrokeOptions]($core-geometry).\r\n * If not supplied, defaults to zero and angleTol will control the quality of the resulting mesh.\r\n */\r\n chordTol?: number;\r\n /** Max angle difference in radians for approximated face, see [StrokeOptions]($core-geometry).\r\n * If not supplied, defaults to PI/12 (15 degrees).\r\n */\r\n angleTol?: number;\r\n /** Max length of any edge in generated faces, see [StrokeOptions]($core-geometry).\r\n * If not supplied, there is no maximum length of an edge. Supplying this value can greatly increase the\r\n * size of the resulting geometry, and should only be done in cases where necessary (if you don't know\r\n * that it's necessary, it's almost certainly not!)\r\n */\r\n maxEdgeLength?: number;\r\n /** The longest dimension of a line style's largest component must be at least this size in order for\r\n * exportGraphics to evaluate and generate its graphics. If undefined, this defaults to 0.1.\r\n * Line styles can evaluate to 3D geometry that clients expect to receive from exportGraphics, but they\r\n * can also generate gigabytes of mesh data when line styles with small components are applied to long\r\n * line strings.\r\n */\r\n minLineStyleComponentSize?: number;\r\n /** Max distance between mesh vertices for them to be collapsed.\r\n * Meshes stored in GeometryStreams are unaffected by StrokeOptions settings. If decimationTol is undefined,\r\n * they are output from exportGraphics without any reduction in quality and can be too detailed for\r\n * some uses. However, decimation is a destructive operation that can introduce gaps and other visual\r\n * anomalies so it is important to choose an appropriate setting for your use case.\r\n */\r\n decimationTol?: number;\r\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\r\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\r\n * like screws and screw holes.\r\n */\r\n minBRepFeatureSize?: number;\r\n}\r\n\r\n/** Info provided to ExportPartFunction about graphics.\r\n * See [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportPartInfo {\r\n /** The color and transparency for these graphics */\r\n color: ColorDefProps;\r\n /** GeometryClass for these graphics */\r\n geometryClass: GeometryClass;\r\n /** If defined, ID for the [RenderMaterialElement]($core-backend) for these graphics */\r\n materialId?: Id64String;\r\n /** If defined, ID for the [Texture]($core-backend) for these graphics */\r\n textureId?: Id64String;\r\n /** The mesh for these graphics */\r\n mesh: ExportGraphicsMesh;\r\n}\r\n\r\n/** A callback function that receives generated graphics for a [GeometryPart]($core-backend).\r\n * See [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport type ExportPartFunction = (info: ExportPartInfo) => void;\r\n\r\n/** Info provided to ExportPartFunction about line graphics.\r\n * See [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportPartLinesInfo {\r\n /** The color and transparency for these graphics */\r\n color: ColorDefProps;\r\n /** GeometryClass for these graphics */\r\n geometryClass: GeometryClass;\r\n /** The linework for these graphics */\r\n lines: ExportGraphicsLines;\r\n}\r\n\r\n/** A callback function that receives generated line graphics for a [GeometryPart]($core-backend).\r\n * See [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport type ExportPartLinesFunction = (info: ExportPartLinesInfo) => void;\r\n\r\n/** Parameters for [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportPartGraphicsOptions {\r\n /** The ID for the source [GeometryPart]($core-backend) */\r\n elementId: Id64String;\r\n /** The base display properties to use for generating the graphics. This should come from an\r\n * ExportPartInstanceProps generated by [IModelDb.exportGraphics]($core-backend)\r\n */\r\n displayProps: ExportPartDisplayInfo;\r\n /** A function to call for each unique color and texture combination. */\r\n onPartGraphics: ExportPartFunction;\r\n /** An optional function to call if line graphics are desired. */\r\n onPartLineGraphics?: ExportPartLinesFunction;\r\n /** Max distance from a face to the original geometry, see [StrokeOptions]($core-geometry).\r\n * If not supplied, defaults to zero and angleTol will control the quality of the resulting mesh.\r\n */\r\n chordTol?: number;\r\n /** Max angle difference in radians for approximated face, see [StrokeOptions]($core-geometry).\r\n * If not supplied, defaults to PI/12 (15 degrees).\r\n */\r\n angleTol?: number;\r\n /** Max length of any edge in generated faces, see [StrokeOptions]($core-geometry)\r\n * If not supplied, there is no maximum length of an edge. Supplying this value can greatly increase the\r\n * size of the resulting geometry, and should only be done in cases where necessary (if you don't know\r\n * that it's necessary, it's almost certainly not!)\r\n */\r\n maxEdgeLength?: number;\r\n /** The longest dimension of a line style's largest component must be at least this size in order for\r\n * exportGraphics to evaluate and generate its graphics. If undefined, this defaults to 0.1.\r\n * Line styles can evaluate to 3D geometry that clients expect to receive from exportGraphics, but they\r\n * can also generate gigabytes of mesh data when line styles with small components are applied to long\r\n * line strings.\r\n */\r\n minLineStyleComponentSize?: number;\r\n /** Max distance between mesh vertices for them to be collapsed.\r\n * Meshes stored in GeometryStreams are unaffected by StrokeOptions settings. If decimationTol is undefined,\r\n * they are output from exportGraphics without any reduction in quality and can be too detailed for\r\n * some uses. However, decimation is a destructive operation that can introduce gaps and other visual\r\n * anomalies so it is important to choose an appropriate setting for your use case.\r\n */\r\n decimationTol?: number;\r\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\r\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\r\n * like screws and screw holes.\r\n */\r\n minBRepFeatureSize?: number;\r\n}\r\n\r\n/** Provides utility functions for working with data generated by [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport namespace ExportGraphics {\r\n /** Test if ExportPartDisplayInfos have exactly the same values.\r\n * @public\r\n */\r\n export function arePartDisplayInfosEqual(lhs: ExportPartDisplayInfo, rhs: ExportPartDisplayInfo): boolean {\r\n if (lhs.categoryId !== rhs.categoryId)\r\n return false;\r\n if (lhs.subCategoryId !== rhs.subCategoryId)\r\n return false;\r\n if (lhs.materialId !== rhs.materialId)\r\n return false;\r\n if (lhs.elmTransparency !== rhs.elmTransparency)\r\n return false;\r\n if (lhs.lineColor !== rhs.lineColor)\r\n return false;\r\n return true;\r\n }\r\n\r\n /**\r\n * Convert an ExportGraphicsMesh to an IndexedPolyface usable by the geometry API.\r\n * @note The resulting IndexedPolyface may have duplicate points, normals and params. If problematic, call [PolyfaceData.compress]($core-geometry)\r\n * @public\r\n */\r\n export function convertToIndexedPolyface(mesh: ExportGraphicsMesh): IndexedPolyface {\r\n const polyface = IndexedPolyface.create(true, true, false, mesh.isTwoSided);\r\n\r\n const p: Float64Array = mesh.points;\r\n for (let i = 0; i < p.length; i += 3)\r\n polyface.data.point.pushXYZ(p[i], p[i + 1], p[i + 2]);\r\n\r\n const n: Float32Array = mesh.normals;\r\n assert(undefined !== polyface.data.normal);\r\n for (let i = 0; i < n.length; i += 3)\r\n polyface.data.normal.pushXYZ(n[i], n[i + 1], n[i + 2]);\r\n\r\n const uv: Float32Array = mesh.params;\r\n assert(undefined !== polyface.data.param);\r\n for (let i = 0; i < uv.length; i += 2)\r\n polyface.data.param.pushXY(uv[i], uv[i + 1]);\r\n\r\n const indices = mesh.indices;\r\n const addIndex = (idx: number) => {\r\n polyface.addPointIndex(idx, true);\r\n polyface.addNormalIndex(idx);\r\n polyface.addParamIndex(idx);\r\n };\r\n for (let i = 0; i < indices.length; i += 3) {\r\n addIndex(indices[i]);\r\n addIndex(indices[i + 1]);\r\n addIndex(indices[i + 2]);\r\n polyface.terminateFacet(false);\r\n }\r\n\r\n return polyface;\r\n }\r\n}\r\n/**\r\n * * Iterator to walk the facets of an ExportGraphicsMesh and present them to the world as if visiting a Polyface.\r\n * * Because the ExportGraphicsMesh has limited data:\r\n * * There is no auxData in this visitor.\r\n * * There is no color in this visitor.\r\n * * All edgeVisible are true.\r\n * @public\r\n */\r\nexport class ExportGraphicsMeshVisitor extends PolyfaceData implements PolyfaceVisitor {\r\n private _currentFacetIndex: number;\r\n private _nextFacetIndex: number;\r\n private _numWrap: number;\r\n private _polyface: ExportGraphicsMesh;\r\n protected constructor(facets: ExportGraphicsMesh, numWrap: number) {\r\n super(facets.normals.length > 0, facets.params.length > 0, false, facets.isTwoSided);\r\n this._polyface = facets;\r\n this._numWrap = numWrap;\r\n this._nextFacetIndex = 0;\r\n this._currentFacetIndex = -1;\r\n this.reset();\r\n }\r\n /** 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\r\n * Typical wrap counts are:\r\n * * 0 -- leave the point arrays with \"missing final edge\" (default)\r\n * * 1 -- add point 0 as closure point\r\n * * 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.\r\n */\r\n public static create(polyface: ExportGraphicsMesh, numWrap: number = 0): ExportGraphicsMeshVisitor {\r\n return new ExportGraphicsMeshVisitor(polyface, numWrap);\r\n }\r\n /** Restart the visitor at the first facet. */\r\n public reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here\r\n }\r\n /** Select a facet by simple index. */\r\n public moveToReadIndex(facetIndex: number): boolean {\r\n if (facetIndex < 0 || 2 + facetIndex * 3 >= this._polyface.indices.length)\r\n return false;\r\n if (this._currentFacetIndex !== facetIndex || 3 + this._numWrap !== this.point.length) {\r\n this._currentFacetIndex = facetIndex;\r\n this.point.length = 0;\r\n this.pointIndex.length = 0;\r\n this.edgeVisible.length = 0;\r\n const sourcePoints = this._polyface.points;\r\n const indices = this._polyface.indices;\r\n const i0 = 3 * facetIndex;\r\n for (let i = i0; i < i0 + 3; i++) {\r\n const k = 3 * indices[i];\r\n this.pointIndex.push(indices[i]);\r\n this.point.pushXYZ(sourcePoints[k], sourcePoints[k + 1], sourcePoints[k + 2]);\r\n this.edgeVisible.push(true);\r\n }\r\n for (let i = 0; i < this._numWrap; i++) {\r\n this.point.pushFromGrowableXYZArray(this.point, i);\r\n }\r\n\r\n const sourceParams = this._polyface.params;\r\n if (sourceParams.length > 0 && this.paramIndex && this.param) {\r\n this.paramIndex.length = 0;\r\n this.param.length = 0;\r\n for (let i = i0; i < i0 + 3; i++) {\r\n const k = 2 * indices[i];\r\n this.paramIndex.push(indices[i]);\r\n this.param.pushXY(sourceParams[k], sourceParams[k + 1]);\r\n }\r\n for (let i = 0; i < this._numWrap; i++) {\r\n this.param.pushFromGrowableXYArray(this.param, i);\r\n }\r\n }\r\n\r\n const sourceNormals = this._polyface.normals;\r\n if (sourceNormals.length > 0 && this.normalIndex && this.normal) {\r\n this.normalIndex.length = 0;\r\n this.normal.length = 0;\r\n for (let i = i0; i < i0 + 3; i++) {\r\n const k = 3 * indices[i];\r\n this.normalIndex.push(indices[i]);\r\n this.normal.pushXYZ(sourceNormals[k], sourceNormals[k + 1], sourceNormals[k + 2]);\r\n }\r\n for (let i = 0; i < this._numWrap; i++) {\r\n this.normal.pushFromGrowableXYZArray(this.normal, i);\r\n }\r\n }\r\n }\r\n this._nextFacetIndex = facetIndex + 1;\r\n return true;\r\n }\r\n /** Load data for the next facet. */\r\n public moveToNextFacet(): boolean {\r\n if (this._nextFacetIndex !== this._currentFacetIndex)\r\n return this.moveToReadIndex(this._nextFacetIndex);\r\n this._nextFacetIndex++;\r\n return true;\r\n }\r\n /** Set the number of vertices to replicate in visitor arrays. */\r\n public setNumWrap(numWrap: number): void {\r\n this._numWrap = numWrap;\r\n }\r\n\r\n /** Return the index (in the client polyface) of the current facet */\r\n public currentReadIndex(): number {\r\n return this._currentFacetIndex;\r\n }\r\n /** Return the point index of vertex i within the currently loaded facet */\r\n public clientPointIndex(i: number): number {\r\n return this.pointIndex[i];\r\n }\r\n /** Return the param index of vertex i within the currently loaded facet.\r\n * Use the artificial paramIndex, which matches pointIndex.\r\n */\r\n public clientParamIndex(i: number): number {\r\n return this.paramIndex ? this.paramIndex[i] : -1;\r\n }\r\n /** Return the normal index of vertex i within the currently loaded facet.\r\n * Use the artificial paramIndex, which matches pointIndex.\r\n */\r\n public clientNormalIndex(i: number): number {\r\n return this.normalIndex ? this.normalIndex[i] : -1;\r\n }\r\n /** Always returns -1 since we never have colors. */\r\n public clientColorIndex(_i: number): number {\r\n return -1;\r\n }\r\n /** Always returns -1 since we never have auxiliary data. */\r\n public clientAuxIndex(_i: number): number {\r\n return -1;\r\n }\r\n /** return the client polyface */\r\n public clientPolyface(): Polyface | undefined {\r\n return undefined;\r\n }\r\n /** clear the contents of all arrays. Use this along with transferDataFrom methods to build up new facets */\r\n public clearArrays(): void {\r\n if (this.point !== undefined)\r\n this.point.length = 0;\r\n if (this.param !== undefined)\r\n this.param.length = 0;\r\n if (this.normal !== undefined)\r\n this.normal.length = 0;\r\n // ignore color and aux -- they never exist.\r\n }\r\n /** transfer interpolated data from the other visitor.\r\n * * all data values are interpolated at `fraction` between `other` values at index0 and index1.\r\n */\r\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\r\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\r\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\r\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\r\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\r\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\r\n }\r\n /** transfer data from a specified index of the other visitor as new data in this visitor. */\r\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\r\n this.point.pushFromGrowableXYZArray(other.point, index);\r\n if (this.param && other.param && index < other.param.length)\r\n this.param.pushFromGrowableXYArray(other.param, index);\r\n if (this.normal && other.normal && index < other.normal.length)\r\n this.normal.pushFromGrowableXYZArray(other.normal, index);\r\n // ignore color and aux -- they never exist.\r\n }\r\n /** Return the number of facets this visitor is able to visit */\r\n public getVisitableFacetCount(): number {\r\n return Math.floor(this._polyface.indices.length / 3);\r\n }\r\n /** Create a visitor for a subset of the facets visitable by the instance. */\r\n public createSubsetVisitor(facetIndices: number[], numWrap: number = 0): ExportGraphicsMeshSubsetVisitor {\r\n return ExportGraphicsMeshSubsetVisitor.createSubsetVisitor(this._polyface, facetIndices, numWrap);\r\n }\r\n}\r\n\r\n/**\r\n * An `ExportGraphicsMeshSubsetVisitor` is an `ExportGraphicsMeshVisitor` which only visits a subset of the facets.\r\n * * The subset is defined by an array of facet indices provided when this visitor is created.\r\n * * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.\r\n * @public\r\n */\r\nexport class ExportGraphicsMeshSubsetVisitor extends ExportGraphicsMeshVisitor {\r\n private _facetIndices: number[];\r\n private _currentSubsetIndex: number; // index within _facetIndices\r\n private _nextSubsetIndex: number; // index within _facetIndices\r\n\r\n private constructor(polyface: ExportGraphicsMesh, facetIndices: number[], numWrap: number) {\r\n super(polyface, numWrap);\r\n this._facetIndices = facetIndices.slice();\r\n this._currentSubsetIndex = -1;\r\n this._nextSubsetIndex = 0;\r\n this.reset();\r\n }\r\n private isValidSubsetIndex(index: number): boolean {\r\n return index >= 0 && index < this._facetIndices.length;\r\n }\r\n /**\r\n * Create a visitor for iterating a subset of the facets of `polyface`.\r\n * @param polyface reference to the client polyface, supplying facets\r\n * @param facetIndices array of indices of facets in the client polyface to visit. This array is cloned.\r\n * @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.\r\n */\r\n public static createSubsetVisitor(\r\n polyface: ExportGraphicsMesh, facetIndices: number[], numWrap: number = 0,\r\n ): ExportGraphicsMeshSubsetVisitor {\r\n return new ExportGraphicsMeshSubsetVisitor(polyface, facetIndices, numWrap);\r\n }\r\n /**\r\n * Advance the iterator to a particular facet in the subset of client polyface facets.\r\n * @param subsetIndex index into the subset array, not to be confused with the client facet index.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToReadIndex(subsetIndex: number): boolean {\r\n if (this.isValidSubsetIndex(subsetIndex)) {\r\n this._currentSubsetIndex = subsetIndex;\r\n this._nextSubsetIndex = subsetIndex + 1;\r\n return super.moveToReadIndex(this._facetIndices[subsetIndex]);\r\n }\r\n return false;\r\n }\r\n /**\r\n * Advance the iterator to the next facet in the subset of client polyface facets.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToNextFacet(): boolean {\r\n if (this._nextSubsetIndex !== this._currentSubsetIndex)\r\n return this.moveToReadIndex(this._nextSubsetIndex);\r\n this._nextSubsetIndex++;\r\n return true;\r\n }\r\n /** Restart the visitor at the first facet. */\r\n public override reset(): void {\r\n if (this._facetIndices) { // avoid crash during super ctor when we aren't yet initialized\r\n this.moveToReadIndex(0);\r\n this._nextSubsetIndex = 0; // so immediate moveToNextFacet stays here\r\n }\r\n }\r\n /**\r\n * Return the client polyface facet index (aka \"readIndex\") for the given subset index.\r\n * @param subsetIndex index into the subset array. Default is the subset index of the currently visited facet.\r\n * @return valid client polyface facet index, or `undefined` if invalid subset index.\r\n */\r\n public parentFacetIndex(subsetIndex?: number): number | undefined {\r\n if (undefined === subsetIndex)\r\n subsetIndex = this._currentSubsetIndex;\r\n return this.isValidSubsetIndex(subsetIndex) ? this._facetIndices[subsetIndex] : undefined;\r\n }\r\n /** Return the number of facets this visitor is able to visit. */\r\n public override getVisitableFacetCount(): number {\r\n return this._facetIndices.length;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ExportGraphics.js","sourceRoot":"","sources":["../../src/ExportGraphics.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAyB,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAY,YAAY,EAAmB,MAAM,sBAAsB,CAAC;AAkQhG;;GAEG;AACH,MAAM,KAAW,cAAc,CAuD9B;AAvDD,WAAiB,cAAc;IAC7B;;OAEG;IACH,SAAgB,wBAAwB,CAAC,GAA0B,EAAE,GAA0B;QAC7F,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,CAAC,UAAU;YACnC,OAAO,KAAK,CAAC;QACf,IAAI,GAAG,CAAC,aAAa,KAAK,GAAG,CAAC,aAAa;YACzC,OAAO,KAAK,CAAC;QACf,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,CAAC,UAAU;YACnC,OAAO,KAAK,CAAC;QACf,IAAI,GAAG,CAAC,eAAe,KAAK,GAA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sBAAsB;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;IACnC,CAAC;CACF","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 ExportGraphics\n */\n\nimport { assert, Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { IndexedPolyface, Polyface, PolyfaceData, PolyfaceVisitor } from \"@itwin/core-geometry\";\nimport { ColorDefProps, GeometryClass } from \"@itwin/core-common\";\n\n/** A collection of line segments, suitable for direct use with graphics APIs.\n * The structure of this data matches GL_LINES in OpenGL.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportGraphicsLines {\n /** Zero-based vertex indices, every two indices represent a line segment */\n indices: Int32Array;\n /** Vertices for these lines, laid out in the pattern XYZXYZ */\n points: Float64Array;\n}\n\n/** Info provided to ExportLinesFunction about linework graphics.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportLinesInfo {\n /** The element ID for the element the graphics originated from */\n elementId: Id64String;\n /** ID for the [SubCategory]($core-backend) for these graphics */\n subCategory: Id64String;\n /** The color and transparency for these graphics */\n color: ColorDefProps;\n /** GeometryClass for these graphics */\n geometryClass: GeometryClass;\n /** The linework for these graphics */\n lines: ExportGraphicsLines;\n}\n\n/** A callback function that receives generated line graphics.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport type ExportLinesFunction = (info: ExportLinesInfo) => void;\n\n/** A triangulated mesh with unified indices, suitable for direct use with graphics APIs.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportGraphicsMesh {\n /** Zero-based vertex indices, every three indices represent a triangle */\n indices: Int32Array;\n /** Vertices for this mesh, laid out in the pattern XYZXYZ */\n points: Float64Array;\n /** Normals for this mesh, laid out in the pattern XYZXYZ */\n normals: Float32Array;\n /** Parameters (uvs) for this mesh, laid out in the pattern XYXY */\n params: Float32Array;\n /** If true, clients should assume both sides of the mesh are visible and not cull back faces. */\n isTwoSided: boolean;\n}\n\n/** Info provided to ExportGraphicsFunction about graphics.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportGraphicsInfo {\n /** The element ID for the element the graphics originated from */\n elementId: Id64String;\n /** ID for the [SubCategory]($core-backend) for these graphics */\n subCategory: Id64String;\n /** The color and transparency for these graphics */\n color: ColorDefProps;\n /** GeometryClass for these graphics */\n geometryClass: GeometryClass;\n /** If defined, ID for the [RenderMaterialElement]($core-backend) for these graphics */\n materialId?: Id64String;\n /** If defined, ID for the [Texture]($core-backend) for these graphics */\n textureId?: Id64String;\n /** The mesh for these graphics */\n mesh: ExportGraphicsMesh;\n}\n\n/** Information about the base display properties when a [GeometryPart]($core-backend) was\n * referenced. This is intended to be used with [IModelDb.exportPartGraphics]($core-backend).\n * * If two ExportPartInstanceInfo have the same ExportPartDisplayInfos, they will result in the\n * same graphics (with a different transform).\n * * If two ExportPartInstanceInfo have different ExportPartDisplayInfos, they may result in different\n * graphics.\n * @public\n */\nexport interface ExportPartDisplayInfo {\n categoryId: Id64String;\n subCategoryId: Id64String;\n geometryClass: GeometryClass;\n materialId: Id64String;\n elmTransparency: number;\n lineColor: number;\n}\n\n/** Information about references to [GeometryPart]($core-backend) elements found during\n * a call to [IModelDb.exportGraphics]($core-backend).\n * See [IModelDb.exportPartGraphics]($core-backend) for the intended use case.\n * @public\n */\nexport interface ExportPartInstanceInfo {\n /** ID for the [GeometryPart]($core-backend) */\n partId: Id64String;\n /** ID for the element that contained the reference to the [GeometryPart]($core-backend) */\n partInstanceId: Id64String;\n /** The base display properties when the [GeometryPart]($core-backend) was referenced. */\n displayProps: ExportPartDisplayInfo;\n /** A row-major storage 4x3 transform for this instance.\n * See export-gltf under test-apps in the iTwin.js monorepo for a working reference.\n */\n transform?: Float64Array;\n}\n\n/** A callback function that receives generated graphics.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport type ExportGraphicsFunction = (info: ExportGraphicsInfo) => void;\n\n/** Parameters for [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportGraphicsOptions {\n /** The source elements for the exported graphics */\n elementIdArray: Id64Array;\n /** A function to call for each unique element ID, color and texture combination */\n onGraphics: ExportGraphicsFunction;\n /** An optional function to call if line graphics are desired. */\n onLineGraphics?: ExportLinesFunction;\n /** If supplied, any references to [GeometryPart]($core-backend) elements found will be\n * recorded in this array. In this case, graphics that would result from the GeometryPart\n * will not be supplied via onGraphics. See [IModelDb.exportPartGraphics]($core-backend)\n */\n partInstanceArray?: ExportPartInstanceInfo[];\n /** Max distance from a face to the original geometry, see [StrokeOptions]($core-geometry).\n * If not supplied, defaults to zero and angleTol will control the quality of the resulting mesh.\n */\n chordTol?: number;\n /** Max angle difference in radians for approximated face, see [StrokeOptions]($core-geometry).\n * If not supplied, defaults to PI/12 (15 degrees).\n */\n angleTol?: number;\n /** Max length of any edge in generated faces, see [StrokeOptions]($core-geometry).\n * If not supplied, there is no maximum length of an edge. Supplying this value can greatly increase the\n * size of the resulting geometry, and should only be done in cases where necessary (if you don't know\n * that it's necessary, it's almost certainly not!)\n */\n maxEdgeLength?: number;\n /** The longest dimension of a line style's largest component must be at least this size in order for\n * exportGraphics to evaluate and generate its graphics. If undefined, this defaults to 0.1.\n * Line styles can evaluate to 3D geometry that clients expect to receive from exportGraphics, but they\n * can also generate gigabytes of mesh data when line styles with small components are applied to long\n * line strings.\n */\n minLineStyleComponentSize?: number;\n /** Max distance between mesh vertices for them to be collapsed.\n * Meshes stored in GeometryStreams are unaffected by StrokeOptions settings. If decimationTol is undefined,\n * they are output from exportGraphics without any reduction in quality and can be too detailed for\n * some uses. However, decimation is a destructive operation that can introduce gaps and other visual\n * anomalies so it is important to choose an appropriate setting for your use case.\n */\n decimationTol?: number;\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\n * like screws and screw holes.\n */\n minBRepFeatureSize?: number;\n}\n\n/** Info provided to ExportPartFunction about graphics.\n * See [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport interface ExportPartInfo {\n /** The color and transparency for these graphics */\n color: ColorDefProps;\n /** GeometryClass for these graphics */\n geometryClass: GeometryClass;\n /** If defined, ID for the [RenderMaterialElement]($core-backend) for these graphics */\n materialId?: Id64String;\n /** If defined, ID for the [Texture]($core-backend) for these graphics */\n textureId?: Id64String;\n /** The mesh for these graphics */\n mesh: ExportGraphicsMesh;\n}\n\n/** A callback function that receives generated graphics for a [GeometryPart]($core-backend).\n * See [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport type ExportPartFunction = (info: ExportPartInfo) => void;\n\n/** Info provided to ExportPartFunction about line graphics.\n * See [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport interface ExportPartLinesInfo {\n /** The color and transparency for these graphics */\n color: ColorDefProps;\n /** GeometryClass for these graphics */\n geometryClass: GeometryClass;\n /** The linework for these graphics */\n lines: ExportGraphicsLines;\n}\n\n/** A callback function that receives generated line graphics for a [GeometryPart]($core-backend).\n * See [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport type ExportPartLinesFunction = (info: ExportPartLinesInfo) => void;\n\n/** Parameters for [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport interface ExportPartGraphicsOptions {\n /** The ID for the source [GeometryPart]($core-backend) */\n elementId: Id64String;\n /** The base display properties to use for generating the graphics. This should come from an\n * ExportPartInstanceProps generated by [IModelDb.exportGraphics]($core-backend)\n */\n displayProps: ExportPartDisplayInfo;\n /** A function to call for each unique color and texture combination. */\n onPartGraphics: ExportPartFunction;\n /** An optional function to call if line graphics are desired. */\n onPartLineGraphics?: ExportPartLinesFunction;\n /** Max distance from a face to the original geometry, see [StrokeOptions]($core-geometry).\n * If not supplied, defaults to zero and angleTol will control the quality of the resulting mesh.\n */\n chordTol?: number;\n /** Max angle difference in radians for approximated face, see [StrokeOptions]($core-geometry).\n * If not supplied, defaults to PI/12 (15 degrees).\n */\n angleTol?: number;\n /** Max length of any edge in generated faces, see [StrokeOptions]($core-geometry)\n * If not supplied, there is no maximum length of an edge. Supplying this value can greatly increase the\n * size of the resulting geometry, and should only be done in cases where necessary (if you don't know\n * that it's necessary, it's almost certainly not!)\n */\n maxEdgeLength?: number;\n /** The longest dimension of a line style's largest component must be at least this size in order for\n * exportGraphics to evaluate and generate its graphics. If undefined, this defaults to 0.1.\n * Line styles can evaluate to 3D geometry that clients expect to receive from exportGraphics, but they\n * can also generate gigabytes of mesh data when line styles with small components are applied to long\n * line strings.\n */\n minLineStyleComponentSize?: number;\n /** Max distance between mesh vertices for them to be collapsed.\n * Meshes stored in GeometryStreams are unaffected by StrokeOptions settings. If decimationTol is undefined,\n * they are output from exportGraphics without any reduction in quality and can be too detailed for\n * some uses. However, decimation is a destructive operation that can introduce gaps and other visual\n * anomalies so it is important to choose an appropriate setting for your use case.\n */\n decimationTol?: number;\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\n * like screws and screw holes.\n */\n minBRepFeatureSize?: number;\n}\n\n/** Provides utility functions for working with data generated by [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport namespace ExportGraphics {\n /** Test if ExportPartDisplayInfos have exactly the same values.\n * @public\n */\n export function arePartDisplayInfosEqual(lhs: ExportPartDisplayInfo, rhs: ExportPartDisplayInfo): boolean {\n if (lhs.categoryId !== rhs.categoryId)\n return false;\n if (lhs.subCategoryId !== rhs.subCategoryId)\n return false;\n if (lhs.materialId !== rhs.materialId)\n return false;\n if (lhs.elmTransparency !== rhs.elmTransparency)\n return false;\n if (lhs.lineColor !== rhs.lineColor)\n return false;\n return true;\n }\n\n /**\n * Convert an ExportGraphicsMesh to an IndexedPolyface usable by the geometry API.\n * @note The resulting IndexedPolyface may have duplicate points, normals and params. If problematic, call [PolyfaceData.compress]($core-geometry)\n * @public\n */\n export function convertToIndexedPolyface(mesh: ExportGraphicsMesh): IndexedPolyface {\n const polyface = IndexedPolyface.create(true, true, false, mesh.isTwoSided);\n\n const p: Float64Array = mesh.points;\n for (let i = 0; i < p.length; i += 3)\n polyface.data.point.pushXYZ(p[i], p[i + 1], p[i + 2]);\n\n const n: Float32Array = mesh.normals;\n assert(undefined !== polyface.data.normal);\n for (let i = 0; i < n.length; i += 3)\n polyface.data.normal.pushXYZ(n[i], n[i + 1], n[i + 2]);\n\n const uv: Float32Array = mesh.params;\n assert(undefined !== polyface.data.param);\n for (let i = 0; i < uv.length; i += 2)\n polyface.data.param.pushXY(uv[i], uv[i + 1]);\n\n const indices = mesh.indices;\n const addIndex = (idx: number) => {\n polyface.addPointIndex(idx, true);\n polyface.addNormalIndex(idx);\n polyface.addParamIndex(idx);\n };\n for (let i = 0; i < indices.length; i += 3) {\n addIndex(indices[i]);\n addIndex(indices[i + 1]);\n addIndex(indices[i + 2]);\n polyface.terminateFacet(false);\n }\n\n return polyface;\n }\n}\n/**\n * * Iterator to walk the facets of an ExportGraphicsMesh and present them to the world as if visiting a Polyface.\n * * Because the ExportGraphicsMesh has limited data:\n * * There is no auxData in this visitor.\n * * There is no color in this visitor.\n * * All edgeVisible are true.\n * @public\n */\nexport class ExportGraphicsMeshVisitor extends PolyfaceData implements PolyfaceVisitor {\n private _currentFacetIndex: number;\n private _nextFacetIndex: number;\n private _numWrap: number;\n private _polyface: ExportGraphicsMesh;\n protected constructor(facets: ExportGraphicsMesh, numWrap: number) {\n super(facets.normals.length > 0, facets.params.length > 0, false, facets.isTwoSided);\n this._polyface = facets;\n this._numWrap = numWrap;\n this._nextFacetIndex = 0;\n this._currentFacetIndex = -1;\n this.reset();\n }\n /** 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\n * Typical wrap counts are:\n * * 0 -- leave the point arrays with \"missing final edge\" (default)\n * * 1 -- add point 0 as closure point\n * * 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.\n */\n public static create(polyface: ExportGraphicsMesh, numWrap: number = 0): ExportGraphicsMeshVisitor {\n return new ExportGraphicsMeshVisitor(polyface, numWrap);\n }\n /** Restart the visitor at the first facet. */\n public reset(): void {\n this.moveToReadIndex(0);\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here\n }\n /** Select a facet by simple index. */\n public moveToReadIndex(facetIndex: number): boolean {\n if (facetIndex < 0 || 2 + facetIndex * 3 >= this._polyface.indices.length)\n return false;\n if (this._currentFacetIndex !== facetIndex || 3 + this._numWrap !== this.point.length) {\n this._currentFacetIndex = facetIndex;\n this.point.length = 0;\n this.pointIndex.length = 0;\n this.edgeVisible.length = 0;\n const sourcePoints = this._polyface.points;\n const indices = this._polyface.indices;\n const i0 = 3 * facetIndex;\n for (let i = i0; i < i0 + 3; i++) {\n const k = 3 * indices[i];\n this.pointIndex.push(indices[i]);\n this.point.pushXYZ(sourcePoints[k], sourcePoints[k + 1], sourcePoints[k + 2]);\n this.edgeVisible.push(true);\n }\n for (let i = 0; i < this._numWrap; i++) {\n this.point.pushFromGrowableXYZArray(this.point, i);\n }\n\n const sourceParams = this._polyface.params;\n if (sourceParams.length > 0 && this.paramIndex && this.param) {\n this.paramIndex.length = 0;\n this.param.length = 0;\n for (let i = i0; i < i0 + 3; i++) {\n const k = 2 * indices[i];\n this.paramIndex.push(indices[i]);\n this.param.pushXY(sourceParams[k], sourceParams[k + 1]);\n }\n for (let i = 0; i < this._numWrap; i++) {\n this.param.pushFromGrowableXYArray(this.param, i);\n }\n }\n\n const sourceNormals = this._polyface.normals;\n if (sourceNormals.length > 0 && this.normalIndex && this.normal) {\n this.normalIndex.length = 0;\n this.normal.length = 0;\n for (let i = i0; i < i0 + 3; i++) {\n const k = 3 * indices[i];\n this.normalIndex.push(indices[i]);\n this.normal.pushXYZ(sourceNormals[k], sourceNormals[k + 1], sourceNormals[k + 2]);\n }\n for (let i = 0; i < this._numWrap; i++) {\n this.normal.pushFromGrowableXYZArray(this.normal, i);\n }\n }\n }\n this._nextFacetIndex = facetIndex + 1;\n return true;\n }\n /** Load data for the next facet. */\n public moveToNextFacet(): boolean {\n if (this._nextFacetIndex !== this._currentFacetIndex)\n return this.moveToReadIndex(this._nextFacetIndex);\n this._nextFacetIndex++;\n return true;\n }\n /** Set the number of vertices to replicate in visitor arrays. */\n public setNumWrap(numWrap: number): void {\n this._numWrap = numWrap;\n }\n\n /** Return the index (in the client polyface) of the current facet */\n public currentReadIndex(): number {\n return this._currentFacetIndex;\n }\n /** Return the point index of vertex i within the currently loaded facet */\n public clientPointIndex(i: number): number {\n return this.pointIndex[i];\n }\n /** Return the param index of vertex i within the currently loaded facet.\n * Use the artificial paramIndex, which matches pointIndex.\n */\n public clientParamIndex(i: number): number {\n return this.paramIndex ? this.paramIndex[i] : -1;\n }\n /** Return the normal index of vertex i within the currently loaded facet.\n * Use the artificial paramIndex, which matches pointIndex.\n */\n public clientNormalIndex(i: number): number {\n return this.normalIndex ? this.normalIndex[i] : -1;\n }\n /** Always returns -1 since we never have colors. */\n public clientColorIndex(_i: number): number {\n return -1;\n }\n /** Always returns -1 since we never have auxiliary data. */\n public clientAuxIndex(_i: number): number {\n return -1;\n }\n /** return the client polyface */\n public clientPolyface(): Polyface | undefined {\n return undefined;\n }\n /** clear the contents of all arrays. Use this along with transferDataFrom methods to build up new facets */\n public clearArrays(): void {\n if (this.point !== undefined)\n this.point.length = 0;\n if (this.param !== undefined)\n this.param.length = 0;\n if (this.normal !== undefined)\n this.normal.length = 0;\n // ignore color and aux -- they never exist.\n }\n /** transfer interpolated data from the other visitor.\n * * all data values are interpolated at `fraction` between `other` values at index0 and index1.\n */\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\n }\n /** transfer data from a specified index of the other visitor as new data in this visitor. */\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\n this.point.pushFromGrowableXYZArray(other.point, index);\n if (this.param && other.param && index < other.param.length)\n this.param.pushFromGrowableXYArray(other.param, index);\n if (this.normal && other.normal && index < other.normal.length)\n this.normal.pushFromGrowableXYZArray(other.normal, index);\n // ignore color and aux -- they never exist.\n }\n /** Return the number of facets this visitor is able to visit */\n public getVisitableFacetCount(): number {\n return Math.floor(this._polyface.indices.length / 3);\n }\n /** Create a visitor for a subset of the facets visitable by the instance. */\n public createSubsetVisitor(facetIndices: number[], numWrap: number = 0): ExportGraphicsMeshSubsetVisitor {\n return ExportGraphicsMeshSubsetVisitor.createSubsetVisitor(this._polyface, facetIndices, numWrap);\n }\n}\n\n/**\n * An `ExportGraphicsMeshSubsetVisitor` is an `ExportGraphicsMeshVisitor` which only visits a subset of the facets.\n * * The subset is defined by an array of facet indices provided when this visitor is created.\n * * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.\n * @public\n */\nexport class ExportGraphicsMeshSubsetVisitor extends ExportGraphicsMeshVisitor {\n private _facetIndices: number[];\n private _currentSubsetIndex: number; // index within _facetIndices\n private _nextSubsetIndex: number; // index within _facetIndices\n\n private constructor(polyface: ExportGraphicsMesh, facetIndices: number[], numWrap: number) {\n super(polyface, numWrap);\n this._facetIndices = facetIndices.slice();\n this._currentSubsetIndex = -1;\n this._nextSubsetIndex = 0;\n this.reset();\n }\n private isValidSubsetIndex(index: number): boolean {\n return index >= 0 && index < this._facetIndices.length;\n }\n /**\n * Create a visitor for iterating a subset of the facets of `polyface`.\n * @param polyface reference to the client polyface, supplying facets\n * @param facetIndices array of indices of facets in the client polyface to visit. This array is cloned.\n * @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.\n */\n public static createSubsetVisitor(\n polyface: ExportGraphicsMesh, facetIndices: number[], numWrap: number = 0,\n ): ExportGraphicsMeshSubsetVisitor {\n return new ExportGraphicsMeshSubsetVisitor(polyface, facetIndices, numWrap);\n }\n /**\n * Advance the iterator to a particular facet in the subset of client polyface facets.\n * @param subsetIndex index into the subset array, not to be confused with the client facet index.\n * @return whether the iterator was successfully moved.\n */\n public override moveToReadIndex(subsetIndex: number): boolean {\n if (this.isValidSubsetIndex(subsetIndex)) {\n this._currentSubsetIndex = subsetIndex;\n this._nextSubsetIndex = subsetIndex + 1;\n return super.moveToReadIndex(this._facetIndices[subsetIndex]);\n }\n return false;\n }\n /**\n * Advance the iterator to the next facet in the subset of client polyface facets.\n * @return whether the iterator was successfully moved.\n */\n public override moveToNextFacet(): boolean {\n if (this._nextSubsetIndex !== this._currentSubsetIndex)\n return this.moveToReadIndex(this._nextSubsetIndex);\n this._nextSubsetIndex++;\n return true;\n }\n /** Restart the visitor at the first facet. */\n public override reset(): void {\n if (this._facetIndices) { // avoid crash during super ctor when we aren't yet initialized\n this.moveToReadIndex(0);\n this._nextSubsetIndex = 0; // so immediate moveToNextFacet stays here\n }\n }\n /**\n * Return the client polyface facet index (aka \"readIndex\") for the given subset index.\n * @param subsetIndex index into the subset array. Default is the subset index of the currently visited facet.\n * @return valid client polyface facet index, or `undefined` if invalid subset index.\n */\n public parentFacetIndex(subsetIndex?: number): number | undefined {\n if (undefined === subsetIndex)\n subsetIndex = this._currentSubsetIndex;\n return this.isValidSubsetIndex(subsetIndex) ? this._facetIndices[subsetIndex] : undefined;\n }\n /** Return the number of facets this visitor is able to visit. */\n public override getVisitableFacetCount(): number {\n return this._facetIndices.length;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalSource.js","sourceRoot":"","sources":["../../src/ExternalSource.ts"],"names":[],"mappings":"AACA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,s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AAsB,KAAqC,EAAE,MAAgB;QAC3E,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;IAEe,MAAM;QACpB,OAAO,KAAK,CAAC,MAAM,EAAoC,CAAC,CAAC,sDAAsD;IACjH,CAAC;CACF","sourcesContent":["\r\n/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Elements\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport {\r\n BisCodeSpec, Code, CodeScopeSpec, EntityReferenceSet, ExternalSourceAttachmentProps, ExternalSourceAttachmentRole, ExternalSourceProps, IModel, RelatedElement,\r\n SynchronizationConfigLinkProps,\r\n} from \"@itwin/core-common\";\r\nimport { InformationReferenceElement, UrlLink } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { ExternalSourceAttachmentAttachesSource, ExternalSourceIsInRepository } from \"./NavigationRelationship\";\r\n\r\n/** An ExternalSource refers to an 'information container' found in a repository. In some cases, the container is the entire repository.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\r\n * @beta\r\n */\r\nexport class ExternalSource extends InformationReferenceElement {\r\n /** The repository that contains this ExternalSource. */\r\n public repository?: ExternalSourceIsInRepository;\r\n /** The name of the iModel Connecter that processed this ExternalSource. */\r\n public connectorName?: string;\r\n /** The version of the iModel Connecter that processed this ExternalSource. */\r\n public connectorVersion?: string;\r\n /** @internal */\r\n public static override get className(): string { return \"ExternalSource\"; }\r\n\r\n protected constructor(props: ExternalSourceProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n if (props.repository)\r\n this.repository = new ExternalSourceIsInRepository(RelatedElement.idFromJson(props.repository));\r\n }\r\n\r\n public override toJSON(): ExternalSourceProps { // This override only specializes the return type\r\n return super.toJSON() as ExternalSourceProps; // Entity.toJSON takes care of auto-handled properties\r\n }\r\n /** The [[CodeSpec]] for ExternalSource elements is not automatically created, so this method ensures that it exists. */\r\n public static ensureCodeSpec(iModelDb: IModelDb): Id64String {\r\n try {\r\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSource);\r\n return codeSpec.id;\r\n } catch {\r\n return iModelDb.codeSpecs.insert(BisCodeSpec.externalSource, CodeScopeSpec.Type.Repository);\r\n }\r\n }\r\n /** Create a Code for an ExternalSource element given a name that is meant to be unique within the scope of the iModel.\r\n * @param iModelDb The IModelDb\r\n * @param codeValue The ExternalSource name\r\n * @see [[ensureCodeSpec]]\r\n */\r\n public static createCode(iModelDb: IModelDb, codeValue: string): Code {\r\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSource);\r\n return new Code({ spec: codeSpec.id, scope: IModel.rootSubjectId, value: codeValue });\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (this.repository)\r\n referenceIds.addElement(this.repository.id);\r\n }\r\n}\r\n\r\n/** Attachment of an ExternalSource\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\r\n * @beta\r\n */\r\nexport class ExternalSourceAttachment extends InformationReferenceElement {\r\n /** The [[ExternalSource]] that is attached by this ExternalSourceAttachment. */\r\n public attaches?: ExternalSourceAttachmentAttachesSource;\r\n /** Specifies whether the attached [[ExternalSource]] provides context or models a part of the whole. */\r\n public role?: ExternalSourceAttachmentRole;\r\n /** The translation or offset in global coordinates of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public translation?: Point3d;\r\n /** The Yaw angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public yaw?: number;\r\n /** The Pitch angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public pitch?: number;\r\n /** The Roll angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public roll?: number;\r\n /** The scale of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public scale?: Point3d;\r\n /** @internal */\r\n public static override get className(): string { return \"ExternalSourceAttachment\"; }\r\n\r\n protected constructor(props: ExternalSourceAttachmentProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n if (props.attaches)\r\n this.attaches = new ExternalSourceAttachmentAttachesSource(RelatedElement.idFromJson(props.attaches));\r\n\r\n if (props.translation)\r\n this.translation = Point3d.fromJSON(props.translation);\r\n\r\n if (props.scale)\r\n this.scale = Point3d.fromJSON(props.scale);\r\n }\r\n\r\n public override toJSON(): ExternalSourceAttachmentProps { // This override only specializes the return type\r\n return super.toJSON() as ExternalSourceAttachmentProps; // Entity.toJSON takes care of auto-handled properties\r\n }\r\n /** The [[CodeSpec]] for ExternalSourceAttachment elements is not automatically created, so this method ensures that it exists. */\r\n public static ensureCodeSpec(iModelDb: IModelDb): Id64String {\r\n try {\r\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSourceAttachment);\r\n return codeSpec.id;\r\n } catch {\r\n return iModelDb.codeSpecs.insert(BisCodeSpec.externalSourceAttachment, CodeScopeSpec.Type.ParentElement);\r\n }\r\n }\r\n /** Create a Code for an ExternalSourceAttachment element given a name that is meant to be unique within the scope of its parent [[ExternalSource]].\r\n * @param iModelDb The IModelDb\r\n * @param scopeElementId The parent ExternalSource\r\n * @param codeValue The ExternalSourceAttachment name\r\n * @see [[ensureCodeSpec]]\r\n */\r\n public static createCode(iModelDb: IModelDb, scopeElementId: Id64String, codeValue: string): Code {\r\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSourceAttachment);\r\n return new Code({ spec: codeSpec.id, scope: scopeElementId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A group of ExternalSources that are collectively a source of information for one or more elements.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\r\n * @beta\r\n */\r\nexport class ExternalSourceGroup extends ExternalSource {\r\n /** @internal */\r\n public static override get className(): string { return \"ExternalSourceGroup\"; }\r\n\r\n protected constructor(props: ExternalSourceProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n}\r\n\r\n/** Link to the Configuration for an iModel Synchronization Job\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\r\n * @beta\r\n */\r\nexport class SynchronizationConfigLink extends UrlLink {\r\n /** Date/Time of last successful run of this synchronization configuration */\r\n public lastSuccessfulRun?: string;\r\n /** @internal */\r\n public static override get className(): string { return \"SynchronizationConfigLink\"; }\r\n\r\n protected constructor(props: SynchronizationConfigLinkProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n public override toJSON(): SynchronizationConfigLinkProps { // This override only specializes the return type\r\n return super.toJSON() as SynchronizationConfigLinkProps; // Entity.toJSON takes care of auto-handled properties\r\n }\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"ExternalSource.js","sourceRoot":"","sources":["../../src/ExternalSource.ts"],"names":[],"mappings":"AACA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACL,WAAW,EAAE,IAAI,EAAE,aAAa,EAAwG,MAAM,EAAE,cAAc,GAE/J,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,2BAA2B,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EAAE,sCAAsC,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAEhH;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,2BAA2B;IAC7D,wDAAwD;IACjD,UAAU,CAAgC;IACjD,2EAA2E;IACpE,aAAa,CAAU;IAC9B,8EAA8E;IACvE,gBAAgB,CAAU;IACjC,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IAE3E,YAAsB,KAA0B,EAAE,MAAgB;QAChE,KAAK,CAAC,KAAK,EAAE,M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U,CAAC,QAAkB,EAAE,cAA0B,EAAE,SAAiB;QACxF,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;QACpF,OAAO,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAClF,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IACrD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,qBAAqB,CAAC,CAAC,CAAC;IAEhF,YAAsB,KAA0B,EAAE,MAAgB;QAChE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,yBAA0B,SAAQ,OAAO;IACpD,6EAA6E;IACtE,iBAAiB,CAAU;IAClC,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,2BAA2B,CAAC,CAAC,CAAC;IAEtF,YAAsB,KAAqC,EAAE,MAAgB;QAC3E,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;IAEe,MAAM;QACpB,OAAO,KAAK,CAAC,MAAM,EAAoC,CAAC,CAAC,sDAAsD;IACjH,CAAC;CACF","sourcesContent":["\n/*---------------------------------------------------------------------------------------------\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 Elements\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { Point3d } from \"@itwin/core-geometry\";\nimport {\n BisCodeSpec, Code, CodeScopeSpec, EntityReferenceSet, ExternalSourceAttachmentProps, ExternalSourceAttachmentRole, ExternalSourceProps, IModel, RelatedElement,\n SynchronizationConfigLinkProps,\n} from \"@itwin/core-common\";\nimport { InformationReferenceElement, UrlLink } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { ExternalSourceAttachmentAttachesSource, ExternalSourceIsInRepository } from \"./NavigationRelationship\";\n\n/** An ExternalSource refers to an 'information container' found in a repository. In some cases, the container is the entire repository.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSource extends InformationReferenceElement {\n /** The repository that contains this ExternalSource. */\n public repository?: ExternalSourceIsInRepository;\n /** The name of the iModel Connecter that processed this ExternalSource. */\n public connectorName?: string;\n /** The version of the iModel Connecter that processed this ExternalSource. */\n public connectorVersion?: string;\n /** @internal */\n public static override get className(): string { return \"ExternalSource\"; }\n\n protected constructor(props: ExternalSourceProps, iModel: IModelDb) {\n super(props, iModel);\n if (props.repository)\n this.repository = new ExternalSourceIsInRepository(RelatedElement.idFromJson(props.repository));\n }\n\n public override toJSON(): ExternalSourceProps { // This override only specializes the return type\n return super.toJSON() as ExternalSourceProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** The [[CodeSpec]] for ExternalSource elements is not automatically created, so this method ensures that it exists. */\n public static ensureCodeSpec(iModelDb: IModelDb): Id64String {\n try {\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSource);\n return codeSpec.id;\n } catch {\n return iModelDb.codeSpecs.insert(BisCodeSpec.externalSource, CodeScopeSpec.Type.Repository);\n }\n }\n /** Create a Code for an ExternalSource element given a name that is meant to be unique within the scope of the iModel.\n * @param iModelDb The IModelDb\n * @param codeValue The ExternalSource name\n * @see [[ensureCodeSpec]]\n */\n public static createCode(iModelDb: IModelDb, codeValue: string): Code {\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSource);\n return new Code({ spec: codeSpec.id, scope: IModel.rootSubjectId, value: codeValue });\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (this.repository)\n referenceIds.addElement(this.repository.id);\n }\n}\n\n/** Attachment of an ExternalSource\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceAttachment extends InformationReferenceElement {\n /** The [[ExternalSource]] that is attached by this ExternalSourceAttachment. */\n public attaches?: ExternalSourceAttachmentAttachesSource;\n /** Specifies whether the attached [[ExternalSource]] provides context or models a part of the whole. */\n public role?: ExternalSourceAttachmentRole;\n /** The translation or offset in global coordinates of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public translation?: Point3d;\n /** The Yaw angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public yaw?: number;\n /** The Pitch angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public pitch?: number;\n /** The Roll angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public roll?: number;\n /** The scale of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public scale?: Point3d;\n /** @internal */\n public static override get className(): string { return \"ExternalSourceAttachment\"; }\n\n protected constructor(props: ExternalSourceAttachmentProps, iModel: IModelDb) {\n super(props, iModel);\n if (props.attaches)\n this.attaches = new ExternalSourceAttachmentAttachesSource(RelatedElement.idFromJson(props.attaches));\n\n if (props.translation)\n this.translation = Point3d.fromJSON(props.translation);\n\n if (props.scale)\n this.scale = Point3d.fromJSON(props.scale);\n }\n\n public override toJSON(): ExternalSourceAttachmentProps { // This override only specializes the return type\n return super.toJSON() as ExternalSourceAttachmentProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** The [[CodeSpec]] for ExternalSourceAttachment elements is not automatically created, so this method ensures that it exists. */\n public static ensureCodeSpec(iModelDb: IModelDb): Id64String {\n try {\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSourceAttachment);\n return codeSpec.id;\n } catch {\n return iModelDb.codeSpecs.insert(BisCodeSpec.externalSourceAttachment, CodeScopeSpec.Type.ParentElement);\n }\n }\n /** Create a Code for an ExternalSourceAttachment element given a name that is meant to be unique within the scope of its parent [[ExternalSource]].\n * @param iModelDb The IModelDb\n * @param scopeElementId The parent ExternalSource\n * @param codeValue The ExternalSourceAttachment name\n * @see [[ensureCodeSpec]]\n */\n public static createCode(iModelDb: IModelDb, scopeElementId: Id64String, codeValue: string): Code {\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSourceAttachment);\n return new Code({ spec: codeSpec.id, scope: scopeElementId, value: codeValue });\n }\n}\n\n/** A group of ExternalSources that are collectively a source of information for one or more elements.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceGroup extends ExternalSource {\n /** @internal */\n public static override get className(): string { return \"ExternalSourceGroup\"; }\n\n protected constructor(props: ExternalSourceProps, iModel: IModelDb) {\n super(props, iModel);\n }\n}\n\n/** Link to the Configuration for an iModel Synchronization Job\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class SynchronizationConfigLink extends UrlLink {\n /** Date/Time of last successful run of this synchronization configuration */\n public lastSuccessfulRun?: string;\n /** @internal */\n public static override get className(): string { return \"SynchronizationConfigLink\"; }\n\n protected constructor(props: SynchronizationConfigLinkProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n public override toJSON(): SynchronizationConfigLinkProps { // This override only specializes the return type\n return super.toJSON() as SynchronizationConfigLinkProps; // Entity.toJSON takes care of auto-handled properties\n }\n}\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FontFile.js","sourceRoot":"","sources":["../../src/FontFile.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,yBAAyB,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAyDjH,YAAY;AACZ,MAAM,KAAW,QAAQ,CAmBxB;AAnBD,WAAiB,QAAQ;IACvB;;OAEG;IACH,SAAgB,0BAA0B,CAAC,QAAuB;QAChE,OAAO,4BAA4B,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAFe,mCAA0B,6BAEzC,CAAA;IAED,+FAA+F;IAC/F,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;IAED;;OAEG;IACH,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;AACH,CAAC,EAnBgB,QAAQ,KAAR,QAAQ,QAmBxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ElementGeometry\r\n */\r\n\r\nimport { FontFace, FontType, LocalFileName, RscFontEncodingProps } from \"@itwin/core-common\";\r\nimport type { IModelJsNative } from \"@bentley/imodeljs-native\";\r\nimport { _faceProps, _getData, _implementationProhibited, _key } from \"./internal/Symbols\";\r\nimport { rscFontFileFromBlob, shxFontFileFromBlob, trueTypeFontFileFromFileName } from \"./internal/FontFileImpl\"; \r\n\r\n/** A container for one or more [font faces]($docs/learning/backend/Fonts.md), often originating as a file on disk.\r\n * @see [[FontFile.createFromTrueTypeFileName]] and [[FontFile.createFromShxFontBlob]] to create a font file.\r\n * @see [[IModelDbFonts.queryEmbeddedFontFiles]] to obtain font files embedded in an [[IModelDb]].\r\n * @see [[IModelDbFonts.embedFontFile]] to embed a font file into an [[IModelDb]].\r\n * @beta\r\n */\r\nexport interface FontFile {\r\n /** @internal */\r\n readonly [_implementationProhibited]: unknown;\r\n\r\n /** The format in which the font data is encoded. */\r\n readonly type: FontType;\r\n /** The individual faces encoded into the file. */\r\n readonly faces: ReadonlyArray<Readonly<FontFace>>;\r\n /** If false, the font is not licensed for embedding, and attempting to embed it into an iModel will throw an error. */\r\n readonly isEmbeddable: boolean;\r\n\r\n /** A canonical representation of this font's contents, used for comparing two font files for equivalence.\r\n * @internal\r\n */\r\n readonly [_key]: string;\r\n\r\n /** Returns the raw (but uncompressed) binary data.\r\n * @internal\r\n */\r\n readonly [_getData]: () => Uint8Array;\r\n\r\n /** Native representation of [[faces]].\r\n * @internal\r\n */\r\n readonly [_faceProps]: IModelJsNative.FontFaceProps[];\r\n}\r\n\r\n/** Arguments supplied to [[FontFile.createFromShxFontBlob]].\r\n * @beta\r\n */\r\nexport interface CreateFontFileFromShxBlobArgs {\r\n /** The name to give to the font family contained in the [[blob]]. */\r\n familyName: string;\r\n /** The binary representation of the SHX font face. */\r\n blob: Uint8Array;\r\n}\r\n\r\n/** Arguments supplied to [[FontFile.CreateFromRscFontBlob]].\r\n * @alpha\r\n */\r\nexport interface CreateFontFileFromRscBlobArgs {\r\n /** The name to give to the font family contained in the [[blob]]. */\r\n familyName: string;\r\n /** The binary, flat-buffer-encoded representation of the RSC font face. */\r\n blob: Uint8Array;\r\n /** The font's encoding. */\r\n encoding?: RscFontEncodingProps;\r\n}\r\n\r\n/** @beta */\r\nexport namespace FontFile {\r\n /** Create a FontFile from a [FontType.TrueType]($common) file on disk.\r\n * @param fileName The absolute path to the font file.\r\n */\r\n export function createFromTrueTypeFileName(fileName: LocalFileName): FontFile {\r\n return trueTypeFontFileFromFileName(fileName);\r\n }\r\n\r\n /** Create a FontFile from the binary representation of a [FontType.SHX]($common) font face. */\r\n export function createFromShxFontBlob(args: CreateFontFileFromShxBlobArgs): FontFile {\r\n return shxFontFileFromBlob(args);\r\n }\r\n\r\n /** Create a FontFile from the binary representation of a [FontType.RSC]($common) font face.\r\n * @alpha\r\n */\r\n export function createFromRscFontBlob(args: CreateFontFileFromRscBlobArgs): FontFile {\r\n return rscFontFileFromBlob(args);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FontFile.js","sourceRoot":"","sources":["../../src/FontFile.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,yBAAyB,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAyDjH,YAAY;AACZ,MAAM,KAAW,QAAQ,CAmBxB;AAnBD,WAAiB,QAAQ;IACvB;;OAEG;IACH,SAAgB,0BAA0B,CAAC,QAAuB;QAChE,OAAO,4BAA4B,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAFe,mCAA0B,6BAEzC,CAAA;IAED,+FAA+F;IAC/F,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;IAED;;OAEG;IACH,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;AACH,CAAC,EAnBgB,QAAQ,KAAR,QAAQ,QAmBxB","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 ElementGeometry\n */\n\nimport { FontFace, FontType, LocalFileName, RscFontEncodingProps } from \"@itwin/core-common\";\nimport type { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { _faceProps, _getData, _implementationProhibited, _key } from \"./internal/Symbols\";\nimport { rscFontFileFromBlob, shxFontFileFromBlob, trueTypeFontFileFromFileName } from \"./internal/FontFileImpl\"; \n\n/** A container for one or more [font faces]($docs/learning/backend/Fonts.md), often originating as a file on disk.\n * @see [[FontFile.createFromTrueTypeFileName]] and [[FontFile.createFromShxFontBlob]] to create a font file.\n * @see [[IModelDbFonts.queryEmbeddedFontFiles]] to obtain font files embedded in an [[IModelDb]].\n * @see [[IModelDbFonts.embedFontFile]] to embed a font file into an [[IModelDb]].\n * @beta\n */\nexport interface FontFile {\n /** @internal */\n readonly [_implementationProhibited]: unknown;\n\n /** The format in which the font data is encoded. */\n readonly type: FontType;\n /** The individual faces encoded into the file. */\n readonly faces: ReadonlyArray<Readonly<FontFace>>;\n /** If false, the font is not licensed for embedding, and attempting to embed it into an iModel will throw an error. */\n readonly isEmbeddable: boolean;\n\n /** A canonical representation of this font's contents, used for comparing two font files for equivalence.\n * @internal\n */\n readonly [_key]: string;\n\n /** Returns the raw (but uncompressed) binary data.\n * @internal\n */\n readonly [_getData]: () => Uint8Array;\n\n /** Native representation of [[faces]].\n * @internal\n */\n readonly [_faceProps]: IModelJsNative.FontFaceProps[];\n}\n\n/** Arguments supplied to [[FontFile.createFromShxFontBlob]].\n * @beta\n */\nexport interface CreateFontFileFromShxBlobArgs {\n /** The name to give to the font family contained in the [[blob]]. */\n familyName: string;\n /** The binary representation of the SHX font face. */\n blob: Uint8Array;\n}\n\n/** Arguments supplied to [[FontFile.CreateFromRscFontBlob]].\n * @alpha\n */\nexport interface CreateFontFileFromRscBlobArgs {\n /** The name to give to the font family contained in the [[blob]]. */\n familyName: string;\n /** The binary, flat-buffer-encoded representation of the RSC font face. */\n blob: Uint8Array;\n /** The font's encoding. */\n encoding?: RscFontEncodingProps;\n}\n\n/** @beta */\nexport namespace FontFile {\n /** Create a FontFile from a [FontType.TrueType]($common) file on disk.\n * @param fileName The absolute path to the font file.\n */\n export function createFromTrueTypeFileName(fileName: LocalFileName): FontFile {\n return trueTypeFontFileFromFileName(fileName);\n }\n\n /** Create a FontFile from the binary representation of a [FontType.SHX]($common) font face. */\n export function createFromShxFontBlob(args: CreateFontFileFromShxBlobArgs): FontFile {\n return shxFontFileFromBlob(args);\n }\n\n /** Create a FontFile from the binary representation of a [FontType.RSC]($common) font face.\n * @alpha\n */\n export function createFromRscFontBlob(args: CreateFontFileFromRscBlobArgs): FontFile {\n return rscFontFileFromBlob(args);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GeoCoordConfig.js","sourceRoot":"","sources":["../../src/GeoCoordConfig.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,SAAS,GAAG,UAAU,CAAC;AAM7B,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,GAAG,gBAAgB,IAAI,IAAI,EAAE,CAAC;AAExE;;;GAGG;AACH,MAAM,OAAO,cAAc;IACzB,gFAAgF;IACzE,MAAM,CAAU,UAAU,GAAgC,EAAE,CAAC;IAC7D,MAAM,CAAU,WAAW,GAAG;QACnC,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC;QACvC,gBAAgB,EAAE,eAAe,CAAC,mBAAmB,CAAC;QACtD,iBAAiB,EAAE,eAAe,CAAC,mBAAmB,CAAC;KACxD,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,OAAmB;QAChD,uDAAuD;QACvD,IAAI,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,iBAAiB,EAAE,KAAK,CAAC;YAClG,OAAO;QAET,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC;YACnC,MAAM,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,GAAG,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,8DAA8D;YAClI,MAAM,cAAc,GAAG,SAA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AAS,EAAE,GAAG,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,OAAO,CAAC,QAAkB,EAAE,WAAmB;QAC5D,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAa,WAAW,CAAC,CAAC;QAC3D,IAAI,OAAO,EAAE,CAAC;YACZ,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,iBAAiB,GAAG,KAAK,CAAC;IAClC,MAAM,CAAC,SAAS;QACrB,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAC9B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,QAAkB;QAC5C,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { BentleyError, Logger } from \"@itwin/core-bentley\";\r\nimport { CloudSqlite } from \"./CloudSqlite\";\r\nimport { IModelHost } from \"./IModelHost\";\r\nimport { Settings } from \"./workspace/Settings\";\r\nimport { WorkspaceDbCloudProps } from \"./workspace/Workspace\";\r\nimport { IModelNative } from \"./internal/NativePlatform\";\r\n\r\nconst loggerCat = \"GeoCoord\";\r\n\r\n/** @internal */\r\nexport interface GcsDbProps extends WorkspaceDbCloudProps {\r\n priority?: number;\r\n}\r\nconst makeSettingName = (name: string) => `${\"itwin/core/gcs\"}/${name}`;\r\n\r\n/**\r\n * Internal class to configure and load the gcs workspaces for an iModel.\r\n * @internal\r\n */\r\nexport class GeoCoordConfig {\r\n /** array of cloud prefetch tasks that may be awaited to permit offline usage */\r\n public static readonly prefetches: CloudSqlite.CloudPrefetch[] = [];\r\n public static readonly settingName = {\r\n databases: makeSettingName(\"databases\"),\r\n defaultDatabases: makeSettingName(\"default/databases\"),\r\n disableWorkspaces: makeSettingName(\"disableWorkspaces\"),\r\n };\r\n\r\n private static addGcsWorkspace(dbProps: GcsDbProps) {\r\n // override to disable loading GCS data from workspaces\r\n if (IModelHost.appWorkspace.settings.getBoolean(GeoCoordConfig.settingName.disableWorkspaces, false))\r\n return;\r\n\r\n try {\r\n const ws = IModelHost.appWorkspace;\r\n const container = ws.getContainer({ ...dbProps, accessToken: \"\" }); // all gcs containers are public so no accessToken is required\r\n const cloudContainer = container.cloudContainer;\r\n if (!cloudContainer?.isConnected) {\r\n Logger.logError(\"GeoCoord\", `could not load gcs database \"${dbProps.dbName}\"`);\r\n return;\r\n }\r\n\r\n const gcsDbName = container.resolveDbFileName(dbProps);\r\n const gcsDbProps = cloudContainer.queryDatabase(gcsDbName);\r\n if (undefined === gcsDbProps)\r\n throw new Error(`database \"${gcsDbName}\" not found in container \"${dbProps.containerId}\"`);\r\n\r\n if (!IModelNative.platform.addGcsWorkspaceDb(gcsDbName, cloudContainer, dbProps.priority))\r\n return; // already had this db\r\n\r\n Logger.logInfo(loggerCat, `loaded gcsDb \"${gcsDbName}\", from \"${dbProps.baseUri}/${dbProps.containerId}\" size=${gcsDbProps.totalBlocks}, local=${gcsDbProps.localBlocks}`);\r\n\r\n if (true === dbProps.prefetch)\r\n this.prefetches.push(CloudSqlite.startCloudPrefetch(cloudContainer, gcsDbName));\r\n\r\n } catch (e: any) {\r\n let msg = `Cannot load GCS workspace (${e.errorNumber}): ${BentleyError.getErrorMessage(e)}`;\r\n msg += `,container=${dbProps.baseUri}/${dbProps.containerId}, storage=${dbProps.storageType}, public=${dbProps.isPublic}, cacheDir=${IModelHost.cacheDir}`;\r\n Logger.logError(loggerCat, msg);\r\n }\r\n }\r\n\r\n private static loadAll(settings: Settings, settingName: string) {\r\n const dbProps = settings.getArray<GcsDbProps>(settingName);\r\n if (dbProps) {\r\n for (const entry of dbProps) {\r\n this.addGcsWorkspace(entry);\r\n }\r\n }\r\n }\r\n\r\n private static _defaultDbsLoaded = false;\r\n public static onStartup() {\r\n this._defaultDbsLoaded = false;\r\n this.prefetches.length = 0;\r\n }\r\n\r\n public static loadDefaultDatabases(): void {\r\n if (!this._defaultDbsLoaded) {\r\n this._defaultDbsLoaded = true;\r\n this.loadAll(IModelHost.appWorkspace.settings, this.settingName.defaultDatabases);\r\n }\r\n }\r\n\r\n public static loadForImodel(settings: Settings) {\r\n this.loadDefaultDatabases();\r\n this.loadAll(settings, this.settingName.databases);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"GeoCoordConfig.js","sourceRoot":"","sources":["../../src/GeoCoordConfig.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,SAAS,GAAG,UAAU,CAAC;AAM7B,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,GAAG,gBAAgB,IA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AChC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAC9B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,QAAkB;QAC5C,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC","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 iModels\n */\n\nimport { BentleyError, Logger } from \"@itwin/core-bentley\";\nimport { CloudSqlite } from \"./CloudSqlite\";\nimport { IModelHost } from \"./IModelHost\";\nimport { Settings } from \"./workspace/Settings\";\nimport { WorkspaceDbCloudProps } from \"./workspace/Workspace\";\nimport { IModelNative } from \"./internal/NativePlatform\";\n\nconst loggerCat = \"GeoCoord\";\n\n/** @internal */\nexport interface GcsDbProps extends WorkspaceDbCloudProps {\n priority?: number;\n}\nconst makeSettingName = (name: string) => `${\"itwin/core/gcs\"}/${name}`;\n\n/**\n * Internal class to configure and load the gcs workspaces for an iModel.\n * @internal\n */\nexport class GeoCoordConfig {\n /** array of cloud prefetch tasks that may be awaited to permit offline usage */\n public static readonly prefetches: CloudSqlite.CloudPrefetch[] = [];\n public static readonly settingName = {\n databases: makeSettingName(\"databases\"),\n defaultDatabases: makeSettingName(\"default/databases\"),\n disableWorkspaces: makeSettingName(\"disableWorkspaces\"),\n };\n\n private static addGcsWorkspace(dbProps: GcsDbProps) {\n // override to disable loading GCS data from workspaces\n if (IModelHost.appWorkspace.settings.getBoolean(GeoCoordConfig.settingName.disableWorkspaces, false))\n return;\n\n try {\n const ws = IModelHost.appWorkspace;\n const container = ws.getContainer({ ...dbProps, accessToken: \"\" }); // all gcs containers are public so no accessToken is required\n const cloudContainer = container.cloudContainer;\n if (!cloudContainer?.isConnected) {\n Logger.logError(\"GeoCoord\", `could not load gcs database \"${dbProps.dbName}\"`);\n return;\n }\n\n const gcsDbName = container.resolveDbFileName(dbProps);\n const gcsDbProps = cloudContainer.queryDatabase(gcsDbName);\n if (undefined === gcsDbProps)\n throw new Error(`database \"${gcsDbName}\" not found in container \"${dbProps.containerId}\"`);\n\n if (!IModelNative.platform.addGcsWorkspaceDb(gcsDbName, cloudContainer, dbProps.priority))\n return; // already had this db\n\n Logger.logInfo(loggerCat, `loaded gcsDb \"${gcsDbName}\", from \"${dbProps.baseUri}/${dbProps.containerId}\" size=${gcsDbProps.totalBlocks}, local=${gcsDbProps.localBlocks}`);\n\n if (true === dbProps.prefetch)\n this.prefetches.push(CloudSqlite.startCloudPrefetch(cloudContainer, gcsDbName));\n\n } catch (e: any) {\n let msg = `Cannot load GCS workspace (${e.errorNumber}): ${BentleyError.getErrorMessage(e)}`;\n msg += `,container=${dbProps.baseUri}/${dbProps.containerId}, storage=${dbProps.storageType}, public=${dbProps.isPublic}, cacheDir=${IModelHost.cacheDir}`;\n Logger.logError(loggerCat, msg);\n }\n }\n\n private static loadAll(settings: Settings, settingName: string) {\n const dbProps = settings.getArray<GcsDbProps>(settingName);\n if (dbProps) {\n for (const entry of dbProps) {\n this.addGcsWorkspace(entry);\n }\n }\n }\n\n private static _defaultDbsLoaded = false;\n public static onStartup() {\n this._defaultDbsLoaded = false;\n this.prefetches.length = 0;\n }\n\n public static loadDefaultDatabases(): void {\n if (!this._defaultDbsLoaded) {\n this._defaultDbsLoaded = true;\n this.loadAll(IModelHost.appWorkspace.settings, this.settingName.defaultDatabases);\n }\n }\n\n public static loadForImodel(settings: Settings) {\n this.loadDefaultDatabases();\n this.loadAll(settings, this.settingName.databases);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GeographicCRSServices.js","sourceRoot":"","sources":["../../src/GeographicCRSServices.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAqClD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,sCAAsC,CAAC,IAAgD;IAC3G,cAAc,CAAC,oBAAoB,EAAE,CAAC;IACtC,OAAO,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;AACxF,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { Range2dProps } from \"@itwin/core-geometry\";\r\nimport { IModelNative } from \"./internal/NativePlatform\";\r\nimport { GeoCoordConfig } from \"./GeoCoordConfig\";\r\n\r\n/** Describes a coordinate reference system produced by [[getAvailableCoordinateReferenceSystems]].\r\n * @beta\r\n */\r\nexport interface AvailableCoordinateReferenceSystemProps {\r\n /** The name of the coordinate reference system. It can be presented to the user in the UI as an identifier for the coordinate reference system. */\r\n name: string;\r\n /** The description of the coordinate reference system. It can be presented to the user in the UI as extra information for the coordinate reference system. */\r\n description: string;\r\n /** Indicate if the coordinate reference system is deprecated. A coordinate reference system is deprecated if it is no longer recommended for use.\r\n * A deprecated coordinate reference system can usually be substituted by a more accurate one. It is possible that an existing project uses a deprecated coordinate reference system.\r\n * However, for new projects, it is recommended to use a non-deprecated coordinate reference system.\r\n */\r\n deprecated: boolean;\r\n /** Extent of the coordinate reference system. This is the area where the coordinate reference system can be used.\r\n * Outside of this area, the coordinate reference system may not be accurate. The extent is defined by a range of longitude and latitude values.\r\n * Minimum longitude and latitude correspond to crsExtent.low.x and crsExtent.low.y, respectively.\r\n * Maximum longitude and latitude correspond to crsExtent.high.x and crsExtent.high.y, respectively.\r\n */\r\n crsExtent: Range2dProps;\r\n}\r\n\r\n/** Arguments supplied to [[getAvailableCoordinateReferenceSystems]].\r\n * @beta\r\n */\r\nexport interface GetAvailableCoordinateReferenceSystemsArgs {\r\n /** If provided, only return coordinate reference systems that contain the given extent. Minimum longitude and latitude correspond to extent.low.x and extent.low.y, respectively.\r\n * Maximum longitude and latitude correspond to extent.high.x and extent.high.y, respectively.\r\n */\r\n extent?: Range2dProps;\r\n /** If true, returns additional coordinate reference systems with extents spanning the entire Earth's surface.\r\n * @default false\r\n */\r\n includeWorld?: boolean\r\n}\r\n\r\n/** Get a list of Geographic Coordinate Reference Systems.\r\n * @param options Specifies the parameters to filter the returned list.\r\n * @returns The list of Geographic Coordinate Reference Systems, according to the supplied parameters.\r\n * @beta\r\n */\r\nexport async function getAvailableCoordinateReferenceSystems(args: GetAvailableCoordinateReferenceSystemsArgs): Promise<AvailableCoordinateReferenceSystemProps[]> {\r\n GeoCoordConfig.loadDefaultDatabases();\r\n return IModelNative.platform.GeoServices.getListOfCRS(args.extent, args.includeWorld);\r\n}\r\n"]}
1
+ {"version":3,"file":"GeographicCRSServices.js","sourceRoot":"","sources":["../../src/GeographicCRSServices.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAqClD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,sCAAsC,CAAC,IAAgD;IAC3G,cAAc,CAAC,oBAAoB,EAAE,CAAC;IACtC,OAAO,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;AACxF,CAAC","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 iModels\n */\n\nimport { Range2dProps } from \"@itwin/core-geometry\";\nimport { IModelNative } from \"./internal/NativePlatform\";\nimport { GeoCoordConfig } from \"./GeoCoordConfig\";\n\n/** Describes a coordinate reference system produced by [[getAvailableCoordinateReferenceSystems]].\n * @beta\n */\nexport interface AvailableCoordinateReferenceSystemProps {\n /** The name of the coordinate reference system. It can be presented to the user in the UI as an identifier for the coordinate reference system. */\n name: string;\n /** The description of the coordinate reference system. It can be presented to the user in the UI as extra information for the coordinate reference system. */\n description: string;\n /** Indicate if the coordinate reference system is deprecated. A coordinate reference system is deprecated if it is no longer recommended for use.\n * A deprecated coordinate reference system can usually be substituted by a more accurate one. It is possible that an existing project uses a deprecated coordinate reference system.\n * However, for new projects, it is recommended to use a non-deprecated coordinate reference system.\n */\n deprecated: boolean;\n /** Extent of the coordinate reference system. This is the area where the coordinate reference system can be used.\n * Outside of this area, the coordinate reference system may not be accurate. The extent is defined by a range of longitude and latitude values.\n * Minimum longitude and latitude correspond to crsExtent.low.x and crsExtent.low.y, respectively.\n * Maximum longitude and latitude correspond to crsExtent.high.x and crsExtent.high.y, respectively.\n */\n crsExtent: Range2dProps;\n}\n\n/** Arguments supplied to [[getAvailableCoordinateReferenceSystems]].\n * @beta\n */\nexport interface GetAvailableCoordinateReferenceSystemsArgs {\n /** If provided, only return coordinate reference systems that contain the given extent. Minimum longitude and latitude correspond to extent.low.x and extent.low.y, respectively.\n * Maximum longitude and latitude correspond to extent.high.x and extent.high.y, respectively.\n */\n extent?: Range2dProps;\n /** If true, returns additional coordinate reference systems with extents spanning the entire Earth's surface.\n * @default false\n */\n includeWorld?: boolean\n}\n\n/** Get a list of Geographic Coordinate Reference Systems.\n * @param options Specifies the parameters to filter the returned list.\n * @returns The list of Geographic Coordinate Reference Systems, according to the supplied parameters.\n * @beta\n */\nexport async function getAvailableCoordinateReferenceSystems(args: GetAvailableCoordinateReferenceSystemsArgs): Promise<AvailableCoordinateReferenceSystemProps[]> {\n GeoCoordConfig.loadDefaultDatabases();\n return IModelNative.platform.GeoServices.getListOfCRS(args.extent, args.includeWorld);\n}\n"]}
@@ -207,17 +207,17 @@ class ResponseGenerator {
207
207
  case "pointCollection":
208
208
  return `${summary} numPoints: ${query.points.length}`;
209
209
  case "bsurf":
210
- return `${summary}'
211
- ' poleDimension: ${query.poleDimension}'
212
- ' numPolesTotal: ${query.numPolesTotal()}'
213
- ' degree[U,V]: ${JSON.stringify([query.degreeUV(UVSelect.uDirection), query.degreeUV(UVSelect.vDirection)])}'
214
- ' order[U,V]: ${JSON.stringify([query.orderUV(UVSelect.uDirection), query.orderUV(UVSelect.vDirection)])}'
215
- ' numSpan[U,V]: ${JSON.stringify([query.numSpanUV(UVSelect.uDirection), query.numSpanUV(UVSelect.vDirection)])}'
216
- ' numPoles[U,V]: ${JSON.stringify([query.numPolesUV(UVSelect.uDirection), query.numPolesUV(UVSelect.vDirection)])}'
210
+ return `${summary}'
211
+ ' poleDimension: ${query.poleDimension}'
212
+ ' numPolesTotal: ${query.numPolesTotal()}'
213
+ ' degree[U,V]: ${JSON.stringify([query.degreeUV(UVSelect.uDirection), query.degreeUV(UVSelect.vDirection)])}'
214
+ ' order[U,V]: ${JSON.stringify([query.orderUV(UVSelect.uDirection), query.orderUV(UVSelect.vDirection)])}'
215
+ ' numSpan[U,V]: ${JSON.stringify([query.numSpanUV(UVSelect.uDirection), query.numSpanUV(UVSelect.vDirection)])}'
216
+ ' numPoles[U,V]: ${JSON.stringify([query.numPolesUV(UVSelect.uDirection), query.numPolesUV(UVSelect.vDirection)])}'
217
217
  ' poleStep[U,V]: ${JSON.stringify([query.poleStepUV(UVSelect.uDirection), query.poleStepUV(UVSelect.vDirection)])}`;
218
218
  case "polyface": {
219
219
  const data = query.data;
220
- summary = `${summary} pointCount: ${data.point.length}'
220
+ summary = `${summary} pointCount: ${data.point.length}'
221
221
  ' pointIndexCount: ${data.pointIndex.length}`;
222
222
  if (query.twoSided)
223
223
  summary = `${summary} (two-sided)`;
@@ -238,40 +238,40 @@ class ResponseGenerator {
238
238
  switch (solid.solidPrimitiveType) {
239
239
  case "box":
240
240
  const box = solid;
241
- return `${summary}'
242
- ' origin: ${JSON.stringify(box.getBaseOrigin().toJSON())}'
243
- ' topOrigin: ${JSON.stringify(box.getTopOrigin().toJSON())}'
244
- ' baseX: ${box.getBaseX()}'
241
+ return `${summary}'
242
+ ' origin: ${JSON.stringify(box.getBaseOrigin().toJSON())}'
243
+ ' topOrigin: ${JSON.stringify(box.getTopOrigin().toJSON())}'
244
+ ' baseX: ${box.getBaseX()}'
245
245
  ' baseY: ${box.getBaseY()}`;
246
246
  case "cone":
247
247
  const cone = solid;
248
- return `${summary}'
249
- ' baseCenterPoint: ${JSON.stringify(cone.getCenterA())}'
250
- ' topCenterPoint: ${JSON.stringify(cone.getCenterB())}'
251
- ' baseCenterRadius: ${JSON.stringify(cone.getRadiusA())}'
248
+ return `${summary}'
249
+ ' baseCenterPoint: ${JSON.stringify(cone.getCenterA())}'
250
+ ' topCenterPoint: ${JSON.stringify(cone.getCenterB())}'
251
+ ' baseCenterRadius: ${JSON.stringify(cone.getRadiusA())}'
252
252
  ' topCenterRadius: ${JSON.stringify(cone.getRadiusB())}`;
253
253
  case "sphere":
254
254
  const sphere = solid;
255
- return `${summary}'
256
- ' centerPoint: ${JSON.stringify(sphere.cloneCenter().toJSON())}'
255
+ return `${summary}'
256
+ ' centerPoint: ${JSON.stringify(sphere.cloneCenter().toJSON())}'
257
257
  ' radius: ${JSON.stringify(sphere.trueSphereRadius())}`;
258
258
  case "linearSweep":
259
259
  const linearSweep = solid;
260
- return `${summary}'
261
- ' vector: ${JSON.stringify(linearSweep.cloneSweepVector().toJSON())}'
260
+ return `${summary}'
261
+ ' vector: ${JSON.stringify(linearSweep.cloneSweepVector().toJSON())}'
262
262
  ' curves${this.summarizeCurveCollection(linearSweep.getCurvesRef())}`;
263
263
  case "rotationalSweep":
264
264
  const rotationalSweep = solid;
265
265
  const axis = rotationalSweep.cloneAxisRay();
266
- return `${summary}'
267
- ' center: ${JSON.stringify(axis.origin.toJSON())}'
268
- ' axis: ${JSON.stringify(axis.direction.toJSON())}'
266
+ return `${summary}'
267
+ ' center: ${JSON.stringify(axis.origin.toJSON())}'
268
+ ' axis: ${JSON.stringify(axis.direction.toJSON())}'
269
269
  ' sweepAngle: ${rotationalSweep.getSweep().degrees}`;
270
270
  case "ruledSweep":
271
271
  const ruledSweep = solid;
272
272
  const summarizedCollection = ruledSweep.cloneContours().map((curveCollection) => this.summarizeCurveCollection(curveCollection));
273
- return `${summary}'
274
- ' isClosedVolume${ruledSweep.isClosedVolume}'
273
+ return `${summary}'
274
+ ' isClosedVolume${ruledSweep.isClosedVolume}'
275
275
  ' contours: ${JSON.stringify(summarizedCollection)}`;
276
276
  case "torusPipe":
277
277
  const torusPipe = solid;
@@ -282,11 +282,11 @@ class ResponseGenerator {
282
282
  vectorY.scaleInPlace(-1.0);
283
283
  sweep.setRadians(-sweep.radians);
284
284
  }
285
- return `${summary}'
286
- ' center: ${JSON.stringify(torusPipe.cloneCenter().toJSON())}'
287
- ' xyVectors: ${JSON.stringify([vectorX.toJSON(), vectorY.toJSON()])}'
288
- ' majorRadius: ${torusPipe.getMajorRadius()}'
289
- ' minorRadius: ${torusPipe.getMinorRadius()}'
285
+ return `${summary}'
286
+ ' center: ${JSON.stringify(torusPipe.cloneCenter().toJSON())}'
287
+ ' xyVectors: ${JSON.stringify([vectorX.toJSON(), vectorY.toJSON()])}'
288
+ ' majorRadius: ${torusPipe.getMajorRadius()}'
289
+ ' minorRadius: ${torusPipe.getMinorRadius()}'
290
290
  ' sweepAngle: ${sweep.degrees}`;
291
291
  }
292
292
  }
@@ -299,9 +299,9 @@ class ResponseGenerator {
299
299
  summary = `${summary} center: ${JSON.stringify(arc.center.toJSON())}`;
300
300
  if (undefined !== arc.circularRadius)
301
301
  summary = `${summary} radius: ${arc.circularRadius()}`;
302
- summary = `${summary}'
303
- ' vectorX:${JSON.stringify(arc.vector0.toJSON())}'
304
- ' vectorY:${JSON.stringify(arc.vector90.toJSON())}'
302
+ summary = `${summary}'
303
+ ' vectorX:${JSON.stringify(arc.vector0.toJSON())}'
304
+ ' vectorY:${JSON.stringify(arc.vector90.toJSON())}'
305
305
  ' sweepStartEnd [${arc.sweep.startDegrees}, ${arc.sweep.endDegrees}]`
306
306
  + ` curveLength: ${curve.curveLength()}`;
307
307
  return summary;
@@ -312,34 +312,34 @@ class ResponseGenerator {
312
312
  return summary;
313
313
  case "lineString":
314
314
  const lineString = curve;
315
- summary = `${summary} pointCount: ${lineString.numPoints()}'
315
+ summary = `${summary} pointCount: ${lineString.numPoints()}'
316
316
  ' curveLength: ${curve.curveLength()}`;
317
317
  return summary;
318
318
  case "bsplineCurve":
319
319
  const bsplineCurve = curve;
320
- summary = `${summary}'
321
- ' curveOrder: ${bsplineCurve.order}'
322
- ' controlPointsCount: ${bsplineCurve.numPoles}'
320
+ summary = `${summary}'
321
+ ' curveOrder: ${bsplineCurve.order}'
322
+ ' controlPointsCount: ${bsplineCurve.numPoles}'
323
323
  ' curveLength: ${curve.curveLength()}`;
324
324
  return summary;
325
325
  case "interpolationCurve":
326
326
  const interpolationCurve = curve;
327
327
  const interpolationProps = interpolationCurve.cloneProps();
328
- summary = `${summary}'
329
- ' curveOrder: ${interpolationProps.order}'
328
+ summary = `${summary}'
329
+ ' curveOrder: ${interpolationProps.order}'
330
330
  ' controlPointsCount: ${interpolationProps.fitPoints.length}`;
331
331
  return summary;
332
332
  case "akimaCurve":
333
333
  const akimaCurve = curve;
334
334
  const akimaProps = akimaCurve.cloneProps();
335
- summary = `${summary}'
335
+ summary = `${summary}'
336
336
  ' controlPointsCount: ${akimaProps.fitPoints.length}`;
337
337
  return summary;
338
338
  case "bezierCurve":
339
339
  const bezierCurve = curve;
340
- summary = `${summary}'
341
- ' curveOrder: ${bezierCurve.order}'
342
- ' controlPointsCount: ${bezierCurve.numPoles}'
340
+ summary = `${summary}'
341
+ ' curveOrder: ${bezierCurve.order}'
342
+ ' controlPointsCount: ${bezierCurve.numPoles}'
343
343
  ' curveLength: ${curve.curveLength()}`;
344
344
  return summary;
345
345
  case "transitionSpiral":
@@ -350,8 +350,8 @@ class ResponseGenerator {
350
350
  case "curveChainWithDistanceIndex":
351
351
  const curveChainWithDistanceIndex = curve;
352
352
  const path = curveChainWithDistanceIndex.path;
353
- summary = `${summary}'
354
- ' curveLength: ${curve.curveLength()}'
353
+ summary = `${summary}'
354
+ ' curveLength: ${curve.curveLength()}'
355
355
  ' isOpen: ${path.isOpenPath}`;
356
356
  return summary;
357
357
  }
@@ -368,8 +368,8 @@ class ResponseGenerator {
368
368
  summary = `${summary} isOpen: ${path.isOpenPath}`;
369
369
  break;
370
370
  }
371
- return `${summary}'
372
- ' numCurves: ${curves.collectCurvePrimitives().length}'
371
+ return `${summary}'
372
+ ' numCurves: ${curves.collectCurvePrimitives().length}'
373
373
  ' boundary: ${curves.dgnBoundaryType()}`;
374
374
  }
375
375
  }