@itwin/core-backend 5.5.0-dev.2 → 5.5.0-dev.5
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.
- package/CHANGELOG.md +19 -1
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BlobContainerService.js.map +1 -1
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CatalogDb.js.map +1 -1
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangeSummaryManager.js +2 -2
- package/lib/cjs/ChangeSummaryManager.js.map +1 -1
- package/lib/cjs/ChangedElementsDb.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +248 -248
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.js +5 -5
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CodeService.js.map +1 -1
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/ElementGraphics.js.map +1 -1
- package/lib/cjs/ElementTreeWalker.js.map +1 -1
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/EntityReferences.js.map +1 -1
- package/lib/cjs/ExportGraphics.js.map +1 -1
- package/lib/cjs/ExternalSource.js.map +1 -1
- package/lib/cjs/FontFile.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/GeographicCRSServices.js.map +1 -1
- package/lib/cjs/GeometrySummary.js +47 -47
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/IModelDb.js +8 -8
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelDbFonts.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/cjs/IModelJsFs.js.map +1 -1
- package/lib/cjs/ImageSourceConversion.js.map +1 -1
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LineStyle.js.map +1 -1
- package/lib/cjs/LocalHub.js +1 -1
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/LockControl.js.map +1 -1
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/NativeAppStorage.js.map +1 -1
- package/lib/cjs/NativeHost.js.map +1 -1
- package/lib/cjs/NavigationRelationship.js.map +1 -1
- package/lib/cjs/PromiseMemoizer.js.map +1 -1
- package/lib/cjs/PropertyStore.js.map +1 -1
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/RpcBackend.js.map +1 -1
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/Schema.js.map +1 -1
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SchemaUtils.js.map +1 -1
- package/lib/cjs/SheetIndex.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/StashManager.js.map +1 -1
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TileStorage.js.map +1 -1
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/ViewStateHydrator.js.map +1 -1
- package/lib/cjs/ViewStore.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
- package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
- package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
- package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
- package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
- package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
- package/lib/cjs/domains/GenericElements.js.map +1 -1
- package/lib/cjs/domains/GenericSchema.js.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
- package/lib/cjs/internal/FontFileImpl.js.map +1 -1
- package/lib/cjs/internal/HubMock.js.map +1 -1
- package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/cjs/internal/NativePlatform.js.map +1 -1
- package/lib/cjs/internal/NoLocks.js.map +1 -1
- package/lib/cjs/internal/OnlineStatus.js.map +1 -1
- package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
- package/lib/cjs/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/annotations/fields.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/cjs/rpc/multipart.js.map +1 -1
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc/web/logging.js.map +1 -1
- package/lib/cjs/rpc/web/request.js.map +1 -1
- package/lib/cjs/rpc/web/response.js.map +1 -1
- package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
- package/lib/esm/BackendHubAccess.js.map +1 -1
- package/lib/esm/BackendLoggerCategory.js.map +1 -1
- package/lib/esm/BisCoreSchema.js.map +1 -1
- package/lib/esm/BlobContainerService.js.map +1 -1
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/CatalogDb.js.map +1 -1
- package/lib/esm/Category.js.map +1 -1
- package/lib/esm/ChangeSummaryManager.js +2 -2
- package/lib/esm/ChangeSummaryManager.js.map +1 -1
- package/lib/esm/ChangedElementsDb.js.map +1 -1
- package/lib/esm/ChangesetECAdaptor.js +248 -248
- package/lib/esm/ChangesetECAdaptor.js.map +1 -1
- package/lib/esm/ChannelControl.js.map +1 -1
- package/lib/esm/CheckpointManager.js.map +1 -1
- package/lib/esm/ClassRegistry.js +5 -5
- package/lib/esm/ClassRegistry.js.map +1 -1
- package/lib/esm/CloudSqlite.js.map +1 -1
- package/lib/esm/CodeService.js.map +1 -1
- package/lib/esm/CodeSpecs.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/CustomViewState3dCreator.js.map +1 -1
- package/lib/esm/DevTools.js.map +1 -1
- package/lib/esm/DisplayStyle.js.map +1 -1
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/ECSchemaXmlContext.js.map +1 -1
- package/lib/esm/ECSqlStatement.js.map +1 -1
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/ElementAspect.js.map +1 -1
- package/lib/esm/ElementGraphics.js.map +1 -1
- package/lib/esm/ElementTreeWalker.js.map +1 -1
- package/lib/esm/Entity.js.map +1 -1
- package/lib/esm/EntityReferences.js.map +1 -1
- package/lib/esm/ExportGraphics.js.map +1 -1
- package/lib/esm/ExternalSource.js.map +1 -1
- package/lib/esm/FontFile.js.map +1 -1
- package/lib/esm/GeoCoordConfig.js.map +1 -1
- package/lib/esm/GeographicCRSServices.js.map +1 -1
- package/lib/esm/GeometrySummary.js +47 -47
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/IModelDb.js +8 -8
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelDbFonts.js.map +1 -1
- package/lib/esm/IModelElementCloneContext.js.map +1 -1
- package/lib/esm/IModelHost.js.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/esm/IModelJsFs.js.map +1 -1
- package/lib/esm/ImageSourceConversion.js.map +1 -1
- package/lib/esm/IpcHost.js.map +1 -1
- package/lib/esm/LineStyle.js.map +1 -1
- package/lib/esm/LocalHub.js +1 -1
- package/lib/esm/LocalHub.js.map +1 -1
- package/lib/esm/LocalhostIpcHost.js.map +1 -1
- package/lib/esm/LockControl.js.map +1 -1
- package/lib/esm/Material.js.map +1 -1
- package/lib/esm/Model.js.map +1 -1
- package/lib/esm/NativeAppStorage.js.map +1 -1
- package/lib/esm/NativeHost.js.map +1 -1
- package/lib/esm/NavigationRelationship.js.map +1 -1
- package/lib/esm/PromiseMemoizer.js.map +1 -1
- package/lib/esm/PropertyStore.js.map +1 -1
- package/lib/esm/Relationship.js.map +1 -1
- package/lib/esm/RpcBackend.js.map +1 -1
- package/lib/esm/SQLiteDb.js.map +1 -1
- package/lib/esm/Schema.js.map +1 -1
- package/lib/esm/SchemaSync.js.map +1 -1
- package/lib/esm/SchemaUtils.js.map +1 -1
- package/lib/esm/SheetIndex.js.map +1 -1
- package/lib/esm/SqliteChangesetReader.js.map +1 -1
- package/lib/esm/SqliteStatement.js.map +1 -1
- package/lib/esm/StashManager.js.map +1 -1
- package/lib/esm/Texture.js.map +1 -1
- package/lib/esm/TileStorage.js.map +1 -1
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/ViewDefinition.js.map +1 -1
- package/lib/esm/ViewStateHydrator.js.map +1 -1
- package/lib/esm/ViewStore.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/esm/annotations/FrameGeometry.js.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
- package/lib/esm/core-backend.js.map +1 -1
- package/lib/esm/domains/FunctionalElements.js.map +1 -1
- package/lib/esm/domains/FunctionalSchema.js.map +1 -1
- package/lib/esm/domains/GenericElements.js.map +1 -1
- package/lib/esm/domains/GenericSchema.js.map +1 -1
- package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/esm/internal/ChannelAdmin.js.map +1 -1
- package/lib/esm/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/internal/FontFileImpl.js.map +1 -1
- package/lib/esm/internal/HubMock.js.map +1 -1
- package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/esm/internal/NativePlatform.js.map +1 -1
- package/lib/esm/internal/NoLocks.js.map +1 -1
- package/lib/esm/internal/OnlineStatus.js.map +1 -1
- package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
- package/lib/esm/internal/Symbols.js.map +1 -1
- package/lib/esm/internal/annotations/fields.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/esm/rpc/multipart.js.map +1 -1
- package/lib/esm/rpc/tracing.js.map +1 -1
- package/lib/esm/rpc/web/logging.js.map +1 -1
- package/lib/esm/rpc/web/request.js.map +1 -1
- package/lib/esm/rpc/web/response.js.map +1 -1
- package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/esm/test/AdvancedEqual.js.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
- package/lib/esm/test/AttachDb.test.js +11 -11
- package/lib/esm/test/AttachDb.test.js.map +1 -1
- package/lib/esm/test/ElementDrivesElement.test.js +23 -23
- package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
- package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
- package/lib/esm/test/GeometryTestUtil.js.map +1 -1
- package/lib/esm/test/IModelHost.test.js.map +1 -1
- package/lib/esm/test/IModelTestUtils.js.map +1 -1
- package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
- package/lib/esm/test/IpcHost.test.js.map +1 -1
- package/lib/esm/test/KnownTestLocations.js.map +1 -1
- package/lib/esm/test/PrintElementTree.js.map +1 -1
- package/lib/esm/test/PropertyDb.test.js.map +1 -1
- package/lib/esm/test/RevisionUtility.js.map +1 -1
- package/lib/esm/test/SchemaUtils.test.js +25 -25
- package/lib/esm/test/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
- package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
- package/lib/esm/test/TestUtils.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.js +53 -53
- package/lib/esm/test/annotations/Fields.test.js.map +1 -1
- package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +5 -5
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
- package/lib/esm/test/categories/Category.test.js.map +1 -1
- package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
- package/lib/esm/test/ecdb/CTE.test.js +88 -88
- package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js +15 -15
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDb.test.js +72 -72
- package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
- package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
- package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlReader.test.js +16 -16
- package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -332
- package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
- package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
- package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
- package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
- package/lib/esm/test/element/ElementAspect.test.js +22 -22
- package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
- package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
- package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
- package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
- package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
- package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
- package/lib/esm/test/element/NullStructArray.test.js +13 -13
- package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
- package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
- package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
- package/lib/esm/test/element/UrlLink.test.js.map +1 -1
- package/lib/esm/test/font/FontFile.test.js.map +1 -1
- package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js +32 -32
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
- package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
- package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
- package/lib/esm/test/hubaccess/Rebase.test.js +40 -40
- package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
- package/lib/esm/test/imageData.js.map +1 -1
- package/lib/esm/test/imodel/Code.test.js.map +1 -1
- package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
- package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
- package/lib/esm/test/imodel/IModel.test.js +44 -44
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
- package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +432 -198
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +272 -190
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/TestContext.d.ts +27 -0
- package/lib/esm/test/incrementalSchemaLocater/TestContext.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/TestContext.js +136 -0
- package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -0
- package/lib/esm/test/index.js.map +1 -1
- package/lib/esm/test/misc/DevTools.test.js.map +1 -1
- package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
- package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
- package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
- package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
- package/lib/esm/test/rpc/response.test.js.map +1 -1
- package/lib/esm/test/schema/ClassRegistry.test.js +99 -99
- package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
- package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
- package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
- package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
- package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +346 -127
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
- package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
- package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
- package/lib/esm/test/standalone/ExportGraphics.test.js +14 -14
- package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
- package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
- package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
- package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
- package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
- package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
- package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
- package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
- package/lib/esm/test/standalone/Setting.test.js.map +1 -1
- package/lib/esm/test/standalone/Settings.test.js.map +1 -1
- package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Texture.test.js.map +1 -1
- package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
- package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
- package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
- package/lib/esm/workspace/Settings.js.map +1 -1
- package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
- package/lib/esm/workspace/Workspace.js.map +1 -1
- package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
- package/package.json +14 -14
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts +0 -11
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js +0 -36
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +0 -20
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +0 -126
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +0 -24
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +0 -67
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportGraphics.js","sourceRoot":"","sources":["../../src/ExportGraphics.ts"],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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;AAtED,0EAsEC","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
|
+
{"version":3,"file":"ExportGraphics.js","sourceRoot":"","sources":["../../src/ExportGraphics.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoE;AACpE,wDAAgG;AAkQhG;;GAEG;AACH,IAAiB,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,GAAG,CAAC,eAAe;YAC7C,OAAO,KAAK,CAAC;QACf,IAAI,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS;YACjC,OAAO,KAAK,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IAZe,uCAAwB,2BAYvC,CAAA;IAED;;;;OAIG;IACH,SAAgB,wBAAwB,CAAC,IAAwB;QAC/D,MAAM,QAAQ,GAAG,+BAAe,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAA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CAAC;YACvC,IAAI,CAAC,gBAAgB,GAAG,WAAW,GAAG,CAAC,CAAC;YACxC,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD;;;OAGG;IACa,eAAe;QAC7B,IAAI,IAAI,CAAC,gBAAgB,KAAK,IAAI,CAAC,mBAAmB;YACpD,OAAO,IAAI,CAAC,eAAe,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;AAtED,0EAsEC","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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalSource.js","sourceRoot":"","sources":["../../src/ExternalSource.ts"],"names":[],"mappings":";AACA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAA+C;AAC/C,oDAG4B;AAC5B,uCAAiE;AAEjE,qEAAgH;AAEhH;;;GAGG;AACH,MAAa,cAAe,SAAQ,qCAA2B;IAC7D,wDAAwD;IACjD,UAAU,CAAgC;IACjD,2EAA2E;IACpE,aAAa,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QACrB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,yBAAW,CAAC,wBAAwB,EAAE,2BAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3G,CAAC;IACH,CAAC;IACD;;;;;OAKG;IACI,MAAM,CAAC,UAAU,CAAC,QAAkB,EAAE,cAA0B,EAAE,SAAiB;QACxF,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,yBAAW,CAAC,wBAAwB,CAAC,CAAC;QACpF,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAClF,CAAC;CACF;AApDD,4DAoDC;AAED;;;GAGG;AACH,MAAa,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;AAPD,kDAOC;AAED;;;GAGG;AACH,MAAa,yBAA0B,SAAQ,iBAAO;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;AAbD,8DAaC","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
|
+
{"version":3,"file":"ExternalSource.js","sourceRoot":"","sources":["../../src/ExternalSource.ts"],"names":[],"mappings":";AACA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAA+C;AAC/C,oDAG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;AAbD,8DAaC","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"]}
|
package/lib/cjs/FontFile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontFile.js","sourceRoot":"","sources":["../../src/FontFile.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,gDAA2F;AAC3F,0DAAiH;AAyDjH,YAAY;AACZ,IAAiB,QAAQ,CAmBxB;AAnBD,WAAiB,QAAQ;IACvB;;OAEG;IACH,SAAgB,0BAA0B,CAAC,QAAuB;QAChE,OAAO,IAAA,2CAA4B,EAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAFe,mCAA0B,6BAEzC,CAAA;IAED,+FAA+F;IAC/F,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;IAED;;OAEG;IACH,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;AACH,CAAC,EAnBgB,QAAQ,wBAAR,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
|
+
{"version":3,"file":"FontFile.js","sourceRoot":"","sources":["../../src/FontFile.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,gDAA2F;AAC3F,0DAAiH;AAyDjH,YAAY;AACZ,IAAiB,QAAQ,CAmBxB;AAnBD,WAAiB,QAAQ;IACvB;;OAEG;IACH,SAAgB,0BAA0B,CAAC,QAAuB;QAChE,OAAO,IAAA,2CAA4B,EAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAFe,mCAA0B,6BAEzC,CAAA;IAED,+FAA+F;IAC/F,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;IAED;;OAEG;IACH,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;AACH,CAAC,EAnBgB,QAAQ,wBAAR,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoCoordConfig.js","sourceRoot":"","sources":["../../src/GeoCoordConfig.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2D;AAC3D,+CAA4C;AAC5C,6CAA0C;AAG1C,8DAAyD;AAEzD,MAAM,SAAS,GAAG,UAAU,CAAC;AAM7B,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,GAAG,gBAAgB,IAAI,IAAI,EAAE,CAAC;AAExE;;;GAGG;AACH,MAAa,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,eA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,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;;AApEH,wCAqEC","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
|
+
{"version":3,"file":"GeoCoordConfig.js","sourceRoot":"","sources":["../../src/GeoCoordConfig.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2D;AAC3D,+CAA4C;AAC5C,6CAA0C;AAG1C,8DAAyD;AAEzD,MAAM,SAAS,GAAG,UAAU,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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,uBAAU,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;;AApEH,wCAqEC","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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeographicCRSServices.js","sourceRoot":"","sources":["../../src/GeographicCRSServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA8CH,wFAGC;AA9CD,8DAAyD;AACzD,qDAAkD;AAqClD;;;;GAIG;AACI,KAAK,UAAU,sCAAsC,CAAC,IAAgD;IAC3G,+BAAc,CAAC,oBAAoB,EAAE,CAAC;IACtC,OAAO,6BAAY,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"]}
|
|
1
|
+
{"version":3,"file":"GeographicCRSServices.js","sourceRoot":"","sources":["../../src/GeographicCRSServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA8CH,wFAGC;AA9CD,8DAAyD;AACzD,qDAAkD;AAqClD;;;;GAIG;AACI,KAAK,UAAU,sCAAsC,CAAC,IAAgD;IAC3G,+BAAc,CAAC,oBAAoB,EAAE,CAAC;IACtC,OAAO,6BAAY,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"]}
|
|
@@ -210,17 +210,17 @@ class ResponseGenerator {
|
|
|
210
210
|
case "pointCollection":
|
|
211
211
|
return `${summary} numPoints: ${query.points.length}`;
|
|
212
212
|
case "bsurf":
|
|
213
|
-
return `${summary}'
|
|
214
|
-
' poleDimension: ${query.poleDimension}'
|
|
215
|
-
' numPolesTotal: ${query.numPolesTotal()}'
|
|
216
|
-
' degree[U,V]: ${JSON.stringify([query.degreeUV(core_geometry_1.UVSelect.uDirection), query.degreeUV(core_geometry_1.UVSelect.vDirection)])}'
|
|
217
|
-
' order[U,V]: ${JSON.stringify([query.orderUV(core_geometry_1.UVSelect.uDirection), query.orderUV(core_geometry_1.UVSelect.vDirection)])}'
|
|
218
|
-
' numSpan[U,V]: ${JSON.stringify([query.numSpanUV(core_geometry_1.UVSelect.uDirection), query.numSpanUV(core_geometry_1.UVSelect.vDirection)])}'
|
|
219
|
-
' numPoles[U,V]: ${JSON.stringify([query.numPolesUV(core_geometry_1.UVSelect.uDirection), query.numPolesUV(core_geometry_1.UVSelect.vDirection)])}'
|
|
213
|
+
return `${summary}'
|
|
214
|
+
' poleDimension: ${query.poleDimension}'
|
|
215
|
+
' numPolesTotal: ${query.numPolesTotal()}'
|
|
216
|
+
' degree[U,V]: ${JSON.stringify([query.degreeUV(core_geometry_1.UVSelect.uDirection), query.degreeUV(core_geometry_1.UVSelect.vDirection)])}'
|
|
217
|
+
' order[U,V]: ${JSON.stringify([query.orderUV(core_geometry_1.UVSelect.uDirection), query.orderUV(core_geometry_1.UVSelect.vDirection)])}'
|
|
218
|
+
' numSpan[U,V]: ${JSON.stringify([query.numSpanUV(core_geometry_1.UVSelect.uDirection), query.numSpanUV(core_geometry_1.UVSelect.vDirection)])}'
|
|
219
|
+
' numPoles[U,V]: ${JSON.stringify([query.numPolesUV(core_geometry_1.UVSelect.uDirection), query.numPolesUV(core_geometry_1.UVSelect.vDirection)])}'
|
|
220
220
|
' poleStep[U,V]: ${JSON.stringify([query.poleStepUV(core_geometry_1.UVSelect.uDirection), query.poleStepUV(core_geometry_1.UVSelect.vDirection)])}`;
|
|
221
221
|
case "polyface": {
|
|
222
222
|
const data = query.data;
|
|
223
|
-
summary = `${summary} pointCount: ${data.point.length}'
|
|
223
|
+
summary = `${summary} pointCount: ${data.point.length}'
|
|
224
224
|
' pointIndexCount: ${data.pointIndex.length}`;
|
|
225
225
|
if (query.twoSided)
|
|
226
226
|
summary = `${summary} (two-sided)`;
|
|
@@ -241,40 +241,40 @@ class ResponseGenerator {
|
|
|
241
241
|
switch (solid.solidPrimitiveType) {
|
|
242
242
|
case "box":
|
|
243
243
|
const box = solid;
|
|
244
|
-
return `${summary}'
|
|
245
|
-
' origin: ${JSON.stringify(box.getBaseOrigin().toJSON())}'
|
|
246
|
-
' topOrigin: ${JSON.stringify(box.getTopOrigin().toJSON())}'
|
|
247
|
-
' baseX: ${box.getBaseX()}'
|
|
244
|
+
return `${summary}'
|
|
245
|
+
' origin: ${JSON.stringify(box.getBaseOrigin().toJSON())}'
|
|
246
|
+
' topOrigin: ${JSON.stringify(box.getTopOrigin().toJSON())}'
|
|
247
|
+
' baseX: ${box.getBaseX()}'
|
|
248
248
|
' baseY: ${box.getBaseY()}`;
|
|
249
249
|
case "cone":
|
|
250
250
|
const cone = solid;
|
|
251
|
-
return `${summary}'
|
|
252
|
-
' baseCenterPoint: ${JSON.stringify(cone.getCenterA())}'
|
|
253
|
-
' topCenterPoint: ${JSON.stringify(cone.getCenterB())}'
|
|
254
|
-
' baseCenterRadius: ${JSON.stringify(cone.getRadiusA())}'
|
|
251
|
+
return `${summary}'
|
|
252
|
+
' baseCenterPoint: ${JSON.stringify(cone.getCenterA())}'
|
|
253
|
+
' topCenterPoint: ${JSON.stringify(cone.getCenterB())}'
|
|
254
|
+
' baseCenterRadius: ${JSON.stringify(cone.getRadiusA())}'
|
|
255
255
|
' topCenterRadius: ${JSON.stringify(cone.getRadiusB())}`;
|
|
256
256
|
case "sphere":
|
|
257
257
|
const sphere = solid;
|
|
258
|
-
return `${summary}'
|
|
259
|
-
' centerPoint: ${JSON.stringify(sphere.cloneCenter().toJSON())}'
|
|
258
|
+
return `${summary}'
|
|
259
|
+
' centerPoint: ${JSON.stringify(sphere.cloneCenter().toJSON())}'
|
|
260
260
|
' radius: ${JSON.stringify(sphere.trueSphereRadius())}`;
|
|
261
261
|
case "linearSweep":
|
|
262
262
|
const linearSweep = solid;
|
|
263
|
-
return `${summary}'
|
|
264
|
-
' vector: ${JSON.stringify(linearSweep.cloneSweepVector().toJSON())}'
|
|
263
|
+
return `${summary}'
|
|
264
|
+
' vector: ${JSON.stringify(linearSweep.cloneSweepVector().toJSON())}'
|
|
265
265
|
' curves${this.summarizeCurveCollection(linearSweep.getCurvesRef())}`;
|
|
266
266
|
case "rotationalSweep":
|
|
267
267
|
const rotationalSweep = solid;
|
|
268
268
|
const axis = rotationalSweep.cloneAxisRay();
|
|
269
|
-
return `${summary}'
|
|
270
|
-
' center: ${JSON.stringify(axis.origin.toJSON())}'
|
|
271
|
-
' axis: ${JSON.stringify(axis.direction.toJSON())}'
|
|
269
|
+
return `${summary}'
|
|
270
|
+
' center: ${JSON.stringify(axis.origin.toJSON())}'
|
|
271
|
+
' axis: ${JSON.stringify(axis.direction.toJSON())}'
|
|
272
272
|
' sweepAngle: ${rotationalSweep.getSweep().degrees}`;
|
|
273
273
|
case "ruledSweep":
|
|
274
274
|
const ruledSweep = solid;
|
|
275
275
|
const summarizedCollection = ruledSweep.cloneContours().map((curveCollection) => this.summarizeCurveCollection(curveCollection));
|
|
276
|
-
return `${summary}'
|
|
277
|
-
' isClosedVolume${ruledSweep.isClosedVolume}'
|
|
276
|
+
return `${summary}'
|
|
277
|
+
' isClosedVolume${ruledSweep.isClosedVolume}'
|
|
278
278
|
' contours: ${JSON.stringify(summarizedCollection)}`;
|
|
279
279
|
case "torusPipe":
|
|
280
280
|
const torusPipe = solid;
|
|
@@ -285,11 +285,11 @@ class ResponseGenerator {
|
|
|
285
285
|
vectorY.scaleInPlace(-1.0);
|
|
286
286
|
sweep.setRadians(-sweep.radians);
|
|
287
287
|
}
|
|
288
|
-
return `${summary}'
|
|
289
|
-
' center: ${JSON.stringify(torusPipe.cloneCenter().toJSON())}'
|
|
290
|
-
' xyVectors: ${JSON.stringify([vectorX.toJSON(), vectorY.toJSON()])}'
|
|
291
|
-
' majorRadius: ${torusPipe.getMajorRadius()}'
|
|
292
|
-
' minorRadius: ${torusPipe.getMinorRadius()}'
|
|
288
|
+
return `${summary}'
|
|
289
|
+
' center: ${JSON.stringify(torusPipe.cloneCenter().toJSON())}'
|
|
290
|
+
' xyVectors: ${JSON.stringify([vectorX.toJSON(), vectorY.toJSON()])}'
|
|
291
|
+
' majorRadius: ${torusPipe.getMajorRadius()}'
|
|
292
|
+
' minorRadius: ${torusPipe.getMinorRadius()}'
|
|
293
293
|
' sweepAngle: ${sweep.degrees}`;
|
|
294
294
|
}
|
|
295
295
|
}
|
|
@@ -302,9 +302,9 @@ class ResponseGenerator {
|
|
|
302
302
|
summary = `${summary} center: ${JSON.stringify(arc.center.toJSON())}`;
|
|
303
303
|
if (undefined !== arc.circularRadius)
|
|
304
304
|
summary = `${summary} radius: ${arc.circularRadius()}`;
|
|
305
|
-
summary = `${summary}'
|
|
306
|
-
' vectorX:${JSON.stringify(arc.vector0.toJSON())}'
|
|
307
|
-
' vectorY:${JSON.stringify(arc.vector90.toJSON())}'
|
|
305
|
+
summary = `${summary}'
|
|
306
|
+
' vectorX:${JSON.stringify(arc.vector0.toJSON())}'
|
|
307
|
+
' vectorY:${JSON.stringify(arc.vector90.toJSON())}'
|
|
308
308
|
' sweepStartEnd [${arc.sweep.startDegrees}, ${arc.sweep.endDegrees}]`
|
|
309
309
|
+ ` curveLength: ${curve.curveLength()}`;
|
|
310
310
|
return summary;
|
|
@@ -315,34 +315,34 @@ class ResponseGenerator {
|
|
|
315
315
|
return summary;
|
|
316
316
|
case "lineString":
|
|
317
317
|
const lineString = curve;
|
|
318
|
-
summary = `${summary} pointCount: ${lineString.numPoints()}'
|
|
318
|
+
summary = `${summary} pointCount: ${lineString.numPoints()}'
|
|
319
319
|
' curveLength: ${curve.curveLength()}`;
|
|
320
320
|
return summary;
|
|
321
321
|
case "bsplineCurve":
|
|
322
322
|
const bsplineCurve = curve;
|
|
323
|
-
summary = `${summary}'
|
|
324
|
-
' curveOrder: ${bsplineCurve.order}'
|
|
325
|
-
' controlPointsCount: ${bsplineCurve.numPoles}'
|
|
323
|
+
summary = `${summary}'
|
|
324
|
+
' curveOrder: ${bsplineCurve.order}'
|
|
325
|
+
' controlPointsCount: ${bsplineCurve.numPoles}'
|
|
326
326
|
' curveLength: ${curve.curveLength()}`;
|
|
327
327
|
return summary;
|
|
328
328
|
case "interpolationCurve":
|
|
329
329
|
const interpolationCurve = curve;
|
|
330
330
|
const interpolationProps = interpolationCurve.cloneProps();
|
|
331
|
-
summary = `${summary}'
|
|
332
|
-
' curveOrder: ${interpolationProps.order}'
|
|
331
|
+
summary = `${summary}'
|
|
332
|
+
' curveOrder: ${interpolationProps.order}'
|
|
333
333
|
' controlPointsCount: ${interpolationProps.fitPoints.length}`;
|
|
334
334
|
return summary;
|
|
335
335
|
case "akimaCurve":
|
|
336
336
|
const akimaCurve = curve;
|
|
337
337
|
const akimaProps = akimaCurve.cloneProps();
|
|
338
|
-
summary = `${summary}'
|
|
338
|
+
summary = `${summary}'
|
|
339
339
|
' controlPointsCount: ${akimaProps.fitPoints.length}`;
|
|
340
340
|
return summary;
|
|
341
341
|
case "bezierCurve":
|
|
342
342
|
const bezierCurve = curve;
|
|
343
|
-
summary = `${summary}'
|
|
344
|
-
' curveOrder: ${bezierCurve.order}'
|
|
345
|
-
' controlPointsCount: ${bezierCurve.numPoles}'
|
|
343
|
+
summary = `${summary}'
|
|
344
|
+
' curveOrder: ${bezierCurve.order}'
|
|
345
|
+
' controlPointsCount: ${bezierCurve.numPoles}'
|
|
346
346
|
' curveLength: ${curve.curveLength()}`;
|
|
347
347
|
return summary;
|
|
348
348
|
case "transitionSpiral":
|
|
@@ -353,8 +353,8 @@ class ResponseGenerator {
|
|
|
353
353
|
case "curveChainWithDistanceIndex":
|
|
354
354
|
const curveChainWithDistanceIndex = curve;
|
|
355
355
|
const path = curveChainWithDistanceIndex.path;
|
|
356
|
-
summary = `${summary}'
|
|
357
|
-
' curveLength: ${curve.curveLength()}'
|
|
356
|
+
summary = `${summary}'
|
|
357
|
+
' curveLength: ${curve.curveLength()}'
|
|
358
358
|
' isOpen: ${path.isOpenPath}`;
|
|
359
359
|
return summary;
|
|
360
360
|
}
|
|
@@ -371,8 +371,8 @@ class ResponseGenerator {
|
|
|
371
371
|
summary = `${summary} isOpen: ${path.isOpenPath}`;
|
|
372
372
|
break;
|
|
373
373
|
}
|
|
374
|
-
return `${summary}'
|
|
375
|
-
' numCurves: ${curves.collectCurvePrimitives().length}'
|
|
374
|
+
return `${summary}'
|
|
375
|
+
' numCurves: ${curves.collectCurvePrimitives().length}'
|
|
376
376
|
' boundary: ${curves.dgnBoundaryType()}`;
|
|
377
377
|
}
|
|
378
378
|
}
|