@itwin/core-common 4.10.0-dev.31 → 4.10.0-dev.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/lib/cjs/BackendTypes.d.ts +0 -2
  2. package/lib/cjs/BackendTypes.d.ts.map +1 -1
  3. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  4. package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
  5. package/lib/cjs/ElementMesh.js +1 -2
  6. package/lib/cjs/ElementMesh.js.map +1 -1
  7. package/lib/cjs/ElementProps.js +3 -3
  8. package/lib/cjs/ElementProps.js.map +1 -1
  9. package/lib/cjs/GeoCoordinateServices.js +2 -2
  10. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  11. package/lib/cjs/Image.js +4 -4
  12. package/lib/cjs/Image.js.map +1 -1
  13. package/lib/cjs/QPoint.d.ts +1 -1
  14. package/lib/cjs/SolarCalculate.js +4 -5
  15. package/lib/cjs/SolarCalculate.js.map +1 -1
  16. package/lib/cjs/SpatialClassification.js.map +1 -1
  17. package/lib/cjs/TileProps.js +2 -2
  18. package/lib/cjs/TileProps.js.map +1 -1
  19. package/lib/cjs/ViewProps.d.ts +1 -1
  20. package/lib/cjs/ViewProps.d.ts.map +1 -1
  21. package/lib/cjs/ViewProps.js.map +1 -1
  22. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  23. package/lib/cjs/rpc/core/RpcConstants.d.ts +1 -1
  24. package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
  25. package/lib/cjs/rpc/core/RpcOperation.d.ts.map +1 -1
  26. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  27. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +0 -2
  28. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  29. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  30. package/lib/cjs/tile/TileIO.js +4 -4
  31. package/lib/cjs/tile/TileIO.js.map +1 -1
  32. package/lib/cjs/tile/TileMetadata.js +12 -12
  33. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  34. package/lib/esm/BackendTypes.d.ts +0 -2
  35. package/lib/esm/BackendTypes.d.ts.map +1 -1
  36. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  37. package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
  38. package/lib/esm/QPoint.d.ts +1 -1
  39. package/lib/esm/SpatialClassification.js.map +1 -1
  40. package/lib/esm/ViewProps.d.ts +1 -1
  41. package/lib/esm/ViewProps.d.ts.map +1 -1
  42. package/lib/esm/ViewProps.js.map +1 -1
  43. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  44. package/lib/esm/rpc/core/RpcConstants.d.ts +1 -1
  45. package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
  46. package/lib/esm/rpc/core/RpcOperation.d.ts.map +1 -1
  47. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  48. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +0 -2
  49. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  50. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  51. package/package.json +7 -7
@@ -1,8 +1,6 @@
1
1
  /** @packageDocumentation
2
2
  * @module Utils
3
3
  */
4
- /// <reference types="node" />
5
- /// <reference types="node" />
6
4
  import type { Readable, Writable } from "stream";
7
5
  import type { Buffer } from "buffer";
8
6
  /** @public @deprecated in 3.x. This type was mistakenly made public in the common scope. */
@@ -1 +1 @@
1
- {"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;;;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConcurrentQuery.d.ts","sourceRoot":"","sources":["../../src/ConcurrentQuery.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAqB,QAAQ,EAAQ,UAAU,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGxD;;;;;;GAMG;AACH,oBAAY,cAAc;IACxB;;OAEG;IACH,qBAAqB,IAAA;IACrB;;OAEG;IACH,uBAAuB,IAAA;IACvB;;OAEG;IACH,kBAAkB,IAAA;CACnB;AAED;;;;KAIK;AACL,MAAM,WAAW,UAAU;IACzB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,cAAc;AACd,MAAM,WAAW,qBAAqB;IACpC,yJAAyJ;IACzJ,SAAS,EAAE,MAAM,CAAC;IAClB,yHAAyH;IACzH,YA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IAM5C;;OAEG;IACI,iBAAiB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAMjD;;;OAGG;IACI,gBAAgB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAMhD,IAAW,MAAM,IAAI,aAAa,CAEjC;IACD,IAAW,MAAM,CAAC,MAAM,EAAE,aAAa,EAOtC;IAED;;;;;;;OAOG;IACI,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAgB3E;;;;OAIG;IACI,YAAY,IAAI,IAAI;IAS3B;;;OAGG;IACH,IAAW,OAAO,IAAI,MAAM,GAAG,SAAS,CAEvC;IAED,wFAAwF;IACjF,yBAAyB,CAAC,OAAO,EAAE,UAAU,GAAG,sBAAsB,GAAG,SAAS;IAIzF,qFAAqF;IAC9E,yBAAyB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,sBAAsB,GAAG,SAAS,GAAG,IAAI;IA4BzG,oJAAoJ;IACpJ,IAAW,sBAAsB,IAAI,QAAQ,CAAC,CAAC,UAAU,EAAE,sBAAsB,CAAC,CAAC,GAAG,SAAS,CAE9F;CACF"}
@@ -7,7 +7,7 @@
7
7
  * @module Geometry
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.readElementMeshes = void 0;
10
+ exports.readElementMeshes = readElementMeshes;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const core_geometry_1 = require("@itwin/core-geometry");
13
13
  function nextChunk(stream) {
@@ -53,5 +53,4 @@ function readElementMeshes(data) {
53
53
  }
54
54
  return polyfaces;
55
55
  }
56
- exports.readElementMeshes = readElementMeshes;
57
56
  //# sourceMappingURL=ElementMesh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ElementMesh.js","sourceRoot":"","sources":["../../src/ElementMesh.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6D;AAC7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AAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI;YAChD,SAAS;QAEX,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,yCAAyB,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACzE,IAAI,IAAI,YAAY,+BAAe;gBACjC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,EAAE;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAvBD,8CAuBC","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 Geometry\r\n */\r\n\r\nimport { ByteStream, Id64String } from \"@itwin/core-bentley\";\r\nimport { BentleyGeometryFlatBuffer, IndexedPolyface } from \"@itwin/core-geometry\";\r\n\r\n/** Options used to control how [Polyface]($core-geometry)s are produced from elements by [IModelConnection.generateElementMeshes]($frontend).\r\n * @beta\r\n */\r\nexport interface ElementMeshOptions {\r\n /** Maximum distance from a face to the original geometry.\r\n * If not supplied, defaults to zero and [[angleTolerance]] will control the quality of the resulting mesh instead.\r\n * @see [StrokeOptions.chordTol]($core-geometry).\r\n */\r\n chordTolerance?: number;\r\n /** Maximum angle difference in radians for an approximated face.\r\n * If not supplied, defaults to PI/12 (15 degrees).\r\n * @see [StrokeOptions.angleTol]($core-geometry).\r\n */\r\n angleTolerance?: number;\r\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\r\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\r\n * like screws and screw holes.\r\n */\r\n minBRepFeatureSize?: number;\r\n // ###TODO? decimationTolerance?: number;\r\n}\r\n\r\n/** Describes a request to generate [Polyface]($core-geometry)s from an element.\r\n * @see [IModelConnection.generateElementMeshes]($frontend).\r\n * @beta\r\n */\r\nexport interface ElementMeshRequestProps extends ElementMeshOptions {\r\n /** The Id of the [GeometricElement]($backend) from which to obtain meshes. */\r\n source: Id64String;\r\n}\r\n\r\ninterface Chunk {\r\n type: string;\r\n data?: Uint8Array;\r\n}\r\n\r\nfunction nextChunk(stream: ByteStream): Chunk | undefined {\r\n if (stream.remainingLength < 8) {\r\n // Consume remaining bytes.\r\n stream.curPos = stream.length;\r\n return undefined;\r\n }\r\n\r\n // Type codes are a sequence of four uppercase ASCII letters.\r\n const chars = [stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8()];\r\n if (chars.some((c) => c < 65 || c > 90))\r\n return undefined;\r\n\r\n const dataLength = stream.readUint32();\r\n const data = dataLength > 0 ? stream.nextBytes(dataLength) : undefined;\r\n return {\r\n type: String.fromCharCode(...chars),\r\n data,\r\n };\r\n}\r\n\r\n/** Convert the output of [IModelConnection.generateElementMeshes]($frontend) into an array of [Polyface]($core-geometry)s.\r\n * @param data Encoded polyfaces obtained from [IModelConnection.generateElementMeshes]($frontend).\r\n * @returns a list of decoded polyfaces.\r\n * @beta\r\n */\r\nexport function readElementMeshes(data: Uint8Array): IndexedPolyface[] {\r\n const polyfaces: IndexedPolyface[] = [];\r\n\r\n const stream = ByteStream.fromUint8Array(data);\r\n const firstChunk = nextChunk(stream);\r\n if (!firstChunk || \"LMSH\" !== firstChunk.type)\r\n return polyfaces;\r\n\r\n while (stream.remainingLength > 0) {\r\n const chunk = nextChunk(stream);\r\n if (!chunk || chunk.type !== \"PLFC\" || !chunk.data)\r\n continue;\r\n\r\n try {\r\n const geom = BentleyGeometryFlatBuffer.bytesToGeometry(chunk.data, true);\r\n if (geom instanceof IndexedPolyface)\r\n polyfaces.push(geom);\r\n } catch (_) {\r\n //\r\n }\r\n }\r\n\r\n return polyfaces;\r\n}\r\n"]}
1
+ {"version":3,"file":"ElementMesh.js","sourceRoot":"","sources":["../../src/ElementMesh.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CAAC;QAClC,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI;YAChD,SAAS;QAEX,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,yCAAyB,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACzE,IAAI,IAAI,YAAY,+BAAe;gBACjC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,EAAE;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { ByteStream, Id64String } from \"@itwin/core-bentley\";\r\nimport { BentleyGeometryFlatBuffer, IndexedPolyface } from \"@itwin/core-geometry\";\r\n\r\n/** Options used to control how [Polyface]($core-geometry)s are produced from elements by [IModelConnection.generateElementMeshes]($frontend).\r\n * @beta\r\n */\r\nexport interface ElementMeshOptions {\r\n /** Maximum distance from a face to the original geometry.\r\n * If not supplied, defaults to zero and [[angleTolerance]] will control the quality of the resulting mesh instead.\r\n * @see [StrokeOptions.chordTol]($core-geometry).\r\n */\r\n chordTolerance?: number;\r\n /** Maximum angle difference in radians for an approximated face.\r\n * If not supplied, defaults to PI/12 (15 degrees).\r\n * @see [StrokeOptions.angleTol]($core-geometry).\r\n */\r\n angleTolerance?: number;\r\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\r\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\r\n * like screws and screw holes.\r\n */\r\n minBRepFeatureSize?: number;\r\n // ###TODO? decimationTolerance?: number;\r\n}\r\n\r\n/** Describes a request to generate [Polyface]($core-geometry)s from an element.\r\n * @see [IModelConnection.generateElementMeshes]($frontend).\r\n * @beta\r\n */\r\nexport interface ElementMeshRequestProps extends ElementMeshOptions {\r\n /** The Id of the [GeometricElement]($backend) from which to obtain meshes. */\r\n source: Id64String;\r\n}\r\n\r\ninterface Chunk {\r\n type: string;\r\n data?: Uint8Array;\r\n}\r\n\r\nfunction nextChunk(stream: ByteStream): Chunk | undefined {\r\n if (stream.remainingLength < 8) {\r\n // Consume remaining bytes.\r\n stream.curPos = stream.length;\r\n return undefined;\r\n }\r\n\r\n // Type codes are a sequence of four uppercase ASCII letters.\r\n const chars = [stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8()];\r\n if (chars.some((c) => c < 65 || c > 90))\r\n return undefined;\r\n\r\n const dataLength = stream.readUint32();\r\n const data = dataLength > 0 ? stream.nextBytes(dataLength) : undefined;\r\n return {\r\n type: String.fromCharCode(...chars),\r\n data,\r\n };\r\n}\r\n\r\n/** Convert the output of [IModelConnection.generateElementMeshes]($frontend) into an array of [Polyface]($core-geometry)s.\r\n * @param data Encoded polyfaces obtained from [IModelConnection.generateElementMeshes]($frontend).\r\n * @returns a list of decoded polyfaces.\r\n * @beta\r\n */\r\nexport function readElementMeshes(data: Uint8Array): IndexedPolyface[] {\r\n const polyfaces: IndexedPolyface[] = [];\r\n\r\n const stream = ByteStream.fromUint8Array(data);\r\n const firstChunk = nextChunk(stream);\r\n if (!firstChunk || \"LMSH\" !== firstChunk.type)\r\n return polyfaces;\r\n\r\n while (stream.remainingLength > 0) {\r\n const chunk = nextChunk(stream);\r\n if (!chunk || chunk.type !== \"PLFC\" || !chunk.data)\r\n continue;\r\n\r\n try {\r\n const geom = BentleyGeometryFlatBuffer.bytesToGeometry(chunk.data, true);\r\n if (geom instanceof IndexedPolyface)\r\n polyfaces.push(geom);\r\n } catch (_) {\r\n //\r\n }\r\n }\r\n\r\n return polyfaces;\r\n}\r\n"]}
@@ -7,7 +7,9 @@
7
7
  * @module Entities
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.Rank = exports.ExternalSourceAttachmentRole = exports.SectionType = exports.isPlacement3dProps = exports.isPlacement2dProps = exports.TypeDefinition = exports.RelatedElement = void 0;
10
+ exports.Rank = exports.ExternalSourceAttachmentRole = exports.SectionType = exports.TypeDefinition = exports.RelatedElement = void 0;
11
+ exports.isPlacement2dProps = isPlacement2dProps;
12
+ exports.isPlacement3dProps = isPlacement3dProps;
11
13
  const core_bentley_1 = require("@itwin/core-bentley");
12
14
  const IModelError_1 = require("./IModelError");
13
15
  /** The Id and relationship class of an Element that is somehow related to another Element
@@ -53,14 +55,12 @@ exports.TypeDefinition = TypeDefinition;
53
55
  function isPlacement2dProps(props) {
54
56
  return props.angle !== undefined;
55
57
  }
56
- exports.isPlacement2dProps = isPlacement2dProps;
57
58
  /** determine if this is Placement3dProps
58
59
  * @public
59
60
  */
60
61
  function isPlacement3dProps(props) {
61
62
  return !isPlacement2dProps(props);
62
63
  }
63
- exports.isPlacement3dProps = isPlacement3dProps;
64
64
  /** An enumeration of the different types of [SectionDrawing]($backend)s.
65
65
  * @public
66
66
  * @extensions
@@ -1 +1 @@
1
- {"version":3,"file":"ElementProps.js","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAmE;AAQnE,+CAA0D;AAqC1D;;GAEG;AACH,MAAa,cAAc;IAOzB,YAAY,KAA0B;QACpC,IAAI,CAAC,EAAE,GAAG,mBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAA0B;QAC/C,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAA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,4BAA4B;IACtC,gEAAgE;IAChE,mGAAkB,CAAA;IAClB,0EAA0E;IAC1E,6FAAe,CAAA;AACjB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC;AAyCD;;;GAGG;AACH,IAAY,IASX;AATD,WAAY,IAAI;IACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,oBAAJ,IAAI,QASf","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 Entities\r\n */\r\n\r\nimport { GuidString, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AngleProps, ClipVectorProps, LowAndHighXYProps, LowAndHighXYZProps, TransformProps, XYProps, XYZProps, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"./Code\";\r\nimport { EntityProps } from \"./EntityProps\";\r\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\r\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\r\nimport { IModelError, IModelStatus } from \"./IModelError\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { TextAnnotationProps } from \"./annotation/TextAnnotation\";\r\n\r\n/** Properties of a NavigationProperty.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n id: Id64String;\r\n /** The full className of the relationship class. */\r\n relClassName?: string;\r\n}\r\n\r\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementProps extends EntityProps {\r\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\r\n model: Id64String;\r\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\r\n code: CodeProps;\r\n /** The Parent of this element, if defined. */\r\n parent?: RelatedElementProps;\r\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\r\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\r\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\r\n */\r\n federationGuid?: GuidString;\r\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\r\n userLabel?: string;\r\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\r\n jsonProperties?: any;\r\n}\r\n\r\n/** The Id and relationship class of an Element that is somehow related to another Element\r\n * @public\r\n */\r\nexport class RelatedElement implements RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n public readonly id: Id64String;\r\n\r\n /** The full className of the relationship class. */\r\n public readonly relClassName?: string;\r\n\r\n constructor(props: RelatedElementProps) {\r\n this.id = Id64.fromJSON(props.id);\r\n this.relClassName = props.relClassName;\r\n }\r\n\r\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\r\n return json ? new RelatedElement(json) : undefined;\r\n }\r\n\r\n /** Used to *null out* an existing navigation relationship. */\r\n public static readonly none = new RelatedElement({ id: Id64.invalid });\r\n\r\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\r\n public static idFromJson(json: any): Id64String {\r\n if ((typeof json === \"object\") && (\"id\" in json)) {\r\n const r = RelatedElement.fromJSON(json);\r\n if (r === undefined)\r\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\r\n return r.id;\r\n }\r\n return Id64.fromJSON(json);\r\n }\r\n\r\n public toJSON(): RelatedElementProps {\r\n return {\r\n id: this.id,\r\n relClassName: this.relClassName,\r\n };\r\n }\r\n}\r\n\r\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\r\n * @public\r\n */\r\nexport class TypeDefinition extends RelatedElement {\r\n}\r\n\r\n/** Properties of a [GeometricElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElementProps extends ElementProps {\r\n /** The id of the category for this geometric element. */\r\n category: Id64String;\r\n /** The geometry stream properties */\r\n geom?: GeometryStreamProps;\r\n /** Describes how to build the element's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\r\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent element.\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\r\n /** The placement properties */\r\n placement?: PlacementProps;\r\n}\r\n\r\n/** Properties of a [[Placement3d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement3dProps {\r\n origin: XYZProps;\r\n angles: YawPitchRollProps;\r\n bbox?: LowAndHighXYZProps;\r\n}\r\n\r\n/** Properties of a [[Placement2d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement2dProps {\r\n origin: XYProps;\r\n angle: AngleProps;\r\n bbox?: LowAndHighXYProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport type PlacementProps = Placement2dProps | Placement3dProps;\r\n\r\n/** determine if this is Placement2dProps\r\n * @public\r\n */\r\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\r\n return (props as Placement2dProps).angle !== undefined;\r\n}\r\n\r\n/** determine if this is Placement3dProps\r\n * @public\r\n */\r\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\r\n return !isPlacement2dProps(props);\r\n}\r\n\r\n/** Properties that define a [GeometricElement3d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement3dProps extends GeometricElementProps {\r\n placement?: Placement3dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** JSON representation of a [TextAnnotation3d]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextAnnotation3dProps extends GeometricElement3dProps {\r\n jsonProperties?: {\r\n [key: string]: any;\r\n /** @beta */\r\n annotation?: TextAnnotationProps;\r\n };\r\n}\r\n\r\n/** Properties that define a [PhysicalElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalElementProps extends GeometricElement3dProps {\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SectionType {\r\n Section = 3,\r\n Detail = 4,\r\n Elevation = 5,\r\n Plan = 6,\r\n}\r\n\r\n/** Properties that define a [SectionDrawing]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingProps extends ElementProps {\r\n /** The type of section used to generate the drawing. Default: Section. */\r\n sectionType?: SectionType;\r\n /** The spatial view from which the section was generated. */\r\n spatialView?: RelatedElementProps;\r\n jsonProperties?: {\r\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\r\n drawingToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\r\n sheetToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\r\n * the sheet graphics when drawn in the context of the spatial view.\r\n * The ClipVector is in spatial coordinates.\r\n */\r\n drawingBoundaryClip?: ClipVectorProps;\r\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\r\n displaySpatialView?: true;\r\n };\r\n}\r\n\r\n/** Properties that define a [SectionDrawingLocation]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\r\n /** The [ViewDefinition]($backend) to which this location refers. */\r\n sectionView?: RelatedElementProps;\r\n}\r\n\r\n/** Properties that define a [GeometricElement2d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement2dProps extends GeometricElementProps {\r\n placement?: Placement2dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** JSON representation of a [TextAnnotation2d]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextAnnotation2dProps extends GeometricElement2dProps {\r\n jsonProperties?: {\r\n [key: string]: any;\r\n /** @beta */\r\n annotation?: TextAnnotationProps;\r\n };\r\n}\r\n\r\n/** Properties of a [GeometryPart]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryPartProps extends ElementProps {\r\n geom?: GeometryStreamProps;\r\n /** Describes how to build the part's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\r\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent part.\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\r\n bbox?: LowAndHighXYZProps;\r\n}\r\n\r\n/** Properties for a [ViewAttachment]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\r\n view: RelatedElementProps;\r\n jsonProperties?: {\r\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\r\n displayPriority?: number;\r\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\r\n clip?: ClipVectorProps;\r\n /** Options for customizing how the view attachment is displayed on the sheet. */\r\n displayOptions?: {\r\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\r\n drawAsRaster?: boolean;\r\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\r\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\r\n */\r\n preserveBackground?: boolean;\r\n };\r\n };\r\n}\r\n\r\n/** Properties of a [Subject]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubjectProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Properties of a [SheetBorderTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetBorderTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n}\r\n\r\n/** Properties of a [SheetTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n border?: Id64String;\r\n}\r\n\r\n/** Properties of a [Sheet]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SheetProps extends ElementProps {\r\n width?: number;\r\n height?: number;\r\n scale?: number;\r\n sheetTemplate?: Id64String;\r\n attachments?: Id64String[];\r\n}\r\n\r\n/** Properties of a [DefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DefinitionElementProps extends ElementProps {\r\n isPrivate?: boolean;\r\n}\r\n\r\n/** Properties of a [TypeDefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\r\n recipe?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [PhysicalType]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\r\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [InformationPartitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface InformationPartitionElementProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\r\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DisplayStyleLoadProps {\r\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\r\n * The element Ids are not required on the frontend for display and can be quite large.\r\n */\r\n omitScheduleScriptElementIds?: boolean;\r\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\r\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\r\n */\r\n compressExcludedElementIds?: boolean;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\r\n * @see [[ElementLoadOptions.renderTimeline]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineLoadProps {\r\n /** If true, the lists of element Ids in the schedule script will be empty.\r\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\r\n */\r\n omitScriptElementIds?: boolean;\r\n}\r\n\r\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\r\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadOptions {\r\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\r\n onlyBaseProperties?: boolean;\r\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\r\n */\r\n wantGeometry?: boolean;\r\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\r\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\r\n */\r\n wantBRepData?: boolean;\r\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\r\n renderTimeline?: RenderTimelineLoadProps;\r\n}\r\n\r\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadProps extends ElementLoadOptions {\r\n id?: Id64String;\r\n /** The properties of the Code of the element to load.\r\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\r\n * TODO: change to Required<CodeProps> in Version 4.0\r\n */\r\n code?: CodeProps;\r\n federationGuid?: GuidString;\r\n}\r\n\r\n/** Properties of an [ElementAspect]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementAspectProps extends EntityProps {\r\n element: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\r\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\r\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\r\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\r\n */\r\n scope: RelatedElementProps;\r\n /** The identifier of the object in the source repository. */\r\n identifier: string;\r\n /** The kind of object within the source repository. */\r\n kind: string;\r\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\r\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\r\n * If present, this value must be guaranteed to change when any of the source object's content changes.\r\n */\r\n version?: string;\r\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\r\n checksum?: string;\r\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\r\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\r\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\r\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\r\n */\r\n jsonProperties?: any;\r\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\r\n source?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSource]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceProps extends ElementProps {\r\n repository?: RelatedElementProps;\r\n connectorName?: string;\r\n connectorVersion?: string;\r\n}\r\n\r\n/** The role that an attached [ExternalSource]($backend) plays.\r\n * @beta\r\n */\r\nexport enum ExternalSourceAttachmentRole {\r\n /** The attached [ExternalSource]($backend) provides context. */\r\n SpecifyContext = 0,\r\n /** The attached [ExternalSource]($backend) models a part of the whole. */\r\n SpecifyPart = 1,\r\n}\r\n\r\n/** Properties of an [ExternalSourceAttachment]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceAttachmentProps extends ElementProps {\r\n attaches?: RelatedElementProps;\r\n role?: ExternalSourceAttachmentRole;\r\n translation?: XYZProps;\r\n yaw?: number;\r\n pitch?: number;\r\n roll?: number;\r\n scale?: XYZProps;\r\n}\r\n\r\n/** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChannelRootAspectProps extends ElementAspectProps {\r\n /** The owner of the channel */\r\n owner: string;\r\n}\r\n\r\n/** Properties of a [LineStyle]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface LineStyleProps extends DefinitionElementProps {\r\n description?: string;\r\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\r\n data: string;\r\n}\r\n\r\n/** Properties of a [LightLocation]($backend)\r\n * @internal\r\n */\r\nexport interface LightLocationProps extends GeometricElement3dProps {\r\n enabled?: boolean;\r\n}\r\n\r\n/** The *rank* for a Category\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Rank {\r\n /** This category is predefined by the system */\r\n System = 0,\r\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\r\n Domain = 1,\r\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\r\n Application = 2,\r\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\r\n User = 3,\r\n}\r\n\r\n/** Parameters of a [Category]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategoryProps extends DefinitionElementProps {\r\n rank?: Rank;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [SubCategory]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubCategoryProps extends DefinitionElementProps {\r\n appearance?: SubCategoryAppearance.Props;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [UrlLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface UrlLinkProps extends ElementProps {\r\n description?: string;\r\n url?: string;\r\n}\r\n\r\n/** Parameters of a [RepositoryLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RepositoryLinkProps extends UrlLinkProps {\r\n repositoryGuid?: GuidString;\r\n format?: string;\r\n}\r\n\r\n/** The properties of a [SynchronizationConfigLink]($backend)\r\n * @beta\r\n */\r\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\r\n lastSuccessfulRun?: string;\r\n}\r\n\r\n/** Wire format describing a [RenderTimeline]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineProps extends ElementProps {\r\n /** An optional human-readable description of the timeline. */\r\n description?: string;\r\n /** The stringified JSON representation of the instructions for visualizing change over time.\r\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\r\n */\r\n script: string;\r\n}\r\n\r\n/** Properties of a [SheetIndexEntry]($backend).\r\n * @beta\r\n*/\r\nexport interface SheetIndexEntryProps extends ElementProps {\r\n /** Can be used to prioritize or order members within a SheetIndex or SheetIndexFolder. */\r\n entryPriority: number;\r\n}\r\n\r\n/** Properties of a [SheetIndexFolder]($backend)\r\n * @beta\r\n */\r\nexport type SheetIndexFolderProps = SheetIndexEntryProps;\r\n\r\n/** Properties of a [SheetIndexReference]($backend)\r\n * @beta\r\n */\r\nexport interface SheetIndexReferenceProps extends SheetIndexEntryProps {\r\n /** The bis:SheetIndex that this bis:SheetIndexReference is pointing to. */\r\n sheetIndex?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [SheetReference]($backend)\r\n * @beta\r\n */\r\nexport interface SheetReferenceProps extends SheetIndexEntryProps {\r\n /** The bis:Sheet that this bis:SheetReference is pointing to. */\r\n sheet?: RelatedElementProps;\r\n}\r\n"]}
1
+ {"version":3,"file":"ElementProps.js","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA4IH,gDAEC;AAKD,gDAEC;AAnJD,sDAAmE;AAQnE,+CAA0D;AAqC1D;;GAEG;AACH,MAAa,cAAc;IAOzB,YAAY,KAA0B;QACpC,IAAI,CAAC,EAAE,GAAG,mBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAA0B;QAC/C,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACrD,CAAC;IAKD,mJAAmJ;IAC5I,MAAM,CAAC,UAAU,CAAC,IAAS;QAChC,IAAI,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;YACjD,MAAM,CAAC,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,SAAS;gBACjB,MAAM,IAAI,yBAAW,CAAC,0BAAY,CAAC,MAAM,EAAE,gCAAgC,CAAC,CAAC;YAC/E,OAAO,CAAC,CAAC,EAAE,CAAC;QACd,CAAC;QACD,OAAO,mBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAEM,MAAM;QACX,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC;IACJ,CAAC;;AAnCH,wCAoCC;AApBC,8DAA8D;AACvC,mBAAI,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE,EAAE,mBAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AAqBzE;;GAEG;AACH,MAAa,cAAe,SAAQ,cAAc;CACjD;AADD,wCACC;AA6CD;;GAEG;AACH,SAAgB,kBAAkB,CAAC,KAAqB;IACtD,OAAQ,KAA0B,CAAC,KAAK,KAAK,SAAS,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,KAAqB;IACtD,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AA+BD;;;GAGG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,mDAAW,CAAA;IACX,iDAAU,CAAA;IACV,uDAAa,CAAA;IACb,6CAAQ,CAAA;AACV,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAmRD;;GAEG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,gEAAgE;IAChE,mGAAkB,CAAA;IAClB,0EAA0E;IAC1E,6FAAe,CAAA;AACjB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC;AAyCD;;;GAGG;AACH,IAAY,IASX;AATD,WAAY,IAAI;IACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,oBAAJ,IAAI,QASf","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 Entities\r\n */\r\n\r\nimport { GuidString, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AngleProps, ClipVectorProps, LowAndHighXYProps, LowAndHighXYZProps, TransformProps, XYProps, XYZProps, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"./Code\";\r\nimport { EntityProps } from \"./EntityProps\";\r\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\r\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\r\nimport { IModelError, IModelStatus } from \"./IModelError\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { TextAnnotationProps } from \"./annotation/TextAnnotation\";\r\n\r\n/** Properties of a NavigationProperty.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n id: Id64String;\r\n /** The full className of the relationship class. */\r\n relClassName?: string;\r\n}\r\n\r\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementProps extends EntityProps {\r\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\r\n model: Id64String;\r\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\r\n code: CodeProps;\r\n /** The Parent of this element, if defined. */\r\n parent?: RelatedElementProps;\r\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\r\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\r\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\r\n */\r\n federationGuid?: GuidString;\r\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\r\n userLabel?: string;\r\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\r\n jsonProperties?: any;\r\n}\r\n\r\n/** The Id and relationship class of an Element that is somehow related to another Element\r\n * @public\r\n */\r\nexport class RelatedElement implements RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n public readonly id: Id64String;\r\n\r\n /** The full className of the relationship class. */\r\n public readonly relClassName?: string;\r\n\r\n constructor(props: RelatedElementProps) {\r\n this.id = Id64.fromJSON(props.id);\r\n this.relClassName = props.relClassName;\r\n }\r\n\r\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\r\n return json ? new RelatedElement(json) : undefined;\r\n }\r\n\r\n /** Used to *null out* an existing navigation relationship. */\r\n public static readonly none = new RelatedElement({ id: Id64.invalid });\r\n\r\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\r\n public static idFromJson(json: any): Id64String {\r\n if ((typeof json === \"object\") && (\"id\" in json)) {\r\n const r = RelatedElement.fromJSON(json);\r\n if (r === undefined)\r\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\r\n return r.id;\r\n }\r\n return Id64.fromJSON(json);\r\n }\r\n\r\n public toJSON(): RelatedElementProps {\r\n return {\r\n id: this.id,\r\n relClassName: this.relClassName,\r\n };\r\n }\r\n}\r\n\r\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\r\n * @public\r\n */\r\nexport class TypeDefinition extends RelatedElement {\r\n}\r\n\r\n/** Properties of a [GeometricElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElementProps extends ElementProps {\r\n /** The id of the category for this geometric element. */\r\n category: Id64String;\r\n /** The geometry stream properties */\r\n geom?: GeometryStreamProps;\r\n /** Describes how to build the element's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\r\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent element.\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\r\n /** The placement properties */\r\n placement?: PlacementProps;\r\n}\r\n\r\n/** Properties of a [[Placement3d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement3dProps {\r\n origin: XYZProps;\r\n angles: YawPitchRollProps;\r\n bbox?: LowAndHighXYZProps;\r\n}\r\n\r\n/** Properties of a [[Placement2d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement2dProps {\r\n origin: XYProps;\r\n angle: AngleProps;\r\n bbox?: LowAndHighXYProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport type PlacementProps = Placement2dProps | Placement3dProps;\r\n\r\n/** determine if this is Placement2dProps\r\n * @public\r\n */\r\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\r\n return (props as Placement2dProps).angle !== undefined;\r\n}\r\n\r\n/** determine if this is Placement3dProps\r\n * @public\r\n */\r\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\r\n return !isPlacement2dProps(props);\r\n}\r\n\r\n/** Properties that define a [GeometricElement3d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement3dProps extends GeometricElementProps {\r\n placement?: Placement3dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** JSON representation of a [TextAnnotation3d]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextAnnotation3dProps extends GeometricElement3dProps {\r\n jsonProperties?: {\r\n [key: string]: any;\r\n /** @beta */\r\n annotation?: TextAnnotationProps;\r\n };\r\n}\r\n\r\n/** Properties that define a [PhysicalElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalElementProps extends GeometricElement3dProps {\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SectionType {\r\n Section = 3,\r\n Detail = 4,\r\n Elevation = 5,\r\n Plan = 6,\r\n}\r\n\r\n/** Properties that define a [SectionDrawing]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingProps extends ElementProps {\r\n /** The type of section used to generate the drawing. Default: Section. */\r\n sectionType?: SectionType;\r\n /** The spatial view from which the section was generated. */\r\n spatialView?: RelatedElementProps;\r\n jsonProperties?: {\r\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\r\n drawingToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\r\n sheetToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\r\n * the sheet graphics when drawn in the context of the spatial view.\r\n * The ClipVector is in spatial coordinates.\r\n */\r\n drawingBoundaryClip?: ClipVectorProps;\r\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\r\n displaySpatialView?: true;\r\n };\r\n}\r\n\r\n/** Properties that define a [SectionDrawingLocation]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\r\n /** The [ViewDefinition]($backend) to which this location refers. */\r\n sectionView?: RelatedElementProps;\r\n}\r\n\r\n/** Properties that define a [GeometricElement2d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement2dProps extends GeometricElementProps {\r\n placement?: Placement2dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** JSON representation of a [TextAnnotation2d]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextAnnotation2dProps extends GeometricElement2dProps {\r\n jsonProperties?: {\r\n [key: string]: any;\r\n /** @beta */\r\n annotation?: TextAnnotationProps;\r\n };\r\n}\r\n\r\n/** Properties of a [GeometryPart]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryPartProps extends ElementProps {\r\n geom?: GeometryStreamProps;\r\n /** Describes how to build the part's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\r\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent part.\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\r\n bbox?: LowAndHighXYZProps;\r\n}\r\n\r\n/** Properties for a [ViewAttachment]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\r\n view: RelatedElementProps;\r\n jsonProperties?: {\r\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\r\n displayPriority?: number;\r\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\r\n clip?: ClipVectorProps;\r\n /** Options for customizing how the view attachment is displayed on the sheet. */\r\n displayOptions?: {\r\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\r\n drawAsRaster?: boolean;\r\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\r\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\r\n */\r\n preserveBackground?: boolean;\r\n };\r\n };\r\n}\r\n\r\n/** Properties of a [Subject]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubjectProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Properties of a [SheetBorderTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetBorderTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n}\r\n\r\n/** Properties of a [SheetTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n border?: Id64String;\r\n}\r\n\r\n/** Properties of a [Sheet]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SheetProps extends ElementProps {\r\n width?: number;\r\n height?: number;\r\n scale?: number;\r\n sheetTemplate?: Id64String;\r\n attachments?: Id64String[];\r\n}\r\n\r\n/** Properties of a [DefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DefinitionElementProps extends ElementProps {\r\n isPrivate?: boolean;\r\n}\r\n\r\n/** Properties of a [TypeDefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\r\n recipe?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [PhysicalType]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\r\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [InformationPartitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface InformationPartitionElementProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\r\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DisplayStyleLoadProps {\r\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\r\n * The element Ids are not required on the frontend for display and can be quite large.\r\n */\r\n omitScheduleScriptElementIds?: boolean;\r\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\r\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\r\n */\r\n compressExcludedElementIds?: boolean;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\r\n * @see [[ElementLoadOptions.renderTimeline]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineLoadProps {\r\n /** If true, the lists of element Ids in the schedule script will be empty.\r\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\r\n */\r\n omitScriptElementIds?: boolean;\r\n}\r\n\r\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\r\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadOptions {\r\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\r\n onlyBaseProperties?: boolean;\r\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\r\n */\r\n wantGeometry?: boolean;\r\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\r\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\r\n */\r\n wantBRepData?: boolean;\r\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\r\n renderTimeline?: RenderTimelineLoadProps;\r\n}\r\n\r\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadProps extends ElementLoadOptions {\r\n id?: Id64String;\r\n /** The properties of the Code of the element to load.\r\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\r\n * TODO: change to Required<CodeProps> in Version 4.0\r\n */\r\n code?: CodeProps;\r\n federationGuid?: GuidString;\r\n}\r\n\r\n/** Properties of an [ElementAspect]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementAspectProps extends EntityProps {\r\n element: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\r\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\r\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\r\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\r\n */\r\n scope: RelatedElementProps;\r\n /** The identifier of the object in the source repository. */\r\n identifier: string;\r\n /** The kind of object within the source repository. */\r\n kind: string;\r\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\r\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\r\n * If present, this value must be guaranteed to change when any of the source object's content changes.\r\n */\r\n version?: string;\r\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\r\n checksum?: string;\r\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\r\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\r\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\r\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\r\n */\r\n jsonProperties?: any;\r\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\r\n source?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSource]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceProps extends ElementProps {\r\n repository?: RelatedElementProps;\r\n connectorName?: string;\r\n connectorVersion?: string;\r\n}\r\n\r\n/** The role that an attached [ExternalSource]($backend) plays.\r\n * @beta\r\n */\r\nexport enum ExternalSourceAttachmentRole {\r\n /** The attached [ExternalSource]($backend) provides context. */\r\n SpecifyContext = 0,\r\n /** The attached [ExternalSource]($backend) models a part of the whole. */\r\n SpecifyPart = 1,\r\n}\r\n\r\n/** Properties of an [ExternalSourceAttachment]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceAttachmentProps extends ElementProps {\r\n attaches?: RelatedElementProps;\r\n role?: ExternalSourceAttachmentRole;\r\n translation?: XYZProps;\r\n yaw?: number;\r\n pitch?: number;\r\n roll?: number;\r\n scale?: XYZProps;\r\n}\r\n\r\n/** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChannelRootAspectProps extends ElementAspectProps {\r\n /** The owner of the channel */\r\n owner: string;\r\n}\r\n\r\n/** Properties of a [LineStyle]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface LineStyleProps extends DefinitionElementProps {\r\n description?: string;\r\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\r\n data: string;\r\n}\r\n\r\n/** Properties of a [LightLocation]($backend)\r\n * @internal\r\n */\r\nexport interface LightLocationProps extends GeometricElement3dProps {\r\n enabled?: boolean;\r\n}\r\n\r\n/** The *rank* for a Category\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Rank {\r\n /** This category is predefined by the system */\r\n System = 0,\r\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\r\n Domain = 1,\r\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\r\n Application = 2,\r\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\r\n User = 3,\r\n}\r\n\r\n/** Parameters of a [Category]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategoryProps extends DefinitionElementProps {\r\n rank?: Rank;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [SubCategory]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubCategoryProps extends DefinitionElementProps {\r\n appearance?: SubCategoryAppearance.Props;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [UrlLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface UrlLinkProps extends ElementProps {\r\n description?: string;\r\n url?: string;\r\n}\r\n\r\n/** Parameters of a [RepositoryLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RepositoryLinkProps extends UrlLinkProps {\r\n repositoryGuid?: GuidString;\r\n format?: string;\r\n}\r\n\r\n/** The properties of a [SynchronizationConfigLink]($backend)\r\n * @beta\r\n */\r\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\r\n lastSuccessfulRun?: string;\r\n}\r\n\r\n/** Wire format describing a [RenderTimeline]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineProps extends ElementProps {\r\n /** An optional human-readable description of the timeline. */\r\n description?: string;\r\n /** The stringified JSON representation of the instructions for visualizing change over time.\r\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\r\n */\r\n script: string;\r\n}\r\n\r\n/** Properties of a [SheetIndexEntry]($backend).\r\n * @beta\r\n*/\r\nexport interface SheetIndexEntryProps extends ElementProps {\r\n /** Can be used to prioritize or order members within a SheetIndex or SheetIndexFolder. */\r\n entryPriority: number;\r\n}\r\n\r\n/** Properties of a [SheetIndexFolder]($backend)\r\n * @beta\r\n */\r\nexport type SheetIndexFolderProps = SheetIndexEntryProps;\r\n\r\n/** Properties of a [SheetIndexReference]($backend)\r\n * @beta\r\n */\r\nexport interface SheetIndexReferenceProps extends SheetIndexEntryProps {\r\n /** The bis:SheetIndex that this bis:SheetIndexReference is pointing to. */\r\n sheetIndex?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [SheetReference]($backend)\r\n * @beta\r\n */\r\nexport interface SheetReferenceProps extends SheetIndexEntryProps {\r\n /** The bis:Sheet that this bis:SheetReference is pointing to. */\r\n sheet?: RelatedElementProps;\r\n}\r\n"]}
@@ -7,7 +7,8 @@
7
7
  * @module iModels
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.mapToGeoServiceStatus = exports.GeoCoordStatus = void 0;
10
+ exports.GeoCoordStatus = void 0;
11
+ exports.mapToGeoServiceStatus = mapToGeoServiceStatus;
11
12
  // cspell:ignore NGVD, NAVD, COMPD_CS, PROJCS, GEOGCS
12
13
  const core_bentley_1 = require("@itwin/core-bentley");
13
14
  /** This enumeration lists all possible status as returned from a coordinate conversion to or from a
@@ -78,5 +79,4 @@ function mapToGeoServiceStatus(s) {
78
79
  throw new Error("GeoCoordStatus -> GeoServiceStatus - Missing enum conversion");
79
80
  }
80
81
  }
81
- exports.mapToGeoServiceStatus = mapToGeoServiceStatus;
82
82
  //# sourceMappingURL=GeoCoordinateServices.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeoCoordinateServices.js","sourceRoot":"","sources":["../../src/GeoCoordinateServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,qDAAqD;AAErD,sDAAuD;AAIvD;;;;;;GAMG;AACH,IAAY,cA0CX;AA1CD,WAAY,cAAc;IACxB,kDAAkD;IAClD,yDAAW,CAAA;IACX,sIAAsI;IACtI,qEAAkB,CAAA;IAClB;;;;;;;;;;OAUG;IACH,2EAAoB,CAAA;IACpB;;;;OAIG;IACH,yFAA2B,CAAA;IAC3B;;;;OAIG;IACH,4EAAqB,CAAA;IACrB;;;;OAIG;IACH,8FAA8B,CAAA;IAC9B,sGAAsG;IACtG,kEAAiB,CAAA;IACjB;;;OAGG;IACH,8DAAgB,CAAA;AAClB,CAAC,EA1CW,cAAc,8BAAd,cAAc,QA0CzB;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAiB;IACrD,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D,KAAK,cAAc,CAAC,YAAY,CAAC,CAAC,OAAO,+BAAgB,CAAC,aAAa,CAAC;QACxE,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,uBAAuB,CAAC,CAAC,OAAO,+BAAgB,CAAC,uBAAuB,CAAC;QAC7F,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,yBAAyB,CAAC,CAAC,OAAO,+BAAgB,CAAC,yBAAyB,CAAC;QACjG,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,OAAO,+BAAgB,CAAC,UAAU,CAAC;QACnE,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D;YACE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACpF,CAAC;AACH,CAAC;AAbD,sDAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\n// cspell:ignore NGVD, NAVD, COMPD_CS, PROJCS, GEOGCS\r\n\r\nimport { GeoServiceStatus } from \"@itwin/core-bentley\";\r\nimport { XYZProps } from \"@itwin/core-geometry\";\r\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\n\r\n/** This enumeration lists all possible status as returned from a coordinate conversion to or from a\r\n * [[GeographicCRS]] and either another [[GeographicCRS]] or a [[GeodeticDatum]].\r\n * @see [[GeoConverter]] to perform coordinate conversions.\r\n * @see [[PointWithStatus]] for the result of a coordinate conversion, including its status code.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GeoCoordStatus {\r\n /** Indicates successful coordinate conversion. */\r\n Success = 0,\r\n /** Indicates that the source or target of the conversion is not defined, usually the iModel Geographic Coordinate Reference System.*/\r\n NoGCSDefined = 100,\r\n /** This value indicates that the conversion was performed outside of the normal use of application of either Geographic Coordinate Reference Systems.\r\n * This return value can often be treated as a warning in specific cases. For example, global imagery extent spans the whole globe and\r\n * may extend far beyond the normal area of the iModel project extents and the extent of normal use of its Geographic Coordinate Reference System.\r\n * In such cases this value can be considered a warning as accuracy and precision is not expected in this specific case and approximate localization\r\n * of global imagery or other low accuracy context data is not essential far from the project.\r\n * If this status is returned for high accuracy data then it indicates that either Geographic Coordinate Reference Systems were inappropriately selected\r\n * for the iModel or other geolocated data. If this is the case the status should be somehow reported so action\r\n * can be performed to verify used geolocation parameters.\r\n * In either case the returned coordinates are to be considered valid though they may be inaccurate or result in some unexpected distortion of graphical\r\n * elements.\r\n */\r\n OutOfUsefulRange = 1,\r\n /** Indicates a hard error where conversions were requested outside of the area of the mathematical capacity of the conversion process for either\r\n * Geographic Coordinate Reference Systems involved. An example could be to attempt a conversion involving a Transverse Mercator more than 60 degrees\r\n * East or West of the projection central meridian.\r\n * The values returned may or may not be valid and should be discarded.\r\n */\r\n OutOfMathematicalDomain = 2,\r\n /** Indicates that datum transformation between the two Geographic Coordinate Reference Systems could not be performed.\r\n * This error is usually the result of a datum transformation path requiring use of latitude/longitude grid shift files that could not be obtained\r\n * or installed. In this case the latitude/longitude transformation is bypassed but the remainder of the conversion process is completed.\r\n * This error can be ignored for low accuracy data but should be somehow reported so actions can be performed to provide the missing files.\r\n */\r\n NoDatumConverter = 25,\r\n /** Indicates that a problem occurred during vertical datum conversion. This may the result of the inability to access the\r\n * Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).\r\n * The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.\r\n * This status should be somehow reported so actions can be performed to provide the missing information.\r\n */\r\n VerticalDatumConvertError = 26,\r\n /** General inner conversion engine error. Coordinates returned are invalid and should be discarded */\r\n CSMapError = 4096,\r\n /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend\r\n * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).\r\n * At the completion of the conversion promise no coordinates should have this status.\r\n */\r\n Pending = -41556,\r\n}\r\n\r\n/** Maps a GeoCoordStatus to the equivalent GeoServiceStatus.\r\n * @public\r\n */\r\nexport function mapToGeoServiceStatus(s: GeoCoordStatus): GeoServiceStatus {\r\n switch (s) {\r\n case GeoCoordStatus.Success: return GeoServiceStatus.Success;\r\n case GeoCoordStatus.NoGCSDefined: return GeoServiceStatus.NoGeoLocation;\r\n case GeoCoordStatus.OutOfUsefulRange: return GeoServiceStatus.OutOfUsefulRange;\r\n case GeoCoordStatus.OutOfMathematicalDomain: return GeoServiceStatus.OutOfMathematicalDomain;\r\n case GeoCoordStatus.NoDatumConverter: return GeoServiceStatus.NoDatumConverter;\r\n case GeoCoordStatus.VerticalDatumConvertError: return GeoServiceStatus.VerticalDatumConvertError;\r\n case GeoCoordStatus.CSMapError: return GeoServiceStatus.CSMapError;\r\n case GeoCoordStatus.Pending: return GeoServiceStatus.Pending;\r\n default:\r\n throw new Error(\"GeoCoordStatus -> GeoServiceStatus - Missing enum conversion\");\r\n }\r\n}\r\n\r\n/** Information required to request conversion of an array of Geographic coordinates (Longitude/Latitude) to iModel coordinates\r\n * @beta\r\n */\r\nexport interface IModelCoordinatesRequestProps {\r\n source: string;\r\n geoCoords: XYZProps[];\r\n}\r\n\r\n/** A point converted to iModel coordinates to geographic coordinates or vice-versa by a [[GeoConverter]].\r\n * The status [[s]] indicates the converted point [[p]]'s degree of accuracy.\r\n * @public\r\n */\r\nexport interface PointWithStatus {\r\n /** A JSON representation of the converted point. */\r\n p: XYZProps;\r\n /** A status code indicating the degree of accuracy with the point [[p]] was converted. */\r\n s: GeoCoordStatus;\r\n}\r\n\r\n/** @beta */\r\nexport interface IModelCoordinatesResponseProps {\r\n iModelCoords: PointWithStatus[];\r\n fromCache: number; // the number that were read from the cache rather than calculated.\r\n}\r\n\r\n/** Information required to request conversion of an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\r\n * @beta\r\n */\r\nexport interface GeoCoordinatesRequestProps {\r\n target: string;\r\n iModelCoords: XYZProps[];\r\n}\r\n\r\n/** Information returned from a request to convert an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\r\n * @beta\r\n */\r\nexport interface GeoCoordinatesResponseProps {\r\n geoCoords: PointWithStatus[];\r\n fromCache: number; // the number that were read from the cache rather than calculated.\r\n}\r\n\r\n/** Information required to interpret or complete a Geographic CRS in the specified format.\r\n * The only currently supported formats are JSON (for completion) and WKT (OGC Well Known Text)\r\n * @beta\r\n */\r\nexport interface GeographicCRSInterpretRequestProps {\r\n /** The format of the geographic CRS definition provided in the geographicCRSDef property. */\r\n format: \"WKT\" | \"JSON\";\r\n /** The geographic CRS definition in the format specified in the format property.\r\n * Note that when the WKT is used the WKT fragment provided can start with a COMPD_CS clause\r\n * which should then contain both the horizontal CRS definition as well as the vertical CRS specification.\r\n * WKT fragments starting with PROJCS or GEOGCS are also supported but the vertical CRS will be assigned a\r\n * default value.\r\n */\r\n geographicCRSDef: string;\r\n}\r\n\r\n/** Information returned from a request to interpret or complete a Geographic CRS\r\n * @beta\r\n */\r\nexport interface GeographicCRSInterpretResponseProps {\r\n /** The result status of the interpret operation. A value of zero indicates successful interpretation.\r\n * Any value other than zero is to be considered a hard error and no valid result will\r\n * be returned in the geographicCRS property.\r\n */\r\n status: number;\r\n /** The property that receives the interpreted geographic CRS if the process was successful. */\r\n geographicCRS?: GeographicCRSProps;\r\n}\r\n"]}
1
+ {"version":3,"file":"GeoCoordinateServices.js","sourceRoot":"","sources":["../../src/GeoCoordinateServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA8DH,sDAaC;AAzED,qDAAqD;AAErD,sDAAuD;AAIvD;;;;;;GAMG;AACH,IAAY,cA0CX;AA1CD,WAAY,cAAc;IACxB,kDAAkD;IAClD,yDAAW,CAAA;IACX,sIAAsI;IACtI,qEAAkB,CAAA;IAClB;;;;;;;;;;OAUG;IACH,2EAAoB,CAAA;IACpB;;;;OAIG;IACH,yFAA2B,CAAA;IAC3B;;;;OAIG;IACH,4EAAqB,CAAA;IACrB;;;;OAIG;IACH,8FAA8B,CAAA;IAC9B,sGAAsG;IACtG,kEAAiB,CAAA;IACjB;;;OAGG;IACH,8DAAgB,CAAA;AAClB,CAAC,EA1CW,cAAc,8BAAd,cAAc,QA0CzB;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAiB;IACrD,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D,KAAK,cAAc,CAAC,YAAY,CAAC,CAAC,OAAO,+BAAgB,CAAC,aAAa,CAAC;QACxE,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,uBAAuB,CAAC,CAAC,OAAO,+BAAgB,CAAC,uBAAuB,CAAC;QAC7F,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,yBAAyB,CAAC,CAAC,OAAO,+BAAgB,CAAC,yBAAyB,CAAC;QACjG,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,OAAO,+BAAgB,CAAC,UAAU,CAAC;QACnE,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D;YACE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACpF,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\n// cspell:ignore NGVD, NAVD, COMPD_CS, PROJCS, GEOGCS\r\n\r\nimport { GeoServiceStatus } from \"@itwin/core-bentley\";\r\nimport { XYZProps } from \"@itwin/core-geometry\";\r\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\n\r\n/** This enumeration lists all possible status as returned from a coordinate conversion to or from a\r\n * [[GeographicCRS]] and either another [[GeographicCRS]] or a [[GeodeticDatum]].\r\n * @see [[GeoConverter]] to perform coordinate conversions.\r\n * @see [[PointWithStatus]] for the result of a coordinate conversion, including its status code.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GeoCoordStatus {\r\n /** Indicates successful coordinate conversion. */\r\n Success = 0,\r\n /** Indicates that the source or target of the conversion is not defined, usually the iModel Geographic Coordinate Reference System.*/\r\n NoGCSDefined = 100,\r\n /** This value indicates that the conversion was performed outside of the normal use of application of either Geographic Coordinate Reference Systems.\r\n * This return value can often be treated as a warning in specific cases. For example, global imagery extent spans the whole globe and\r\n * may extend far beyond the normal area of the iModel project extents and the extent of normal use of its Geographic Coordinate Reference System.\r\n * In such cases this value can be considered a warning as accuracy and precision is not expected in this specific case and approximate localization\r\n * of global imagery or other low accuracy context data is not essential far from the project.\r\n * If this status is returned for high accuracy data then it indicates that either Geographic Coordinate Reference Systems were inappropriately selected\r\n * for the iModel or other geolocated data. If this is the case the status should be somehow reported so action\r\n * can be performed to verify used geolocation parameters.\r\n * In either case the returned coordinates are to be considered valid though they may be inaccurate or result in some unexpected distortion of graphical\r\n * elements.\r\n */\r\n OutOfUsefulRange = 1,\r\n /** Indicates a hard error where conversions were requested outside of the area of the mathematical capacity of the conversion process for either\r\n * Geographic Coordinate Reference Systems involved. An example could be to attempt a conversion involving a Transverse Mercator more than 60 degrees\r\n * East or West of the projection central meridian.\r\n * The values returned may or may not be valid and should be discarded.\r\n */\r\n OutOfMathematicalDomain = 2,\r\n /** Indicates that datum transformation between the two Geographic Coordinate Reference Systems could not be performed.\r\n * This error is usually the result of a datum transformation path requiring use of latitude/longitude grid shift files that could not be obtained\r\n * or installed. In this case the latitude/longitude transformation is bypassed but the remainder of the conversion process is completed.\r\n * This error can be ignored for low accuracy data but should be somehow reported so actions can be performed to provide the missing files.\r\n */\r\n NoDatumConverter = 25,\r\n /** Indicates that a problem occurred during vertical datum conversion. This may the result of the inability to access the\r\n * Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).\r\n * The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.\r\n * This status should be somehow reported so actions can be performed to provide the missing information.\r\n */\r\n VerticalDatumConvertError = 26,\r\n /** General inner conversion engine error. Coordinates returned are invalid and should be discarded */\r\n CSMapError = 4096,\r\n /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend\r\n * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).\r\n * At the completion of the conversion promise no coordinates should have this status.\r\n */\r\n Pending = -41556,\r\n}\r\n\r\n/** Maps a GeoCoordStatus to the equivalent GeoServiceStatus.\r\n * @public\r\n */\r\nexport function mapToGeoServiceStatus(s: GeoCoordStatus): GeoServiceStatus {\r\n switch (s) {\r\n case GeoCoordStatus.Success: return GeoServiceStatus.Success;\r\n case GeoCoordStatus.NoGCSDefined: return GeoServiceStatus.NoGeoLocation;\r\n case GeoCoordStatus.OutOfUsefulRange: return GeoServiceStatus.OutOfUsefulRange;\r\n case GeoCoordStatus.OutOfMathematicalDomain: return GeoServiceStatus.OutOfMathematicalDomain;\r\n case GeoCoordStatus.NoDatumConverter: return GeoServiceStatus.NoDatumConverter;\r\n case GeoCoordStatus.VerticalDatumConvertError: return GeoServiceStatus.VerticalDatumConvertError;\r\n case GeoCoordStatus.CSMapError: return GeoServiceStatus.CSMapError;\r\n case GeoCoordStatus.Pending: return GeoServiceStatus.Pending;\r\n default:\r\n throw new Error(\"GeoCoordStatus -> GeoServiceStatus - Missing enum conversion\");\r\n }\r\n}\r\n\r\n/** Information required to request conversion of an array of Geographic coordinates (Longitude/Latitude) to iModel coordinates\r\n * @beta\r\n */\r\nexport interface IModelCoordinatesRequestProps {\r\n source: string;\r\n geoCoords: XYZProps[];\r\n}\r\n\r\n/** A point converted to iModel coordinates to geographic coordinates or vice-versa by a [[GeoConverter]].\r\n * The status [[s]] indicates the converted point [[p]]'s degree of accuracy.\r\n * @public\r\n */\r\nexport interface PointWithStatus {\r\n /** A JSON representation of the converted point. */\r\n p: XYZProps;\r\n /** A status code indicating the degree of accuracy with the point [[p]] was converted. */\r\n s: GeoCoordStatus;\r\n}\r\n\r\n/** @beta */\r\nexport interface IModelCoordinatesResponseProps {\r\n iModelCoords: PointWithStatus[];\r\n fromCache: number; // the number that were read from the cache rather than calculated.\r\n}\r\n\r\n/** Information required to request conversion of an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\r\n * @beta\r\n */\r\nexport interface GeoCoordinatesRequestProps {\r\n target: string;\r\n iModelCoords: XYZProps[];\r\n}\r\n\r\n/** Information returned from a request to convert an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\r\n * @beta\r\n */\r\nexport interface GeoCoordinatesResponseProps {\r\n geoCoords: PointWithStatus[];\r\n fromCache: number; // the number that were read from the cache rather than calculated.\r\n}\r\n\r\n/** Information required to interpret or complete a Geographic CRS in the specified format.\r\n * The only currently supported formats are JSON (for completion) and WKT (OGC Well Known Text)\r\n * @beta\r\n */\r\nexport interface GeographicCRSInterpretRequestProps {\r\n /** The format of the geographic CRS definition provided in the geographicCRSDef property. */\r\n format: \"WKT\" | \"JSON\";\r\n /** The geographic CRS definition in the format specified in the format property.\r\n * Note that when the WKT is used the WKT fragment provided can start with a COMPD_CS clause\r\n * which should then contain both the horizontal CRS definition as well as the vertical CRS specification.\r\n * WKT fragments starting with PROJCS or GEOGCS are also supported but the vertical CRS will be assigned a\r\n * default value.\r\n */\r\n geographicCRSDef: string;\r\n}\r\n\r\n/** Information returned from a request to interpret or complete a Geographic CRS\r\n * @beta\r\n */\r\nexport interface GeographicCRSInterpretResponseProps {\r\n /** The result status of the interpret operation. A value of zero indicates successful interpretation.\r\n * Any value other than zero is to be considered a hard error and no valid result will\r\n * be returned in the geographicCRS property.\r\n */\r\n status: number;\r\n /** The property that receives the interpreted geographic CRS if the process was successful. */\r\n geographicCRS?: GeographicCRSProps;\r\n}\r\n"]}
package/lib/cjs/Image.js CHANGED
@@ -7,7 +7,10 @@
7
7
  * @module Rendering
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ImageSource = exports.isValidImageSourceFormat = exports.ImageSourceFormat = exports.nextHighestPowerOfTwo = exports.isPowerOfTwo = exports.ImageBuffer = exports.ImageBufferFormat = void 0;
10
+ exports.ImageSource = exports.ImageSourceFormat = exports.ImageBuffer = exports.ImageBufferFormat = void 0;
11
+ exports.isPowerOfTwo = isPowerOfTwo;
12
+ exports.nextHighestPowerOfTwo = nextHighestPowerOfTwo;
13
+ exports.isValidImageSourceFormat = isValidImageSourceFormat;
11
14
  /** Format of an [[ImageBuffer]].
12
15
  * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.
13
16
  * @see [[ImageBuffer.getNumBytesPerPixel]]
@@ -76,7 +79,6 @@ exports.ImageBuffer = ImageBuffer;
76
79
  function isPowerOfTwo(num) {
77
80
  return 0 === (num & (num - 1));
78
81
  }
79
- exports.isPowerOfTwo = isPowerOfTwo;
80
82
  /** Returns the first power-of-two value greater than or equal to the input.
81
83
  * @note Floating point inputs are truncated.
82
84
  * @public
@@ -87,7 +89,6 @@ function nextHighestPowerOfTwo(num) {
87
89
  num = num | num >> i;
88
90
  return num + 1;
89
91
  }
90
- exports.nextHighestPowerOfTwo = nextHighestPowerOfTwo;
91
92
  /** The format of an ImageSource.
92
93
  * @public
93
94
  * @extensions
@@ -114,7 +115,6 @@ function isValidImageSourceFormat(format) {
114
115
  return false;
115
116
  }
116
117
  }
117
- exports.isValidImageSourceFormat = isValidImageSourceFormat;
118
118
  /** Image data encoded and compressed in either Jpeg or Png format.
119
119
  * @public
120
120
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAAA;IACR,sCAAsC;IACtC,uDAAO,CAAA;IACP,wBAAwB;IACxB,2DAAS,CAAA;AACX,CAAC,EAPW,iBAAiB,iCAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAa,WAAW;IAQtB,2DAA2D;IAC3D,IAAW,gBAAgB,KAAa,OAAO,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,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,MAAyB;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAXD,kCAWC","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 Rendering\r\n */\r\n\r\n/** Format of an [[ImageBuffer]].\r\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\r\n * @see [[ImageBuffer.getNumBytesPerPixel]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ImageBufferFormat {\r\n /** RGBA format - 4 bytes per pixel. */\r\n Rgba = 0,\r\n /** RGB format - 3 bytes per pixel. */\r\n Rgb = 2,\r\n /** 1 byte per pixel. */\r\n Alpha = 5,\r\n}\r\n\r\n/** Uncompressed rectangular bitmap image data.\r\n * @public\r\n */\r\nexport class ImageBuffer {\r\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\r\n public readonly data: Uint8Array;\r\n /** Format of the bytes in the image. */\r\n public readonly format: ImageBufferFormat;\r\n /** Width of image in pixels */\r\n public readonly width: number;\r\n\r\n /** Return the number of bytes allocated for each pixel. */\r\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\r\n\r\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\r\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\r\n switch (format) {\r\n case ImageBufferFormat.Alpha: return 1;\r\n case ImageBufferFormat.Rgb: return 3;\r\n default: return 4;\r\n }\r\n }\r\n\r\n /** Get the height of this image in pixels. */\r\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\r\n\r\n /** Create a new ImageBuffer.\r\n * @note The ImageBuffer takes ownership of the input Uint8Array.\r\n * @param data The uncompressed image bytes. Must be a multiple of the width times the number of bytes per pixel specified by the format.\r\n * @param format The format of the image.\r\n * @param width The width of the image in pixels.\r\n * @returns A new ImageBuffer.\r\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\r\n */\r\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\r\n if (!this.isValidData(data, format, width))\r\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\r\n\r\n return new ImageBuffer(data, format, width);\r\n }\r\n\r\n /** @internal */\r\n protected static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\r\n const height = this.computeHeight(data, format, width);\r\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\r\n }\r\n\r\n /** @internal */\r\n protected static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\r\n return data.length / (width * this.getNumBytesPerPixel(format));\r\n }\r\n\r\n /** @internal */\r\n protected constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\r\n this.data = data;\r\n this.format = format;\r\n this.width = width;\r\n }\r\n}\r\n\r\n/** Returns whether the input is a power of two.\r\n * @note Floating point inputs are truncated.\r\n * @public\r\n */\r\nexport function isPowerOfTwo(num: number): boolean {\r\n return 0 === (num & (num - 1));\r\n}\r\n\r\n/** Returns the first power-of-two value greater than or equal to the input.\r\n * @note Floating point inputs are truncated.\r\n * @public\r\n */\r\nexport function nextHighestPowerOfTwo(num: number): number {\r\n --num;\r\n for (let i = 1; i < 32; i <<= 1)\r\n num = num | num >> i;\r\n\r\n return num + 1;\r\n}\r\n\r\n/** The format of an ImageSource.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ImageSourceFormat {\r\n /** Image data is stored with JPEG compression. */\r\n Jpeg = 0,\r\n /** Image data is stored with PNG compression. */\r\n Png = 2,\r\n /** Image is stored as an Svg stream.\r\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\r\n */\r\n Svg = 3,\r\n}\r\n\r\n/** @internal */\r\nexport function isValidImageSourceFormat(format: ImageSourceFormat): boolean {\r\n switch (format) {\r\n case ImageSourceFormat.Jpeg:\r\n case ImageSourceFormat.Png:\r\n case ImageSourceFormat.Svg:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\n/** Image data encoded and compressed in either Jpeg or Png format.\r\n * @public\r\n */\r\nexport class ImageSource {\r\n /** The content of the image, compressed */\r\n public readonly data: Uint8Array | string;\r\n /** The compression type. */\r\n public readonly format: ImageSourceFormat;\r\n\r\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\r\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\r\n this.data = data;\r\n this.format = format;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAiFH,oCAEC;AAMD,sDAMC;AAkBD,4DASC;AAxHD;;;;;GAKG;AACH,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAAA;IACR,sCAAsC;IACtC,uDAAO,CAAA;IACP,wBAAwB;IACxB,2DAAS,CAAA;AACX,CAAC,EAPW,iBAAiB,iCAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAa,WAAW;IAQtB,2DAA2D;IAC3D,IAAW,gBAAgB,KAAa,OAAO,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAE9F,0FAA0F;IACnF,MAAM,CAAC,mBAAmB,CAAC,MAAyB;QACzD,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,iBAAiB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;YACvC,KAAK,iBAAiB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,8CAA8C;IAC9C,IAAW,MAAM,KAAa,OAAO,WAAW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C,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,GAAW;IAC/C,EAAE,GAAG,CAAC;IACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC;QAC7B,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC;IAEvB,OAAO,GAAG,GAAG,CAAC,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,kDAAkD;IAClD,yDAAQ,CAAA;IACR,iDAAiD;IACjD,uDAAO,CAAA;IACP;;OAEG;IACH,uDAAO,CAAA;AACT,CAAC,EATW,iBAAiB,iCAAjB,iBAAiB,QAS5B;AAED,gBAAgB;AAChB,SAAgB,wBAAwB,CAAC,MAAyB;IAChE,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,iBAAiB,CAAC,IAAI,CAAC;QAC5B,KAAK,iBAAiB,CAAC,GAAG,CAAC;QAC3B,KAAK,iBAAiB,CAAC,GAAG;YACxB,OAAO,IAAI,CAAC;QACd;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAa,WAAW;IAMtB,4EAA4E;IAC5E,YAAmB,IAAyB,EAAE,MAAyB;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAXD,kCAWC","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 Rendering\r\n */\r\n\r\n/** Format of an [[ImageBuffer]].\r\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\r\n * @see [[ImageBuffer.getNumBytesPerPixel]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ImageBufferFormat {\r\n /** RGBA format - 4 bytes per pixel. */\r\n Rgba = 0,\r\n /** RGB format - 3 bytes per pixel. */\r\n Rgb = 2,\r\n /** 1 byte per pixel. */\r\n Alpha = 5,\r\n}\r\n\r\n/** Uncompressed rectangular bitmap image data.\r\n * @public\r\n */\r\nexport class ImageBuffer {\r\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\r\n public readonly data: Uint8Array;\r\n /** Format of the bytes in the image. */\r\n public readonly format: ImageBufferFormat;\r\n /** Width of image in pixels */\r\n public readonly width: number;\r\n\r\n /** Return the number of bytes allocated for each pixel. */\r\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\r\n\r\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\r\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\r\n switch (format) {\r\n case ImageBufferFormat.Alpha: return 1;\r\n case ImageBufferFormat.Rgb: return 3;\r\n default: return 4;\r\n }\r\n }\r\n\r\n /** Get the height of this image in pixels. */\r\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\r\n\r\n /** Create a new ImageBuffer.\r\n * @note The ImageBuffer takes ownership of the input Uint8Array.\r\n * @param data The uncompressed image bytes. Must be a multiple of the width times the number of bytes per pixel specified by the format.\r\n * @param format The format of the image.\r\n * @param width The width of the image in pixels.\r\n * @returns A new ImageBuffer.\r\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\r\n */\r\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\r\n if (!this.isValidData(data, format, width))\r\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\r\n\r\n return new ImageBuffer(data, format, width);\r\n }\r\n\r\n /** @internal */\r\n protected static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\r\n const height = this.computeHeight(data, format, width);\r\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\r\n }\r\n\r\n /** @internal */\r\n protected static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\r\n return data.length / (width * this.getNumBytesPerPixel(format));\r\n }\r\n\r\n /** @internal */\r\n protected constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\r\n this.data = data;\r\n this.format = format;\r\n this.width = width;\r\n }\r\n}\r\n\r\n/** Returns whether the input is a power of two.\r\n * @note Floating point inputs are truncated.\r\n * @public\r\n */\r\nexport function isPowerOfTwo(num: number): boolean {\r\n return 0 === (num & (num - 1));\r\n}\r\n\r\n/** Returns the first power-of-two value greater than or equal to the input.\r\n * @note Floating point inputs are truncated.\r\n * @public\r\n */\r\nexport function nextHighestPowerOfTwo(num: number): number {\r\n --num;\r\n for (let i = 1; i < 32; i <<= 1)\r\n num = num | num >> i;\r\n\r\n return num + 1;\r\n}\r\n\r\n/** The format of an ImageSource.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ImageSourceFormat {\r\n /** Image data is stored with JPEG compression. */\r\n Jpeg = 0,\r\n /** Image data is stored with PNG compression. */\r\n Png = 2,\r\n /** Image is stored as an Svg stream.\r\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\r\n */\r\n Svg = 3,\r\n}\r\n\r\n/** @internal */\r\nexport function isValidImageSourceFormat(format: ImageSourceFormat): boolean {\r\n switch (format) {\r\n case ImageSourceFormat.Jpeg:\r\n case ImageSourceFormat.Png:\r\n case ImageSourceFormat.Svg:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\n/** Image data encoded and compressed in either Jpeg or Png format.\r\n * @public\r\n */\r\nexport class ImageSource {\r\n /** The content of the image, compressed */\r\n public readonly data: Uint8Array | string;\r\n /** The compression type. */\r\n public readonly format: ImageSourceFormat;\r\n\r\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\r\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\r\n this.data = data;\r\n this.format = format;\r\n }\r\n}\r\n"]}
@@ -391,7 +391,7 @@ export declare class QPoint3dList {
391
391
  /** Construct a list containing all points in the supplied list, quantized using the supplied parameters. */
392
392
  static createFrom(points: Point3d[], params: QParams3d): QPoint3dList;
393
393
  /** An iterator over the points in the list. */
394
- [Symbol.iterator](): IterableIterator<QPoint3d>;
394
+ [Symbol.iterator](): ArrayIterator<QPoint3d>;
395
395
  }
396
396
  /** Options used to construct a [[QPoint2dBufferBuilder]].
397
397
  * @public
@@ -7,7 +7,10 @@
7
7
  * @module Utils
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.calculateSunriseOrSunset = exports.calculateSolarDirectionFromAngles = exports.calculateSolarDirection = exports.calculateSolarAngles = void 0;
10
+ exports.calculateSolarAngles = calculateSolarAngles;
11
+ exports.calculateSolarDirection = calculateSolarDirection;
12
+ exports.calculateSolarDirectionFromAngles = calculateSolarDirectionFromAngles;
13
+ exports.calculateSunriseOrSunset = calculateSunriseOrSunset;
11
14
  const core_geometry_1 = require("@itwin/core-geometry");
12
15
  // cspell:ignore mrad sinm sint aarg
13
16
  // Code below loosely translated from https://www.esrl.noaa.gov/gmd/grad/solcalc/
@@ -160,14 +163,12 @@ function calculateSolarAngles(date, location) {
160
163
  const T = calcTimeJulianCent(jTotal);
161
164
  return calcAzEl(T, localMinutes, latitude, longitude, zone);
162
165
  }
163
- exports.calculateSolarAngles = calculateSolarAngles;
164
166
  /** @public
165
167
  * calculate solar direction based at a given date/time and cartpgrphic location.
166
168
  */
167
169
  function calculateSolarDirection(date, location) {
168
170
  return calculateSolarDirectionFromAngles(calculateSolarAngles(date, location));
169
171
  }
170
- exports.calculateSolarDirection = calculateSolarDirection;
171
172
  /** @public
172
173
  * calculate solar direction corresponding to the given azimuth and elevation (altitude) angles in degrees.
173
174
  */
@@ -178,7 +179,6 @@ function calculateSolarDirectionFromAngles(azimuthElevation) {
178
179
  const sinElevation = Math.sin(elevation);
179
180
  return core_geometry_1.Vector3d.create(-Math.sin(azimuth) * cosElevation, -Math.cos(azimuth) * cosElevation, -sinElevation);
180
181
  }
181
- exports.calculateSolarDirectionFromAngles = calculateSolarDirectionFromAngles;
182
182
  function dateFromUtcMinutes(date, utcMinutes) {
183
183
  const utcHours = Math.floor(utcMinutes / 60.0);
184
184
  const output = new Date(date);
@@ -208,5 +208,4 @@ function calculateSunriseOrSunset(date, location, sunrise) {
208
208
  const utcMinutes = calcSunriseUtcMinutes(sunrise, latitude, longitude, jDay);
209
209
  return sunrise ? dateFromUtcMinutes(date, utcMinutes) : dateFromUtcMinutes(date, calcSunriseUtcMinutes(sunrise, latitude, longitude, jDay + utcMinutes / 1440));
210
210
  }
211
- exports.calculateSunriseOrSunset = calculateSunriseOrSunset;
212
211
  //# sourceMappingURL=SolarCalculate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SolarCalculate.js","sourceRoot":"","sources":["../../src/SolarCalculate.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAuD;AAGvD,oCAAoC;AAEpC,kFAAkF;AAClF,SAAS,kBAAkB,CAAC,EAAU;IACpC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,QAAQ,CAAC,QAAgB;IAChC,OAAO,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,QAAQ,CAAC,QAAgB;IAChC,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,mBAAmB,CAAC,CAAS;IACpC,IAAI,EAAE,GAAG,SAAS,GAAG,CAAC,GAAG,CAAC,WAAW,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,OAAO,EAAE,GAAG,KAAK,EAAE,CA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BAAqB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,GAAG,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC;AAClK,CAAC;AAND,4DAMC","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 Utils\r\n */\r\n\r\nimport { Angle, Vector3d } from \"@itwin/core-geometry\";\r\nimport { Cartographic } from \"./geometry/Cartographic\";\r\n\r\n// cspell:ignore mrad sinm sint aarg\r\n\r\n// Code below loosely translated from https://www.esrl.noaa.gov/gmd/grad/solcalc/\r\nfunction calcTimeJulianCent(jd: number) {\r\n const T = (jd - 2451545.0) / 36525.0;\r\n return T;\r\n}\r\n\r\nfunction radToDeg(angleRad: number) {\r\n return (180.0 * angleRad / Math.PI);\r\n}\r\n\r\nfunction degToRad(angleDeg: number) {\r\n return (Math.PI * angleDeg / 180.0);\r\n}\r\n\r\nfunction calcGeomMeanLongSun(t: number) {\r\n let L0 = 280.46646 + t * (36000.76983 + t * (0.0003032));\r\n while (L0 > 360.0) {\r\n L0 -= 360.0;\r\n }\r\n while (L0 < 0.0) {\r\n L0 += 360.0;\r\n }\r\n return L0;\t\t// in degrees\r\n}\r\n\r\nfunction calcGeomMeanAnomalySun(t: number) {\r\n const M = 357.52911 + t * (35999.05029 - 0.0001537 * t);\r\n return M;\t\t// in degrees\r\n}\r\n\r\nfunction calcEccentricityEarthOrbit(t: number) {\r\n const e = 0.016708634 - t * (0.000042037 + 0.0000001267 * t);\r\n return e;\t\t// unitless\r\n}\r\n\r\nfunction calcSunEqOfCenter(t: number) {\r\n const m = calcGeomMeanAnomalySun(t);\r\n const mrad = degToRad(m);\r\n const sinm = Math.sin(mrad);\r\n const sin2m = Math.sin(mrad + mrad);\r\n const sin3m = Math.sin(mrad + mrad + mrad);\r\n const C = sinm * (1.914602 - t * (0.004817 + 0.000014 * t)) + sin2m * (0.019993 - 0.000101 * t) + sin3m * 0.000289;\r\n return C;\t\t// in degrees\r\n}\r\n\r\nfunction calcSunTrueLong(t: number) {\r\n const l0 = calcGeomMeanLongSun(t);\r\n const c = calcSunEqOfCenter(t);\r\n const O = l0 + c;\r\n return O;\t\t// in degrees\r\n}\r\n\r\nfunction calcSunApparentLong(t: number) {\r\n const o = calcSunTrueLong(t);\r\n const omega = 125.04 - 1934.136 * t;\r\n const lambda = o - 0.00569 - 0.00478 * Math.sin(degToRad(omega));\r\n return lambda;\t\t// in degrees\r\n}\r\n\r\nfunction calcMeanObliquityOfEcliptic(t: number) {\r\n const seconds = 21.448 - t * (46.8150 + t * (0.00059 - t * (0.001813)));\r\n const e0 = 23.0 + (26.0 + (seconds / 60.0)) / 60.0;\r\n return e0;\t\t// in degrees\r\n}\r\n\r\nfunction calcObliquityCorrection(t: number) {\r\n const e0 = calcMeanObliquityOfEcliptic(t);\r\n const omega = 125.04 - 1934.136 * t;\r\n const e = e0 + 0.00256 * Math.cos(degToRad(omega));\r\n return e;\t\t// in degrees\r\n}\r\n\r\nfunction calcSunDeclination(t: number) {\r\n const e = calcObliquityCorrection(t);\r\n const lambda = calcSunApparentLong(t);\r\n\r\n const sint = Math.sin(degToRad(e)) * Math.sin(degToRad(lambda));\r\n const theta = radToDeg(Math.asin(sint));\r\n return theta;\t\t// in degrees\r\n}\r\n\r\nfunction calcEquationOfTime(t: number) {\r\n const epsilon = calcObliquityCorrection(t);\r\n const l0 = calcGeomMeanLongSun(t);\r\n const e = calcEccentricityEarthOrbit(t);\r\n const m = calcGeomMeanAnomalySun(t);\r\n\r\n let y = Math.tan(degToRad(epsilon) / 2.0);\r\n y *= y;\r\n\r\n const sin2l0 = Math.sin(2.0 * degToRad(l0));\r\n const sinm = Math.sin(degToRad(m));\r\n const cos2l0 = Math.cos(2.0 * degToRad(l0));\r\n const sin4l0 = Math.sin(4.0 * degToRad(l0));\r\n const sin2m = Math.sin(2.0 * degToRad(m));\r\n\r\n const eTime = y * sin2l0 - 2.0 * e * sinm + 4.0 * e * y * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * e * e * sin2m;\r\n return radToDeg(eTime) * 4.0;\t// in minutes of time\r\n}\r\n\r\nfunction calcAzEl(t: number, localTime: number, latitude: number, longitude: number, zone: number): { azimuth: number, elevation: number } {\r\n const eqTime = calcEquationOfTime(t);\r\n const theta = calcSunDeclination(t);\r\n const solarTimeFix = eqTime + 4.0 * longitude - 60.0 * zone;\r\n let trueSolarTime = localTime + solarTimeFix;\r\n while (trueSolarTime > 1440)\r\n trueSolarTime -= 1440;\r\n\r\n let hourAngle = trueSolarTime / 4.0 - 180.0;\r\n if (hourAngle < -180) {\r\n hourAngle += 360.0;\r\n }\r\n const haRad = degToRad(hourAngle);\r\n let csz = Math.sin(degToRad(latitude)) * Math.sin(degToRad(theta)) + Math.cos(degToRad(latitude)) * Math.cos(degToRad(theta)) * Math.cos(haRad);\r\n if (csz > 1.0) {\r\n csz = 1.0;\r\n } else if (csz < -1.0) {\r\n csz = -1.0;\r\n }\r\n const zenith = radToDeg(Math.acos(csz));\r\n const azDenom = (Math.cos(degToRad(latitude)) * Math.sin(degToRad(zenith)));\r\n let azimuth;\r\n if (Math.abs(azDenom) > 0.001) {\r\n let azRad = ((Math.sin(degToRad(latitude)) * Math.cos(degToRad(zenith))) - Math.sin(degToRad(theta))) / azDenom;\r\n if (Math.abs(azRad) > 1.0) {\r\n if (azRad < 0) {\r\n azRad = -1.0;\r\n } else {\r\n azRad = 1.0;\r\n }\r\n }\r\n azimuth = 180.0 - radToDeg(Math.acos(azRad));\r\n if (hourAngle > 0.0) {\r\n azimuth = -azimuth;\r\n }\r\n } else {\r\n if (latitude > 0.0) {\r\n azimuth = 180.0;\r\n } else {\r\n azimuth = 0.0;\r\n }\r\n }\r\n if (azimuth < 0.0) {\r\n azimuth += 360.0;\r\n }\r\n return { azimuth, elevation: 90 - zenith };\r\n}\r\n\r\nfunction calculateJulianDay(date: Date) {\r\n return Math.floor(date.getTime() / 86400000) + 2440587.5; // https://stackoverflow.com/questions/11759992/calculating-jdayjulian-day-in-javascript\r\n}\r\n\r\n/** @public\r\n * calculate solar angles (in radians) based at a given date/time and cartographic location.\r\n */\r\nexport function calculateSolarAngles(date: Date, location: Cartographic): { azimuth: number, elevation: number } {\r\n const jDay = calculateJulianDay(date);\r\n const latitude = location.latitudeDegrees;\r\n const longitude = location.longitudeDegrees;\r\n const utcMinutes = date.getUTCHours() * 60 + date.getUTCMinutes() + date.getUTCSeconds() / 60;\r\n const zone = Math.floor(.5 + longitude / 15.0); // date.getTimeZoneOffset mixes in DST.\r\n const localMinutes = utcMinutes + zone * 60;\r\n const jTotal = jDay + utcMinutes / 1440.0;\r\n const T = calcTimeJulianCent(jTotal);\r\n return calcAzEl(T, localMinutes, latitude, longitude, zone);\r\n}\r\n\r\n/** @public\r\n * calculate solar direction based at a given date/time and cartpgrphic location.\r\n */\r\nexport function calculateSolarDirection(date: Date, location: Cartographic): Vector3d {\r\n return calculateSolarDirectionFromAngles(calculateSolarAngles(date, location));\r\n}\r\n\r\n/** @public\r\n * calculate solar direction corresponding to the given azimuth and elevation (altitude) angles in degrees.\r\n */\r\nexport function calculateSolarDirectionFromAngles(azimuthElevation: { azimuth: number, elevation: number }): Vector3d {\r\n const azimuth = Angle.degreesToRadians(azimuthElevation.azimuth);\r\n const elevation = Angle.degreesToRadians(azimuthElevation.elevation);\r\n const cosElevation = Math.cos(elevation);\r\n const sinElevation = Math.sin(elevation);\r\n return Vector3d.create(-Math.sin(azimuth) * cosElevation, -Math.cos(azimuth) * cosElevation, -sinElevation);\r\n}\r\n\r\nfunction dateFromUtcMinutes(date: Date, utcMinutes: number) {\r\n const utcHours = Math.floor(utcMinutes / 60.0);\r\n const output = new Date(date);\r\n output.setUTCHours(utcHours);\r\n output.setUTCMinutes(Math.floor(.5 + utcMinutes - 60.0 * utcHours));\r\n output.setUTCSeconds(0);\r\n return output;\r\n}\r\n\r\nfunction calcSunriseUtcMinutes(rise: boolean, lat: number, longitude: number, jDay: number) {\r\n const t = calcTimeJulianCent(jDay);\r\n const eqTime = calcEquationOfTime(t);\r\n const solarDec = calcSunDeclination(t);\r\n const latRad = degToRad(lat);\r\n const sdRad = degToRad(solarDec);\r\n const hAarg = (Math.cos(degToRad(90.833)) / (Math.cos(latRad) * Math.cos(sdRad)) - Math.tan(latRad) * Math.tan(sdRad));\r\n const hourAngle = Math.acos(hAarg);\r\n const delta = longitude + radToDeg(rise ? hourAngle : - hourAngle);\r\n return 720 - (4.0 * delta) - eqTime;\t// in UTC minutes\r\n}\r\n\r\n/** @public\r\n * calculate solar sunrise or sunset for a given day and cartographic location.\r\n */\r\nexport function calculateSunriseOrSunset(date: Date, location: Cartographic, sunrise: boolean): Date {\r\n const jDay = calculateJulianDay(date);\r\n const longitude = location.longitudeDegrees;\r\n const latitude = location.latitudeDegrees;\r\n const utcMinutes = calcSunriseUtcMinutes(sunrise, latitude, longitude, jDay);\r\n return sunrise ? dateFromUtcMinutes(date, utcMinutes) : dateFromUtcMinutes(date, calcSunriseUtcMinutes(sunrise, latitude, longitude, jDay + utcMinutes / 1440));\r\n}\r\n"]}
1
+ {"version":3,"file":"SolarCalculate.js","sourceRoot":"","sources":["../../src/SolarCalculate.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAkKH,oDAUC;AAKD,0DAEC;AAKD,8EAMC;AA0BD,4DAMC;AA5ND,wDAAuD;AAGvD,oCAAoC;AAEpC,kFAAkF;AAClF,SAAS,kBAAkB,CAAC,EAAU;IACpC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,QAAQ,CAAC,QAAgB;IAChC,OAAO,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,CAAC;AAED,SAA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GAAG,QAAQ,CAAC,eAAe,CAAC;IAC1C,MAAM,UAAU,GAAG,qBAAqB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAC7E,OAAO,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE,qBAAqB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,GAAG,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC;AAClK,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utils\r\n */\r\n\r\nimport { Angle, Vector3d } from \"@itwin/core-geometry\";\r\nimport { Cartographic } from \"./geometry/Cartographic\";\r\n\r\n// cspell:ignore mrad sinm sint aarg\r\n\r\n// Code below loosely translated from https://www.esrl.noaa.gov/gmd/grad/solcalc/\r\nfunction calcTimeJulianCent(jd: number) {\r\n const T = (jd - 2451545.0) / 36525.0;\r\n return T;\r\n}\r\n\r\nfunction radToDeg(angleRad: number) {\r\n return (180.0 * angleRad / Math.PI);\r\n}\r\n\r\nfunction degToRad(angleDeg: number) {\r\n return (Math.PI * angleDeg / 180.0);\r\n}\r\n\r\nfunction calcGeomMeanLongSun(t: number) {\r\n let L0 = 280.46646 + t * (36000.76983 + t * (0.0003032));\r\n while (L0 > 360.0) {\r\n L0 -= 360.0;\r\n }\r\n while (L0 < 0.0) {\r\n L0 += 360.0;\r\n }\r\n return L0;\t\t// in degrees\r\n}\r\n\r\nfunction calcGeomMeanAnomalySun(t: number) {\r\n const M = 357.52911 + t * (35999.05029 - 0.0001537 * t);\r\n return M;\t\t// in degrees\r\n}\r\n\r\nfunction calcEccentricityEarthOrbit(t: number) {\r\n const e = 0.016708634 - t * (0.000042037 + 0.0000001267 * t);\r\n return e;\t\t// unitless\r\n}\r\n\r\nfunction calcSunEqOfCenter(t: number) {\r\n const m = calcGeomMeanAnomalySun(t);\r\n const mrad = degToRad(m);\r\n const sinm = Math.sin(mrad);\r\n const sin2m = Math.sin(mrad + mrad);\r\n const sin3m = Math.sin(mrad + mrad + mrad);\r\n const C = sinm * (1.914602 - t * (0.004817 + 0.000014 * t)) + sin2m * (0.019993 - 0.000101 * t) + sin3m * 0.000289;\r\n return C;\t\t// in degrees\r\n}\r\n\r\nfunction calcSunTrueLong(t: number) {\r\n const l0 = calcGeomMeanLongSun(t);\r\n const c = calcSunEqOfCenter(t);\r\n const O = l0 + c;\r\n return O;\t\t// in degrees\r\n}\r\n\r\nfunction calcSunApparentLong(t: number) {\r\n const o = calcSunTrueLong(t);\r\n const omega = 125.04 - 1934.136 * t;\r\n const lambda = o - 0.00569 - 0.00478 * Math.sin(degToRad(omega));\r\n return lambda;\t\t// in degrees\r\n}\r\n\r\nfunction calcMeanObliquityOfEcliptic(t: number) {\r\n const seconds = 21.448 - t * (46.8150 + t * (0.00059 - t * (0.001813)));\r\n const e0 = 23.0 + (26.0 + (seconds / 60.0)) / 60.0;\r\n return e0;\t\t// in degrees\r\n}\r\n\r\nfunction calcObliquityCorrection(t: number) {\r\n const e0 = calcMeanObliquityOfEcliptic(t);\r\n const omega = 125.04 - 1934.136 * t;\r\n const e = e0 + 0.00256 * Math.cos(degToRad(omega));\r\n return e;\t\t// in degrees\r\n}\r\n\r\nfunction calcSunDeclination(t: number) {\r\n const e = calcObliquityCorrection(t);\r\n const lambda = calcSunApparentLong(t);\r\n\r\n const sint = Math.sin(degToRad(e)) * Math.sin(degToRad(lambda));\r\n const theta = radToDeg(Math.asin(sint));\r\n return theta;\t\t// in degrees\r\n}\r\n\r\nfunction calcEquationOfTime(t: number) {\r\n const epsilon = calcObliquityCorrection(t);\r\n const l0 = calcGeomMeanLongSun(t);\r\n const e = calcEccentricityEarthOrbit(t);\r\n const m = calcGeomMeanAnomalySun(t);\r\n\r\n let y = Math.tan(degToRad(epsilon) / 2.0);\r\n y *= y;\r\n\r\n const sin2l0 = Math.sin(2.0 * degToRad(l0));\r\n const sinm = Math.sin(degToRad(m));\r\n const cos2l0 = Math.cos(2.0 * degToRad(l0));\r\n const sin4l0 = Math.sin(4.0 * degToRad(l0));\r\n const sin2m = Math.sin(2.0 * degToRad(m));\r\n\r\n const eTime = y * sin2l0 - 2.0 * e * sinm + 4.0 * e * y * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * e * e * sin2m;\r\n return radToDeg(eTime) * 4.0;\t// in minutes of time\r\n}\r\n\r\nfunction calcAzEl(t: number, localTime: number, latitude: number, longitude: number, zone: number): { azimuth: number, elevation: number } {\r\n const eqTime = calcEquationOfTime(t);\r\n const theta = calcSunDeclination(t);\r\n const solarTimeFix = eqTime + 4.0 * longitude - 60.0 * zone;\r\n let trueSolarTime = localTime + solarTimeFix;\r\n while (trueSolarTime > 1440)\r\n trueSolarTime -= 1440;\r\n\r\n let hourAngle = trueSolarTime / 4.0 - 180.0;\r\n if (hourAngle < -180) {\r\n hourAngle += 360.0;\r\n }\r\n const haRad = degToRad(hourAngle);\r\n let csz = Math.sin(degToRad(latitude)) * Math.sin(degToRad(theta)) + Math.cos(degToRad(latitude)) * Math.cos(degToRad(theta)) * Math.cos(haRad);\r\n if (csz > 1.0) {\r\n csz = 1.0;\r\n } else if (csz < -1.0) {\r\n csz = -1.0;\r\n }\r\n const zenith = radToDeg(Math.acos(csz));\r\n const azDenom = (Math.cos(degToRad(latitude)) * Math.sin(degToRad(zenith)));\r\n let azimuth;\r\n if (Math.abs(azDenom) > 0.001) {\r\n let azRad = ((Math.sin(degToRad(latitude)) * Math.cos(degToRad(zenith))) - Math.sin(degToRad(theta))) / azDenom;\r\n if (Math.abs(azRad) > 1.0) {\r\n if (azRad < 0) {\r\n azRad = -1.0;\r\n } else {\r\n azRad = 1.0;\r\n }\r\n }\r\n azimuth = 180.0 - radToDeg(Math.acos(azRad));\r\n if (hourAngle > 0.0) {\r\n azimuth = -azimuth;\r\n }\r\n } else {\r\n if (latitude > 0.0) {\r\n azimuth = 180.0;\r\n } else {\r\n azimuth = 0.0;\r\n }\r\n }\r\n if (azimuth < 0.0) {\r\n azimuth += 360.0;\r\n }\r\n return { azimuth, elevation: 90 - zenith };\r\n}\r\n\r\nfunction calculateJulianDay(date: Date) {\r\n return Math.floor(date.getTime() / 86400000) + 2440587.5; // https://stackoverflow.com/questions/11759992/calculating-jdayjulian-day-in-javascript\r\n}\r\n\r\n/** @public\r\n * calculate solar angles (in radians) based at a given date/time and cartographic location.\r\n */\r\nexport function calculateSolarAngles(date: Date, location: Cartographic): { azimuth: number, elevation: number } {\r\n const jDay = calculateJulianDay(date);\r\n const latitude = location.latitudeDegrees;\r\n const longitude = location.longitudeDegrees;\r\n const utcMinutes = date.getUTCHours() * 60 + date.getUTCMinutes() + date.getUTCSeconds() / 60;\r\n const zone = Math.floor(.5 + longitude / 15.0); // date.getTimeZoneOffset mixes in DST.\r\n const localMinutes = utcMinutes + zone * 60;\r\n const jTotal = jDay + utcMinutes / 1440.0;\r\n const T = calcTimeJulianCent(jTotal);\r\n return calcAzEl(T, localMinutes, latitude, longitude, zone);\r\n}\r\n\r\n/** @public\r\n * calculate solar direction based at a given date/time and cartpgrphic location.\r\n */\r\nexport function calculateSolarDirection(date: Date, location: Cartographic): Vector3d {\r\n return calculateSolarDirectionFromAngles(calculateSolarAngles(date, location));\r\n}\r\n\r\n/** @public\r\n * calculate solar direction corresponding to the given azimuth and elevation (altitude) angles in degrees.\r\n */\r\nexport function calculateSolarDirectionFromAngles(azimuthElevation: { azimuth: number, elevation: number }): Vector3d {\r\n const azimuth = Angle.degreesToRadians(azimuthElevation.azimuth);\r\n const elevation = Angle.degreesToRadians(azimuthElevation.elevation);\r\n const cosElevation = Math.cos(elevation);\r\n const sinElevation = Math.sin(elevation);\r\n return Vector3d.create(-Math.sin(azimuth) * cosElevation, -Math.cos(azimuth) * cosElevation, -sinElevation);\r\n}\r\n\r\nfunction dateFromUtcMinutes(date: Date, utcMinutes: number) {\r\n const utcHours = Math.floor(utcMinutes / 60.0);\r\n const output = new Date(date);\r\n output.setUTCHours(utcHours);\r\n output.setUTCMinutes(Math.floor(.5 + utcMinutes - 60.0 * utcHours));\r\n output.setUTCSeconds(0);\r\n return output;\r\n}\r\n\r\nfunction calcSunriseUtcMinutes(rise: boolean, lat: number, longitude: number, jDay: number) {\r\n const t = calcTimeJulianCent(jDay);\r\n const eqTime = calcEquationOfTime(t);\r\n const solarDec = calcSunDeclination(t);\r\n const latRad = degToRad(lat);\r\n const sdRad = degToRad(solarDec);\r\n const hAarg = (Math.cos(degToRad(90.833)) / (Math.cos(latRad) * Math.cos(sdRad)) - Math.tan(latRad) * Math.tan(sdRad));\r\n const hourAngle = Math.acos(hAarg);\r\n const delta = longitude + radToDeg(rise ? hourAngle : - hourAngle);\r\n return 720 - (4.0 * delta) - eqTime;\t// in UTC minutes\r\n}\r\n\r\n/** @public\r\n * calculate solar sunrise or sunset for a given day and cartographic location.\r\n */\r\nexport function calculateSunriseOrSunset(date: Date, location: Cartographic, sunrise: boolean): Date {\r\n const jDay = calculateJulianDay(date);\r\n const longitude = location.longitudeDegrees;\r\n const latitude = location.latitudeDegrees;\r\n const utcMinutes = calcSunriseUtcMinutes(sunrise, latitude, longitude, jDay);\r\n return sunrise ? dateFromUtcMinutes(date, utcMinutes) : dateFromUtcMinutes(date, calcSunriseUtcMinutes(sunrise, latitude, longitude, jDay + utcMinutes / 1440));\r\n}\r\n"]}