@itwin/core-backend 5.5.0-dev.13 → 5.5.0-dev.15

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.
@@ -72,7 +72,7 @@ export interface DisplayStyleCreationOptions extends Omit<DisplayStyle3dSettings
72
72
  backgroundColor?: ColorDef | number;
73
73
  }
74
74
  /** A DisplayStyle for 3d views.
75
- * See [how to create a DisplayStyle3d]$(docs/learning/backend/CreateElements.md#DisplayStyle3d).
75
+ * See [how to create a DisplayStyle3d]($docs/learning/backend/CreateElements.md#DisplayStyle3d).
76
76
  * @public @preview
77
77
  */
78
78
  export declare class DisplayStyle3d extends DisplayStyle {
@@ -178,7 +178,7 @@ export class DisplayStyle2d extends DisplayStyle {
178
178
  }
179
179
  }
180
180
  /** A DisplayStyle for 3d views.
181
- * See [how to create a DisplayStyle3d]$(docs/learning/backend/CreateElements.md#DisplayStyle3d).
181
+ * See [how to create a DisplayStyle3d]($docs/learning/backend/CreateElements.md#DisplayStyle3d).
182
182
  * @public @preview
183
183
  */
184
184
  export class DisplayStyle3d extends DisplayStyle {
@@ -1 +1 @@
1
- {"version":3,"file":"DisplayStyle.js","sourceRoot":"","sources":["../../src/DisplayStyle.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAyB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1G,OAAO,EACL,WAAW,EAAE,IAAI,EAA4B,QAAQ,EAAuB,sBAAsB,EAC/E,oBAAoB,EAAiF,cAAc,EAAoB,SAAS,GACpK,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAK9D;;;;GAIG;AACH,MAAM,OAAgB,YAAa,SAAQ,iBAAiB;IACnD,MAAM,KAAc,SAAS,KAAa,OAAO,cAAc,CAAC,CAAC,CAAC;IAGzE,YAAsB,KAAwB,EAA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,CAAC,MAAM,CAAC,QAAkB,EAAE,iBAA6B,EAAE,IAAY,EAAE,OAAqC;QACzH,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7E,OAAO,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;IAChE,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ViewDefinitions\r\n */\r\n\r\nimport { CompressedId64Set, Id64, Id64Array, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\r\nimport {\r\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, ColorDef, DisplayStyle3dProps, DisplayStyle3dSettings, DisplayStyle3dSettingsProps,\r\n DisplayStyleProps, DisplayStyleSettings, DisplayStyleSubCategoryProps, EntityReferenceSet, PlanProjectionSettingsProps, RenderSchedule, SkyBoxImageProps, ViewFlags,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement, RenderTimeline } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\nimport { DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\r\n\r\n/** A DisplayStyle defines the parameters for 'styling' the contents of a view.\r\n * Internally a DisplayStyle consists of a dictionary of several named 'styles' describing specific aspects of the display style as a whole.\r\n * Many ViewDefinitions may share the same DisplayStyle.\r\n * @public @preview\r\n */\r\nexport abstract class DisplayStyle extends DefinitionElement {\r\n public static override get className(): string { return \"DisplayStyle\"; }\r\n public abstract get settings(): DisplayStyleSettings;\r\n\r\n protected constructor(props: DisplayStyleProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** @beta */\r\n public static override deserialize(props: DeserializeEntityArgs): DisplayStyleProps {\r\n const elProps = super.deserialize(props) as DisplayStyleProps;\r\n const displayOptions = props.options?.element?.displayStyle;\r\n // Uncompress excludedElements if they are compressed\r\n if (!displayOptions?.compressExcludedElementIds && elProps.jsonProperties?.styles?.excludedElements) {\r\n const excludedElements = elProps.jsonProperties.styles.excludedElements;\r\n if (typeof excludedElements === \"string\" && excludedElements.startsWith(\"+\")) {\r\n const ids: string[] = [];\r\n CompressedId64Set.decompressSet(excludedElements).forEach((id: string) => {\r\n ids.push(id);\r\n });\r\n elProps.jsonProperties.styles.excludedElements = ids;\r\n }\r\n }\r\n // Omit Schedule Script Element Ids if the option is set\r\n if (displayOptions?.omitScheduleScriptElementIds && elProps.jsonProperties?.styles?.scheduleScript) {\r\n const scheduleScript: RenderSchedule.ScriptProps = elProps.jsonProperties.styles.scheduleScript;\r\n elProps.jsonProperties.styles.scheduleScript = RenderSchedule.Script.removeScheduleScriptElementIds(scheduleScript);\r\n }\r\n return elProps;\r\n }\r\n\r\n /** @beta */\r\n public static override serialize(props: DisplayStyleProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n return inst;\r\n }\r\n\r\n /** Create a Code for a DisplayStyle given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the DisplayStyle and provides the scope for its name.\r\n * @param codeValue The DisplayStyle name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.displayStyle);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n for (const [id] of this.settings.subCategoryOverrides) {\r\n referenceIds.addElement(id);\r\n }\r\n\r\n for (const excludedElementId of this.settings.excludedElementIds)\r\n referenceIds.addElement(excludedElementId);\r\n\r\n if (this.settings.renderTimeline) {\r\n referenceIds.addElement(this.settings.renderTimeline);\r\n } else {\r\n const script = this.loadScheduleScript();\r\n if (script)\r\n script.script.discloseIds(referenceIds);\r\n }\r\n }\r\n\r\n /** @alpha */\r\n protected static override async onCloned(context: IModelElementCloneContext, sourceElementProps: DisplayStyleProps, targetElementProps: DisplayStyleProps): Promise<void> {\r\n await super.onCloned(context, sourceElementProps, targetElementProps);\r\n\r\n if (!context.isBetweenIModels || !targetElementProps.jsonProperties?.styles)\r\n return;\r\n\r\n const settings = targetElementProps.jsonProperties.styles;\r\n if (settings.subCategoryOvr) {\r\n const targetOverrides: DisplayStyleSubCategoryProps[] = [];\r\n for (const ovr of settings.subCategoryOvr) {\r\n ovr.subCategory;\r\n const targetSubCategoryId = context.findTargetElementId(Id64.fromJSON(ovr.subCategory));\r\n if (Id64.isValid(targetSubCategoryId))\r\n targetOverrides.push({...ovr, subCategory: targetSubCategoryId});\r\n }\r\n settings.subCategoryOvr = targetOverrides;\r\n }\r\n\r\n if (settings.excludedElements) {\r\n const excluded: Id64Array = \"string\" === typeof settings.excludedElements ? CompressedId64Set.decompressArray(settings.excludedElements) : settings.excludedElements;\r\n const excludedTargetElements: Id64Array = [];\r\n for (const excludedElement of excluded) {\r\n const remapped = context.findTargetElementId(excludedElement);\r\n if (Id64.isValid(remapped))\r\n excludedTargetElements.push(remapped);\r\n }\r\n\r\n if (0 === excludedTargetElements.length)\r\n delete settings.excludedElements;\r\n else\r\n settings.excludedElements = CompressedId64Set.compressIds(OrderedId64Iterable.sortArray(excludedTargetElements));\r\n }\r\n\r\n if (settings.renderTimeline) {\r\n const renderTimeline = context.findTargetElementId(settings.renderTimeline);\r\n if (Id64.isValid(renderTimeline))\r\n settings.renderTimeline = renderTimeline;\r\n else\r\n delete settings.renderTimeline;\r\n } else if (settings.scheduleScript) {\r\n const scheduleScript = RenderTimeline.remapScript(context, settings.scheduleScript);\r\n if (scheduleScript.length > 0)\r\n settings.scheduleScript = scheduleScript;\r\n else\r\n delete settings.scheduleScript;\r\n }\r\n }\r\n\r\n public loadScheduleScript(): RenderSchedule.ScriptReference | undefined {\r\n let script;\r\n let sourceId;\r\n if (this.settings.renderTimeline) {\r\n const timeline = this.iModel.elements.tryGetElement<RenderTimeline>(this.settings.renderTimeline);\r\n if (timeline) {\r\n script = RenderSchedule.Script.fromJSON(timeline.scriptProps);\r\n sourceId = timeline.id;\r\n }\r\n } else if (this.settings.scheduleScriptProps) {\r\n script = RenderSchedule.Script.fromJSON(this.settings.scheduleScriptProps);\r\n sourceId = this.id;\r\n }\r\n\r\n return undefined !== sourceId && undefined !== script ? new RenderSchedule.ScriptReference(sourceId, script) : undefined;\r\n }\r\n}\r\n\r\n/** A DisplayStyle for 2d views.\r\n * @public @preview\r\n */\r\nexport class DisplayStyle2d extends DisplayStyle {\r\n public static override get className(): string { return \"DisplayStyle2d\"; }\r\n private readonly _settings: DisplayStyleSettings;\r\n\r\n public get settings(): DisplayStyleSettings { return this._settings; }\r\n\r\n protected constructor(props: DisplayStyleProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this._settings = new DisplayStyleSettings(this.jsonProperties);\r\n }\r\n /** Create a DisplayStyle2d for use by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the DisplayStyle2d\r\n * @returns The newly constructed DisplayStyle2d element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string): DisplayStyle2d {\r\n const displayStyleProps: DisplayStyleProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n isPrivate: false,\r\n jsonProperties: {\r\n styles: {\r\n backgroundColor: 0,\r\n monochromeColor: ColorDef.white.toJSON(),\r\n viewflags: ViewFlags.defaults,\r\n },\r\n },\r\n };\r\n return new DisplayStyle2d(displayStyleProps, iModelDb);\r\n }\r\n /** Insert a DisplayStyle2d for use by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DisplayStyle2d into this DefinitionModel\r\n * @param name The name of the DisplayStyle2d\r\n * @returns The Id of the newly inserted DisplayStyle2d element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string): Id64String {\r\n const displayStyle = this.create(iModelDb, definitionModelId, name);\r\n return iModelDb.elements.insertElement(displayStyle.toJSON());\r\n }\r\n}\r\n\r\n/** Describes initial settings for a new [[DisplayStyle3d]].\r\n * Most properties are inherited from [DisplayStyle3dSettingsProps]($common), but for backwards compatibility reasons, this interface is slightly awkward:\r\n * - It adds a `viewFlags` member that differs only in case and type from [DisplayStyleSettingsProps.viewflags]($common); and\r\n * - It extends the type of [DisplayStyleSettingsProps.backgroundColor]($common) to include [ColorDef]($common).\r\n * These idiosyncrasies will be addressed in a future version of core-backend.\r\n * @see [[DisplayStyle3d.create]].\r\n * @public @preview\r\n */\r\nexport interface DisplayStyleCreationOptions extends Omit<DisplayStyle3dSettingsProps, \"backgroundColor\" | \"scheduleScript\"> {\r\n /** If supplied, the [ViewFlags]($common) applied by the display style.\r\n * If undefined, [DisplayStyle3dSettingsProps.viewflags]($common) will be used if present (note the difference in case); otherwise, default-constructed [ViewFlags]($common) will be used.\r\n */\r\n viewFlags?: ViewFlags;\r\n backgroundColor?: ColorDef | number;\r\n}\r\n\r\n/** A DisplayStyle for 3d views.\r\n * See [how to create a DisplayStyle3d]$(docs/learning/backend/CreateElements.md#DisplayStyle3d).\r\n * @public @preview\r\n */\r\nexport class DisplayStyle3d extends DisplayStyle {\r\n public static override get className(): string { return \"DisplayStyle3d\"; }\r\n private readonly _settings: DisplayStyle3dSettings;\r\n\r\n public get settings(): DisplayStyle3dSettings { return this._settings; }\r\n\r\n protected constructor(props: DisplayStyle3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this._settings = new DisplayStyle3dSettings(this.jsonProperties);\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n for (const textureId of this.settings.environment.sky.textureIds)\r\n referenceIds.addElement(textureId);\r\n\r\n if (this.settings.planProjectionSettings)\r\n for (const planProjectionSetting of this.settings.planProjectionSettings)\r\n referenceIds.addElement(planProjectionSetting[0]);\r\n\r\n const groups = this.settings.contours.groups;\r\n for (const group of groups) {\r\n const subCategories = group.subCategories;\r\n for (const subCategoryId of subCategories) {\r\n referenceIds.addElement(subCategoryId);\r\n }\r\n }\r\n }\r\n\r\n /** @alpha */\r\n protected static override async onCloned(context: IModelElementCloneContext, sourceElementProps: DisplayStyle3dProps, targetElementProps: DisplayStyle3dProps): Promise<void> {\r\n await super.onCloned(context, sourceElementProps, targetElementProps);\r\n if (context.isBetweenIModels) {\r\n const convertTexture = (id: string) => Id64.isValidId64(id) ? context.findTargetElementId(id) : id;\r\n\r\n const skyBoxImageProps: SkyBoxImageProps | undefined = targetElementProps?.jsonProperties?.styles?.environment?.sky?.image;\r\n if (skyBoxImageProps?.texture && Id64.isValidId64(skyBoxImageProps.texture))\r\n skyBoxImageProps.texture = convertTexture(skyBoxImageProps.texture);\r\n\r\n if (skyBoxImageProps?.textures) {\r\n skyBoxImageProps.textures.front = convertTexture(skyBoxImageProps.textures.front);\r\n skyBoxImageProps.textures.back = convertTexture(skyBoxImageProps.textures.back);\r\n skyBoxImageProps.textures.left = convertTexture(skyBoxImageProps.textures.left);\r\n skyBoxImageProps.textures.right = convertTexture(skyBoxImageProps.textures.right);\r\n skyBoxImageProps.textures.top = convertTexture(skyBoxImageProps.textures.top);\r\n skyBoxImageProps.textures.bottom = convertTexture(skyBoxImageProps.textures.bottom);\r\n }\r\n\r\n if (targetElementProps?.jsonProperties?.styles?.planProjections) {\r\n const remappedPlanProjections: { [modelId: string]: PlanProjectionSettingsProps } = {};\r\n for (const entry of Object.entries(targetElementProps.jsonProperties.styles.planProjections)) {\r\n const remappedModelId: Id64String = context.findTargetElementId(entry[0]);\r\n if (Id64.isValidId64(remappedModelId)) {\r\n remappedPlanProjections[remappedModelId] = entry[1];\r\n }\r\n }\r\n targetElementProps.jsonProperties.styles.planProjections = remappedPlanProjections;\r\n }\r\n\r\n const groups = targetElementProps?.jsonProperties?.styles?.contours?.groups;\r\n if (groups) {\r\n for (const group of groups) {\r\n if (group.subCategories) {\r\n const subCategories = CompressedId64Set.decompressArray(group.subCategories);\r\n const remappedSubCategories: Id64String[] = [];\r\n for (const subCategoryId of subCategories) {\r\n const remappedSubCategoryId: Id64String = context.findTargetElementId(subCategoryId);\r\n if (Id64.isValidId64(remappedSubCategoryId)) {\r\n remappedSubCategories.push(remappedSubCategoryId);\r\n }\r\n }\r\n group.subCategories = CompressedId64Set.sortAndCompress(remappedSubCategories);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Create a DisplayStyle3d for use by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the DisplayStyle3d\r\n * @returns The newly constructed DisplayStyle3d element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, options?: DisplayStyleCreationOptions): DisplayStyle3d {\r\n options = options ?? {};\r\n let viewflags = options.viewFlags?.toJSON();\r\n if (!viewflags)\r\n viewflags = options.viewflags ?? new ViewFlags().toJSON();\r\n\r\n const backgroundColor = options.backgroundColor instanceof ColorDef ? options.backgroundColor.toJSON() : options.backgroundColor;\r\n\r\n const settings: DisplayStyle3dSettingsProps = {\r\n ...options,\r\n viewflags,\r\n backgroundColor,\r\n };\r\n\r\n const displayStyleProps: DisplayStyle3dProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n jsonProperties: { styles: settings },\r\n isPrivate: false,\r\n\r\n };\r\n\r\n return new DisplayStyle3d(displayStyleProps, iModelDb);\r\n }\r\n /**\r\n * Insert a DisplayStyle3d for use by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DisplayStyle3d into this [[DefinitionModel]]\r\n * @param name The name of the DisplayStyle3d\r\n * @returns The Id of the newly inserted DisplayStyle3d element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, options?: DisplayStyleCreationOptions): Id64String {\r\n const displayStyle = this.create(iModelDb, definitionModelId, name, options);\r\n return iModelDb.elements.insertElement(displayStyle.toJSON());\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"DisplayStyle.js","sourceRoot":"","sources":["../../src/DisplayStyle.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAyB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1G,OAAO,EACL,WAAW,EAAE,IAAI,EAA4B,QAAQ,EAAuB,sBAAsB,EAC/E,oBAAoB,EAAiF,cAAc,EAAoB,SAAS,GACpK,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAK9D;;;;GAIG;AACH,MAAM,OAAgB,YAAa,SAAQ,iBAAiB;IACnD,MAAM,KAAc,SAAS,KAAa,OAAO,cAAc,CAAC,CAAC,CAAC;IAGzE,YAAsB,KAAwB,EAAE,MAAgB;QAC9D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,YAAY;IACL,MAAM,CAAU,WAAW,CAAC,KAA4B;QAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,CAAsB,CAAC;QAC9D,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC;QAC5D,qDAAq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ACF","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 ViewDefinitions\r\n */\r\n\r\nimport { CompressedId64Set, Id64, Id64Array, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\r\nimport {\r\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, ColorDef, DisplayStyle3dProps, DisplayStyle3dSettings, DisplayStyle3dSettingsProps,\r\n DisplayStyleProps, DisplayStyleSettings, DisplayStyleSubCategoryProps, EntityReferenceSet, PlanProjectionSettingsProps, RenderSchedule, SkyBoxImageProps, ViewFlags,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement, RenderTimeline } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\nimport { DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\r\n\r\n/** A DisplayStyle defines the parameters for 'styling' the contents of a view.\r\n * Internally a DisplayStyle consists of a dictionary of several named 'styles' describing specific aspects of the display style as a whole.\r\n * Many ViewDefinitions may share the same DisplayStyle.\r\n * @public @preview\r\n */\r\nexport abstract class DisplayStyle extends DefinitionElement {\r\n public static override get className(): string { return \"DisplayStyle\"; }\r\n public abstract get settings(): DisplayStyleSettings;\r\n\r\n protected constructor(props: DisplayStyleProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** @beta */\r\n public static override deserialize(props: DeserializeEntityArgs): DisplayStyleProps {\r\n const elProps = super.deserialize(props) as DisplayStyleProps;\r\n const displayOptions = props.options?.element?.displayStyle;\r\n // Uncompress excludedElements if they are compressed\r\n if (!displayOptions?.compressExcludedElementIds && elProps.jsonProperties?.styles?.excludedElements) {\r\n const excludedElements = elProps.jsonProperties.styles.excludedElements;\r\n if (typeof excludedElements === \"string\" && excludedElements.startsWith(\"+\")) {\r\n const ids: string[] = [];\r\n CompressedId64Set.decompressSet(excludedElements).forEach((id: string) => {\r\n ids.push(id);\r\n });\r\n elProps.jsonProperties.styles.excludedElements = ids;\r\n }\r\n }\r\n // Omit Schedule Script Element Ids if the option is set\r\n if (displayOptions?.omitScheduleScriptElementIds && elProps.jsonProperties?.styles?.scheduleScript) {\r\n const scheduleScript: RenderSchedule.ScriptProps = elProps.jsonProperties.styles.scheduleScript;\r\n elProps.jsonProperties.styles.scheduleScript = RenderSchedule.Script.removeScheduleScriptElementIds(scheduleScript);\r\n }\r\n return elProps;\r\n }\r\n\r\n /** @beta */\r\n public static override serialize(props: DisplayStyleProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n return inst;\r\n }\r\n\r\n /** Create a Code for a DisplayStyle given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the DisplayStyle and provides the scope for its name.\r\n * @param codeValue The DisplayStyle name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.displayStyle);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n for (const [id] of this.settings.subCategoryOverrides) {\r\n referenceIds.addElement(id);\r\n }\r\n\r\n for (const excludedElementId of this.settings.excludedElementIds)\r\n referenceIds.addElement(excludedElementId);\r\n\r\n if (this.settings.renderTimeline) {\r\n referenceIds.addElement(this.settings.renderTimeline);\r\n } else {\r\n const script = this.loadScheduleScript();\r\n if (script)\r\n script.script.discloseIds(referenceIds);\r\n }\r\n }\r\n\r\n /** @alpha */\r\n protected static override async onCloned(context: IModelElementCloneContext, sourceElementProps: DisplayStyleProps, targetElementProps: DisplayStyleProps): Promise<void> {\r\n await super.onCloned(context, sourceElementProps, targetElementProps);\r\n\r\n if (!context.isBetweenIModels || !targetElementProps.jsonProperties?.styles)\r\n return;\r\n\r\n const settings = targetElementProps.jsonProperties.styles;\r\n if (settings.subCategoryOvr) {\r\n const targetOverrides: DisplayStyleSubCategoryProps[] = [];\r\n for (const ovr of settings.subCategoryOvr) {\r\n ovr.subCategory;\r\n const targetSubCategoryId = context.findTargetElementId(Id64.fromJSON(ovr.subCategory));\r\n if (Id64.isValid(targetSubCategoryId))\r\n targetOverrides.push({...ovr, subCategory: targetSubCategoryId});\r\n }\r\n settings.subCategoryOvr = targetOverrides;\r\n }\r\n\r\n if (settings.excludedElements) {\r\n const excluded: Id64Array = \"string\" === typeof settings.excludedElements ? CompressedId64Set.decompressArray(settings.excludedElements) : settings.excludedElements;\r\n const excludedTargetElements: Id64Array = [];\r\n for (const excludedElement of excluded) {\r\n const remapped = context.findTargetElementId(excludedElement);\r\n if (Id64.isValid(remapped))\r\n excludedTargetElements.push(remapped);\r\n }\r\n\r\n if (0 === excludedTargetElements.length)\r\n delete settings.excludedElements;\r\n else\r\n settings.excludedElements = CompressedId64Set.compressIds(OrderedId64Iterable.sortArray(excludedTargetElements));\r\n }\r\n\r\n if (settings.renderTimeline) {\r\n const renderTimeline = context.findTargetElementId(settings.renderTimeline);\r\n if (Id64.isValid(renderTimeline))\r\n settings.renderTimeline = renderTimeline;\r\n else\r\n delete settings.renderTimeline;\r\n } else if (settings.scheduleScript) {\r\n const scheduleScript = RenderTimeline.remapScript(context, settings.scheduleScript);\r\n if (scheduleScript.length > 0)\r\n settings.scheduleScript = scheduleScript;\r\n else\r\n delete settings.scheduleScript;\r\n }\r\n }\r\n\r\n public loadScheduleScript(): RenderSchedule.ScriptReference | undefined {\r\n let script;\r\n let sourceId;\r\n if (this.settings.renderTimeline) {\r\n const timeline = this.iModel.elements.tryGetElement<RenderTimeline>(this.settings.renderTimeline);\r\n if (timeline) {\r\n script = RenderSchedule.Script.fromJSON(timeline.scriptProps);\r\n sourceId = timeline.id;\r\n }\r\n } else if (this.settings.scheduleScriptProps) {\r\n script = RenderSchedule.Script.fromJSON(this.settings.scheduleScriptProps);\r\n sourceId = this.id;\r\n }\r\n\r\n return undefined !== sourceId && undefined !== script ? new RenderSchedule.ScriptReference(sourceId, script) : undefined;\r\n }\r\n}\r\n\r\n/** A DisplayStyle for 2d views.\r\n * @public @preview\r\n */\r\nexport class DisplayStyle2d extends DisplayStyle {\r\n public static override get className(): string { return \"DisplayStyle2d\"; }\r\n private readonly _settings: DisplayStyleSettings;\r\n\r\n public get settings(): DisplayStyleSettings { return this._settings; }\r\n\r\n protected constructor(props: DisplayStyleProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this._settings = new DisplayStyleSettings(this.jsonProperties);\r\n }\r\n /** Create a DisplayStyle2d for use by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the DisplayStyle2d\r\n * @returns The newly constructed DisplayStyle2d element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string): DisplayStyle2d {\r\n const displayStyleProps: DisplayStyleProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n isPrivate: false,\r\n jsonProperties: {\r\n styles: {\r\n backgroundColor: 0,\r\n monochromeColor: ColorDef.white.toJSON(),\r\n viewflags: ViewFlags.defaults,\r\n },\r\n },\r\n };\r\n return new DisplayStyle2d(displayStyleProps, iModelDb);\r\n }\r\n /** Insert a DisplayStyle2d for use by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DisplayStyle2d into this DefinitionModel\r\n * @param name The name of the DisplayStyle2d\r\n * @returns The Id of the newly inserted DisplayStyle2d element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string): Id64String {\r\n const displayStyle = this.create(iModelDb, definitionModelId, name);\r\n return iModelDb.elements.insertElement(displayStyle.toJSON());\r\n }\r\n}\r\n\r\n/** Describes initial settings for a new [[DisplayStyle3d]].\r\n * Most properties are inherited from [DisplayStyle3dSettingsProps]($common), but for backwards compatibility reasons, this interface is slightly awkward:\r\n * - It adds a `viewFlags` member that differs only in case and type from [DisplayStyleSettingsProps.viewflags]($common); and\r\n * - It extends the type of [DisplayStyleSettingsProps.backgroundColor]($common) to include [ColorDef]($common).\r\n * These idiosyncrasies will be addressed in a future version of core-backend.\r\n * @see [[DisplayStyle3d.create]].\r\n * @public @preview\r\n */\r\nexport interface DisplayStyleCreationOptions extends Omit<DisplayStyle3dSettingsProps, \"backgroundColor\" | \"scheduleScript\"> {\r\n /** If supplied, the [ViewFlags]($common) applied by the display style.\r\n * If undefined, [DisplayStyle3dSettingsProps.viewflags]($common) will be used if present (note the difference in case); otherwise, default-constructed [ViewFlags]($common) will be used.\r\n */\r\n viewFlags?: ViewFlags;\r\n backgroundColor?: ColorDef | number;\r\n}\r\n\r\n/** A DisplayStyle for 3d views.\r\n * See [how to create a DisplayStyle3d]($docs/learning/backend/CreateElements.md#DisplayStyle3d).\r\n * @public @preview\r\n */\r\nexport class DisplayStyle3d extends DisplayStyle {\r\n public static override get className(): string { return \"DisplayStyle3d\"; }\r\n private readonly _settings: DisplayStyle3dSettings;\r\n\r\n public get settings(): DisplayStyle3dSettings { return this._settings; }\r\n\r\n protected constructor(props: DisplayStyle3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this._settings = new DisplayStyle3dSettings(this.jsonProperties);\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n for (const textureId of this.settings.environment.sky.textureIds)\r\n referenceIds.addElement(textureId);\r\n\r\n if (this.settings.planProjectionSettings)\r\n for (const planProjectionSetting of this.settings.planProjectionSettings)\r\n referenceIds.addElement(planProjectionSetting[0]);\r\n\r\n const groups = this.settings.contours.groups;\r\n for (const group of groups) {\r\n const subCategories = group.subCategories;\r\n for (const subCategoryId of subCategories) {\r\n referenceIds.addElement(subCategoryId);\r\n }\r\n }\r\n }\r\n\r\n /** @alpha */\r\n protected static override async onCloned(context: IModelElementCloneContext, sourceElementProps: DisplayStyle3dProps, targetElementProps: DisplayStyle3dProps): Promise<void> {\r\n await super.onCloned(context, sourceElementProps, targetElementProps);\r\n if (context.isBetweenIModels) {\r\n const convertTexture = (id: string) => Id64.isValidId64(id) ? context.findTargetElementId(id) : id;\r\n\r\n const skyBoxImageProps: SkyBoxImageProps | undefined = targetElementProps?.jsonProperties?.styles?.environment?.sky?.image;\r\n if (skyBoxImageProps?.texture && Id64.isValidId64(skyBoxImageProps.texture))\r\n skyBoxImageProps.texture = convertTexture(skyBoxImageProps.texture);\r\n\r\n if (skyBoxImageProps?.textures) {\r\n skyBoxImageProps.textures.front = convertTexture(skyBoxImageProps.textures.front);\r\n skyBoxImageProps.textures.back = convertTexture(skyBoxImageProps.textures.back);\r\n skyBoxImageProps.textures.left = convertTexture(skyBoxImageProps.textures.left);\r\n skyBoxImageProps.textures.right = convertTexture(skyBoxImageProps.textures.right);\r\n skyBoxImageProps.textures.top = convertTexture(skyBoxImageProps.textures.top);\r\n skyBoxImageProps.textures.bottom = convertTexture(skyBoxImageProps.textures.bottom);\r\n }\r\n\r\n if (targetElementProps?.jsonProperties?.styles?.planProjections) {\r\n const remappedPlanProjections: { [modelId: string]: PlanProjectionSettingsProps } = {};\r\n for (const entry of Object.entries(targetElementProps.jsonProperties.styles.planProjections)) {\r\n const remappedModelId: Id64String = context.findTargetElementId(entry[0]);\r\n if (Id64.isValidId64(remappedModelId)) {\r\n remappedPlanProjections[remappedModelId] = entry[1];\r\n }\r\n }\r\n targetElementProps.jsonProperties.styles.planProjections = remappedPlanProjections;\r\n }\r\n\r\n const groups = targetElementProps?.jsonProperties?.styles?.contours?.groups;\r\n if (groups) {\r\n for (const group of groups) {\r\n if (group.subCategories) {\r\n const subCategories = CompressedId64Set.decompressArray(group.subCategories);\r\n const remappedSubCategories: Id64String[] = [];\r\n for (const subCategoryId of subCategories) {\r\n const remappedSubCategoryId: Id64String = context.findTargetElementId(subCategoryId);\r\n if (Id64.isValidId64(remappedSubCategoryId)) {\r\n remappedSubCategories.push(remappedSubCategoryId);\r\n }\r\n }\r\n group.subCategories = CompressedId64Set.sortAndCompress(remappedSubCategories);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Create a DisplayStyle3d for use by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the DisplayStyle3d\r\n * @returns The newly constructed DisplayStyle3d element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, options?: DisplayStyleCreationOptions): DisplayStyle3d {\r\n options = options ?? {};\r\n let viewflags = options.viewFlags?.toJSON();\r\n if (!viewflags)\r\n viewflags = options.viewflags ?? new ViewFlags().toJSON();\r\n\r\n const backgroundColor = options.backgroundColor instanceof ColorDef ? options.backgroundColor.toJSON() : options.backgroundColor;\r\n\r\n const settings: DisplayStyle3dSettingsProps = {\r\n ...options,\r\n viewflags,\r\n backgroundColor,\r\n };\r\n\r\n const displayStyleProps: DisplayStyle3dProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n jsonProperties: { styles: settings },\r\n isPrivate: false,\r\n\r\n };\r\n\r\n return new DisplayStyle3d(displayStyleProps, iModelDb);\r\n }\r\n /**\r\n * Insert a DisplayStyle3d for use by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DisplayStyle3d into this [[DefinitionModel]]\r\n * @param name The name of the DisplayStyle3d\r\n * @returns The Id of the newly inserted DisplayStyle3d element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, options?: DisplayStyleCreationOptions): Id64String {\r\n const displayStyle = this.create(iModelDb, definitionModelId, name, options);\r\n return iModelDb.elements.insertElement(displayStyle.toJSON());\r\n }\r\n}\r\n"]}
@@ -11,7 +11,6 @@ import { IModelElementCloneContext } from "./IModelElementCloneContext";
11
11
  import { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from "./Entity";
12
12
  /** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.
13
13
  * @see [ModelSelectorState]($frontend)
14
- * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).
15
14
  * @public @preview
16
15
  */
17
16
  export declare class ModelSelector extends DefinitionElement {
@@ -62,7 +61,7 @@ export declare class ModelSelector extends DefinitionElement {
62
61
  }
63
62
  /** Holds a list of Ids of Categories to be displayed in a view.
64
63
  * @see [CategorySelectorState]($frontend)
65
- * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).
64
+ * See [how to create a CategorySelector]($docs/learning/backend/CreateElements.md#CategorySelector).
66
65
  * @public @preview
67
66
  */
68
67
  export declare class CategorySelector extends DefinitionElement {
@@ -291,7 +290,7 @@ export declare class SpatialViewDefinition extends ViewDefinition3d {
291
290
  static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView?: StandardViewIndex, cameraAngle?: number): Id64String;
292
291
  }
293
292
  /** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.
294
- * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).
293
+ * See [how to create a OrthographicViewDefinition]($docs/learning/backend/CreateElements.md#OrthographicViewDefinition).
295
294
  * @public @preview
296
295
  */
297
296
  export declare class OrthographicViewDefinition extends SpatialViewDefinition {
@@ -1 +1 @@
1
- {"version":3,"file":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,MAAM,CAA+B;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;gBACF,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,QAAQ;IAQjE;;;;OAIG;WACW,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;CAIlG;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,WAA2B,SAAS,IAAI,MAAM,CAAoC;IAClF;;;;OAIG;WACoB,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;CAI3G;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IACpD,WAA2B,SAAS,IAAI,MAAM,CAA6B;IACpE,IAAI,EAAE,cAAc,CAAC;gBACT,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ;cAK5C,mBAAmB,CAAC,YAAY,EAAE,kBAAkB,GAAG,IAAI;CAI/E;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IACvD,WAA2B,SAAS,IAAI,MAAM,CAA4B;IAC1E,iDAAiD;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAEzB,SAAS,aAAa,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,QAAQ;CAIlE"}
@@ -11,7 +11,6 @@ import { BisCodeSpec, Camera, Code, ConcreteEntityTypes, IModelError, RelatedEle
11
11
  import { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from "./Element";
12
12
  /** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.
13
13
  * @see [ModelSelectorState]($frontend)
14
- * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).
15
14
  * @public @preview
16
15
  */
17
16
  export class ModelSelector extends DefinitionElement {
@@ -102,7 +101,7 @@ export class ModelSelector extends DefinitionElement {
102
101
  }
103
102
  /** Holds a list of Ids of Categories to be displayed in a view.
104
103
  * @see [CategorySelectorState]($frontend)
105
- * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).
104
+ * See [how to create a CategorySelector]($docs/learning/backend/CreateElements.md#CategorySelector).
106
105
  * @public @preview
107
106
  */
108
107
  export class CategorySelector extends DefinitionElement {
@@ -527,7 +526,7 @@ export class SpatialViewDefinition extends ViewDefinition3d {
527
526
  }
528
527
  }
529
528
  /** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.
530
- * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).
529
+ * See [how to create a OrthographicViewDefinition]($docs/learning/backend/CreateElements.md#OrthographicViewDefinition).
531
530
  * @public @preview
532
531
  */
533
532
  export class OrthographicViewDefinition extends SpatialViewDefinition {
@@ -1 +1 @@
1
- {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAyB,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrG,OAAO,EACL,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAoB,iBAAiB,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,GAChH,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAC8D,WAAW,EAAE,MAAM,EAAyB,IAAI,EACzG,mBAAmB,EAAsB,WAAW,EAA0C,cAAc,EACF,WAAW,EAC/H,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAA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,0GAA0G;IAC5G,CAAC;IACkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,sBAAsB;IAChD,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAC1E,iDAAiD;IAC1C,OAAO,CAAW;IAEzB,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;CACF","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 ViewDefinitions\r\n */\r\n\r\nimport { DbResult, Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\r\n} from \"@itwin/core-geometry\";\r\nimport {\r\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\r\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\r\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\r\n ViewDetails3d,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\r\n\r\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\r\n * @see [ModelSelectorState]($frontend)\r\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\r\n * @public @preview\r\n */\r\nexport class ModelSelector extends DefinitionElement {\r\n public static override get className(): string { return \"ModelSelector\"; }\r\n\r\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\r\n public models: Id64String[];\r\n\r\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.models = props.models;\r\n }\r\n\r\n public override toJSON(): ModelSelectorProps {\r\n const val = super.toJSON() as ModelSelectorProps;\r\n val.models = this.models;\r\n return val;\r\n }\r\n\r\n /**\r\n * ModelSelector custom HandledProps includes 'models'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"models\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * ModelSelector deserializes 'models'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): ModelSelectorProps {\r\n const elProps = super.deserialize(props) as ModelSelectorProps;\r\n const instance = props.row;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n elProps.models = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.ModelSelectorRefersToModels WHERE SourceECInstanceId=?\", (statement) => {\r\n statement.bindId(1, instance.id);\r\n const ids: Id64Array = [];\r\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\r\n ids.push(statement.getValue(0).getId());\r\n }\r\n return ids;\r\n });\r\n return elProps;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\r\n }\r\n\r\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\r\n * @param codeValue The ModelSelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The newly constructed ModelSelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\r\n const modelSelectorProps: ModelSelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n models,\r\n isPrivate: false,\r\n };\r\n return new ModelSelector(modelSelectorProps, iModelDb);\r\n }\r\n /**\r\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The Id of the newly inserted ModelSelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\r\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\r\n return iModelDb.elements.insertElement(modelSelector.toJSON());\r\n }\r\n}\r\n\r\n/** Holds a list of Ids of Categories to be displayed in a view.\r\n * @see [CategorySelectorState]($frontend)\r\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\r\n * @public @preview\r\n */\r\nexport class CategorySelector extends DefinitionElement {\r\n public static override get className(): string { return \"CategorySelector\"; }\r\n /** The array of element Ids of the Categories selected by this CategorySelector */\r\n public categories: Id64String[];\r\n\r\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.categories = props.categories;\r\n }\r\n\r\n public override toJSON(): CategorySelectorProps {\r\n const val = super.toJSON() as CategorySelectorProps;\r\n val.categories = this.categories;\r\n return val;\r\n }\r\n\r\n /**\r\n * CategorySelector custom HandledProps includes 'categories'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"categories\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * CategorySelector deserializes 'categories'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): CategorySelectorProps {\r\n const elProps = super.deserialize(props) as CategorySelectorProps;\r\n const instance = props.row;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n elProps.categories = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.CategorySelectorRefersToCategories WHERE SourceECInstanceId=?\", (statement) => {\r\n statement.bindId(1, instance.id);\r\n const ids: Id64Array = [];\r\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\r\n ids.push(statement.getValue(0).getId());\r\n }\r\n return ids;\r\n });\r\n return elProps;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\r\n }\r\n\r\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\r\n * @param codeValue The CategorySelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The newly constructed CategorySelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\r\n const categorySelectorProps: CategorySelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n categories,\r\n isPrivate: false,\r\n };\r\n return new CategorySelector(categorySelectorProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The Id of the newly inserted CategorySelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\r\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\r\n return iModelDb.elements.insertElement(categorySelector.toJSON());\r\n }\r\n}\r\n\r\n/**\r\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\r\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\r\n * Subclasses of ViewDefinition determine which model(s) are viewed.\r\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\r\n * @public @preview\r\n */\r\nexport abstract class ViewDefinition extends DefinitionElement {\r\n public static override get className(): string { return \"ViewDefinition\"; }\r\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\r\n public categorySelectorId: Id64String;\r\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\r\n public displayStyleId: Id64String;\r\n\r\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n\r\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\r\n if (!Id64.isValid(this.categorySelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\r\n\r\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\r\n if (!Id64.isValid(this.displayStyleId))\r\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\r\n }\r\n\r\n /**\r\n * ViewDefinition custom HandledProps includes 'categorySelector', and 'displayStyle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"categorySelector\", source: \"Class\" },\r\n { propertyName: \"displayStyle\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * ViewDefinition deserializes 'categorySelector', and 'displayStyle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinitionProps {\r\n const elProps = super.deserialize(props) as ViewDefinitionProps;\r\n const instance = props.row;\r\n if (instance.isPrivate !== undefined)\r\n elProps.isPrivate = instance.isPrivate;\r\n elProps.categorySelectorId = instance.categorySelector.id;\r\n elProps.displayStyleId = instance.displayStyle.id;\r\n return elProps;\r\n }\r\n\r\n /**\r\n * ViewDefinition serializes 'categorySelector', and 'displayStyle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: ViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, _iModel);\r\n inst.categorySelector.id = props.categorySelectorId;\r\n inst.displayStyle.id = props.displayStyleId;\r\n return inst;\r\n }\r\n\r\n public override toJSON(): ViewDefinitionProps {\r\n const json = super.toJSON() as ViewDefinitionProps;\r\n json.categorySelectorId = this.categorySelectorId;\r\n json.displayStyleId = this.displayStyleId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.categorySelectorId);\r\n referenceIds.addElement(this.displayStyleId);\r\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\r\n if (Id64.isValidId64(acsId)) {\r\n referenceIds.addElement(acsId);\r\n }\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n categorySelectorId: ConcreteEntityTypes.Element,\r\n displayStyleId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** @beta */\r\n protected static override async onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): Promise<void> {\r\n await super.onCloned(context, sourceElementProps, targetElementProps);\r\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\r\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\r\n if (Id64.isValidId64(acsId)) {\r\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\r\n }\r\n }\r\n }\r\n\r\n /** Type guard for `instanceof ViewDefinition3d` */\r\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\r\n /** Type guard for 'instanceof ViewDefinition2d` */\r\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\r\n /** Type guard for `instanceof SpatialViewDefinition` */\r\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\r\n /** Type guard for 'instanceof DrawingViewDefinition' */\r\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\r\n\r\n /** Load this view's DisplayStyle from the IModelDb. */\r\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\r\n\r\n /** Load this view's CategorySelector from the IModelDb. */\r\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public abstract get details(): ViewDetails;\r\n\r\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\r\n public getAuxiliaryCoordinateSystemId(): Id64String {\r\n return this.details.auxiliaryCoordinateSystemId;\r\n }\r\n\r\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\r\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\r\n */\r\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\r\n this.details.auxiliaryCoordinateSystemId = acsId;\r\n }\r\n\r\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\r\n * @param codeValue The ViewDefinition name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Defines a view of one or more 3d models.\r\n * @public @preview\r\n */\r\nexport abstract class ViewDefinition3d extends ViewDefinition {\r\n private readonly _details: ViewDetails3d;\r\n public static override get className(): string { return \"ViewDefinition3d\"; }\r\n /** If true, camera is used. Otherwise, use an orthographic projection. */\r\n public cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n public origin: Point3d;\r\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\r\n public extents: Vector3d;\r\n /** Rotation from world coordinates to view coordinates. */\r\n public angles: YawPitchRollAngles;\r\n /** The camera used for this view, if `cameraOn` is true. */\r\n public camera: Camera;\r\n\r\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\r\n this.origin = Point3d.fromJSON(props.origin);\r\n this.extents = Vector3d.fromJSON(props.extents);\r\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\r\n this.camera = new Camera(props.camera);\r\n this._details = new ViewDetails3d(this.jsonProperties);\r\n }\r\n\r\n /**\r\n * ViewDefinition3d custom HandledProps includes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\r\n * 'origin', 'extents', and 'isCameraOn'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"eyePoint\", source: \"Class\" },\r\n { propertyName: \"focusDistance\", source: \"Class\" },\r\n { propertyName: \"lensAngle\", source: \"Class\" },\r\n { propertyName: \"yaw\", source: \"Class\" },\r\n { propertyName: \"roll\", source: \"Class\" },\r\n { propertyName: \"pitch\", source: \"Class\" },\r\n { propertyName: \"origin\", source: \"Class\" },\r\n { propertyName: \"extents\", source: \"Class\" },\r\n { propertyName: \"isCameraOn\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * ViewDefinition3d deserializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\r\n * 'origin', 'extents', and 'isCameraOn'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition3dProps {\r\n const instance = props.row;\r\n const elProps = super.deserialize(props) as ViewDefinition3dProps;\r\n // ViewDefinition3dProps\r\n elProps.cameraOn = instance.isCameraOn as boolean;\r\n elProps.origin = [ instance.origin.x, instance.origin.y, instance.origin.z ];\r\n elProps.extents = [ instance.extents.x, instance.extents.y, instance.extents.z ];\r\n elProps.camera = { eye: [instance.eyePoint.x, instance.eyePoint.y, instance.eyePoint.z], focusDist: instance.focusDistance, lens: Angle.createRadians(instance.lensAngle).toJSON() };\r\n elProps.angles = YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON();\r\n return elProps;\r\n }\r\n\r\n /**\r\n * ViewDefinition3d serializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\r\n * 'origin', 'extents', and 'isCameraOn'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: ViewDefinition3dProps, _iModel: IModelDb): ECSqlRow {\r\n const row = super.serialize(props, _iModel);\r\n row.isCameraOn = props.cameraOn;\r\n row.eyePoint = props.camera.eye;\r\n row.focusDistance = props.camera.focusDist;\r\n row.lensAngle = props.camera.lens;\r\n if (props.angles) {\r\n row.yaw = props.angles.yaw;\r\n row.roll = props.angles.roll;\r\n row.pitch = props.angles.pitch;\r\n }\r\n return row;\r\n }\r\n\r\n public override toJSON(): ViewDefinition3dProps {\r\n const val = super.toJSON() as ViewDefinition3dProps;\r\n val.cameraOn = this.cameraOn;\r\n val.origin = this.origin;\r\n val.extents = this.extents;\r\n val.angles = this.angles;\r\n val.camera = this.camera;\r\n return val;\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails3d { return this._details; }\r\n\r\n /** Load this view's DisplayStyle3d from the IModelDb. */\r\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of one or more SpatialModels.\r\n * The list of viewed models is stored by the ModelSelector.\r\n *\r\n * This is how a SpatialViewDefinition selects the elements to display:\r\n *\r\n * SpatialViewDefinition\r\n * * ModelSelector\r\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\r\n * * CategorySelector\r\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\r\n * @public @preview\r\n */\r\nexport class SpatialViewDefinition extends ViewDefinition3d {\r\n public static override get className(): string { return \"SpatialViewDefinition\"; }\r\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\r\n public modelSelectorId: Id64String;\r\n\r\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\r\n if (!Id64.isValid(this.modelSelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\r\n }\r\n\r\n /** Construct a SpatialViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\r\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n public override toJSON(): SpatialViewDefinitionProps {\r\n const json = super.toJSON() as SpatialViewDefinitionProps;\r\n json.modelSelectorId = this.modelSelectorId;\r\n return json;\r\n }\r\n\r\n /**\r\n * SpatialViewDefinition custom HandledProps includes 'modelSelector'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"modelSelector\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * SpatialViewDefinition deserializes 'modelSelector'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): SpatialViewDefinitionProps {\r\n const elProps = super.deserialize(props) as SpatialViewDefinitionProps;\r\n const instance = props.row;\r\n elProps.modelSelectorId = instance.modelSelector.id;\r\n return elProps;\r\n }\r\n\r\n /**\r\n * SpatialViewDefinition serializes 'modelSelector'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: SpatialViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, _iModel);\r\n inst.modelSelector.id = props.modelSelectorId;\r\n return inst;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.modelSelectorId);\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\r\n\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n modelSelectorId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** Load this view's ModelSelector from the IModelDb. */\r\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\r\n /**\r\n * Create a SpatialViewDefinition with the camera turned on.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @param cameraAngle Camera angle in radians.\r\n * @returns The newly constructed SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\r\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\r\n cameraLocation.z += cameraDistance; // Back up by camera distance.\r\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\r\n\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: true,\r\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\r\n };\r\n\r\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n /**\r\n * Insert an SpatialViewDefinition with the camera turned on.\r\n * @see [[createWithCamera]] for details.\r\n * @returns The Id of the newly inserted SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\r\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\r\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\r\n * @public @preview\r\n */\r\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\r\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\r\n\r\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /**\r\n * Create an OrthographicViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The newly constructed OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: false,\r\n camera: new Camera(), // not used when cameraOn === false\r\n };\r\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert an OrthographicViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The Id of the newly inserted OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n\r\n /** Set a new viewed range without changing the rotation or any other properties. */\r\n public setRange(range: Range3d): void {\r\n const rotation = this.angles.toMatrix3d();\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\r\n this.extents = rotatedRange.diagonal();\r\n }\r\n}\r\n\r\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\r\n * @public @preview\r\n */\r\nexport class ViewDefinition2d extends ViewDefinition {\r\n private readonly _details: ViewDetails;\r\n\r\n public static override get className(): string { return \"ViewDefinition2d\"; }\r\n /** The Id of the Model displayed by this view. */\r\n public baseModelId: Id64String;\r\n /** The lower-left corner of this view in Model coordinates. */\r\n public origin: Point2d;\r\n /** The delta (size) of this view, in meters, aligned with view x,y. */\r\n public delta: Point2d;\r\n /** The rotation of this view. */\r\n public angle: Angle;\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.baseModelId = Id64.fromJSON(props.baseModelId);\r\n this.origin = Point2d.fromJSON(props.origin);\r\n this.delta = Point2d.fromJSON(props.delta);\r\n this.angle = Angle.fromJSON(props.angle);\r\n this._details = new ViewDetails(this.jsonProperties);\r\n }\r\n\r\n public override toJSON(): ViewDefinition2dProps {\r\n const val = super.toJSON() as ViewDefinition2dProps;\r\n val.baseModelId = this.baseModelId;\r\n val.origin = this.origin;\r\n val.delta = this.delta;\r\n val.angle = this.angle;\r\n return val;\r\n }\r\n\r\n /**\r\n * ViewDefinition2d custom HandledProps includes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"baseModel\", source: \"Class\" },\r\n { propertyName: \"origin\", source: \"Class\" },\r\n { propertyName: \"extents\", source: \"Class\" },\r\n { propertyName: \"rotationAngle\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * ViewDefinition2d deserializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition2dProps {\r\n const elProps = super.deserialize(props) as ViewDefinition2dProps;\r\n const instance = props.row;\r\n elProps.baseModelId = instance.baseModel.id;\r\n elProps.origin = [ instance.origin.x, instance.origin.y ];\r\n elProps.delta = [ instance.extents.x, instance.extents.y ];\r\n elProps.angle = instance.rotationAngle;\r\n return elProps;\r\n }\r\n\r\n /**\r\n * ViewDefinition2d serializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: ViewDefinition2dProps, _iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, _iModel);\r\n inst.baseModel.id = props.baseModelId;\r\n inst.origin = props.origin;\r\n inst.extents = props.delta;\r\n inst.rotationAngle = props.angle;\r\n return inst;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.baseModelId);\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails { return this._details; }\r\n\r\n /** Load this view's DisplayStyle2d from the IModelDb. */\r\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of a [[DrawingModel]].\r\n * @public @preview\r\n */\r\nexport class DrawingViewDefinition extends ViewDefinition2d {\r\n public static override get className(): string { return \"DrawingViewDefinition\"; }\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** Create a DrawingViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is a problem creating the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\r\n const viewDefinitionProps: ViewDefinition2dProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n baseModelId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: { x: range.low.x, y: range.low.y },\r\n delta: range.diagonal(),\r\n angle: 0,\r\n };\r\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /** Construct a DrawingViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\r\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Insert a DrawingViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Arguments to be passed in to [[SheetViewDefinition.create]]\r\n * @public\r\n*/\r\nexport interface CreateSheetViewDefinitionArgs {\r\n /** The iModel in which the sheet view will be created. */\r\n iModel: IModelDb;\r\n /** The Id of the [[DefinitionModel]] into which the sheet view will be inserted. */\r\n definitionModelId: Id64String;\r\n /** The name to use as the view's Code value. */\r\n name: string;\r\n /** The Id of the sheet model whose contents will be displayed by this view. */\r\n baseModelId: Id64String;\r\n /** The [[CategorySelector]] that this view should use. */\r\n categorySelectorId: Id64String;\r\n /** The [[DisplayStyle2d]] that this view should use. */\r\n displayStyleId: Id64String;\r\n /** Defines the view origin and extents. */\r\n range: Range2d;\r\n}\r\n\r\n/** Defines a view of a [[SheetModel]].\r\n * @public @preview\r\n */\r\nexport class SheetViewDefinition extends ViewDefinition2d {\r\n public static override get className(): string { return \"SheetViewDefinition\"; }\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** Create a SheetViewDefinition */\r\n public static create(args: CreateSheetViewDefinitionArgs): SheetViewDefinition {\r\n const { baseModelId, categorySelectorId, displayStyleId, range } = args;\r\n const props: ViewDefinition2dProps = {\r\n classFullName: this.classFullName,\r\n model: args.definitionModelId,\r\n code: this.createCode(args.iModel, args.definitionModelId, args.name),\r\n baseModelId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: { x: range.low.x, y: range.low.y },\r\n delta: range.diagonal(),\r\n angle: 0,\r\n };\r\n\r\n return new SheetViewDefinition(props, args.iModel);\r\n }\r\n\r\n /** Insert a SheetViewDefinition into an IModelDb */\r\n public static insert(args: CreateSheetViewDefinitionArgs): Id64String {\r\n const view = this.create(args);\r\n return args.iModel.elements.insertElement(view.toJSON());\r\n }\r\n\r\n /** Create a SheetViewDefinition from JSON props */\r\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb): SheetViewDefinition {\r\n return new SheetViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n}\r\n\r\n/** A ViewDefinition used to display a 2d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\r\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 3d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\r\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\r\n}\r\n\r\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\r\n * coordinate information in different units and/or orientations.\r\n * @public @preview\r\n */\r\nexport abstract class AuxCoordSystem extends DefinitionElement {\r\n public static override get className(): string { return \"AuxCoordSystem\"; }\r\n public type?: number;\r\n public description?: string;\r\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.type = props.type;\r\n this.description = props.description;\r\n }\r\n}\r\n\r\n/** A 2d auxiliary coordinate system.\r\n * @public @preview\r\n */\r\nexport class AuxCoordSystem2d extends AuxCoordSystem {\r\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\r\n public origin?: Point2d;\r\n public angle?: number;\r\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.origin = props.origin ? Point2d.fromJSON(props.origin) : undefined;\r\n this.angle = props.angle ? Angle.fromJSON(props.angle).degrees : undefined;\r\n }\r\n\r\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem2d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A 3d auxiliary coordinate system.\r\n * @public @preview\r\n */\r\nexport class AuxCoordSystem3d extends AuxCoordSystem {\r\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\r\n public origin?: Point3d;\r\n public yaw?: number;\r\n public pitch?: number;\r\n public roll?: number;\r\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.origin = props.origin ? Point3d.fromJSON(props.origin) : undefined;\r\n this.yaw = props.yaw ? Angle.fromJSON(props.yaw).degrees : undefined;\r\n this.pitch = props.pitch ? Angle.fromJSON(props.pitch).degrees : undefined;\r\n this.roll = props.roll ? Angle.fromJSON(props.roll).degrees : undefined;\r\n }\r\n\r\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem3d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A spatial auxiliary coordinate system.\r\n * @public @preview\r\n */\r\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\r\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\r\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystemSpatial name\r\n */\r\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\r\n * @public @preview\r\n */\r\nexport class ViewAttachment extends GraphicalElement2d {\r\n public static override get className(): string { return \"ViewAttachment\"; }\r\n public view: RelatedElement;\r\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.view = new RelatedElement(props.view);\r\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\r\n }\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.view.id);\r\n }\r\n}\r\n\r\n/** The position in space of a Light.\r\n * @internal\r\n */\r\nexport class LightLocation extends SpatialLocationElement {\r\n public static override get className(): string { return \"LightLocation\"; }\r\n /** Whether this light is currently turned on. */\r\n public enabled?: boolean;\r\n\r\n protected constructor(props: LightLocationProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.enabled = props.enabled;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAyB,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrG,OAAO,EACL,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAoB,iBAAi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H,MAAM,OAAO,cAAe,SAAQ,kBAAkB;IAC7C,MAAM,KAAc,SAAS,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IACpE,IAAI,CAAiB;IAC5B,YAAmB,KAA0B,EAAE,MAAgB;QAC7D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,0GAA0G;IAC5G,CAAC;IACkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,sBAAsB;IAChD,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAC1E,iDAAiD;IAC1C,OAAO,CAAW;IAEzB,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;CACF","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 ViewDefinitions\r\n */\r\n\r\nimport { DbResult, Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\r\n} from \"@itwin/core-geometry\";\r\nimport {\r\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\r\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\r\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\r\n ViewDetails3d,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\r\n\r\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\r\n * @see [ModelSelectorState]($frontend)\r\n * @public @preview\r\n */\r\nexport class ModelSelector extends DefinitionElement {\r\n public static override get className(): string { return \"ModelSelector\"; }\r\n\r\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\r\n public models: Id64String[];\r\n\r\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.models = props.models;\r\n }\r\n\r\n public override toJSON(): ModelSelectorProps {\r\n const val = super.toJSON() as ModelSelectorProps;\r\n val.models = this.models;\r\n return val;\r\n }\r\n\r\n /**\r\n * ModelSelector custom HandledProps includes 'models'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"models\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * ModelSelector deserializes 'models'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): ModelSelectorProps {\r\n const elProps = super.deserialize(props) as ModelSelectorProps;\r\n const instance = props.row;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n elProps.models = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.ModelSelectorRefersToModels WHERE SourceECInstanceId=?\", (statement) => {\r\n statement.bindId(1, instance.id);\r\n const ids: Id64Array = [];\r\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\r\n ids.push(statement.getValue(0).getId());\r\n }\r\n return ids;\r\n });\r\n return elProps;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\r\n }\r\n\r\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\r\n * @param codeValue The ModelSelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The newly constructed ModelSelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\r\n const modelSelectorProps: ModelSelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n models,\r\n isPrivate: false,\r\n };\r\n return new ModelSelector(modelSelectorProps, iModelDb);\r\n }\r\n /**\r\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The Id of the newly inserted ModelSelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\r\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\r\n return iModelDb.elements.insertElement(modelSelector.toJSON());\r\n }\r\n}\r\n\r\n/** Holds a list of Ids of Categories to be displayed in a view.\r\n * @see [CategorySelectorState]($frontend)\r\n * See [how to create a CategorySelector]($docs/learning/backend/CreateElements.md#CategorySelector).\r\n * @public @preview\r\n */\r\nexport class CategorySelector extends DefinitionElement {\r\n public static override get className(): string { return \"CategorySelector\"; }\r\n /** The array of element Ids of the Categories selected by this CategorySelector */\r\n public categories: Id64String[];\r\n\r\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.categories = props.categories;\r\n }\r\n\r\n public override toJSON(): CategorySelectorProps {\r\n const val = super.toJSON() as CategorySelectorProps;\r\n val.categories = this.categories;\r\n return val;\r\n }\r\n\r\n /**\r\n * CategorySelector custom HandledProps includes 'categories'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"categories\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * CategorySelector deserializes 'categories'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): CategorySelectorProps {\r\n const elProps = super.deserialize(props) as CategorySelectorProps;\r\n const instance = props.row;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n elProps.categories = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.CategorySelectorRefersToCategories WHERE SourceECInstanceId=?\", (statement) => {\r\n statement.bindId(1, instance.id);\r\n const ids: Id64Array = [];\r\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\r\n ids.push(statement.getValue(0).getId());\r\n }\r\n return ids;\r\n });\r\n return elProps;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\r\n }\r\n\r\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\r\n * @param codeValue The CategorySelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The newly constructed CategorySelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\r\n const categorySelectorProps: CategorySelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n categories,\r\n isPrivate: false,\r\n };\r\n return new CategorySelector(categorySelectorProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The Id of the newly inserted CategorySelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\r\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\r\n return iModelDb.elements.insertElement(categorySelector.toJSON());\r\n }\r\n}\r\n\r\n/**\r\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\r\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\r\n * Subclasses of ViewDefinition determine which model(s) are viewed.\r\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\r\n * @public @preview\r\n */\r\nexport abstract class ViewDefinition extends DefinitionElement {\r\n public static override get className(): string { return \"ViewDefinition\"; }\r\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\r\n public categorySelectorId: Id64String;\r\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\r\n public displayStyleId: Id64String;\r\n\r\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n\r\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\r\n if (!Id64.isValid(this.categorySelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\r\n\r\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\r\n if (!Id64.isValid(this.displayStyleId))\r\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\r\n }\r\n\r\n /**\r\n * ViewDefinition custom HandledProps includes 'categorySelector', and 'displayStyle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"categorySelector\", source: \"Class\" },\r\n { propertyName: \"displayStyle\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * ViewDefinition deserializes 'categorySelector', and 'displayStyle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinitionProps {\r\n const elProps = super.deserialize(props) as ViewDefinitionProps;\r\n const instance = props.row;\r\n if (instance.isPrivate !== undefined)\r\n elProps.isPrivate = instance.isPrivate;\r\n elProps.categorySelectorId = instance.categorySelector.id;\r\n elProps.displayStyleId = instance.displayStyle.id;\r\n return elProps;\r\n }\r\n\r\n /**\r\n * ViewDefinition serializes 'categorySelector', and 'displayStyle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: ViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, _iModel);\r\n inst.categorySelector.id = props.categorySelectorId;\r\n inst.displayStyle.id = props.displayStyleId;\r\n return inst;\r\n }\r\n\r\n public override toJSON(): ViewDefinitionProps {\r\n const json = super.toJSON() as ViewDefinitionProps;\r\n json.categorySelectorId = this.categorySelectorId;\r\n json.displayStyleId = this.displayStyleId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.categorySelectorId);\r\n referenceIds.addElement(this.displayStyleId);\r\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\r\n if (Id64.isValidId64(acsId)) {\r\n referenceIds.addElement(acsId);\r\n }\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n categorySelectorId: ConcreteEntityTypes.Element,\r\n displayStyleId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** @beta */\r\n protected static override async onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): Promise<void> {\r\n await super.onCloned(context, sourceElementProps, targetElementProps);\r\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\r\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\r\n if (Id64.isValidId64(acsId)) {\r\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\r\n }\r\n }\r\n }\r\n\r\n /** Type guard for `instanceof ViewDefinition3d` */\r\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\r\n /** Type guard for 'instanceof ViewDefinition2d` */\r\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\r\n /** Type guard for `instanceof SpatialViewDefinition` */\r\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\r\n /** Type guard for 'instanceof DrawingViewDefinition' */\r\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\r\n\r\n /** Load this view's DisplayStyle from the IModelDb. */\r\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\r\n\r\n /** Load this view's CategorySelector from the IModelDb. */\r\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public abstract get details(): ViewDetails;\r\n\r\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\r\n public getAuxiliaryCoordinateSystemId(): Id64String {\r\n return this.details.auxiliaryCoordinateSystemId;\r\n }\r\n\r\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\r\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\r\n */\r\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\r\n this.details.auxiliaryCoordinateSystemId = acsId;\r\n }\r\n\r\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\r\n * @param codeValue The ViewDefinition name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Defines a view of one or more 3d models.\r\n * @public @preview\r\n */\r\nexport abstract class ViewDefinition3d extends ViewDefinition {\r\n private readonly _details: ViewDetails3d;\r\n public static override get className(): string { return \"ViewDefinition3d\"; }\r\n /** If true, camera is used. Otherwise, use an orthographic projection. */\r\n public cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n public origin: Point3d;\r\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\r\n public extents: Vector3d;\r\n /** Rotation from world coordinates to view coordinates. */\r\n public angles: YawPitchRollAngles;\r\n /** The camera used for this view, if `cameraOn` is true. */\r\n public camera: Camera;\r\n\r\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\r\n this.origin = Point3d.fromJSON(props.origin);\r\n this.extents = Vector3d.fromJSON(props.extents);\r\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\r\n this.camera = new Camera(props.camera);\r\n this._details = new ViewDetails3d(this.jsonProperties);\r\n }\r\n\r\n /**\r\n * ViewDefinition3d custom HandledProps includes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\r\n * 'origin', 'extents', and 'isCameraOn'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"eyePoint\", source: \"Class\" },\r\n { propertyName: \"focusDistance\", source: \"Class\" },\r\n { propertyName: \"lensAngle\", source: \"Class\" },\r\n { propertyName: \"yaw\", source: \"Class\" },\r\n { propertyName: \"roll\", source: \"Class\" },\r\n { propertyName: \"pitch\", source: \"Class\" },\r\n { propertyName: \"origin\", source: \"Class\" },\r\n { propertyName: \"extents\", source: \"Class\" },\r\n { propertyName: \"isCameraOn\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * ViewDefinition3d deserializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\r\n * 'origin', 'extents', and 'isCameraOn'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition3dProps {\r\n const instance = props.row;\r\n const elProps = super.deserialize(props) as ViewDefinition3dProps;\r\n // ViewDefinition3dProps\r\n elProps.cameraOn = instance.isCameraOn as boolean;\r\n elProps.origin = [ instance.origin.x, instance.origin.y, instance.origin.z ];\r\n elProps.extents = [ instance.extents.x, instance.extents.y, instance.extents.z ];\r\n elProps.camera = { eye: [instance.eyePoint.x, instance.eyePoint.y, instance.eyePoint.z], focusDist: instance.focusDistance, lens: Angle.createRadians(instance.lensAngle).toJSON() };\r\n elProps.angles = YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON();\r\n return elProps;\r\n }\r\n\r\n /**\r\n * ViewDefinition3d serializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\r\n * 'origin', 'extents', and 'isCameraOn'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: ViewDefinition3dProps, _iModel: IModelDb): ECSqlRow {\r\n const row = super.serialize(props, _iModel);\r\n row.isCameraOn = props.cameraOn;\r\n row.eyePoint = props.camera.eye;\r\n row.focusDistance = props.camera.focusDist;\r\n row.lensAngle = props.camera.lens;\r\n if (props.angles) {\r\n row.yaw = props.angles.yaw;\r\n row.roll = props.angles.roll;\r\n row.pitch = props.angles.pitch;\r\n }\r\n return row;\r\n }\r\n\r\n public override toJSON(): ViewDefinition3dProps {\r\n const val = super.toJSON() as ViewDefinition3dProps;\r\n val.cameraOn = this.cameraOn;\r\n val.origin = this.origin;\r\n val.extents = this.extents;\r\n val.angles = this.angles;\r\n val.camera = this.camera;\r\n return val;\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails3d { return this._details; }\r\n\r\n /** Load this view's DisplayStyle3d from the IModelDb. */\r\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of one or more SpatialModels.\r\n * The list of viewed models is stored by the ModelSelector.\r\n *\r\n * This is how a SpatialViewDefinition selects the elements to display:\r\n *\r\n * SpatialViewDefinition\r\n * * ModelSelector\r\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\r\n * * CategorySelector\r\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\r\n * @public @preview\r\n */\r\nexport class SpatialViewDefinition extends ViewDefinition3d {\r\n public static override get className(): string { return \"SpatialViewDefinition\"; }\r\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\r\n public modelSelectorId: Id64String;\r\n\r\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\r\n if (!Id64.isValid(this.modelSelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\r\n }\r\n\r\n /** Construct a SpatialViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\r\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n public override toJSON(): SpatialViewDefinitionProps {\r\n const json = super.toJSON() as SpatialViewDefinitionProps;\r\n json.modelSelectorId = this.modelSelectorId;\r\n return json;\r\n }\r\n\r\n /**\r\n * SpatialViewDefinition custom HandledProps includes 'modelSelector'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"modelSelector\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * SpatialViewDefinition deserializes 'modelSelector'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): SpatialViewDefinitionProps {\r\n const elProps = super.deserialize(props) as SpatialViewDefinitionProps;\r\n const instance = props.row;\r\n elProps.modelSelectorId = instance.modelSelector.id;\r\n return elProps;\r\n }\r\n\r\n /**\r\n * SpatialViewDefinition serializes 'modelSelector'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: SpatialViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, _iModel);\r\n inst.modelSelector.id = props.modelSelectorId;\r\n return inst;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.modelSelectorId);\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\r\n\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n modelSelectorId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** Load this view's ModelSelector from the IModelDb. */\r\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\r\n /**\r\n * Create a SpatialViewDefinition with the camera turned on.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @param cameraAngle Camera angle in radians.\r\n * @returns The newly constructed SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\r\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\r\n cameraLocation.z += cameraDistance; // Back up by camera distance.\r\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\r\n\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: true,\r\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\r\n };\r\n\r\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n /**\r\n * Insert an SpatialViewDefinition with the camera turned on.\r\n * @see [[createWithCamera]] for details.\r\n * @returns The Id of the newly inserted SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\r\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\r\n * See [how to create a OrthographicViewDefinition]($docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\r\n * @public @preview\r\n */\r\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\r\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\r\n\r\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /**\r\n * Create an OrthographicViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The newly constructed OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: false,\r\n camera: new Camera(), // not used when cameraOn === false\r\n };\r\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert an OrthographicViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The Id of the newly inserted OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n\r\n /** Set a new viewed range without changing the rotation or any other properties. */\r\n public setRange(range: Range3d): void {\r\n const rotation = this.angles.toMatrix3d();\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\r\n this.extents = rotatedRange.diagonal();\r\n }\r\n}\r\n\r\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\r\n * @public @preview\r\n */\r\nexport class ViewDefinition2d extends ViewDefinition {\r\n private readonly _details: ViewDetails;\r\n\r\n public static override get className(): string { return \"ViewDefinition2d\"; }\r\n /** The Id of the Model displayed by this view. */\r\n public baseModelId: Id64String;\r\n /** The lower-left corner of this view in Model coordinates. */\r\n public origin: Point2d;\r\n /** The delta (size) of this view, in meters, aligned with view x,y. */\r\n public delta: Point2d;\r\n /** The rotation of this view. */\r\n public angle: Angle;\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.baseModelId = Id64.fromJSON(props.baseModelId);\r\n this.origin = Point2d.fromJSON(props.origin);\r\n this.delta = Point2d.fromJSON(props.delta);\r\n this.angle = Angle.fromJSON(props.angle);\r\n this._details = new ViewDetails(this.jsonProperties);\r\n }\r\n\r\n public override toJSON(): ViewDefinition2dProps {\r\n const val = super.toJSON() as ViewDefinition2dProps;\r\n val.baseModelId = this.baseModelId;\r\n val.origin = this.origin;\r\n val.delta = this.delta;\r\n val.angle = this.angle;\r\n return val;\r\n }\r\n\r\n /**\r\n * ViewDefinition2d custom HandledProps includes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"baseModel\", source: \"Class\" },\r\n { propertyName: \"origin\", source: \"Class\" },\r\n { propertyName: \"extents\", source: \"Class\" },\r\n { propertyName: \"rotationAngle\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * ViewDefinition2d deserializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition2dProps {\r\n const elProps = super.deserialize(props) as ViewDefinition2dProps;\r\n const instance = props.row;\r\n elProps.baseModelId = instance.baseModel.id;\r\n elProps.origin = [ instance.origin.x, instance.origin.y ];\r\n elProps.delta = [ instance.extents.x, instance.extents.y ];\r\n elProps.angle = instance.rotationAngle;\r\n return elProps;\r\n }\r\n\r\n /**\r\n * ViewDefinition2d serializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: ViewDefinition2dProps, _iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, _iModel);\r\n inst.baseModel.id = props.baseModelId;\r\n inst.origin = props.origin;\r\n inst.extents = props.delta;\r\n inst.rotationAngle = props.angle;\r\n return inst;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.baseModelId);\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails { return this._details; }\r\n\r\n /** Load this view's DisplayStyle2d from the IModelDb. */\r\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of a [[DrawingModel]].\r\n * @public @preview\r\n */\r\nexport class DrawingViewDefinition extends ViewDefinition2d {\r\n public static override get className(): string { return \"DrawingViewDefinition\"; }\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** Create a DrawingViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is a problem creating the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\r\n const viewDefinitionProps: ViewDefinition2dProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n baseModelId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: { x: range.low.x, y: range.low.y },\r\n delta: range.diagonal(),\r\n angle: 0,\r\n };\r\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /** Construct a DrawingViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\r\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Insert a DrawingViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Arguments to be passed in to [[SheetViewDefinition.create]]\r\n * @public\r\n*/\r\nexport interface CreateSheetViewDefinitionArgs {\r\n /** The iModel in which the sheet view will be created. */\r\n iModel: IModelDb;\r\n /** The Id of the [[DefinitionModel]] into which the sheet view will be inserted. */\r\n definitionModelId: Id64String;\r\n /** The name to use as the view's Code value. */\r\n name: string;\r\n /** The Id of the sheet model whose contents will be displayed by this view. */\r\n baseModelId: Id64String;\r\n /** The [[CategorySelector]] that this view should use. */\r\n categorySelectorId: Id64String;\r\n /** The [[DisplayStyle2d]] that this view should use. */\r\n displayStyleId: Id64String;\r\n /** Defines the view origin and extents. */\r\n range: Range2d;\r\n}\r\n\r\n/** Defines a view of a [[SheetModel]].\r\n * @public @preview\r\n */\r\nexport class SheetViewDefinition extends ViewDefinition2d {\r\n public static override get className(): string { return \"SheetViewDefinition\"; }\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** Create a SheetViewDefinition */\r\n public static create(args: CreateSheetViewDefinitionArgs): SheetViewDefinition {\r\n const { baseModelId, categorySelectorId, displayStyleId, range } = args;\r\n const props: ViewDefinition2dProps = {\r\n classFullName: this.classFullName,\r\n model: args.definitionModelId,\r\n code: this.createCode(args.iModel, args.definitionModelId, args.name),\r\n baseModelId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: { x: range.low.x, y: range.low.y },\r\n delta: range.diagonal(),\r\n angle: 0,\r\n };\r\n\r\n return new SheetViewDefinition(props, args.iModel);\r\n }\r\n\r\n /** Insert a SheetViewDefinition into an IModelDb */\r\n public static insert(args: CreateSheetViewDefinitionArgs): Id64String {\r\n const view = this.create(args);\r\n return args.iModel.elements.insertElement(view.toJSON());\r\n }\r\n\r\n /** Create a SheetViewDefinition from JSON props */\r\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb): SheetViewDefinition {\r\n return new SheetViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n}\r\n\r\n/** A ViewDefinition used to display a 2d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\r\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 3d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\r\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\r\n}\r\n\r\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\r\n * coordinate information in different units and/or orientations.\r\n * @public @preview\r\n */\r\nexport abstract class AuxCoordSystem extends DefinitionElement {\r\n public static override get className(): string { return \"AuxCoordSystem\"; }\r\n public type?: number;\r\n public description?: string;\r\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.type = props.type;\r\n this.description = props.description;\r\n }\r\n}\r\n\r\n/** A 2d auxiliary coordinate system.\r\n * @public @preview\r\n */\r\nexport class AuxCoordSystem2d extends AuxCoordSystem {\r\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\r\n public origin?: Point2d;\r\n public angle?: number;\r\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.origin = props.origin ? Point2d.fromJSON(props.origin) : undefined;\r\n this.angle = props.angle ? Angle.fromJSON(props.angle).degrees : undefined;\r\n }\r\n\r\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem2d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A 3d auxiliary coordinate system.\r\n * @public @preview\r\n */\r\nexport class AuxCoordSystem3d extends AuxCoordSystem {\r\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\r\n public origin?: Point3d;\r\n public yaw?: number;\r\n public pitch?: number;\r\n public roll?: number;\r\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.origin = props.origin ? Point3d.fromJSON(props.origin) : undefined;\r\n this.yaw = props.yaw ? Angle.fromJSON(props.yaw).degrees : undefined;\r\n this.pitch = props.pitch ? Angle.fromJSON(props.pitch).degrees : undefined;\r\n this.roll = props.roll ? Angle.fromJSON(props.roll).degrees : undefined;\r\n }\r\n\r\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem3d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A spatial auxiliary coordinate system.\r\n * @public @preview\r\n */\r\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\r\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\r\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystemSpatial name\r\n */\r\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\r\n * @public @preview\r\n */\r\nexport class ViewAttachment extends GraphicalElement2d {\r\n public static override get className(): string { return \"ViewAttachment\"; }\r\n public view: RelatedElement;\r\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.view = new RelatedElement(props.view);\r\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\r\n }\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.view.id);\r\n }\r\n}\r\n\r\n/** The position in space of a Light.\r\n * @internal\r\n */\r\nexport class LightLocation extends SpatialLocationElement {\r\n public static override get className(): string { return \"LightLocation\"; }\r\n /** Whether this light is currently turned on. */\r\n public enabled?: boolean;\r\n\r\n protected constructor(props: LightLocationProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.enabled = props.enabled;\r\n }\r\n}\r\n"]}