@itwin/ecschema-rpcinterface-tests 4.7.0-dev.0 → 4.7.0-dev.11

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.
@@ -28230,6 +28230,8 @@ var ChangesetType;
28230
28230
  ChangesetType[ChangesetType["Regular"] = 0] = "Regular";
28231
28231
  /** changeset *does* contain schema changes. */
28232
28232
  ChangesetType[ChangesetType["Schema"] = 1] = "Schema";
28233
+ /** Schema changeset pushed by iModel with SchemaSync enabled */
28234
+ ChangesetType[ChangesetType["SchemaSync"] = 65] = "SchemaSync";
28233
28235
  })(ChangesetType || (ChangesetType = {}));
28234
28236
 
28235
28237
 
@@ -38377,7 +38379,8 @@ class QPoint2d {
38377
38379
  return pt;
38378
38380
  }
38379
38381
  }
38380
- /** @public
38382
+ /**
38383
+ * @public
38381
38384
  * @extensions
38382
38385
  */
38383
38386
  var QPoint2dBuffer;
@@ -44112,30 +44115,38 @@ __webpack_require__.r(__webpack_exports__);
44112
44115
 
44113
44116
  /**
44114
44117
  * Represents a formatted block of text positioned in 2d or 3d space.
44115
- * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a TextAnnotation from which their geometric representation is generated.
44118
+ * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.
44119
+ * Other types of elements may store multiple TextAnnotations, positioned relative to one another.
44120
+ * The annotation's position and orientation relative to the host element's [Placement]($common) is determined as follows:
44121
+ * - First, the width and height of a box enclosing the contents of the [[textBlock]] must be computed using [computeTextBlockExtents]($backend). This yields a box with the top-left
44122
+ * corner at (0, 0) and the bottom-right corner at (width, -height).
44123
+ * - Then, an "anchor point" is computed based on the text box and the [[anchor]] property. For example, if the annotation is anchored at the center-left, the anchor point will be (width/2, -height).
44124
+ * - The [[orientation]] is applied to rotate the box around the anchor point.
44125
+ * - Finally, the [[offset]] is added to the anchor point to apply translation.
44116
44126
  * @see [produceTextAnnotationGeometry]($backend) to decompose the annotation into a set of geometric primitives suitable for use with [[GeometryStreamBuilder.appendTextBlock]].
44117
44127
  * @beta
44118
- * @preview
44119
- * @extensions
44120
44128
  */
44121
44129
  class TextAnnotation {
44122
- constructor(angles, textBlock, anchor) {
44130
+ constructor(offset, angles, textBlock, anchor) {
44131
+ this.offset = offset;
44123
44132
  this.orientation = angles;
44124
44133
  this.textBlock = textBlock;
44125
44134
  this.anchor = anchor;
44126
44135
  }
44127
44136
  /** Creates a new TextAnnotation. */
44128
44137
  static create(args) {
44138
+ const offset = args?.offset ?? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d();
44129
44139
  const angles = args?.orientation ?? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.YawPitchRollAngles();
44130
44140
  const textBlock = args?.textBlock ?? _TextBlock__WEBPACK_IMPORTED_MODULE_1__.TextBlock.createEmpty();
44131
44141
  const anchor = args?.anchor ?? { vertical: "top", horizontal: "left" };
44132
- return new TextAnnotation(angles, textBlock, anchor);
44142
+ return new TextAnnotation(offset, angles, textBlock, anchor);
44133
44143
  }
44134
44144
  /**
44135
44145
  * Creates a new TextAnnotation instance from its JSON representation.
44136
44146
  */
44137
44147
  static fromJSON(props) {
44138
44148
  return TextAnnotation.create({
44149
+ offset: props?.offset ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d.fromJSON(props.offset) : undefined,
44139
44150
  orientation: props?.orientation ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.YawPitchRollAngles.fromJSON(props.orientation) : undefined,
44140
44151
  textBlock: props?.textBlock ? _TextBlock__WEBPACK_IMPORTED_MODULE_1__.TextBlock.create(props.textBlock) : undefined,
44141
44152
  anchor: props?.anchor ? { ...props.anchor } : undefined,
@@ -44149,6 +44160,9 @@ class TextAnnotation {
44149
44160
  // Even if the text block is empty, we want to record its style name and overrides, e.g.,
44150
44161
  // so the user can pick up where they left off editing it next time.
44151
44162
  props.textBlock = this.textBlock.toJSON();
44163
+ if (!this.offset.isZero) {
44164
+ props.offset = this.offset.toJSON();
44165
+ }
44152
44166
  if (!this.orientation.isIdentity()) {
44153
44167
  props.orientation = this.orientation.toJSON();
44154
44168
  }
@@ -44157,32 +44171,41 @@ class TextAnnotation {
44157
44171
  }
44158
44172
  return props;
44159
44173
  }
44160
- /**
44161
- * @internal used by produceTextAnnotationGeometry; requires layoutRange computed by layoutTextBlock.
44174
+ /** Compute the transform that positions and orients this annotation relative to its anchor point, based on the [[textBlock]]'s computed bounding box.
44175
+ * The anchor point is computed as specified by this annotation's [[anchor]] setting. For example, if the text block is anchored
44176
+ * at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.
44177
+ * The text block will be rotated around the fixed anchor point according to [[orientation]], then the anchor point will be translated by [[offset]].
44178
+ * @param textBlockDimensions The width and height of the bounding box containing the text block. You can compute this using [computeTextBlockExtents]($backend).
44179
+ * @see [[computeAnchorPoint]] to compute the transform's anchor point.
44162
44180
  */
44163
- computeDocumentTransform(layoutRange) {
44164
- const origin = this.computeAnchorPoint(layoutRange);
44181
+ computeTransform(textBlockDimensions) {
44182
+ const anchorPt = this.computeAnchorPoint(textBlockDimensions);
44165
44183
  const matrix = this.orientation.toMatrix3d();
44166
- return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createFixedPointAndMatrix(origin, matrix);
44184
+ const rotation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createFixedPointAndMatrix(anchorPt, matrix);
44185
+ const translation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createTranslation(this.offset);
44186
+ return translation.multiplyTransformTransform(rotation, rotation);
44167
44187
  }
44168
- /** @internal */
44169
- computeAnchorPoint(layoutRange) {
44188
+ /** Compute the anchor point of this annotation as specified by [[anchor]].
44189
+ * @param textBlockDimensions The width and height of the bounding box containing the [[textBlock]]. You can compute this using [computeTextBlockExtents]($backend).
44190
+ * @see [[computeTransform]] to compute the transform relative to the anchor point.
44191
+ */
44192
+ computeAnchorPoint(textBlockDimensions) {
44170
44193
  let x = 0;
44171
44194
  let y = 0;
44172
44195
  switch (this.anchor.horizontal) {
44173
44196
  case "center":
44174
- x += layoutRange.xLength() / 2;
44197
+ x += textBlockDimensions.x / 2;
44175
44198
  break;
44176
44199
  case "right":
44177
- x += layoutRange.xLength();
44200
+ x += textBlockDimensions.x;
44178
44201
  break;
44179
44202
  }
44180
44203
  switch (this.anchor.vertical) {
44181
44204
  case "middle":
44182
- y -= layoutRange.yLength() / 2;
44205
+ y -= textBlockDimensions.y / 2;
44183
44206
  break;
44184
44207
  case "bottom":
44185
- y -= layoutRange.yLength();
44208
+ y -= textBlockDimensions.y;
44186
44209
  break;
44187
44210
  }
44188
44211
  return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d(x, y, 0);
@@ -44190,7 +44213,8 @@ class TextAnnotation {
44190
44213
  /** Returns true if this annotation is logically equivalent to `other`. */
44191
44214
  equals(other) {
44192
44215
  return this.anchor.horizontal === other.anchor.horizontal && this.anchor.vertical === other.anchor.vertical
44193
- && this.orientation.isAlmostEqual(other.orientation) && this.textBlock.equals(other.textBlock);
44216
+ && this.orientation.isAlmostEqual(other.orientation) && this.offset.isAlmostEqual(other.offset)
44217
+ && this.textBlock.equals(other.textBlock);
44194
44218
  }
44195
44219
  }
44196
44220
 
@@ -44224,8 +44248,6 @@ __webpack_require__.r(__webpack_exports__);
44224
44248
  /** Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s, [[Paragraph]]s, and [[TextBlock]] itself.
44225
44249
  * Each component can specify a [[TextStyle]] that formats its contents and optional [[styleOverrides]] to customize that formatting.
44226
44250
  * @beta
44227
- * @preview
44228
- * @extensions
44229
44251
  */
44230
44252
  class TextBlockComponent {
44231
44253
  /** @internal */
@@ -44295,8 +44317,6 @@ class TextBlockComponent {
44295
44317
  * multiple lines, but it will never contain different styling.
44296
44318
  * Use the `type` field to discriminate between the different kinds of runs.
44297
44319
  * @beta
44298
- * @preview
44299
- * @extensions
44300
44320
  */
44301
44321
  var Run;
44302
44322
  (function (Run) {
@@ -44314,8 +44334,6 @@ var Run;
44314
44334
  })(Run || (Run = {}));
44315
44335
  /** The most common type of [[Run]], containing a sequence of characters to be displayed using a single style.
44316
44336
  * @beta
44317
- * @preview
44318
- * @extensions
44319
44337
  */
44320
44338
  class TextRun extends TextBlockComponent {
44321
44339
  constructor(props) {
@@ -44350,8 +44368,6 @@ class TextRun extends TextBlockComponent {
44350
44368
  /** A [[Run]] containing a numeric ratio to be displayed as a numerator and denominator separated by a horizontal or diagonal bar.
44351
44369
  * @note The [[numerator]] and [[denominator]] are stored as strings. They are not technically required to contain a numeric representation.
44352
44370
  * @beta
44353
- * @preview
44354
- * @extensions
44355
44371
  */
44356
44372
  class FractionRun extends TextBlockComponent {
44357
44373
  constructor(props) {
@@ -44386,8 +44402,6 @@ class FractionRun extends TextBlockComponent {
44386
44402
  }
44387
44403
  /** A [[Run]] that represents the end of a line of text within a [[Paragraph]]. It contains no content of its own - it simply causes subsequent content to display on a new line.
44388
44404
  * @beta
44389
- * @preview
44390
- * @extensions
44391
44405
  */
44392
44406
  class LineBreakRun extends TextBlockComponent {
44393
44407
  constructor(props) {
@@ -44417,8 +44431,6 @@ class LineBreakRun extends TextBlockComponent {
44417
44431
  }
44418
44432
  /** A collection of [[Run]]s within a [[TextBlock]]. Each paragraph within a text block is laid out on a separate line.
44419
44433
  * @beta
44420
- * @preview
44421
- * @extensions
44422
44434
  */
44423
44435
  class Paragraph extends TextBlockComponent {
44424
44436
  constructor(props) {
@@ -44466,8 +44478,6 @@ class Paragraph extends TextBlockComponent {
44466
44478
  * No word-wrapping is applied to the document unless a [[width]] greater than zero is specified.
44467
44479
  * @see [[TextAnnotation]] to position a text block as an annotation in 2d or 3d space.
44468
44480
  * @beta
44469
- * @preview
44470
- * @extensions
44471
44481
  */
44472
44482
  class TextBlock extends TextBlockComponent {
44473
44483
  constructor(props) {
@@ -44590,8 +44600,6 @@ __webpack_require__.r(__webpack_exports__);
44590
44600
  * @note This is an immutable type. Use [[clone]] to create a modified copy.
44591
44601
  * @see [[TextStyleSettingsProps]] for documentation of each of the settings.
44592
44602
  * @beta
44593
- * @preview
44594
- * @extensions
44595
44603
  */
44596
44604
  class TextStyleSettings {
44597
44605
  constructor(props, defaults) {
@@ -44658,8 +44666,6 @@ Object.freeze(TextStyleSettings.defaults);
44658
44666
  * @see [[TextBlockComponent.styleName]] to define the text style for a component of a [[TextBlock]].
44659
44667
  * @note This is an immutable type. Use [[clone]] to create a modified copy.
44660
44668
  * @beta
44661
- * @preview
44662
- * @extensions
44663
44669
  */
44664
44670
  class TextStyle {
44665
44671
  constructor(name, settings) {
@@ -46784,10 +46790,8 @@ var ElementGeometry;
46784
46790
  return true;
46785
46791
  }
46786
46792
  /** Append a series of entries representing a [[TextBlock]] to the [[ElementGeometryDataEntry]] array.
46787
- * @beta
46788
- * @extensions
46789
- * @preview
46790
- */
46793
+ * @beta
46794
+ */
46791
46795
  appendTextBlock(block) {
46792
46796
  for (const entry of block.entries) {
46793
46797
  let result;
@@ -53126,8 +53130,6 @@ class GeometryStreamBuilder {
53126
53130
  }
53127
53131
  /** Append a series of entries representing a [[TextBlock]] to the [[GeometryStreamProps]] array.
53128
53132
  * @beta
53129
- * @extensions
53130
- * @preview
53131
53133
  */
53132
53134
  appendTextBlock(block) {
53133
53135
  for (const entry of block.entries) {
@@ -55726,7 +55728,7 @@ class RpcInvocation {
55726
55728
  status: this.protocol.getCode(this.status),
55727
55729
  id: this.request.id,
55728
55730
  interfaceName: (typeof (this.operation) === "undefined") ? "" : this.operation.interfaceDefinition.interfaceName,
55729
- allowCompression: this.operation?.policy.allowResponseCompression || false,
55731
+ allowCompression: this.operation ? this.operation.policy.allowResponseCompression : true,
55730
55732
  };
55731
55733
  this.transformResponseStatus(fulfillment, rawResult);
55732
55734
  try {
@@ -55827,9 +55829,8 @@ class RpcMarshaling {
55827
55829
  /** Serializes a value. */
55828
55830
  static serialize(protocol, value) {
55829
55831
  const serialized = RpcSerializedValue.create();
55830
- if (typeof (value) === "undefined") {
55832
+ if (value === undefined)
55831
55833
  return serialized;
55832
- }
55833
55834
  marshalingTarget = serialized;
55834
55835
  chunkThreshold = protocol ? protocol.transferChunkThreshold : 0;
55835
55836
  serialized.objects = JSON.stringify(value, (_key, _value) => WireFormat.marshal(_key, _value));
@@ -55997,7 +55998,7 @@ class RpcOperationPolicy {
55997
55998
  /** Whether the IModelRpcProps in the operation parameter list is allowed to differ from the token in the request URL. */
55998
55999
  this.allowTokenMismatch = false;
55999
56000
  /** Whether to compress the operation response with one of the client's supported encodings. */
56000
- this.allowResponseCompression = false;
56001
+ this.allowResponseCompression = true;
56001
56002
  }
56002
56003
  }
56003
56004
  /** An RPC operation descriptor.
@@ -57055,6 +57056,8 @@ class RpcRequest {
57055
57056
  return this.reject(new _IModelError__WEBPACK_IMPORTED_MODULE_1__.NoContentError());
57056
57057
  }
57057
57058
  handleNotFound(status, value) {
57059
+ if (RpcRequest.notFoundHandlers.numberOfListeners === 0)
57060
+ this.handleRejected(value);
57058
57061
  const response = _RpcMarshaling__WEBPACK_IMPORTED_MODULE_4__.RpcMarshaling.deserialize(this.protocol, value);
57059
57062
  this.setStatus(status);
57060
57063
  let resubmitted = false;
@@ -57062,8 +57065,8 @@ class RpcRequest {
57062
57065
  if (resubmitted)
57063
57066
  throw new _IModelError__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR, `Already resubmitted using this handler.`);
57064
57067
  resubmitted = true;
57065
- this.submit(); // eslint-disable-line @typescript-eslint/no-floating-promises
57066
- }, (reason) => this.reject(reason));
57068
+ void this.submit();
57069
+ }, (reason) => reason ? this.reject(reason) : this.handleRejected(value));
57067
57070
  return;
57068
57071
  }
57069
57072
  resolve(result) {
@@ -59021,13 +59024,13 @@ var CurrentImdlVersion;
59021
59024
  * front-end is not capable of reading the tile content. Otherwise, this front-end can read the tile content even if the header specifies a
59022
59025
  * greater minor version than CurrentVersion.Minor, although some data may be skipped.
59023
59026
  */
59024
- CurrentImdlVersion[CurrentImdlVersion["Major"] = 33] = "Major";
59027
+ CurrentImdlVersion[CurrentImdlVersion["Major"] = 34] = "Major";
59025
59028
  /** The unsigned 16-bit minor version number. If the major version in the tile header is equal to CurrentVersion.Major, then this package can
59026
59029
  * read the tile content even if the minor version in the tile header is greater than this value, although some data may be skipped.
59027
59030
  */
59028
59031
  CurrentImdlVersion[CurrentImdlVersion["Minor"] = 0] = "Minor";
59029
59032
  /** The unsigned 32-bit version number derived from the 16-bit major and minor version numbers. */
59030
- CurrentImdlVersion[CurrentImdlVersion["Combined"] = 2162688] = "Combined";
59033
+ CurrentImdlVersion[CurrentImdlVersion["Combined"] = 2228224] = "Combined";
59031
59034
  })(CurrentImdlVersion || (CurrentImdlVersion = {}));
59032
59035
  /** Header embedded at the beginning of binary tile data in iMdl format describing its contents.
59033
59036
  * @internal
@@ -59336,6 +59339,7 @@ var TileOptions;
59336
59339
  ignoreAreaPatterns: 0 !== (contentFlags & ContentFlags.IgnoreAreaPatterns),
59337
59340
  enableExternalTextures: 0 !== (contentFlags & ContentFlags.ExternalTextures),
59338
59341
  useProjectExtents: 0 !== (tree.flags & TreeFlags.UseProjectExtents),
59342
+ expandProjectExtents: 0 !== (tree.flags & TreeFlags.ExpandProjectExtents),
59339
59343
  optimizeBRepProcessing: 0 !== (tree.flags & TreeFlags.OptimizeBRepProcessing),
59340
59344
  useLargerTiles: 0 !== (tree.flags & TreeFlags.UseLargerTiles),
59341
59345
  disableMagnification: false,
@@ -59479,6 +59483,7 @@ const defaultTileOptions = Object.freeze({
59479
59483
  ignoreAreaPatterns: false,
59480
59484
  enableExternalTextures: true,
59481
59485
  useProjectExtents: true,
59486
+ expandProjectExtents: true,
59482
59487
  optimizeBRepProcessing: true,
59483
59488
  useLargerTiles: true,
59484
59489
  disableMagnification: false,
@@ -59578,6 +59583,7 @@ var TreeFlags;
59578
59583
  TreeFlags[TreeFlags["EnforceDisplayPriority"] = 2] = "EnforceDisplayPriority";
59579
59584
  TreeFlags[TreeFlags["OptimizeBRepProcessing"] = 4] = "OptimizeBRepProcessing";
59580
59585
  TreeFlags[TreeFlags["UseLargerTiles"] = 8] = "UseLargerTiles";
59586
+ TreeFlags[TreeFlags["ExpandProjectExtents"] = 16] = "ExpandProjectExtents"; // If UseProjectExtents, round them up/down to nearest powers of ten.
59581
59587
  })(TreeFlags || (TreeFlags = {}));
59582
59588
  function animationIdToString(animationId) {
59583
59589
  return `A:${animationId}_`;
@@ -59592,6 +59598,8 @@ function iModelTileTreeIdToString(modelId, treeId, options) {
59592
59598
  flags |= TreeFlags.OptimizeBRepProcessing;
59593
59599
  if (options.useLargerTiles)
59594
59600
  flags |= TreeFlags.UseLargerTiles;
59601
+ if (options.expandProjectExtents)
59602
+ flags |= TreeFlags.ExpandProjectExtents;
59595
59603
  if (_FeatureTable__WEBPACK_IMPORTED_MODULE_2__.BatchType.Primary === treeId.type) {
59596
59604
  if (undefined !== treeId.animationId)
59597
59605
  idStr = `${idStr}${animationIdToString(treeId.animationId)}`;
@@ -59604,8 +59612,11 @@ function iModelTileTreeIdToString(modelId, treeId, options) {
59604
59612
  else {
59605
59613
  const typeStr = _FeatureTable__WEBPACK_IMPORTED_MODULE_2__.BatchType.PlanarClassifier === treeId.type ? "CP" : "C";
59606
59614
  idStr = `${idStr + typeStr}:${treeId.expansion.toFixed(6)}_`;
59607
- if (_FeatureTable__WEBPACK_IMPORTED_MODULE_2__.BatchType.VolumeClassifier === treeId.type)
59615
+ if (_FeatureTable__WEBPACK_IMPORTED_MODULE_2__.BatchType.VolumeClassifier === treeId.type) {
59616
+ // Volume classifiers always use the exact project extents.
59608
59617
  flags |= TreeFlags.UseProjectExtents;
59618
+ flags &= ~TreeFlags.ExpandProjectExtents;
59619
+ }
59609
59620
  if (undefined !== treeId.animationId)
59610
59621
  idStr = `${idStr}${animationIdToString(treeId.animationId)}`;
59611
59622
  }
@@ -69950,16 +69961,10 @@ exports.SchemaGraph = SchemaGraph;
69950
69961
  /*!**********************************************************************!*\
69951
69962
  !*** ../../core/ecschema-rpc/common/lib/cjs/ECSchemaRpcInterface.js ***!
69952
69963
  \**********************************************************************/
69953
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
69964
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
69954
69965
 
69955
69966
  "use strict";
69956
69967
 
69957
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
69958
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
69959
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
69960
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
69961
- return c > 3 && r && Object.defineProperty(target, key, r), r;
69962
- };
69963
69968
  Object.defineProperty(exports, "__esModule", ({ value: true }));
69964
69969
  exports.ECSchemaRpcInterface = void 0;
69965
69970
  /*---------------------------------------------------------------------------------------------
@@ -70006,9 +70011,6 @@ exports.ECSchemaRpcInterface = ECSchemaRpcInterface;
70006
70011
  ECSchemaRpcInterface.version = "2.0.0";
70007
70012
  ECSchemaRpcInterface.interfaceName = "ECSchemaRpcInterface";
70008
70013
  ECSchemaRpcInterface.interfaceVersion = ECSchemaRpcInterface.version;
70009
- __decorate([
70010
- core_common_1.RpcOperation.setPolicy({ allowResponseCompression: true })
70011
- ], ECSchemaRpcInterface.prototype, "getSchemaJSON", null);
70012
70014
 
70013
70015
 
70014
70016
  /***/ }),
@@ -76069,10 +76071,10 @@ class CheckpointConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_4_
76069
76071
  super(props);
76070
76072
  this._reopenConnectionHandler = async (request, response, resubmit, reject) => {
76071
76073
  if (!response.hasOwnProperty("isIModelNotFoundResponse"))
76072
- return;
76074
+ reject();
76073
76075
  const iModelRpcProps = request.parameters[0];
76074
76076
  if (this._fileKey !== iModelRpcProps.key)
76075
- return; // The handler is called for a different connection than this
76077
+ reject(); // The handler is called for a different connection than this
76076
76078
  _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace(loggerCategory, "Attempting to reopen connection", () => iModelRpcProps);
76077
76079
  try {
76078
76080
  const openResponse = await CheckpointConnection.callOpen(iModelRpcProps, this.routingContext);
@@ -100927,7 +100929,6 @@ const extensionExports = {
100927
100929
  FlashMode: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.FlashMode,
100928
100930
  FlashSettings: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.FlashSettings,
100929
100931
  FontType: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FontType,
100930
- FractionRun: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FractionRun,
100931
100932
  FrontendLoggerCategory: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.FrontendLoggerCategory,
100932
100933
  FrustumAnimator: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.FrustumAnimator,
100933
100934
  FrustumPlanes: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FrustumPlanes,
@@ -100962,7 +100963,6 @@ const extensionExports = {
100962
100963
  InteractiveTool: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.InteractiveTool,
100963
100964
  IntersectDetail: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.IntersectDetail,
100964
100965
  KeyinParseError: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.KeyinParseError,
100965
- LineBreakRun: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LineBreakRun,
100966
100966
  LinePixels: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels,
100967
100967
  LocateAction: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.LocateAction,
100968
100968
  LocateFilterStatus: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.LocateFilterStatus,
@@ -100988,7 +100988,6 @@ const extensionExports = {
100988
100988
  OutputMessageAlert: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.OutputMessageAlert,
100989
100989
  OutputMessagePriority: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.OutputMessagePriority,
100990
100990
  OutputMessageType: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.OutputMessageType,
100991
- Paragraph: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Paragraph,
100992
100991
  ParseAndRunResult: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.ParseAndRunResult,
100993
100992
  ParticleCollectionBuilder: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.ParticleCollectionBuilder,
100994
100993
  PerModelCategoryVisibility: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.PerModelCategoryVisibility,
@@ -101016,7 +101015,6 @@ const extensionExports = {
101016
101015
  RenderGraphicOwner: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.RenderGraphicOwner,
101017
101016
  RenderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderMode,
101018
101017
  RenderSystem: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.RenderSystem,
101019
- Run: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Run,
101020
101018
  Scene: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.Scene,
101021
101019
  ScreenViewport: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.ScreenViewport,
101022
101020
  SectionDrawingModelState: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.SectionDrawingModelState,
@@ -101045,12 +101043,6 @@ const extensionExports = {
101045
101043
  SyncMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.SyncMode,
101046
101044
  TentativePoint: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.TentativePoint,
101047
101045
  TerrainHeightOriginMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TerrainHeightOriginMode,
101048
- TextAnnotation: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextAnnotation,
101049
- TextBlock: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextBlock,
101050
- TextBlockComponent: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextBlockComponent,
101051
- TextRun: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextRun,
101052
- TextStyle: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextStyle,
101053
- TextStyleSettings: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextStyleSettings,
101054
101046
  TextureMapUnits: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapUnits,
101055
101047
  ThematicDisplayMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicDisplayMode,
101056
101048
  ThematicGradientColorScheme: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientColorScheme,
@@ -146901,6 +146893,7 @@ class TileAdmin {
146901
146893
  this.alwaysSubdivideIncompleteTiles = options.alwaysSubdivideIncompleteTiles ?? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.defaultTileOptions.alwaysSubdivideIncompleteTiles;
146902
146894
  this.maximumMajorTileFormatVersion = options.maximumMajorTileFormatVersion ?? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.defaultTileOptions.maximumMajorTileFormatVersion;
146903
146895
  this.useProjectExtents = options.useProjectExtents ?? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.defaultTileOptions.useProjectExtents;
146896
+ this.expandProjectExtents = options.expandProjectExtents ?? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.defaultTileOptions.expandProjectExtents;
146904
146897
  this.optimizeBRepProcessing = options.optimizeBRepProcessing ?? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.defaultTileOptions.optimizeBRepProcessing;
146905
146898
  this.useLargerTiles = options.useLargerTiles ?? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.defaultTileOptions.useLargerTiles;
146906
146899
  this.mobileRealityTileMinToleranceRatio = Math.max(options.mobileRealityTileMinToleranceRatio ?? 3.0, 1.0);
@@ -150807,7 +150800,13 @@ async function getCesiumTerrainProvider(opts) {
150807
150800
  }
150808
150801
  const tilingScheme = new _internal__WEBPACK_IMPORTED_MODULE_8__.GeographicTilingScheme();
150809
150802
  let tileAvailability;
150810
- if (undefined !== layers.available) {
150803
+ // When collecting tiles, only the highest resolution tiles are downloaded.
150804
+ // Because of that, the tile availability is often only populated by the
150805
+ // "layer" metadata. (i.e. not from higher resolution tiles metadata).
150806
+ // Unfortunately the "layer" metadata only cover the first 16 levels,
150807
+ // preventing the geometry collector from accessing to higher resolution tiles.
150808
+ // For now, the solution is to turn off tile availability check when collecting geometries.
150809
+ if (undefined !== layers.available && !opts.produceGeometry) {
150811
150810
  const availableTiles = layers.available;
150812
150811
  tileAvailability = new _internal__WEBPACK_IMPORTED_MODULE_8__.TileAvailability(tilingScheme, availableTiles.length);
150813
150812
  for (let level = 0; level < layers.available.length; level++) {
@@ -156309,6 +156308,7 @@ class MapTreeSupplier {
156309
156308
  exaggeration: id.terrainExaggeration,
156310
156309
  wantNormals: id.wantNormals,
156311
156310
  dataSource: id.terrainDataSource,
156311
+ produceGeometry: id.produceGeometry,
156312
156312
  };
156313
156313
  if (id.applyTerrain) {
156314
156314
  await _ApproximateTerrainHeights__WEBPACK_IMPORTED_MODULE_3__.ApproximateTerrainHeights.instance.initialize();
@@ -167305,6 +167305,17 @@ class ToolAdmin {
167305
167305
  if (!await _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.tools.run(this.defaultToolId, this.defaultToolArgs))
167306
167306
  return this.startPrimitiveTool(undefined);
167307
167307
  }
167308
+ /**
167309
+ * Call from external events or immediate tools that may have invalidated the current primitive tool's state.
167310
+ * Examples are undo, which may invalidate any references to elements, or an immediate tool that uses an edit command to write to the iModel,
167311
+ * since immediate tools do not replace the active tool.
167312
+ * The current primitive tool is expected to call installTool with a new instance, or exitTool to start the default tool.
167313
+ * @note Should be called even if the primitive tool is currently suspended by a view tool or input collector.
167314
+ */
167315
+ async restartPrimitiveTool() {
167316
+ if (undefined !== this._primitiveTool)
167317
+ await this._primitiveTool.onRestartTool();
167318
+ }
167308
167319
  setCursor(cursor) {
167309
167320
  if (undefined === this._saveCursor)
167310
167321
  _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.setViewCursor(cursor);
@@ -196548,17 +196559,17 @@ __webpack_require__.r(__webpack_exports__);
196548
196559
  /* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
196549
196560
  /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
196550
196561
  /* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
196551
- /* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
196562
+ /* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
196552
196563
  /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
196553
196564
  /* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
196554
196565
  /* harmony import */ var _numerics_Newton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../numerics/Newton */ "../../core/geometry/lib/esm/numerics/Newton.js");
196555
- /* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
196566
+ /* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
196556
196567
  /* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
196557
196568
  /* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
196558
196569
  /* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
196559
196570
  /* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
196560
196571
  /* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
196561
- /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
196572
+ /* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
196562
196573
  /*---------------------------------------------------------------------------------------------
196563
196574
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
196564
196575
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -196888,6 +196899,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
196888
196899
  * Check different combination of fractions on curveA and curveB. If distance between points at 2 fractions
196889
196900
  * is less than maxDistance, record CurveLocationDetailPair which is the approach between the 2 points.
196890
196901
  * Optionally, record close approaches of one curve's points if they fall between the other curve's points.
196902
+ * * If an input curve is a LineString3d, then the corresponding fractions must define a segment of the line string.
196891
196903
  * @param cpA curveA
196892
196904
  * @param fA0 fraction0 on curveA
196893
196905
  * @param fA1 fraction1 on curveA
@@ -196923,7 +196935,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
196923
196935
  */
196924
196936
  getPointCurveClosestApproachXYNewton(curveP, pointQ) {
196925
196937
  if (!(curveP instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) && !(curveP instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__.LineSegment3d)) {
196926
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!!"getPointCurveClosestApproachXYNewton only supports Arc3d and LineSegment");
196938
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!"getPointCurveClosestApproachXYNewton only supports Arc3d and LineSegment");
196927
196939
  return undefined;
196928
196940
  }
196929
196941
  const seeds = [0.2, 0.4, 0.6, 0.8]; // HEURISTIC: arcs have up to 4 perpendiculars; lines have only 1
@@ -196951,9 +196963,24 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
196951
196963
  return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(curveP, minCurvePFraction, minPointP);
196952
196964
  return undefined;
196953
196965
  }
196954
- /** Find the closest approach between pointA and cpB. Add the approach if it's within fB0 and fB1. */
196966
+ /**
196967
+ * Find the closest approach between `pointA` and `cpB`. Add the approach if it's within `fB0` and `fB1`.
196968
+ * * Does not test the endpoints of `cpB`.
196969
+ * * The only types supported for `cpB` are Arc3d, LineSegment3d, and LineString3d.
196970
+ * * If `cpB` is a LineString3d, then the interval `[fB0, fB1]` must correspond to a segment of the line string.
196971
+ */
196955
196972
  testAndRecordProjection(cpA, fA, pointA, cpB, fB0, fB1, reversed) {
196956
- const detail = this.getPointCurveClosestApproachXYNewton(cpB, pointA);
196973
+ let detail;
196974
+ if (cpB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d) {
196975
+ const segParamsB = cpB.globalFractionToSegmentIndexAndLocalFraction(fB0 <= fB1 ? fB0 : fB1);
196976
+ const segIndexB = (segParamsB.fraction < 0.999999) ? segParamsB.index : segParamsB.index + 1;
196977
+ const segmentB = cpB.getIndexedSegment(segIndexB);
196978
+ if (segmentB && (detail = this.getPointCurveClosestApproachXYNewton(segmentB, pointA)))
196979
+ _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d.convertLocalToGlobalDetail(detail, segIndexB, cpB.numEdges(), cpB);
196980
+ }
196981
+ else {
196982
+ detail = this.getPointCurveClosestApproachXYNewton(cpB, pointA);
196983
+ }
196957
196984
  if (detail) {
196958
196985
  const fB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.restrictToInterval(detail.fraction, fB0, fB1);
196959
196986
  if (fB === detail.fraction) { // if fraction is within fB0 and fB1
@@ -197013,15 +197040,15 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
197013
197040
  const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.center, 1); // det(A0, A1, C)
197014
197041
  const beta = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector0, 0); // det(A0, A1, U)
197015
197042
  const gamma = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector90, 0); // det(A0, A1, V)
197016
- const cosines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_7__.GrowableFloat64Array(2);
197017
- const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_7__.GrowableFloat64Array(2);
197018
- const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_7__.GrowableFloat64Array(2);
197019
- const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(// solve the equation
197043
+ const cosines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_8__.GrowableFloat64Array(2);
197044
+ const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_8__.GrowableFloat64Array(2);
197045
+ const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_8__.GrowableFloat64Array(2);
197046
+ const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_9__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(// solve the equation
197020
197047
  alpha, beta, gamma, cosines, sines, radians);
197021
197048
  for (let i = 0; i < numRoots; i++) {
197022
197049
  const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
197023
197050
  const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
197024
- const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
197051
+ const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_9__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
197025
197052
  // only add if the point is within the start and end fractions of both line segment and arc
197026
197053
  if (lineFraction !== undefined && this.acceptFraction(lineFraction) && this.acceptFraction(arcFraction)) {
197027
197054
  this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
@@ -197041,7 +197068,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
197041
197068
  for (const radians1 of [parallelRadians, parallelRadians + Math.PI]) {
197042
197069
  const arcPoint = data.center.plus2Scaled(data.vector0, Math.cos(radians1), data.vector90, Math.sin(radians1));
197043
197070
  const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians1);
197044
- const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
197071
+ const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_9__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
197045
197072
  // only add if the point is within the start and end fractions of both line segment and arc
197046
197073
  if (lineFraction !== undefined && this.acceptFraction(lineFraction) && this.acceptFraction(arcFraction)) {
197047
197074
  this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
@@ -197085,27 +197112,27 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
197085
197112
  }
197086
197113
  /** Low level dispatch of arc with (beziers of) a bspline curve */
197087
197114
  dispatchArcBsplineCurve3d(cpA, cpB, reversed) {
197088
- const ls = _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.create();
197115
+ const ls = _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d.create();
197089
197116
  cpB.emitStrokes(ls);
197090
197117
  this.computeArcLineString(cpA, ls, reversed);
197091
197118
  }
197092
197119
  /** Low level dispatch of (beziers of) a bspline curve with (beziers of) a bspline curve */
197093
197120
  dispatchBSplineCurve3dBSplineCurve3d(bcurveA, bcurveB, reversed) {
197094
- const lsA = _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.create();
197121
+ const lsA = _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d.create();
197095
197122
  bcurveA.emitStrokes(lsA);
197096
- const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.create();
197123
+ const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d.create();
197097
197124
  bcurveB.emitStrokes(lsB);
197098
197125
  this.computeLineStringLineString(lsA, lsB, reversed);
197099
197126
  }
197100
197127
  /** Low level dispatch of linestring with (beziers of) a bspline curve */
197101
197128
  dispatchLineStringBSplineCurve(lsA, curveB, reversed) {
197102
- const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.create();
197129
+ const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d.create();
197103
197130
  curveB.emitStrokes(lsB);
197104
197131
  this.computeLineStringLineString(lsA, lsB, reversed);
197105
197132
  }
197106
197133
  /** Low level dispatch of segment with (beziers of) a bspline curve */
197107
197134
  dispatchSegmentBsplineCurve(segA, curveB, reversed) {
197108
- const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.create();
197135
+ const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d.create();
197109
197136
  curveB.emitStrokes(lsB);
197110
197137
  this.computeSegmentLineString(segA, lsB, reversed);
197111
197138
  }
@@ -197165,7 +197192,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
197165
197192
  if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex))
197166
197193
  return;
197167
197194
  if (geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_11__.CurveChainWithDistanceIndex) {
197168
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!!"call handleCurveChainWithDistanceIndex(geomA) instead");
197195
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!"call handleCurveChainWithDistanceIndex(geomA) instead");
197169
197196
  return;
197170
197197
  }
197171
197198
  const index0 = this._results.length;
@@ -197183,7 +197210,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
197183
197210
  const segmentB = this._geometryB;
197184
197211
  this.dispatchSegmentSegment(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, segmentB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, false);
197185
197212
  }
197186
- else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d) {
197213
+ else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d) {
197187
197214
  this.computeSegmentLineString(segmentA, this._geometryB, false);
197188
197215
  }
197189
197216
  else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
@@ -197278,7 +197305,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
197278
197305
  }
197279
197306
  /** Double dispatch handler for strongly typed linestring. */
197280
197307
  handleLineString3d(lsA) {
197281
- if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d) {
197308
+ if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d) {
197282
197309
  const lsB = this._geometryB;
197283
197310
  this.computeLineStringLineString(lsA, lsB, false);
197284
197311
  }
@@ -197304,7 +197331,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
197304
197331
  if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__.LineSegment3d) {
197305
197332
  this.dispatchSegmentArc(this._geometryB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, arc0, true);
197306
197333
  }
197307
- else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d) {
197334
+ else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d) {
197308
197335
  this.computeArcLineString(arc0, this._geometryB, false);
197309
197336
  }
197310
197337
  else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
@@ -197326,7 +197353,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
197326
197353
  if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_5__.LineSegment3d) {
197327
197354
  this.dispatchSegmentBsplineCurve(this._geometryB, curve, true);
197328
197355
  }
197329
- else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d) {
197356
+ else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d) {
197330
197357
  this.dispatchLineStringBSplineCurve(this._geometryB, curve, true);
197331
197358
  }
197332
197359
  else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
@@ -198115,7 +198142,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
198115
198142
  if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex))
198116
198143
  return;
198117
198144
  if (geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_12__.CurveChainWithDistanceIndex) {
198118
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!!"call handleCurveChainWithDistanceIndex(geomA) instead");
198145
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!"call handleCurveChainWithDistanceIndex(geomA) instead");
198119
198146
  return;
198120
198147
  }
198121
198148
  const index0 = this._results.length;
@@ -198903,7 +198930,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
198903
198930
  if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_8__.CurveChainWithDistanceIndex))
198904
198931
  return;
198905
198932
  if (geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_8__.CurveChainWithDistanceIndex) {
198906
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!!"call handleCurveChainWithDistanceIndex(geomA) instead");
198933
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!"call handleCurveChainWithDistanceIndex(geomA) instead");
198907
198934
  return;
198908
198935
  }
198909
198936
  const index0 = this._results.length;
@@ -214127,6 +214154,10 @@ class XY {
214127
214154
  get isAlmostZero() {
214128
214155
  return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.x) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.y);
214129
214156
  }
214157
+ /** Return true if the x and y components are all exactly zero */
214158
+ get isZero() {
214159
+ return this.x === 0.0 && this.y === 0.0;
214160
+ }
214130
214161
  /** Return the largest absolute value of any component */
214131
214162
  maxAbs() {
214132
214163
  return Math.max(Math.abs(this.x), Math.abs(this.y));
@@ -216280,10 +216311,10 @@ class Vector3d extends XYZ {
216280
216311
  return _Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createAtan2(this.crossProductXY(vectorB), this.dotProductXY(vectorB));
216281
216312
  }
216282
216313
  /**
216283
- * Return the angle in radians (not as strongly-typed Angle) from this vector to vectorB, measured
216284
- * in their containing plane whose normal lies in the same half-space as vectorW.
216314
+ * Return the angle in radians (not as strongly-typed Angle) from `this` vector to `vectorB`, measured
216315
+ * in their containing plane whose normal lies in the same half-space as `vectorW`.
216285
216316
  * * The returned angle is between `-Math.PI` and `Math.PI`.
216286
- * * If the cross product of this vector and vectorB lies on the same side of the plane as vectorW,
216317
+ * * If the cross product of `this` vector and `vectorB` lies on the same side of the plane as `vectorW`,
216287
216318
  * this function returns `radiansTo(vectorB)`; otherwise, it returns `-radiansTo(vectorB)`.
216288
216319
  * * `vectorW` does not have to be perpendicular to the plane.
216289
216320
  * * Use `planarRadiansTo` to measure the angle between vectors that are projected to another plane.
@@ -216291,6 +216322,7 @@ class Vector3d extends XYZ {
216291
216322
  * @param vectorW determines the side of the plane in which the returned angle is measured
216292
216323
  */
216293
216324
  signedRadiansTo(vectorB, vectorW) {
216325
+ // A.B = |A||B|cos(theta) and |AxB| = |A||B|sin(theta) so theta = arctan(|AxB|/A.B)
216294
216326
  const p = this.crossProduct(vectorB);
216295
216327
  const theta = Math.atan2(p.magnitude(), this.dotProduct(vectorB));
216296
216328
  if (vectorW.dotProduct(p) < 0.0)
@@ -216984,6 +217016,25 @@ class Point3dArray {
216984
217016
  }
216985
217017
  return result;
216986
217018
  }
217019
+ /**
217020
+ * Copy 3d points into a packed number array.
217021
+ * @param data array of xyz
217022
+ * @param result optional destination array.
217023
+ * @return packed number array
217024
+ */
217025
+ static packToNumberArray(data, result) {
217026
+ const numValues = 3 * data.length;
217027
+ if (!result)
217028
+ result = Array(numValues);
217029
+ result.length = numValues;
217030
+ let i = 0;
217031
+ for (const p of data) {
217032
+ result[i++] = p.x;
217033
+ result[i++] = p.y;
217034
+ result[i++] = p.z;
217035
+ }
217036
+ return result;
217037
+ }
216987
217038
  /**
216988
217039
  * Compute the 8 weights of trilinear mapping
216989
217040
  * By appropriate choice of weights, this can be used for both point and derivative mappings.
@@ -232142,7 +232193,7 @@ var AuxChannelDataType;
232142
232193
  * @public
232143
232194
  */
232144
232195
  class AuxChannelData {
232145
- /** Construct a new [[AuxChannelData]] from input value and vertex values. */
232196
+ /** Constructor. If `values` is a number array, it is captured. */
232146
232197
  constructor(input, values) {
232147
232198
  this.input = input;
232148
232199
  if (values instanceof Float64Array) {
@@ -232174,7 +232225,7 @@ class AuxChannelData {
232174
232225
  * @public
232175
232226
  */
232176
232227
  class AuxChannel {
232177
- /** Create a [[AuxChannel]] */
232228
+ /** Constructor with CAPTURED inputs. */
232178
232229
  constructor(data, dataType, name, inputName) {
232179
232230
  this.data = data;
232180
232231
  this.dataType = dataType;
@@ -232200,15 +232251,23 @@ class AuxChannel {
232200
232251
  return false;
232201
232252
  return true;
232202
232253
  }
232203
- /** True if [[entriesPerValue]] is `1`. */
232254
+ /** True if the data type is 1-dimensional. */
232255
+ static isScalar(dataType) {
232256
+ return dataType === AuxChannelDataType.Distance || dataType === AuxChannelDataType.Scalar;
232257
+ }
232258
+ /** True if the data stored in this AuxChannel is 1-dimensional. */
232204
232259
  get isScalar() {
232205
- return this.dataType === AuxChannelDataType.Distance || this.dataType === AuxChannelDataType.Scalar;
232260
+ return AuxChannel.isScalar(this.dataType);
232261
+ }
232262
+ /** The dimension (1D or 3D) of each datum of an AuxChannel of the given type. */
232263
+ static entriesPerValue(dataType) {
232264
+ return this.isScalar(dataType) ? 1 : 3;
232206
232265
  }
232207
- /** The number of values in `data.values` per entry - 1 for scalar and distance types, 3 for normal and vector types. */
232266
+ /** The dimension (1D or 3D) of each datum in the data arrays of this AuxChannel. */
232208
232267
  get entriesPerValue() {
232209
- return this.isScalar ? 1 : 3;
232268
+ return AuxChannel.entriesPerValue(this.dataType);
232210
232269
  }
232211
- /** The number of entries in `data.values`. */
232270
+ /** The number of data stored in each data array of this AuxChannel, equal to the length of the array divided by `entriesPerValue`. */
232212
232271
  get valueCount() {
232213
232272
  return 0 === this.data.length ? 0 : this.data[0].values.length / this.entriesPerValue;
232214
232273
  }
@@ -232238,16 +232297,20 @@ class AuxChannel {
232238
232297
  return result;
232239
232298
  }
232240
232299
  }
232241
- /** The `PolyfaceAuxData` structure contains one or more analytical data channels for each vertex of a [[Polyface]], allowing the polyface to be styled
232300
+ /**
232301
+ * The `PolyfaceAuxData` structure contains one or more analytical data channels for each vertex of a [[Polyface]], allowing the polyface to be styled
232242
232302
  * using an [AnalysisStyle]($common).
232243
- * Typically a polyface will contain only vertex data required for its basic display: the vertex position, normal
232244
- * and possibly texture parameter. `PolyfaceAuxData` provides supplemental data that is generally computed
232245
- * in an analysis program or other external data source. This can be scalar data used to either override the vertex colors through, or
232246
- * XYZ data used to deform the mesh by adjusting the vertex positions and/or normals.
232303
+ * Typically a polyface will contain only vertex data required for its basic display: vertex position, normal, texture parameter, color.
232304
+ * `PolyfaceAuxData` provides supplemental per-vertex data that is generally computed in an analysis program or other external data source.
232305
+ * This supplemental data can be either 1D (e.g., height, override color) or 3D (e.g., displacement vector, override normal); see [[AuxChannel.entriesPerValue]], [[AuxChannel.dataType]].
232306
+ * All data channels are indexed by the same indices, which must have the same length and structure as the other Polyface indices.
232307
+ * This means that if a facet's face loop is found at index range [i0,i1] in the Polyface vertex index array, then the same index range [i0,i1]
232308
+ * locates the data for this facet in all the other Polyface index arrays, including the `PolyfaceAuxData` indices.
232247
232309
  * @see [[PolyfaceData.auxData]] to associate auxiliary data with a polyface.
232248
232310
  * @public
232249
232311
  */
232250
232312
  class PolyfaceAuxData {
232313
+ /** Constructor with CAPTURED inputs. */
232251
232314
  constructor(channels, indices) {
232252
232315
  this.channels = channels;
232253
232316
  this.indices = indices;
@@ -233769,7 +233832,8 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
233769
233832
  * * Example: suppose `[6,7,8]` is the pointIndex array representing a triangle. First edge would be `6,7`. Second
233770
233833
  * edge is `7,8`. Third edge is `8,6`. To access `6` for the third edge, we have to go back to the start of array.
233771
233834
  * Therefore, it is useful to store `6` at the end of pointIndex array, i.e., `[6,7,8,6]` meaning `numWrap = 1`.
233772
- * * `numWrap = 2` is useful when vertex visit requires two adjacent vectors, e.g. for cross products.
233835
+ * Continuing this example, `numWrap = 2` (i.e., `[6,7,8,6,7]`) is useful when each vertex visit requires the next
233836
+ * two points, e.g., to form two adjacent vectors for a cross product.
233773
233837
  */
233774
233838
  setNumWrap(numWrap) {
233775
233839
  this._numWrap = numWrap;
@@ -234423,11 +234487,38 @@ class IndexedPolyface extends Polyface {
234423
234487
  cleanupOpenFacet() {
234424
234488
  this.data.trimAllIndexArrays(this.data.pointIndex.length);
234425
234489
  }
234490
+ /**
234491
+ * Validate (the tail of) the active index arrays: point, normal, param, color.
234492
+ * @param index0 optional offset into the index arrays at which to start validating indices. Default 0.
234493
+ * @param errors optional array appended with error message(s) if invalid indices are encountered
234494
+ * @return whether the indices are valid
234495
+ */
234496
+ validateAllIndices(index0 = 0, errors) {
234497
+ const numPointIndices = this.data.pointIndex.length;
234498
+ const messages = errors ?? [];
234499
+ if (this.data.normalIndex && this.data.normalIndex.length !== numPointIndices)
234500
+ messages.push("normalIndex count must match pointIndex count");
234501
+ if (this.data.paramIndex && this.data.paramIndex.length !== numPointIndices)
234502
+ messages.push("paramIndex count must equal pointIndex count");
234503
+ if (this.data.colorIndex && this.data.colorIndex.length !== numPointIndices)
234504
+ messages.push("colorIndex count must equal pointIndex count");
234505
+ if (this.data.edgeVisible.length !== numPointIndices)
234506
+ messages.push("visibleIndex count must equal pointIndex count");
234507
+ if (!Polyface.areIndicesValid(this.data.pointIndex, index0, numPointIndices, this.data.point, this.data.point ? this.data.point.length : 0))
234508
+ messages.push("invalid point indices in the last facet");
234509
+ if (!Polyface.areIndicesValid(this.data.normalIndex, index0, numPointIndices, this.data.normal, this.data.normal ? this.data.normal.length : 0))
234510
+ messages.push("invalid normal indices in the last facet");
234511
+ if (!Polyface.areIndicesValid(this.data.paramIndex, index0, numPointIndices, this.data.param, this.data.param ? this.data.param.length : 0))
234512
+ messages.push("invalid param indices in the last facet");
234513
+ if (!Polyface.areIndicesValid(this.data.colorIndex, index0, numPointIndices, this.data.color, this.data.color ? this.data.color.length : 0))
234514
+ messages.push("invalid color indices in the last facet");
234515
+ return 0 === messages.length;
234516
+ }
234426
234517
  /**
234427
234518
  * Announce the end of construction of a facet.
234428
234519
  * * Optionally check for:
234429
234520
  * * Same number of indices among all active index arrays -- point, normal, param, color
234430
- * * All indices are within bounds of the respective data arrays.
234521
+ * * All indices for the latest facet are within bounds of the respective data arrays.
234431
234522
  * * In error cases, all index arrays are trimmed back to the size when previous facet was terminated.
234432
234523
  * * A return value of `undefined` is normal. Otherwise, a string array of error messages is returned.
234433
234524
  */
@@ -234441,22 +234532,7 @@ class IndexedPolyface extends Polyface {
234441
234532
  const messages = [];
234442
234533
  if (lengthB < lengthA + 2)
234443
234534
  messages.push("Less than 3 indices in the last facet");
234444
- if (this.data.normalIndex && this.data.normalIndex.length !== lengthB)
234445
- messages.push("normalIndex count must match pointIndex count");
234446
- if (this.data.paramIndex && this.data.paramIndex.length !== lengthB)
234447
- messages.push("paramIndex count must equal pointIndex count");
234448
- if (this.data.colorIndex && this.data.colorIndex.length !== lengthB)
234449
- messages.push("colorIndex count must equal pointIndex count");
234450
- if (this.data.edgeVisible.length !== lengthB)
234451
- messages.push("visibleIndex count must equal pointIndex count");
234452
- if (!Polyface.areIndicesValid(this.data.pointIndex, lengthA, lengthB, this.data.point, this.data.point ? this.data.point.length : 0))
234453
- messages.push("invalid point indices in the last facet");
234454
- if (!Polyface.areIndicesValid(this.data.normalIndex, lengthA, lengthB, this.data.normal, this.data.normal ? this.data.normal.length : 0))
234455
- messages.push("invalid normal indices in the last facet");
234456
- if (!Polyface.areIndicesValid(this.data.paramIndex, lengthA, lengthB, this.data.param, this.data.param ? this.data.param.length : 0))
234457
- messages.push("invalid param indices in the last facet");
234458
- if (!Polyface.areIndicesValid(this.data.colorIndex, lengthA, lengthB, this.data.color, this.data.color ? this.data.color.length : 0))
234459
- messages.push("invalid color indices in the last facet");
234535
+ this.validateAllIndices(lengthA, messages);
234460
234536
  if (messages.length > 0) {
234461
234537
  this.data.trimAllIndexArrays(lengthA);
234462
234538
  return messages;
@@ -237688,10 +237764,11 @@ class PolyfaceData {
237688
237764
  }
237689
237765
  /**
237690
237766
  * Compress the instance by equating duplicate data.
237691
- * * Search for duplicates within points, normals, params, and colors.
237767
+ * * Search for duplicates within vertices, normals, params, and colors.
237692
237768
  * * Compress each data array.
237693
237769
  * * Revise all indexing for the relocated data.
237694
- * @param tolerance (optional) tolerance for clustering mesh vertices. Default is [[Geometry.smallMetricDistance]].
237770
+ * * [[PolyfaceAuxData]] is compressed if and only if exactly one [[AuxChannelData]] is present.
237771
+ * @param tolerance (optional) tolerance for clustering mesh vertices only. Default value, and the tolerance used to cluster all other data, is [[Geometry.smallMetricDistance]].
237695
237772
  */
237696
237773
  compress(tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.smallMetricDistance) {
237697
237774
  // more info can be found at geometry/internaldocs/Polyface.md
@@ -237714,6 +237791,20 @@ class PolyfaceData {
237714
237791
  this.color = packedColors.packedNumbers;
237715
237792
  packedColors.updateIndices(this.colorIndex);
237716
237793
  }
237794
+ if (this.auxData && this.auxData.channels.length === 1 && this.auxData.channels[0].data.length === 1) {
237795
+ const dataSize = this.auxData.channels[0].entriesPerValue;
237796
+ if (1 === dataSize) {
237797
+ const packedData = _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_9__.ClusterableArray.clusterNumberArray(this.auxData.channels[0].data[0].values);
237798
+ this.auxData.channels[0].data[0].values = packedData.packedNumbers;
237799
+ packedData.updateIndices(this.auxData.indices);
237800
+ }
237801
+ else if (3 === dataSize) {
237802
+ const blockedData = _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_0__.GrowableXYZArray.create(this.auxData.channels[0].data[0].values);
237803
+ const packedData = _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_9__.ClusterableArray.clusterGrowablePoint3dArray(blockedData);
237804
+ this.auxData.channels[0].data[0].values = _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_2__.NumberArray.create(packedData.growablePackedPoints.float64Data());
237805
+ packedData.updateIndices(this.auxData.indices);
237806
+ }
237807
+ }
237717
237808
  }
237718
237809
  /**
237719
237810
  * Test if `facetStartIndex` is (minimally) valid.
@@ -237926,6 +238017,7 @@ __webpack_require__.r(__webpack_exports__);
237926
238017
  * @module Polyface
237927
238018
  */
237928
238019
  /* eslint-disable @typescript-eslint/naming-convention, no-empty */
238020
+ // cspell:word internaldocs
237929
238021
 
237930
238022
 
237931
238023
 
@@ -237968,8 +238060,7 @@ __webpack_require__.r(__webpack_exports__);
237968
238060
  * @public
237969
238061
  */
237970
238062
  class SweepLineStringToFacetsOptions {
237971
- /** constructor -- captures fully-checked parameters from static create method.
237972
- */
238063
+ /** Constructor. Captures fully-checked parameters from static create method. */
237973
238064
  constructor(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
237974
238065
  this.vectorToEye = vectorToEye;
237975
238066
  this.sideAngle = sideAngle;
@@ -237978,20 +238069,27 @@ class SweepLineStringToFacetsOptions {
237978
238069
  this.collectOnSideFacets = collectOnSideFacets;
237979
238070
  this.collectOnRearFacets = collectOnRearFacets;
237980
238071
  }
237981
- /** Create an options structure.
237982
- * * Default vectorToEye is positive Z
237983
- * * Default sideAngle has radians value Geometry.smallAngleRadians
237984
- * * Default assembleChains is true
237985
- * * Default collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets are all true.
238072
+ /**
238073
+ * Create an options structure.
238074
+ * * Default `vectorToEye` is (0,0,1).
238075
+ * * Default `sideAngle` is `Geometry.smallAngleRadians`.
238076
+ * * Default `assembleChains` is `true`.
238077
+ * * Default `collectOnForwardFacets`, `collectOnSideFacets`, `collectOnRearFacets` are all `true`.
237986
238078
  */
237987
238079
  static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
237988
238080
  return new SweepLineStringToFacetsOptions(vectorToEye === undefined ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.unitZ() : vectorToEye.clone(), sideAngle === undefined ? _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallAngleRadians) : sideAngle.clone(), _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.resolveValue(assembleChains, true), _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.resolveValue(collectOnForwardFacets, true), _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.resolveValue(collectOnSideFacets, true), _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.resolveValue(collectOnRearFacets, true));
237989
238081
  }
237990
- /** Return true if all outputs are requested */
237991
- get collectAll() { return this.collectOnForwardFacets === true && this.collectOnRearFacets === true && this.collectOnRearFacets === true; }
237992
- /** Decide if the instance flags accept this facet.
237993
- * * Facets whose facet normal have positive, zero, or negative dot product with the vectorToEye are forward, side, and rear.
237994
- * * Undefined facet normal returns false
238082
+ /** Return `true` if all outputs are requested. */
238083
+ get collectAll() {
238084
+ return this.collectOnForwardFacets === true &&
238085
+ this.collectOnSideFacets === true &&
238086
+ this.collectOnRearFacets === true;
238087
+ }
238088
+ /**
238089
+ * Decide if the instance collector flags accept a facet with the given normal.
238090
+ * * A facet whose facet normal has a positive, zero, or negative dot product with `vectorToEye` is classified
238091
+ * as forward, side, or rear, respectively.
238092
+ * * `undefined` facet normal returns `false`.
237995
238093
  */
237996
238094
  collectFromThisFacetNormal(facetNormal) {
237997
238095
  if (facetNormal === undefined)
@@ -238005,22 +238103,27 @@ class SweepLineStringToFacetsOptions {
238005
238103
  /**
238006
238104
  * Options carrier for [[PolyfaceQuery.cloneOffset]].
238007
238105
  * * Default options are strongly recommended.
238008
- * * The option most likely to be changed is chamferTurnAngle
238106
+ * * The option most likely to be changed is `chamferAngleBetweenNormals`.
238009
238107
  * @public
238010
238108
  */
238011
238109
  class OffsetMeshOptions {
238012
- /** Constructor -- CAPTURE parameters ... */
238013
- constructor(smoothSingleAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(25), smoothAccumulatedAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(60), chamferTurnAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(90)) {
238110
+ /** Constructor -- CAPTURE parameters. */
238111
+ constructor(smoothSingleAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(25), smoothAccumulatedAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(60), chamferAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(90)) {
238014
238112
  this.smoothSingleAngleBetweenNormals = smoothSingleAngleBetweenNormals.clone();
238015
238113
  this.smoothAccumulatedAngleBetweenNormals = smoothAccumulatedAngleBetweenNormals.clone();
238016
- this.chamferAngleBetweenNormals = chamferTurnAngle.clone();
238114
+ this.chamferAngleBetweenNormals = chamferAngleBetweenNormals.clone();
238017
238115
  }
238018
- /** construct and return an OffsetMeshOptions with given parameters.
238116
+ /**
238117
+ * Construct and return an `OffsetMeshOptions` with given parameters.
238019
238118
  * * Angles are forced to minimum values.
238020
238119
  * * Clones of the angles are given to the constructor.
238021
- * @param smoothSingleRadiansBetweenNormals an angle larger than this (between facets) is considered a sharp edge
238022
- * @param smoothAccumulatedAngleBetweenNormals angles that sum to this much may be consolidated for average normal
238023
- * @param chamferTurnAngleBetweenNormals when facets meet with larger angle, a chamfer edge may be added if the angle between facet normals is larger than this.
238120
+ * @param smoothSingleRadiansBetweenNormals an angle larger than this (between facets) is considered a sharp edge.
238121
+ * Default value is `25` degrees.
238122
+ * @param smoothAccumulatedAngleBetweenNormals angles that sum to this much may be consolidated for average normal.
238123
+ * Default value is `60` degrees.
238124
+ * @param chamferTurnAngleBetweenNormals when facets meet and the turn angle (i.e., angle between facet normals)
238125
+ * is larger than `chamferTurnAngleBetweenNormals`, a chamfer edge may be added to prevent offset mesh from having
238126
+ * facets that extend out too far away from the source mesh. Default value is `120` degrees.
238024
238127
  */
238025
238128
  static create(smoothSingleAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(25), smoothAccumulatedAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(60), chamferTurnAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(120)) {
238026
238129
  const mySmoothSingleRadiansBetweenNormals = smoothSingleAngleBetweenNormals.clone();
@@ -238036,25 +238139,27 @@ class OffsetMeshOptions {
238036
238139
  }
238037
238140
  }
238038
238141
  /**
238039
- * Enumeration of cases for retaining facets among duplicates
238142
+ * Enumeration of cases for retaining facets among duplicates.
238040
238143
  * @public
238041
238144
  */
238042
238145
  var DuplicateFacetClusterSelector;
238043
238146
  (function (DuplicateFacetClusterSelector) {
238044
- /** retain none of the duplicates */
238147
+ /** Retain none of the duplicates. */
238045
238148
  DuplicateFacetClusterSelector[DuplicateFacetClusterSelector["SelectNone"] = 0] = "SelectNone";
238046
- /** retain any one member among duplicates */
238149
+ /** Retain any one member among duplicates. */
238047
238150
  DuplicateFacetClusterSelector[DuplicateFacetClusterSelector["SelectAny"] = 1] = "SelectAny";
238048
- /** retain all members among duplicates */
238151
+ /** Retain all members among duplicates. */
238049
238152
  DuplicateFacetClusterSelector[DuplicateFacetClusterSelector["SelectAll"] = 2] = "SelectAll";
238050
- /** retain one from any cluster with an odd number of faces */
238153
+ /** Retain one from any cluster with an odd number of faces. */
238051
238154
  DuplicateFacetClusterSelector[DuplicateFacetClusterSelector["SelectOneByParity"] = 3] = "SelectOneByParity";
238052
238155
  })(DuplicateFacetClusterSelector || (DuplicateFacetClusterSelector = {}));
238053
- /** PolyfaceQuery is a static class whose methods implement queries on a polyface or polyface visitor provided as a parameter to each method.
238156
+ /**
238157
+ * PolyfaceQuery is a static class whose methods implement queries on a `Polyface` or `PolyfaceVisitor` provided as a
238158
+ * parameter to each method.
238054
238159
  * @public
238055
238160
  */
238056
238161
  class PolyfaceQuery {
238057
- /** copy the points from a visitor into a Linestring3d in a Loop object */
238162
+ /** Copy the points from a visitor into a linestring loop. */
238058
238163
  static visitorToLoop(visitor) {
238059
238164
  const ls = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.createPoints(visitor.point.getPoint3dArray());
238060
238165
  return _curve_Loop__WEBPACK_IMPORTED_MODULE_4__.Loop.create(ls);
@@ -238069,11 +238174,15 @@ class PolyfaceQuery {
238069
238174
  }
238070
238175
  return result;
238071
238176
  }
238072
- /** Return the sum of all facet areas.
238073
- * @param vectorToEye compute sum of *signed* facet areas projected to a view plane perpendicular to this vector
238074
- */
238177
+ /**
238178
+ * Sum all facet areas.
238179
+ * @param source polyface or visitor.
238180
+ * @param vectorToEye compute sum of (signed) facet areas projected to a view plane perpendicular to `vectorToEye`.
238181
+ * If `vectorToEye` is not provided, actual facet areas are calculated (without any projection).
238182
+ * @returns the sum of all facet areas. Return 0 if `source` is `undefined`.
238183
+ */
238075
238184
  static sumFacetAreas(source, vectorToEye) {
238076
- let s = 0;
238185
+ let sum = 0;
238077
238186
  if (source !== undefined) {
238078
238187
  if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
238079
238188
  return PolyfaceQuery.sumFacetAreas(source.createVisitor(1), vectorToEye);
@@ -238082,20 +238191,21 @@ class PolyfaceQuery {
238082
238191
  unitVectorToEye = vectorToEye.normalize();
238083
238192
  source.reset();
238084
238193
  while (source.moveToNextFacet()) {
238085
- const scaledNormal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__.PolygonOps.areaNormal(source.point.getPoint3dArray());
238086
- s += unitVectorToEye ? scaledNormal.dotProduct(unitVectorToEye) : scaledNormal.magnitude();
238194
+ const areaNormal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__.PolygonOps.areaNormal(source.point.getPoint3dArray());
238195
+ sum += unitVectorToEye ? areaNormal.dotProduct(unitVectorToEye) : areaNormal.magnitude();
238087
238196
  }
238088
238197
  }
238089
- return s;
238198
+ return sum;
238090
238199
  }
238091
- /** sum volumes of tetrahedra from origin to all facets.
238092
- * * if origin is omitted, the first point encountered (by the visitor) is used as origin.
238200
+ /**
238201
+ * Sum volumes of tetrahedra from origin to all facets.
238202
+ * * If origin is `undefined`, the first point encountered (by the visitor) is used as origin.
238093
238203
  * * If the mesh is closed, this sum is the volume.
238094
- * * If the mesh is not closed, this sum is the volume of a mesh with various additional facets
238095
- * from the origin to facets.
238096
- */
238204
+ * * If the mesh is not closed, this sum is the volume of a mesh with various additional facets from the origin
238205
+ * to facets.
238206
+ */
238097
238207
  static sumTetrahedralVolumes(source, origin) {
238098
- let s = 0;
238208
+ let sum = 0;
238099
238209
  if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
238100
238210
  return PolyfaceQuery.sumTetrahedralVolumes(source.createVisitor(0), origin);
238101
238211
  let myOrigin = origin;
@@ -238110,17 +238220,18 @@ class PolyfaceQuery {
238110
238220
  for (let i = 1; i + 1 < source.point.length; i++) {
238111
238221
  source.point.getPoint3dAtUncheckedPointIndex(i, targetA);
238112
238222
  source.point.getPoint3dAtUncheckedPointIndex(i + 1, targetB);
238113
- s += myOrigin.tripleProductToPoints(facetOrigin, targetA, targetB);
238223
+ sum += myOrigin.tripleProductToPoints(facetOrigin, targetA, targetB);
238114
238224
  }
238115
238225
  }
238116
- return s / 6.0;
238226
+ return sum / 6.0;
238117
238227
  }
238118
- /** sum (signed) volumes between facets and a plane.
238228
+ /**
238229
+ * Sum (signed) volumes between facets and a plane.
238119
238230
  * Return a structure with multiple sums:
238120
238231
  * * volume = the sum of (signed) volumes between facets and the plane.
238121
- * * positiveAreaMomentData, negativeProjectedFacetAreaMoments = moment data with centroid, area, and second moments with respect to the centroid.
238122
- *
238123
- */
238232
+ * * positiveProjectedFacetAreaMoments, negativeProjectedFacetAreaMoments = moment data with centroid, area, and second
238233
+ * moments with respect to the centroid.
238234
+ */
238124
238235
  static sumVolumeBetweenFacetsAndPlane(source, plane) {
238125
238236
  if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
238126
238237
  return PolyfaceQuery.sumVolumeBetweenFacetsAndPlane(source.createVisitor(0), plane);
@@ -238138,18 +238249,18 @@ class PolyfaceQuery {
238138
238249
  const singleFacetProducts = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_9__.Matrix4d.createZero();
238139
238250
  const projectToPlane = plane.getProjectionToPlane();
238140
238251
  source.reset();
238141
- // For each facet ..
238142
- // Form triangles from facet origin to each far edge.
238143
- // Sum signed area and volume contributions
238144
- // each "projectedArea" contribution is twice the area of a triangle.
238145
- // each volume contribution is 3 times the actual volume -- (1/3) of the altitude sums was the centroid altitude.
238252
+ // For each facet:
238253
+ // - form triangles from facet origin to each far edge.
238254
+ // - sum signed area and volume contributions.
238255
+ // each projected area contribution is twice the area of a triangle.
238256
+ // each volume contribution is 3 times the actual volume -- (1/3) of the altitude sums was the centroid altitude.
238146
238257
  while (source.moveToNextFacet()) {
238147
238258
  source.point.getPoint3dAtUncheckedPointIndex(0, facetOrigin);
238148
238259
  h0 = plane.altitude(facetOrigin);
238149
238260
  singleFacetArea = 0;
238150
238261
  // within a single facets, the singleFacetArea sum is accumulated with signs of individual triangles.
238151
- // For a non-convex facet, this can be a mixture of positive and negative areas.
238152
- // The absoluteProjectedAreaSum contribution is forced positive after the sum for the facet.
238262
+ // for a non-convex facet, this can be a mixture of positive and negative areas.
238263
+ // the absoluteProjectedAreaSum contribution is forced positive after the sum for the facet.
238153
238264
  for (let i = 1; i + 1 < source.point.length; i++) {
238154
238265
  source.point.getPoint3dAtUncheckedPointIndex(i, targetA);
238155
238266
  source.point.getPoint3dAtUncheckedPointIndex(i + 1, targetB);
@@ -238180,7 +238291,7 @@ class PolyfaceQuery {
238180
238291
  negativeProjectedFacetAreaMoments: negativeAreaMoments,
238181
238292
  };
238182
238293
  }
238183
- /** Return the inertia products [xx,xy,xz,xw, yw, etc] integrated over all all facets, as viewed from origin. */
238294
+ /** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all all facets as viewed from origin. */
238184
238295
  static sumFacetSecondAreaMomentProducts(source, origin) {
238185
238296
  if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
238186
238297
  return PolyfaceQuery.sumFacetSecondAreaMomentProducts(source.createVisitor(0), origin);
@@ -238191,7 +238302,7 @@ class PolyfaceQuery {
238191
238302
  }
238192
238303
  return products;
238193
238304
  }
238194
- /** Return the inertia products [xx,xy,xz,xw, yw, etc] integrated over all tetrahedral volumes from origin */
238305
+ /** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all tetrahedral volumes from origin. */
238195
238306
  static sumFacetSecondVolumeMomentProducts(source, origin) {
238196
238307
  if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
238197
238308
  return PolyfaceQuery.sumFacetSecondVolumeMomentProducts(source.createVisitor(0), origin);
@@ -238202,10 +238313,11 @@ class PolyfaceQuery {
238202
238313
  }
238203
238314
  return products;
238204
238315
  }
238205
- /** Compute area moments for the mesh. In the returned MomentData:
238206
- * * origin is the centroid.
238207
- * * localToWorldMap has the origin and principal directions
238208
- * * radiiOfGyration radii for rotation around the x,y,z axes.
238316
+ /**
238317
+ * Compute area moments for the mesh. In the returned `MomentData`:
238318
+ * * `origin` is the centroid.
238319
+ * * `localToWorldMap` has the origin and principal directions.
238320
+ * * `radiiOfGyration` radii for rotation around the x,y,z axes.
238209
238321
  */
238210
238322
  static computePrincipalAreaMoments(source) {
238211
238323
  const origin = source.data.getPoint(0);
@@ -238214,12 +238326,13 @@ class PolyfaceQuery {
238214
238326
  const inertiaProducts = PolyfaceQuery.sumFacetSecondAreaMomentProducts(source, origin);
238215
238327
  return _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_8__.MomentData.inertiaProductsToPrincipalAxes(origin, inertiaProducts);
238216
238328
  }
238217
- /** Compute area moments for the mesh. In the returned MomentData:
238218
- * * origin is the centroid.
238219
- * * localToWorldMap has the origin and principal directions
238220
- * * radiiOfGyration radii for rotation around the x,y,z axes.
238329
+ /**
238330
+ * Compute area moments for the mesh. In the returned MomentData:
238331
+ * * `origin` is the centroid.
238332
+ * * `localToWorldMap` has the origin and principal directions.
238333
+ * * `radiiOfGyration` radii for rotation around the x,y,z axes.
238221
238334
  * * The result is only valid if the mesh is closed.
238222
- * * There is no test for closure. Use `PolyfaceQuery.isPolyfaceClosedByEdgePairing(polyface)` to test for closure.
238335
+ * * There is no test for closure. Use `PolyfaceQuery.isPolyfaceClosedByEdgePairing(polyface)` to test for closure.
238223
238336
  */
238224
238337
  static computePrincipalVolumeMoments(source) {
238225
238338
  const origin = source.data.getPoint(0);
@@ -238228,8 +238341,10 @@ class PolyfaceQuery {
238228
238341
  const inertiaProducts = PolyfaceQuery.sumFacetSecondVolumeMomentProducts(source, origin);
238229
238342
  return _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_8__.MomentData.inertiaProductsToPrincipalAxes(origin, inertiaProducts);
238230
238343
  }
238231
- /** Determine whether all facets are convex.
238232
- * @param source mesh to examine
238344
+ /**
238345
+ * Determine whether all facets are convex.
238346
+ * @param source polyface or visitor.
238347
+ * @returns `true` if all facets are convex; `false` otherwise.
238233
238348
  */
238234
238349
  static areFacetsConvex(source) {
238235
238350
  if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
@@ -238245,56 +238360,50 @@ class PolyfaceQuery {
238245
238360
  return true;
238246
238361
  }
238247
238362
  /**
238248
- * Test for convex volume by dihedral angle tests on all edges.
238249
- * * This tests if all dihedral angles are positive.
238250
- * * In a closed solid, this is a strong test for overall convexity.
238251
- * * With `ignoreBoundaries` true, this may be a useful test when all the facets are in a single edge-connected component, such as a pyramid with no underside.
238252
- * * It is not a correct test if there are multiple, disjoint components.
238253
- * * Take the above-mentioned pyramid with no underside.
238254
- * * Within the same mesh, have a second pyramid placed to the side, still facing upward.
238255
- * * The angles will pass the dihedral convexity test, but the composite thing surely is not convex.
238256
- * @param source mesh to examine
238257
- * @param ignoreBoundaries if true, ignore simple boundary edges, i.e. allow unclosed meshes.
238258
- * @returns true if the mesh is closed and has all dihedral angles (angle across edge) positive
238363
+ * Compute a number summarizing the dihedral angles in the mesh.
238364
+ * * A dihedral angle is the signed angle between adjacent facets' normals. This angle is positive when the cross
238365
+ * product `normalA x normalB` has the same direction as facetA's traversal of the facets' shared edge.
238366
+ * @param source mesh.
238367
+ * @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
238368
+ * See [[isConvexByDihedralAngleCount]] for comments about passing true when there are multiple
238369
+ * connected components.
238370
+ * * Return `0` if all dihedral angles are zero (and `ignoreBoundaries === true`). The mesh is planar.
238371
+ * * Otherwise, return `1` if all dihedral angles are non-negative. The mesh probably encloses a convex volume and
238372
+ * has outward normals.
238373
+ * * Otherwise, return `-1` if all dihedral angles are non-positive. The mesh probably encloses a convex volume and
238374
+ * has inward normals.
238375
+ * * Otherwise, return `-2`. Also return `-2` if a non-manifold condition was detected, or a facet normal could not
238376
+ * be computed. A non-manifold condition is a positive-length edge adjacent to more than 2 facets or (if
238377
+ * `ignoreBoundaries` is false) adjacent to exactly one facet.
238259
238378
  */
238260
- static isConvexByDihedralAngleCount(source, ignoreBoundaries = false) {
238261
- return this.dihedralAngleSummary(source, ignoreBoundaries) > 0;
238262
- }
238263
- /**
238264
- * Compute a number summarizing the dihedral angles in the mesh.
238265
- * @see [[isConvexByDihedralAngleCount]] for comments about ignoreBoundaries===true when there are multiple connected components.
238266
- * @param source mesh to examine
238267
- * @param ignoreBoundaries if true, ignore simple boundary edges, i.e. allow unclosed meshes.
238268
- * @returns a number summarizing the dihedral angles in the mesh.
238269
- * * Return 1 if all angles are positive or planar. The mesh is probably convex with outward normals.
238270
- * * Return -1 if all angles are negative or planar. The mesh is probably convex with inward normals.
238271
- * * Return 0 if
238272
- * * angles area mixed
238273
- * * any edge has other than 1 incident facet or more than 2 incident facets.
238274
- * * (but null edges are permitted -- These occur naturally at edges of quads at north or south pole)
238275
- */
238276
238379
  static dihedralAngleSummary(source, ignoreBoundaries = false) {
238380
+ // more info can be found at geometry/internaldocs/Polyface.md
238277
238381
  const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_10__.IndexedEdgeMatcher();
238278
238382
  const visitor = source.createVisitor(1);
238279
238383
  visitor.reset();
238384
+ // find centroid normals of all facets
238280
238385
  const centroidNormal = [];
238281
238386
  let normalCounter = 0;
238282
238387
  while (visitor.moveToNextFacet()) {
238283
238388
  const numEdges = visitor.pointCount - 1;
238284
238389
  const normal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__.PolygonOps.centroidAreaNormal(visitor.point);
238285
238390
  if (normal === undefined)
238286
- return 0;
238391
+ return -2;
238287
238392
  centroidNormal.push(normal);
238288
238393
  for (let i = 0; i < numEdges; i++) {
238289
238394
  edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
238290
238395
  }
238291
238396
  normalCounter++;
238292
238397
  }
238398
+ // find "manifold clusters" and "bad clusters"
238399
+ // manifold clusters are edges adjacent to 2 facets
238400
+ // bad clusters are edges adjacent to more than 2 facets or (if ignoreBoundaries is false) adjacent to 1 facet
238293
238401
  const badClusters = [];
238294
238402
  const manifoldClusters = [];
238295
238403
  edges.sortAndCollectClusters(manifoldClusters, ignoreBoundaries ? undefined : badClusters, undefined, badClusters);
238296
238404
  if (badClusters.length > 0)
238297
- return 0;
238405
+ return -2;
238406
+ // find angle between facet centroid normals (dihedral angles)
238298
238407
  let numPositive = 0;
238299
238408
  let numPlanar = 0;
238300
238409
  let numNegative = 0;
@@ -238302,8 +238411,7 @@ class PolyfaceQuery {
238302
238411
  for (const cluster of manifoldClusters) {
238303
238412
  const sideA = cluster[0];
238304
238413
  const sideB = cluster[1];
238305
- if (sideA instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_10__.SortableEdge
238306
- && sideB instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_10__.SortableEdge
238414
+ if (sideA instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_10__.SortableEdge && sideB instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_10__.SortableEdge
238307
238415
  && source.data.point.vectorIndexIndex(sideA.vertexIndexA, sideA.vertexIndexB, edgeVector)) {
238308
238416
  const dihedralAngle = centroidNormal[sideA.facetIndex].direction.signedAngleTo(centroidNormal[sideB.facetIndex].direction, edgeVector);
238309
238417
  if (dihedralAngle.isAlmostZero)
@@ -238314,26 +238422,40 @@ class PolyfaceQuery {
238314
238422
  numNegative++;
238315
238423
  }
238316
238424
  }
238425
+ // categorize the mesh
238317
238426
  if (numPositive > 0 && numNegative === 0)
238318
238427
  return 1;
238319
238428
  if (numNegative > 0 && numPositive === 0)
238320
238429
  return -1;
238321
- // problem case: if all edges have zero dihedral angle, record it as convex.
238322
- if (numPlanar > 0 && numPositive === 0 && numNegative === 0)
238323
- return 1;
238324
- return 0;
238430
+ if (numPlanar > 0 && numPositive === 0 && numNegative === 0) // planar mesh
238431
+ return 0;
238432
+ return -2;
238433
+ }
238434
+ /**
238435
+ * Test for convex volume by dihedral angle tests on all edges.
238436
+ * * This tests if all dihedral angles of the mesh are positive.
238437
+ * * In a closed solid, this is a strong test for overall mesh convexity with outward facing normals.
238438
+ * * See [[dihedralAngleSummary]] for the definition of "dihedral angle".
238439
+ * * With `ignoreBoundaries` true, this may be a useful test when all the facets are in a single edge-connected
238440
+ * component, such as a pyramid with no underside.
238441
+ * * It is not a correct test if there are multiple, disjoint components.
238442
+ * * Take the above-mentioned pyramid with no underside.
238443
+ * * Within the same mesh, have a second pyramid placed to the side, still facing upward.
238444
+ * * The angles will pass the dihedral convexity test, but the composite thing surely is not convex.
238445
+ * @param source mesh.
238446
+ * @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
238447
+ * @returns true if all dihedral angles of the mesh are positive.
238448
+ */
238449
+ static isConvexByDihedralAngleCount(source, ignoreBoundaries = false) {
238450
+ return this.dihedralAngleSummary(source, ignoreBoundaries) > 0;
238325
238451
  }
238326
238452
  /**
238327
- * Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume.
238328
- */
238329
- static isPolyfaceClosedByEdgePairing(source) {
238330
- return this.isPolyfaceManifold(source, false);
238331
- }
238332
- /** Test edges pairing in `source` mesh.
238333
- * * for `allowSimpleBoundaries === false` true return means this is a closed 2-manifold surface
238334
- * * for `allowSimpleBoundaries === true` true means this is a 2-manifold surface which may have boundary, but is still properly matched internally.
238335
- * * Any edge with 3 or more incident facets triggers `false` return.
238336
- * * Any edge with 2 incident facets in the same direction triggers a `false` return.
238453
+ * Test edges pairing in `source` mesh.
238454
+ * * For `allowSimpleBoundaries === false` true return means this is a closed 2-manifold surface.
238455
+ * * For `allowSimpleBoundaries === true` true means this is a 2-manifold surface which may have boundary, but is
238456
+ * still properly matched internally.
238457
+ * * Any edge with 3 or more adjacent facets triggers `false` return.
238458
+ * * Any edge with 2 adjacent facets in the same direction triggers a `false` return.
238337
238459
  */
238338
238460
  static isPolyfaceManifold(source, allowSimpleBoundaries = false) {
238339
238461
  const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_10__.IndexedEdgeMatcher();
@@ -238349,44 +238471,18 @@ class PolyfaceQuery {
238349
238471
  edges.sortAndCollectClusters(undefined, allowSimpleBoundaries ? undefined : badClusters, undefined, badClusters);
238350
238472
  return badClusters.length === 0;
238351
238473
  }
238352
- /**
238353
- * construct a CurveCollection containing boundary edges.
238354
- * * each edge is a LineSegment3d
238355
- * @param source polyface or visitor
238356
- * @param includeTypical true to in include typical boundary edges with a single incident facet
238357
- * @param includeMismatch true to include edges with more than 2 incident facets
238358
- * @param includeNull true to include edges with identical start and end vertex indices.
238359
- */
238360
- static boundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
238361
- const result = new _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_5__.BagOfCurves();
238362
- const announceEdge = (pointA, pointB, _indexA, _indexB, _readIndex) => {
238363
- result.tryAddChild(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d.create(pointA, pointB));
238364
- };
238365
- PolyfaceQuery.announceBoundaryEdges(source, announceEdge, includeTypical, includeMismatch, includeNull);
238366
- if (result.children.length === 0)
238367
- return undefined;
238368
- return result;
238369
- }
238370
- /**
238371
- * Collect boundary edges.
238372
- * * Return the edges as the simplest collection of chains of line segments.
238373
- * @param source facets
238374
- * @param includeTypical true to in include typical boundary edges with a single incident facet
238375
- * @param includeMismatch true to include edges with more than 2 incident facets
238376
- * @param includeNull true to include edges with identical start and end vertex indices.
238377
- */
238378
- static collectBoundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
238379
- const collector = new _curve_internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_12__.MultiChainCollector(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance, _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance);
238380
- PolyfaceQuery.announceBoundaryEdges(source, (ptA, ptB) => collector.captureCurve(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d.create(ptA, ptB)), includeTypical, includeMismatch, includeNull);
238381
- return collector.grabResult(true);
238474
+ /** Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume. */
238475
+ static isPolyfaceClosedByEdgePairing(source) {
238476
+ return this.isPolyfaceManifold(source, false);
238382
238477
  }
238383
238478
  /**
238384
238479
  * Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume.
238385
238480
  * If not, extract the boundary edges as lines.
238386
- * @param source polyface or visitor
238387
- * @param announceEdge function to be called with each boundary edge. The announcement is start and end points, start and end indices, and facet index.
238388
- * @param includeTypical true to announce typical boundary edges with a single incident facet
238389
- * @param includeMismatch true to announce edges with more than 2 incident facets
238481
+ * @param source polyface or visitor.
238482
+ * @param announceEdge function to be called with each boundary edge. The announcement is start and end points,
238483
+ * start and end indices, and facet index.
238484
+ * @param includeTypical true to announce typical boundary edges with a single adjacent facet.
238485
+ * @param includeMismatch true to announce edges with more than 2 adjacent facets.
238390
238486
  * @param includeNull true to announce edges with identical start and end vertex indices.
238391
238487
  */
238392
238488
  static announceBoundaryEdges(source, announceEdge, includeTypical = true, includeMismatch = true, includeNull = true) {
@@ -238402,17 +238498,17 @@ class PolyfaceQuery {
238402
238498
  edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
238403
238499
  }
238404
238500
  }
238405
- const bad1 = [];
238406
- const bad2 = [];
238407
- const bad0 = [];
238408
- edges.sortAndCollectClusters(undefined, bad1, bad0, bad2);
238501
+ const boundaryEdges = [];
238502
+ const nullEdges = [];
238503
+ const allOtherEdges = [];
238504
+ edges.sortAndCollectClusters(undefined, boundaryEdges, nullEdges, allOtherEdges);
238409
238505
  const badList = [];
238410
- if (includeTypical && bad1.length > 0)
238411
- badList.push(bad1);
238412
- if (includeMismatch && bad2.length > 0)
238413
- badList.push(bad2);
238414
- if (includeNull && bad0.length > 0)
238415
- badList.push(bad0);
238506
+ if (includeTypical && boundaryEdges.length > 0)
238507
+ badList.push(boundaryEdges);
238508
+ if (includeNull && nullEdges.length > 0)
238509
+ badList.push(nullEdges);
238510
+ if (includeMismatch && allOtherEdges.length > 0)
238511
+ badList.push(allOtherEdges);
238416
238512
  if (badList.length === 0)
238417
238513
  return undefined;
238418
238514
  const sourcePolyface = visitor.clientPolyface();
@@ -238429,12 +238525,61 @@ class PolyfaceQuery {
238429
238525
  }
238430
238526
  }
238431
238527
  /**
238432
- * Invoke the callback on each manifold edge whose adjacent facet normals form vectorToEye dot products with opposite sign.
238528
+ * Construct a CurveCollection containing boundary edges.
238529
+ * * Each edge is a LineSegment3d.
238530
+ * @param source polyface or visitor.
238531
+ * @param includeTypical true to in include typical boundary edges with a single adjacent facet.
238532
+ * @param includeMismatch true to include edges with more than 2 adjacent facets.
238533
+ * @param includeNull true to include edges with identical start and end vertex indices.
238534
+ */
238535
+ static boundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
238536
+ const result = new _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_5__.BagOfCurves();
238537
+ const announceEdge = (pointA, pointB, _indexA, _indexB, _readIndex) => {
238538
+ result.tryAddChild(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d.create(pointA, pointB));
238539
+ };
238540
+ PolyfaceQuery.announceBoundaryEdges(source, announceEdge, includeTypical, includeMismatch, includeNull);
238541
+ if (result.children.length === 0)
238542
+ return undefined;
238543
+ return result;
238544
+ }
238545
+ /**
238546
+ * Collect boundary edges.
238547
+ * * Return the edges as the simplest collection of chains of line segments.
238548
+ * @param source polyface or visitor.
238549
+ * @param includeTypical true to in include typical boundary edges with a single adjacent facet.
238550
+ * @param includeMismatch true to include edges with more than 2 adjacent facets.
238551
+ * @param includeNull true to include edges with identical start and end vertex indices.
238552
+ */
238553
+ static collectBoundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
238554
+ const collector = new _curve_internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_12__.MultiChainCollector(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance, _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance);
238555
+ PolyfaceQuery.announceBoundaryEdges(source, (ptA, ptB) => collector.captureCurve(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d.create(ptA, ptB)), includeTypical, includeMismatch, includeNull);
238556
+ return collector.grabResult(true);
238557
+ }
238558
+ /**
238559
+ * Load all half edges from a mesh to an IndexedEdgeMatcher.
238560
+ * @param polyface a mesh or a visitor assumed to have numWrap === 1.
238561
+ */
238562
+ static createIndexedEdges(polyface) {
238563
+ if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
238564
+ return this.createIndexedEdges(polyface.createVisitor(1));
238565
+ const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_10__.IndexedEdgeMatcher();
238566
+ polyface.reset();
238567
+ while (polyface.moveToNextFacet()) {
238568
+ const numEdges = polyface.pointCount - 1;
238569
+ for (let i = 0; i < numEdges; i++) {
238570
+ edges.addEdge(polyface.clientPointIndex(i), polyface.clientPointIndex(i + 1), polyface.currentReadIndex());
238571
+ }
238572
+ }
238573
+ return edges;
238574
+ }
238575
+ /**
238576
+ * Invoke the callback on each manifold edge whose adjacent facet normals form vectorToEye dot products
238577
+ * with opposite sign.
238433
238578
  * * The callback is not called on boundary edges.
238434
- * @param source facets
238435
- * @param announce callback function invoked on manifold silhouette edges
238436
- * @param vectorToEye normal of plane in which to compute silhouette edges
238437
- * @param sideAngle angular tolerance for perpendicularity test
238579
+ * @param source polyface or visitor.
238580
+ * @param announce callback function invoked on manifold silhouette edges.
238581
+ * @param vectorToEye normal of plane in which to compute silhouette edges.
238582
+ * @param sideAngle angular tolerance for perpendicularity test.
238438
238583
  */
238439
238584
  static announceSilhouetteEdges(source, announce, vectorToEye, sideAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createSmallAngle()) {
238440
238585
  if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
@@ -238484,16 +238629,17 @@ class PolyfaceQuery {
238484
238629
  * Collect manifold edges whose adjacent facet normals form vectorToEye dot products with opposite sign.
238485
238630
  * * Does not return boundary edges.
238486
238631
  * * Return the edges as chains of line segments.
238487
- * @param source facets
238488
- * @param vectorToEye normal of plane in which to compute silhouette edges
238489
- * @param sideAngle angular tolerance for perpendicularity test
238632
+ * @param source polyface or visitor.
238633
+ * @param vectorToEye normal of plane in which to compute silhouette edges.
238634
+ * @param sideAngle angular tolerance for perpendicularity test.
238490
238635
  */
238491
238636
  static collectSilhouetteEdges(source, vectorToEye, sideAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createSmallAngle()) {
238492
238637
  const collector = new _curve_internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_12__.MultiChainCollector(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance, _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance);
238493
238638
  PolyfaceQuery.announceSilhouetteEdges(source, (ptA, ptB) => collector.captureCurve(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d.create(ptA, ptB)), vectorToEye, sideAngle);
238494
238639
  return collector.grabResult(true);
238495
238640
  }
238496
- /** Find segments (within the linestring) which project to facets.
238641
+ /**
238642
+ * Find segments (within the linestring) which project to facets.
238497
238643
  * * Announce each pair of linestring segment and on-facet segment through a callback.
238498
238644
  * * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
238499
238645
  */
@@ -238506,7 +238652,24 @@ class PolyfaceQuery {
238506
238652
  }
238507
238653
  }
238508
238654
  }
238509
- /** Execute context.projectToPolygon until its work estimates accumulate to workLimit */
238655
+ /**
238656
+ * Set the limit on work during an async time blocks, and return the old value.
238657
+ * * This should be a large number -- default is 1.0e6
238658
+ * @internal
238659
+ */
238660
+ static setAsyncWorkLimit(value) {
238661
+ const oldValue = this._asyncWorkLimit;
238662
+ this._asyncWorkLimit = value;
238663
+ return oldValue;
238664
+ }
238665
+ /**
238666
+ * Query the current limit on work during an async time block.
238667
+ * @internal
238668
+ */
238669
+ static get asyncWorkLimit() {
238670
+ return this._asyncWorkLimit;
238671
+ }
238672
+ /** Execute `context.projectToPolygon` until its work estimates accumulate to workLimit. */
238510
238673
  static async continueAnnounceSweepLinestringToConvexPolyfaceXY(context, visitor, announce) {
238511
238674
  let workCount = 0;
238512
238675
  while ((workCount < this.asyncWorkLimit) && visitor.moveToNextFacet()) {
@@ -238514,16 +238677,8 @@ class PolyfaceQuery {
238514
238677
  }
238515
238678
  return workCount;
238516
238679
  }
238517
- /** Set the limit on work during an async time blocks, and return the old value.
238518
- * * This should be a large number -- default is 1.0e6
238519
- * @internal
238520
- */
238521
- static setAsyncWorkLimit(value) { const a = this._asyncWorkLimit; this._asyncWorkLimit = value; return a; }
238522
- /** Query the current limit on work during an async time block.
238523
- * @internal
238524
- */
238525
- static get asyncWorkLimit() { return this._asyncWorkLimit; }
238526
- /** Find segments (within the linestring) which project to facets.
238680
+ /**
238681
+ * Find segments (within the linestring) which project to facets.
238527
238682
  * * Announce each pair of linestring segment and on-facet segment through a callback.
238528
238683
  * * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
238529
238684
  * * REMARK: Although this is public, the usual use is via slightly higher level public methods, viz:
@@ -238546,14 +238701,15 @@ class PolyfaceQuery {
238546
238701
  // GeometryCoreTestIO.consoleLog({ myWorkTotal: workTotal, myBlockCount: this.awaitBlockCount });
238547
238702
  return workTotal;
238548
238703
  }
238549
- /** Search the facets for facet subsets that are connected with at least vertex contact.
238704
+ /**
238705
+ * Search the facets for facet subsets that are connected with at least vertex contact.
238550
238706
  * * Return array of arrays of facet indices.
238551
238707
  */
238552
238708
  static partitionFacetIndicesByVertexConnectedComponent(polyface) {
238553
238709
  if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface) {
238554
238710
  return this.partitionFacetIndicesByVertexConnectedComponent(polyface.createVisitor(0));
238555
238711
  }
238556
- // The polyface is really a visitor !!!
238712
+ // The polyface is really a visitor
238557
238713
  const context = new _numerics_UnionFind__WEBPACK_IMPORTED_MODULE_14__.UnionFindContext(this.visitorClientPointCount(polyface));
238558
238714
  for (polyface.reset(); polyface.moveToNextFacet();) {
238559
238715
  const firstVertexIndexOnThisFacet = polyface.pointIndex[0];
@@ -238581,9 +238737,9 @@ class PolyfaceQuery {
238581
238737
  /**
238582
238738
  * * Examine the normal orientation for each faces.
238583
238739
  * * Separate to 3 partitions:
238584
- * * facets with normal in the positive direction of the vectorToEye (partition 0)
238585
- * * facets with normal in the negative direction of the vectorToEye (partition 1)
238586
- * * facets nearly perpendicular to the view vector (partition 2)
238740
+ * * Facets with normal in the positive direction of the vectorToEye (partition 0).
238741
+ * * Facets with normal in the negative direction of the vectorToEye (partition 1).
238742
+ * * Facets nearly perpendicular to the view vector (partition 2).
238587
238743
  * * Return array of arrays of facet indices.
238588
238744
  */
238589
238745
  static partitionFacetIndicesByVisibilityVector(polyface, vectorToEye, sideAngleTolerance) {
@@ -238618,13 +238774,13 @@ class PolyfaceQuery {
238618
238774
  }
238619
238775
  /**
238620
238776
  * Return the boundary of facets that are facing the eye.
238621
- * @param polyface
238777
+ * @param polyface the indexed polyface
238622
238778
  * @param visibilitySubset selector among the visible facet sets extracted by partitionFacetIndicesByVisibilityVector
238623
238779
  * * 0 ==> forward facing
238624
238780
  * * 1 ==> rear facing
238625
238781
  * * 2 ==> side facing
238626
- * @param vectorToEye
238627
- * @param sideAngleTolerance
238782
+ * @param vectorToEye the vector to eye
238783
+ * @param sideAngleTolerance the tolerance of side angle
238628
238784
  */
238629
238785
  static boundaryOfVisibleSubset(polyface, visibilitySelect, vectorToEye, sideAngleTolerance = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(1.0e-3)) {
238630
238786
  const partitionedIndices = this.partitionFacetIndicesByVisibilityVector(polyface, vectorToEye, sideAngleTolerance);
@@ -238634,10 +238790,9 @@ class PolyfaceQuery {
238634
238790
  return this.boundaryEdges(visitor, true, false, false);
238635
238791
  }
238636
238792
  /**
238637
- * Search for edges with only 1 incident facet.
238638
- * * chain them into loops
238639
- * * emit the loops to the announceLoop function
238640
- * @param mesh
238793
+ * Search for edges with only 1 adjacent facet.
238794
+ * * Chain them into loops.
238795
+ * * Emit the loops to the announceLoop function.
238641
238796
  */
238642
238797
  static announceBoundaryChainsAsLineString3d(mesh, announceLoop) {
238643
238798
  const collector = new _curve_internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_12__.MultiChainCollector(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance, 1000);
@@ -238648,9 +238803,9 @@ class PolyfaceQuery {
238648
238803
  * Return a mesh with
238649
238804
  * * clusters of adjacent, coplanar facets merged into larger facets.
238650
238805
  * * other facets included unchanged.
238651
- * @param mesh existing mesh or visitor
238652
- * @param maxSmoothEdgeAngle maximum dihedral angle across an edge between facets deemed coplanar. If undefined, uses `Geometry.smallAngleRadians`.
238653
- * @returns
238806
+ * @param mesh existing mesh or visitor.
238807
+ * @param maxSmoothEdgeAngle maximum dihedral angle across an edge between facets deemed coplanar. If undefined,
238808
+ * uses `Geometry.smallAngleRadians`.
238654
238809
  */
238655
238810
  static cloneWithMaximalPlanarFacets(mesh, maxSmoothEdgeAngle) {
238656
238811
  if (mesh instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
@@ -238709,14 +238864,14 @@ class PolyfaceQuery {
238709
238864
  * * Unclosed chains are rejected.
238710
238865
  * * Closed chains are triangulated and returned as a mesh.
238711
238866
  * * The options structure enforces restrictions on how complicated the hole filling can be:
238712
- * * maxEdgesAroundHole -- holes with more edges are skipped
238867
+ * * maxEdgesAroundHole -- holes with more edges are skipped.
238713
238868
  * * maxPerimeter -- holes with larger summed edge lengths are skipped.
238714
238869
  * * upVector -- holes that do not have positive area along this view are skipped.
238715
- * * includeOriginalMesh -- includes the original mesh in the output mesh, so the composite mesh is a clone with holes filled
238716
- * @param mesh existing mesh
238870
+ * * includeOriginalMesh -- includes the original mesh in the output mesh, so the composite mesh is a
238871
+ * clone with holes filled.
238872
+ * @param mesh existing mesh.
238717
238873
  * @param options options controlling the hole fill.
238718
238874
  * @param unfilledChains optional array to receive the points around holes that were not filled.
238719
- * @returns
238720
238875
  */
238721
238876
  static fillSimpleHoles(mesh, options, unfilledChains) {
238722
238877
  if (mesh instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
@@ -238752,9 +238907,7 @@ class PolyfaceQuery {
238752
238907
  }
238753
238908
  return builder.claimPolyface(true);
238754
238909
  }
238755
- /** Clone the facets in each partition to a separate polyface.
238756
- *
238757
- */
238910
+ /** Clone the facets in each partition to a separate polyface. */
238758
238911
  static clonePartitions(polyface, partitions) {
238759
238912
  if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface) {
238760
238913
  return this.clonePartitions(polyface.createVisitor(0), partitions);
@@ -238777,7 +238930,7 @@ class PolyfaceQuery {
238777
238930
  }
238778
238931
  return polyfaces;
238779
238932
  }
238780
- /** Clone facets that pass a filter function */
238933
+ /** Clone facets that pass a filter function. */
238781
238934
  static cloneFiltered(source, filter) {
238782
238935
  if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface) {
238783
238936
  return this.cloneFiltered(source.createVisitor(0), filter);
@@ -238847,46 +239000,44 @@ class PolyfaceQuery {
238847
239000
  }
238848
239001
  return builder.claimPolyface(true);
238849
239002
  }
238850
- /** If the visitor's client is a polyface, simply return its point array length.
238851
- * If not a polyface, visit all facets to find the largest index.
238852
- */
238853
- static visitorClientPointCount(visitor) {
238854
- if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
238855
- return visitor.data.point.length;
238856
- const polyface = visitor.clientPolyface();
239003
+ /** Return the point count of the `source`. */
239004
+ static visitorClientPointCount(source) {
239005
+ if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
239006
+ return source.data.point.length;
239007
+ const polyface = source.clientPolyface();
238857
239008
  if (polyface !== undefined)
238858
239009
  return polyface.data.point.length;
238859
- visitor.reset();
239010
+ source.reset();
238860
239011
  let maxIndex = -1;
238861
- while (visitor.moveToNextFacet()) {
238862
- for (const pointIndex of visitor.pointIndex)
239012
+ while (source.moveToNextFacet()) {
239013
+ for (const pointIndex of source.pointIndex)
238863
239014
  if (pointIndex > maxIndex)
238864
239015
  maxIndex = pointIndex;
238865
239016
  }
238866
239017
  return maxIndex + 1;
238867
239018
  }
238868
- /** If the visitor's client is a polyface, simply return its facet count.
238869
- * If not a polyface, visit all facets to accumulate a count.
238870
- */
238871
- static visitorClientFacetCount(visitor) {
238872
- if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface) {
238873
- if (visitor.facetCount !== undefined)
238874
- return visitor.facetCount;
238875
- visitor = visitor.createVisitor(0);
239019
+ /** Return the facet count of the `source`. */
239020
+ static visitorClientFacetCount(source) {
239021
+ if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface) {
239022
+ if (source.facetCount !== undefined)
239023
+ return source.facetCount;
239024
+ source = source.createVisitor(0);
238876
239025
  }
238877
- const polyface = visitor.clientPolyface();
239026
+ const polyface = source.clientPolyface();
238878
239027
  if (polyface !== undefined && polyface.facetCount !== undefined)
238879
239028
  return polyface.facetCount;
238880
239029
  let facetCount = 0;
238881
- visitor.reset();
238882
- while (visitor.moveToNextFacet())
239030
+ source.reset();
239031
+ while (source.moveToNextFacet())
238883
239032
  ++facetCount;
238884
239033
  return facetCount;
238885
239034
  }
238886
- /** Partition the facet set into connected components such that two adjacent facets are in the same component if and only if they are adjacent across a clustered edge.
239035
+ /**
239036
+ * Partition the facet set into connected components such that two adjacent facets are in the same component if and
239037
+ * only if they are adjacent across a clustered edge.
238887
239038
  * @param edgeClusters sorted and clustered edges (cf. `IndexedEdgeMatcher.sortAndCollectClusters`).
238888
239039
  * @param numFacets facet count in the parent mesh. In particular, `edge.facetIndex < numFacets` for every input edge.
238889
- * @return collection of facet index arrays, one array per connected component
239040
+ * @return collection of facet index arrays, one array per connected component.
238890
239041
  */
238891
239042
  static partitionFacetIndicesBySortableEdgeClusters(edgeClusters, numFacets) {
238892
239043
  const context = new _numerics_UnionFind__WEBPACK_IMPORTED_MODULE_14__.UnionFindContext(numFacets);
@@ -238917,10 +239068,12 @@ class PolyfaceQuery {
238917
239068
  }
238918
239069
  return facetsInComponent;
238919
239070
  }
238920
- /** Partition the facet set into connected components. Each facet in a given component shares an edge only with other facets in the component (or is a boundary edge).
238921
- * @param polyface facets to partition
238922
- * @param stopAtVisibleEdges whether to further split connected components by visible edges of the polyface
238923
- * @return collection of facet index arrays, one per connected component
239071
+ /**
239072
+ * Partition the facet set into connected components. Each facet in a given component shares an edge only with
239073
+ * other facets in the component (or is a boundary edge).
239074
+ * @param polyface facets to partition.
239075
+ * @param stopAtVisibleEdges whether to further split connected components by visible edges of the polyface.
239076
+ * @return collection of facet index arrays, one per connected component.
238924
239077
  */
238925
239078
  static partitionFacetIndicesByEdgeConnectedComponent(polyface, stopAtVisibleEdges = false) {
238926
239079
  if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface) {
@@ -238945,7 +239098,8 @@ class PolyfaceQuery {
238945
239098
  matcher.sortAndCollectClusters(allEdges, allEdges, allEdges, allEdges);
238946
239099
  return this.partitionFacetIndicesBySortableEdgeClusters(allEdges, numFacets);
238947
239100
  }
238948
- /** Find segments (within the line string) which project to facets.
239101
+ /**
239102
+ * Find segments (within the line string) which project to facets.
238949
239103
  * * Assemble each input segment paired with its projected segment/point as a quad/triangle facet in a new polyface.
238950
239104
  * * Input facets are ASSUMED to be convex and planar, and not overlap in the z direction.
238951
239105
  */
@@ -238959,7 +239113,7 @@ class PolyfaceQuery {
238959
239113
  });
238960
239114
  return builder.claimPolyface(true);
238961
239115
  }
238962
- /** @deprecated in 4.x. Use sweepLineStringToFacetsXYReturnSweptFacets instead. */
239116
+ /** @deprecated in 4.x. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
238963
239117
  static sweepLinestringToFacetsXYreturnSweptFacets(linestringPoints, polyface) {
238964
239118
  return this.sweepLineStringToFacetsXYReturnSweptFacets(linestringPoints, polyface);
238965
239119
  }
@@ -238972,11 +239126,10 @@ class PolyfaceQuery {
238972
239126
  */
238973
239127
  static sweepLineStringToFacets(linestringPoints, polyfaceOrVisitor, options) {
238974
239128
  let result = [];
238975
- // setup default options:
239129
+ // setup default options
238976
239130
  if (options === undefined)
238977
239131
  options = SweepLineStringToFacetsOptions.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallAngleRadians), // tight geometry tolerance for vertical side facets
238978
- true, // assemble chains
238979
- true, true, true); // accept all outputs
239132
+ true, true, true, true);
238980
239133
  let chainContext;
238981
239134
  if (options.assembleChains)
238982
239135
  chainContext = _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_25__.ChainMergeContext.create();
@@ -239007,9 +239160,9 @@ class PolyfaceQuery {
239007
239160
  }
239008
239161
  /**
239009
239162
  * Sweep the line string in the z-direction to intersections with a mesh, using a search object for speedup.
239010
- * @param lineStringPoints input line string to drape on the mesh
239011
- * @param polyfaceOrVisitor mesh, or mesh visitor to traverse only part of a mesh
239012
- * @param searchByReadIndex object for searching facet 2D ranges tagged by mesh read index
239163
+ * @param lineStringPoints input line string to drape on the mesh.
239164
+ * @param polyfaceOrVisitor mesh, or mesh visitor to traverse only part of a mesh.
239165
+ * @param searchByReadIndex object for searching facet 2D ranges tagged by mesh read index.
239013
239166
  * @example Using a 5x5 indexed search grid:
239014
239167
  * ```
239015
239168
  * const xyRange = Range2d.createFrom(myPolyface.range());
@@ -239019,7 +239172,7 @@ class PolyfaceQuery {
239019
239172
  * }
239020
239173
  * const drapedLineStrings = PolyfaceQuery.sweepLineStringToFacetsXY(lineString, myPolyface, searcher);
239021
239174
  * ```
239022
- * @returns collected line strings
239175
+ * @returns the collected line strings.
239023
239176
  */
239024
239177
  static sweepLineStringToFacetsXY(lineStringPoints, polyfaceOrVisitor, searchByReadIndex) {
239025
239178
  const chainContext = _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_25__.ChainMergeContext.create();
@@ -239053,32 +239206,36 @@ class PolyfaceQuery {
239053
239206
  chainContext.clusterAndMergeVerticesXYZ();
239054
239207
  return chainContext.collectMaximalChains();
239055
239208
  }
239056
- /** Find segments (within the linestring) which project to facets.
239209
+ /**
239210
+ * Find segments (within the linestring) which project to facets.
239057
239211
  * * Return collected line segments.
239058
239212
  * * This calls [[sweepLineStringToFacets]] with options created by
239059
- * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(),false, true, true, true);`
239060
- * @deprecated in 4.x. Use [[sweepLineStringToFacets]] to get further options.
239213
+ * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), false, true, true, true);`
239214
+ * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
239061
239215
  */
239062
239216
  static sweepLinestringToFacetsXYReturnLines(linestringPoints, polyface) {
239063
239217
  const options = SweepLineStringToFacetsOptions.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createSmallAngle(), false, true, true, true);
239064
239218
  const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
239065
239219
  return result;
239066
239220
  }
239067
- /** Find segments (within the linestring) which project to facets.
239221
+ /**
239222
+ * Find segments (within the linestring) which project to facets.
239068
239223
  * * Return chains.
239069
239224
  * * This calls [[sweepLineStringToFacets]] with options created by
239070
239225
  * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(),true, true, true, true);`
239071
- * @deprecated in 4.x. Use [[sweepLineStringToFacets]] to get further options.
239226
+ * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
239072
239227
  */
239073
239228
  static sweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
239074
239229
  const options = SweepLineStringToFacetsOptions.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createSmallAngle(), true, true, true, true);
239075
239230
  const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
239076
239231
  return result;
239077
239232
  }
239078
- /** Find segments (within the linestring) which project to facets.
239233
+ /**
239234
+ * Find segments (within the linestring) which project to facets.
239079
239235
  * * This is done as a sequence of "await" steps.
239080
- * * Each "await" step deals with approximately PolyfaceQuery.asyncWorkLimit pairings of (linestring edge) with (facet edge)
239081
- * * PolyfaceQuery.setAsyncWorkLimit() to change work blocks from default
239236
+ * * Each "await" step deals with approximately PolyfaceQuery.asyncWorkLimit pairings of "linestring edge"
239237
+ * with "facet edge".
239238
+ * * PolyfaceQuery.setAsyncWorkLimit() to change work blocks from default.
239082
239239
  * * Return chains.
239083
239240
  * * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
239084
239241
  */
@@ -239092,7 +239249,7 @@ class PolyfaceQuery {
239092
239249
  return chains;
239093
239250
  }
239094
239251
  /**
239095
- * * Examine ranges of facets.
239252
+ * Examine ranges of facets.
239096
239253
  * * Return statistical summary of x,y,z ranges.
239097
239254
  */
239098
239255
  static collectRangeLengthData(polyface) {
@@ -239100,17 +239257,18 @@ class PolyfaceQuery {
239100
239257
  return this.collectRangeLengthData(polyface.createVisitor(0));
239101
239258
  }
239102
239259
  const rangeData = new _RangeLengthData__WEBPACK_IMPORTED_MODULE_28__.RangeLengthData();
239103
- // polyface is a visitor ...
239260
+ // polyface is a visitor
239104
239261
  for (polyface.reset(); polyface.moveToNextFacet();)
239105
239262
  rangeData.accumulateGrowableXYZArrayRange(polyface.point);
239106
239263
  return rangeData;
239107
239264
  }
239108
- /** Clone the facets, inserting vertices (within edges) where points not part of each facet's vertex indices impinge within edges.
239109
- *
239265
+ /**
239266
+ * Clone the facets, inserting vertices (within edges) where points not part of each facet's vertex indices
239267
+ * impinge within edges.
239110
239268
  */
239111
239269
  static cloneWithTVertexFixup(polyface) {
239112
- const oldFacetVisitor = polyface.createVisitor(1); // This is to visit the existing facets.
239113
- const newFacetVisitor = polyface.createVisitor(0); // This is to build the new facets.
239270
+ const oldFacetVisitor = polyface.createVisitor(1); // this is to visit the existing facets
239271
+ const newFacetVisitor = polyface.createVisitor(0); // this is to build the new facets
239114
239272
  const rangeSearcher = _multiclip_XYPointBuckets__WEBPACK_IMPORTED_MODULE_29__.XYPointBuckets.create(polyface.data.point, 30);
239115
239273
  const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
239116
239274
  const edgeRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_26__.Range3d.createNull();
@@ -239121,7 +239279,7 @@ class PolyfaceQuery {
239121
239279
  for (oldFacetVisitor.reset(); oldFacetVisitor.moveToNextFacet();) {
239122
239280
  newFacetVisitor.clearArrays();
239123
239281
  for (let i = 0; i + 1 < oldFacetVisitor.point.length; i++) {
239124
- // each base vertex is part of the result ...
239282
+ // each base vertex is part of the result
239125
239283
  oldFacetVisitor.point.getPoint3dAtUncheckedPointIndex(i, point0);
239126
239284
  oldFacetVisitor.point.getPoint3dAtUncheckedPointIndex(i + 1, point1);
239127
239285
  newFacetVisitor.pushDataFrom(oldFacetVisitor, i);
@@ -239132,12 +239290,12 @@ class PolyfaceQuery {
239132
239290
  edgeRange.extend(point1);
239133
239291
  edgeRange.ensureMinLengths(_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance); // add some slop in case segment is axis-aligned
239134
239292
  rangeSearcher.announcePointsInRange(edgeRange, (index, _x, _y, _z) => {
239135
- // x,y,z has x,y within the range of the search ... test for exact on (in full 3d!)
239293
+ // x,y,z has x,y within the range of the search; test for exact on (in full 3d)
239136
239294
  polyface.data.point.getPoint3dAtUncheckedPointIndex(index, spacePoint);
239137
239295
  const detail = segment.closestPoint(spacePoint, false);
239138
239296
  if (undefined !== detail) {
239139
- if (detail.fraction > 0.0 && detail.fraction < 1.0 && !detail.point.isAlmostEqual(point0) && !detail.point.isAlmostEqual(point1)
239140
- && spacePoint.isAlmostEqual(detail.point)) {
239297
+ if (detail.fraction > 0.0 && detail.fraction < 1.0 && !detail.point.isAlmostEqual(point0) &&
239298
+ !detail.point.isAlmostEqual(point1) && spacePoint.isAlmostEqual(detail.point)) {
239141
239299
  if (detailArray === undefined)
239142
239300
  detailArray = [];
239143
239301
  detail.a = index;
@@ -239158,14 +239316,13 @@ class PolyfaceQuery {
239158
239316
  return builder.claimPolyface();
239159
239317
  }
239160
239318
  /**
239319
+ * Compare index arrays formatted as follows. Return 0 if arrays are the same.
239161
239320
  * * Each array input structure is: [facetIndex, vertexIndex0, vertexIndex1, ....]
239162
- * * Vertex indices assumed reversed so it
239163
- * * vertexIndex0 is the lowest index on the facet
239164
- * * vertexIndex1 is the lowest neighbor of vertex0
239321
+ * * Vertex indices assumed reversed so:
239322
+ * * vertexIndex0 is the lowest index on the facet.
239323
+ * * vertexIndex1 is the lowest neighbor of vertex0.
239165
239324
  * * first different entry among vertex indices determines lexical result.
239166
- * * Hence facets with duplicate indices (whether forward or reversed) are considered equal.
239167
- * @param arrayA
239168
- * @param arrayB
239325
+ * * hence facets with duplicate indices (whether forward or reversed) are considered equal.
239169
239326
  */
239170
239327
  static compareFacetIndexAndVertexIndices(arrayA, arrayB) {
239171
239328
  if (arrayA.length !== arrayB.length)
@@ -239178,25 +239335,12 @@ class PolyfaceQuery {
239178
239335
  return 0;
239179
239336
  }
239180
239337
  /**
239181
- * * Return an array of arrays describing facet duplication.
239182
- * @param includeSingletons if true, non-duplicated facets are included in the output.
239183
- * * Each array `entry` in the output contains read indices of a cluster of facets with the same vertex indices.
239184
- */
239185
- static collectDuplicateFacetIndices(polyface, includeSingletons = false) {
239186
- const result = [];
239187
- this.announceDuplicateFacetIndices(polyface, (clusterFacetIndices) => {
239188
- if (includeSingletons || clusterFacetIndices.length > 1)
239189
- result.push(clusterFacetIndices.slice());
239190
- });
239191
- return result;
239192
- }
239193
- /**
239194
- * * Return an array of arrays describing facet duplication.
239195
- * @param includeSingletons if true, non-duplicated facets are included in the output.
239196
- * * Each array `entry` in the output contains read indices of a cluster of facets with the same vertex indices.
239338
+ * Announce facet duplicates.
239339
+ * @returns an array of arrays describing facet duplication. Each array `entry` in the output contains read
239340
+ * indices of a cluster of facets with the same vertex indices.
239197
239341
  */
239198
239342
  static announceDuplicateFacetIndices(polyface, announceCluster) {
239199
- const visitor = polyface.createVisitor(0); // This is to visit the existing facets.
239343
+ const visitor = polyface.createVisitor(0); // this is to visit the existing facets
239200
239344
  const facetIndexAndVertexIndices = [];
239201
239345
  for (visitor.reset(); visitor.moveToNextFacet();) {
239202
239346
  const facetIndex = visitor.currentReadIndex();
@@ -239204,12 +239348,12 @@ class PolyfaceQuery {
239204
239348
  const pointIndex = visitor.pointIndex;
239205
239349
  const numPointsThisFacet = pointIndex.length;
239206
239350
  let lowIndex = 0;
239207
- // find the lowest point index ...
239351
+ // find the lowest point index
239208
239352
  for (let i = 1; i < visitor.pointIndex.length; i++) {
239209
239353
  if (pointIndex[i] < pointIndex[lowIndex])
239210
239354
  lowIndex = i;
239211
239355
  }
239212
- // find its lowest neighbor -- assemble sort array in that direction
239356
+ // find its lowest neighbor; assemble sort array in that direction
239213
239357
  if (pointIndex[(lowIndex + 1) % numPointsThisFacet] < pointIndex[(lowIndex + numPointsThisFacet - 1) % numPointsThisFacet]) {
239214
239358
  for (let i = 0; i < numPointsThisFacet; i++) {
239215
239359
  entry.push(pointIndex[(lowIndex + i) % numPointsThisFacet]);
@@ -239237,9 +239381,26 @@ class PolyfaceQuery {
239237
239381
  announceCluster(clusterArray);
239238
239382
  }
239239
239383
  }
239240
- /** Return a new facet set with a subset of facets in source
239384
+ /**
239385
+ * Collect facet duplicates.
239386
+ * @param polyface the polyface.
239387
+ * @param includeSingletons if true, non-duplicated facets are included in the output.
239388
+ * @returns an array of arrays describing facet duplication. Each array `entry` in the output contains read
239389
+ * indices of a cluster of facets with the same vertex indices.
239390
+ */
239391
+ static collectDuplicateFacetIndices(polyface, includeSingletons = false) {
239392
+ const result = [];
239393
+ this.announceDuplicateFacetIndices(polyface, (clusterFacetIndices) => {
239394
+ if (includeSingletons || clusterFacetIndices.length > 1)
239395
+ result.push(clusterFacetIndices.slice());
239396
+ });
239397
+ return result;
239398
+ }
239399
+ /**
239400
+ * Return a new facet set with a subset of facets in polyface.
239401
+ * @param source the polyface.
239241
239402
  * @param includeSingletons true to copy facets that only appear once
239242
- * @param clusterSelector indicates whether duplicate clusters are to have 0, 1, or all facets included
239403
+ * @param clusterSelector indicates whether duplicate clusters are to have 0, 1, or all facets included.
239243
239404
  */
239244
239405
  static cloneByFacetDuplication(source, includeSingletons, clusterSelector) {
239245
239406
  const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
@@ -239265,25 +239426,23 @@ class PolyfaceQuery {
239265
239426
  });
239266
239427
  return builder.claimPolyface();
239267
239428
  }
239268
- /** Clone the facets, inserting removing points that are simply within colinear edges.
239269
- *
239270
- */
239429
+ /** Clone the facets, removing points that are simply within colinear edges. */
239271
239430
  static cloneWithColinearEdgeFixup(polyface) {
239272
- const oldFacetVisitor = polyface.createVisitor(2); // This is to visit the existing facets.
239273
- const newFacetVisitor = polyface.createVisitor(0); // This is to build the new facets.
239431
+ const oldFacetVisitor = polyface.createVisitor(2); // this is to visit the existing facets
239432
+ const newFacetVisitor = polyface.createVisitor(0); // this is to build the new facets
239274
239433
  const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
239275
239434
  const vector01 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
239276
239435
  const vector12 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
239277
239436
  const numPoint = polyface.data.point.length;
239278
239437
  const pointState = new Int32Array(numPoint);
239279
- // FIRST PASS -- in each sector of each facet, determine if the sector has colinear incoming and outgoing vectors.
239280
- // Mark each point as
239281
- // 0 unvisited
239282
- // -1 incident to a non-colinear sector
239283
- // n incident to n colinear sectors
239438
+ // FIRST PASS: in each sector of each facet, determine if the sector has colinear incoming and outgoing vectors.
239439
+ // Mark each point as
239440
+ // 0 unvisited
239441
+ // -1 adjacent to a non-colinear sector
239442
+ // n adjacent to n colinear sectors
239284
239443
  for (oldFacetVisitor.reset(); oldFacetVisitor.moveToNextFacet();) {
239285
239444
  for (let i = 0; i + 2 < oldFacetVisitor.point.length; i++) {
239286
- // each base vertex is part of the result ...
239445
+ // each base vertex is part of the result
239287
239446
  oldFacetVisitor.point.vectorIndexIndex(i, i + 1, vector01);
239288
239447
  oldFacetVisitor.point.vectorIndexIndex(i + 1, i + 2, vector12);
239289
239448
  const pointIndex = oldFacetVisitor.clientPointIndex(i + 1);
@@ -239298,7 +239457,7 @@ class PolyfaceQuery {
239298
239457
  }
239299
239458
  }
239300
239459
  }
239301
- // SECOND PASS -- make copies, omitting references to points at colinear sectors
239460
+ // SECOND PASS: make copies, omitting references to points at colinear sectors.
239302
239461
  for (oldFacetVisitor.reset(); oldFacetVisitor.moveToNextFacet();) {
239303
239462
  newFacetVisitor.clearArrays();
239304
239463
  for (let i = 0; i + 2 < oldFacetVisitor.point.length; i++) {
@@ -239314,9 +239473,9 @@ class PolyfaceQuery {
239314
239473
  }
239315
239474
  /**
239316
239475
  * Set the edge visibility for specified edges in the polyface.
239317
- * @param polyface mesh to be edited
239318
- * @param clusters array of edge references
239319
- * @param value visibility value (true or false)
239476
+ * @param polyface mesh to be edited.
239477
+ * @param clusters array of edge references.
239478
+ * @param value visibility value (true or false).
239320
239479
  */
239321
239480
  static setEdgeVisibility(polyface, clusters, value) {
239322
239481
  for (const cluster of clusters) {
@@ -239331,9 +239490,9 @@ class PolyfaceQuery {
239331
239490
  }
239332
239491
  /**
239333
239492
  * Set the visibility of a particular edge of a particular facet.
239334
- * @param polyface containing polyface
239335
- * @param facetIndex facet index
239336
- * @param vertexIndex vertex index (in vertex array) at which the edge starts
239493
+ * @param polyface containing polyface.
239494
+ * @param facetIndex facet index.
239495
+ * @param vertexIndex vertex index (in vertex array) at which the edge starts.
239337
239496
  * @param value visibility value.
239338
239497
  */
239339
239498
  static setSingleEdgeVisibility(polyface, facetIndex, vertexIndex, value) {
@@ -239346,9 +239505,9 @@ class PolyfaceQuery {
239346
239505
  }
239347
239506
  /**
239348
239507
  * Get the visibility of a particular edge of a particular facet.
239349
- * @param polyface containing polyface
239350
- * @param facetIndex facet index
239351
- * @param vertexIndex vertex index (in vertex array) at which the edge starts
239508
+ * @param polyface containing polyface.
239509
+ * @param facetIndex facet index.
239510
+ * @param vertexIndex vertex index (in vertex array) at which the edge starts.
239352
239511
  */
239353
239512
  static getSingleEdgeVisibility(polyface, facetIndex, vertexIndex) {
239354
239513
  const data = polyface.data;
@@ -239359,29 +239518,13 @@ class PolyfaceQuery {
239359
239518
  return data.edgeVisible[i]; // return visibility of first edge in the face that starts at this vertex
239360
239519
  return undefined;
239361
239520
  }
239362
- /** Load all half edges from a mesh to an IndexedEdgeMatcher.
239363
- * @param polyface a mesh, or a visitor assumed to have numWrap === 1
239364
- */
239365
- static createIndexedEdges(polyface) {
239366
- if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
239367
- return this.createIndexedEdges(polyface.createVisitor(1));
239368
- const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_10__.IndexedEdgeMatcher();
239369
- polyface.reset();
239370
- while (polyface.moveToNextFacet()) {
239371
- const numEdges = polyface.pointCount - 1;
239372
- for (let i = 0; i < numEdges; i++) {
239373
- edges.addEdge(polyface.clientPointIndex(i), polyface.clientPointIndex(i + 1), polyface.currentReadIndex());
239374
- }
239375
- }
239376
- return edges;
239377
- }
239378
239521
  /**
239379
239522
  * Return manifold edge pairs whose dihedral angle is bounded by the given angle.
239380
239523
  * * The dihedral angle of a manifold edge is measured between the normals of its two adjacent faces.
239381
239524
  * * Boundary edges are not returned as they are not manifold.
239382
- * @param mesh existing polyface or visitor
239383
- * @param maxSmoothEdgeAngle maximum dihedral angle of a smooth edge. If undefined, uses `Geometry.smallAngleRadians`.
239384
- * @param sharpEdges true to reverse the angle threshold test and return sharp edges; otherwise return smooth edges (default)
239525
+ * @param mesh existing polyface or visitor.
239526
+ * @param maxSmoothEdgeAngle maximum dihedral angle of a smooth edge. If `undefined`, uses `Geometry.smallAngleRadians`.
239527
+ * @param sharpEdges true to reverse the angle threshold test and return sharp edges; otherwise return smooth edges (default).
239385
239528
  */
239386
239529
  static collectEdgesByDihedralAngle(mesh, maxSmoothEdgeAngle, sharpEdges = false) {
239387
239530
  if (mesh instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
@@ -239416,13 +239559,13 @@ class PolyfaceQuery {
239416
239559
  return outEdges;
239417
239560
  }
239418
239561
  /**
239562
+ * Make paired edges invisible.
239419
239563
  * * Find mated pairs among facet edges.
239420
239564
  * * Mated pairs have the same vertex indices appearing in opposite order.
239421
239565
  * * Mark all non-mated pairs visible.
239422
239566
  * * At mated pairs
239423
239567
  * * if angle across the edge is larger than `sharpEdgeAngle`, mark visible
239424
239568
  * * otherwise mark invisible.
239425
- * @param mesh mesh to be marked
239426
239569
  */
239427
239570
  static markPairedEdgesInvisible(mesh, sharpEdgeAngle) {
239428
239571
  const visitor = mesh.createVisitor(1);
@@ -239451,7 +239594,8 @@ class PolyfaceQuery {
239451
239594
  }
239452
239595
  }
239453
239596
  }
239454
- /** Try to compute a unit normal for a facet accessible through a visitor.
239597
+ /**
239598
+ * Try to compute a unit normal for a facet accessible through a visitor.
239455
239599
  * * Unit normal is computed by `PolygonOps.unitNormal` with the points around the facet.
239456
239600
  */
239457
239601
  static computeFacetUnitNormal(visitor, facetIndex, result) {
@@ -239464,18 +239608,18 @@ class PolyfaceQuery {
239464
239608
  return undefined;
239465
239609
  }
239466
239610
  /**
239467
- * * Mark all edge visibilities in the IndexedPolyface
239468
- * @param mesh mesh to be marked
239469
- * @param value true for visible, false for hidden
239470
- */
239611
+ * * Mark all edge visibilities in the IndexedPolyface.
239612
+ * @param mesh mesh to be marked.
239613
+ * @param value true for visible, false for hidden.
239614
+ */
239471
239615
  static markAllEdgeVisibility(mesh, value) {
239472
239616
  const data = mesh.data;
239473
239617
  for (let i = 0; i < data.edgeVisible.length; i++)
239474
239618
  data.edgeVisible[i] = value;
239475
239619
  }
239476
239620
  /**
239477
- * Create a HalfEdgeGraph with a face for each facet of the IndexedPolyface
239478
- * @param mesh mesh to convert
239621
+ * Create a HalfEdgeGraph with a face for each facet of the IndexedPolyface.
239622
+ * @param mesh mesh to convert.
239479
239623
  * @internal
239480
239624
  */
239481
239625
  static convertToHalfEdgeGraph(mesh) {
@@ -239494,28 +239638,22 @@ class PolyfaceQuery {
239494
239638
  });
239495
239639
  return graph;
239496
239640
  }
239497
- /**
239498
- * * Examine adjacent facet orientations throughout the mesh
239499
- * * If possible, reverse a subset to achieve proper pairing.
239500
- * @param mesh
239501
- */
239641
+ /** Examine adjacent facet orientations throughout the mesh. If possible, reverse a subset to achieve proper pairing. */
239502
239642
  static reorientVertexOrderAroundFacetsForConsistentOrientation(mesh) {
239503
239643
  return _FacetOrientation__WEBPACK_IMPORTED_MODULE_31__.FacetOrientationFixup.doFixup(mesh);
239504
239644
  }
239505
- /**
239506
- * Set up indexed normals with one normal in the plane of each facet of the mesh.
239507
- * @param polyface
239508
- */
239645
+ /** Set up indexed normals with one normal in the plane of each facet of the mesh. */
239509
239646
  static buildPerFaceNormals(polyface) {
239510
239647
  _multiclip_BuildAverageNormalsContext__WEBPACK_IMPORTED_MODULE_32__.BuildAverageNormalsContext.buildPerFaceNormals(polyface);
239511
239648
  }
239512
239649
  /**
239513
- * * At each vertex of the mesh
239514
- * * Find clusters of almost parallel normals
239515
- * * Compute simple average of those normals
239516
- * * Index to the averages
239650
+ * * At each vertex of the mesh:
239651
+ * * Find clusters of almost parallel normals.
239652
+ * * Compute simple average of those normals.
239653
+ * * Index to the averages.
239517
239654
  * * For typical meshes, this correctly clusters adjacent normals.
239518
- * * One can imagine a vertex with multiple "smooth cone-like" sets of incident facets such that averaging occurs among two nonadjacent cones. But this does not seem to be a problem in practice.
239655
+ * * One can imagine a vertex with multiple "smooth cone-like" sets of adjacent facets such that averaging occurs
239656
+ * among two nonadjacent cones. But this does not seem to be a problem in practice.
239519
239657
  * @param polyface polyface to update.
239520
239658
  * @param toleranceAngle averaging is done between normals up to this angle.
239521
239659
  */
@@ -239524,9 +239662,9 @@ class PolyfaceQuery {
239524
239662
  }
239525
239663
  /**
239526
239664
  * Offset the faces of the mesh.
239527
- * @param source original mesh
239665
+ * @param source original mesh.
239528
239666
  * @param signedOffsetDistance distance to offset
239529
- * @param offsetOptions angle options. The default options are recommended.
239667
+ * @param offsetOptions angle options. The default options are recommended.
239530
239668
  * @returns shifted mesh.
239531
239669
  */
239532
239670
  static cloneOffset(source, signedOffsetDistance, offsetOptions = OffsetMeshOptions.create()) {
@@ -239535,16 +239673,22 @@ class PolyfaceQuery {
239535
239673
  _multiclip_OffsetMeshContext__WEBPACK_IMPORTED_MODULE_33__.OffsetMeshContext.buildOffsetMeshWithEdgeChamfers(source, offsetBuilder, signedOffsetDistance, offsetOptions);
239536
239674
  return offsetBuilder.claimPolyface();
239537
239675
  }
239538
- /** Search facets for the first one that intersects the infinite line.
239539
- * * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always returns false.
239540
- * In this case, `intersectRay3d` will return undefined, but the callback will be invoked for each intersection.
239676
+ /**
239677
+ * Search facets for the first one that intersects the infinite line.
239678
+ * * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always
239679
+ * returns `false`.
239680
+ * In this case, `intersectRay3d` will return `undefined`, but the callback will be invoked for each intersection.
239541
239681
  * * Example callback logic:
239542
239682
  * * Accept the first found facet that intersects the half-line specified by the ray: `return detail.a >= 0.0;`
239543
- * * Collect all intersections: `myIntersections.push(detail.clone()); return false;` Then after `intersectRay3d` returns, sort along `ray` with `myIntersections.sort((d0, d1) => d0.a - d1.a);`
239544
- * @param visitor facet iterator
239545
- * @param ray infinite line parameterized as a ray. The returned `detail.a` is the intersection parameter on the ray, e.g., zero at `ray.origin` and increasing in `ray.direction`.
239546
- * @param options options for computing and populating an intersection detail, and an optional callback for accepting one
239547
- * @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no (accepted) intersection
239683
+ * * Collect all intersections: `myIntersections.push(detail.clone()); return false;` Then after `intersectRay3d`
239684
+ * returns, sort along `ray` with `myIntersections.sort((d0, d1) => d0.a - d1.a);`
239685
+ * @param visitor facet iterator.
239686
+ * @param ray infinite line parameterized as a ray. The returned `detail.a` is the intersection parameter on the
239687
+ * ray, e.g., zero at `ray.origin` and increasing in `ray.direction`.
239688
+ * @param options options for computing and populating an intersection detail, and an optional callback for
239689
+ * accepting one.
239690
+ * @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no
239691
+ * (accepted) intersection.
239548
239692
  * @see PolygonOps.intersectRay3d
239549
239693
  */
239550
239694
  static intersectRay3d(visitor, ray, options) {
@@ -239587,7 +239731,8 @@ class PolyfaceQuery {
239587
239731
  }
239588
239732
  // amount of computation to do per step of async methods.
239589
239733
  PolyfaceQuery._asyncWorkLimit = 1.e06;
239590
- /** Number of "await" steps executed in recent async calls.
239734
+ /**
239735
+ * Number of "await" steps executed in recent async calls.
239591
239736
  * @internal
239592
239737
  */
239593
239738
  PolyfaceQuery.awaitBlockCount = 0;
@@ -248951,44 +249096,45 @@ __webpack_require__.r(__webpack_exports__);
248951
249096
  /* harmony export */ "DgnSpiralTypeQueries": () => (/* binding */ DgnSpiralTypeQueries)
248952
249097
  /* harmony export */ });
248953
249098
  /* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ "../../common/temp/node_modules/.pnpm/flatbuffers@1.12.0/node_modules/flatbuffers/js/flatbuffers.mjs");
248954
- /* harmony import */ var _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../bspline/AkimaCurve3d */ "../../core/geometry/lib/esm/bspline/AkimaCurve3d.js");
248955
- /* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
248956
- /* harmony import */ var _bspline_BSplineCurve3dH__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../bspline/BSplineCurve3dH */ "../../core/geometry/lib/esm/bspline/BSplineCurve3dH.js");
248957
- /* harmony import */ var _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../bspline/BSplineSurface */ "../../core/geometry/lib/esm/bspline/BSplineSurface.js");
248958
- /* harmony import */ var _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../bspline/InterpolationCurve3d */ "../../core/geometry/lib/esm/bspline/InterpolationCurve3d.js");
248959
- /* harmony import */ var _curve_Arc3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../curve/Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
248960
- /* harmony import */ var _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../curve/CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
248961
- /* harmony import */ var _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../curve/GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
248962
- /* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
248963
- /* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
248964
- /* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
248965
- /* harmony import */ var _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../curve/ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
248966
- /* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
248967
- /* harmony import */ var _curve_PointString3d__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../curve/PointString3d */ "../../core/geometry/lib/esm/curve/PointString3d.js");
248968
- /* harmony import */ var _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../curve/spiral/DirectSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/DirectSpiral3d.js");
248969
- /* harmony import */ var _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../curve/spiral/IntegratedSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/IntegratedSpiral3d.js");
248970
- /* harmony import */ var _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../curve/spiral/TransitionSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/TransitionSpiral3d.js");
248971
- /* harmony import */ var _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../curve/UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
248972
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
248973
- /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
248974
- /* harmony import */ var _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/AngleSweep */ "../../core/geometry/lib/esm/geometry3d/AngleSweep.js");
248975
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
248976
- /* harmony import */ var _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/PointHelpers */ "../../core/geometry/lib/esm/geometry3d/PointHelpers.js");
248977
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
248978
- /* harmony import */ var _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Segment1d */ "../../core/geometry/lib/esm/geometry3d/Segment1d.js");
248979
- /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
248980
- /* harmony import */ var _polyface_AuxData__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../polyface/AuxData */ "../../core/geometry/lib/esm/polyface/AuxData.js");
248981
- /* harmony import */ var _polyface_Polyface__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../polyface/Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
248982
- /* harmony import */ var _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../polyface/TaggedNumericData */ "../../core/geometry/lib/esm/polyface/TaggedNumericData.js");
248983
- /* harmony import */ var _solid_Box__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../solid/Box */ "../../core/geometry/lib/esm/solid/Box.js");
248984
- /* harmony import */ var _solid_Cone__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../solid/Cone */ "../../core/geometry/lib/esm/solid/Cone.js");
248985
- /* harmony import */ var _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../solid/LinearSweep */ "../../core/geometry/lib/esm/solid/LinearSweep.js");
248986
- /* harmony import */ var _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../solid/RotationalSweep */ "../../core/geometry/lib/esm/solid/RotationalSweep.js");
248987
- /* harmony import */ var _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../solid/RuledSweep */ "../../core/geometry/lib/esm/solid/RuledSweep.js");
248988
- /* harmony import */ var _solid_Sphere__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../solid/Sphere */ "../../core/geometry/lib/esm/solid/Sphere.js");
248989
- /* harmony import */ var _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../solid/TorusPipe */ "../../core/geometry/lib/esm/solid/TorusPipe.js");
248990
- /* harmony import */ var _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BGFBAccessors */ "../../core/geometry/lib/esm/serialization/BGFBAccessors.js");
248991
- /* harmony import */ var _SerializationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SerializationHelpers */ "../../core/geometry/lib/esm/serialization/SerializationHelpers.js");
249099
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
249100
+ /* harmony import */ var _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../bspline/AkimaCurve3d */ "../../core/geometry/lib/esm/bspline/AkimaCurve3d.js");
249101
+ /* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
249102
+ /* harmony import */ var _bspline_BSplineCurve3dH__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../bspline/BSplineCurve3dH */ "../../core/geometry/lib/esm/bspline/BSplineCurve3dH.js");
249103
+ /* harmony import */ var _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../bspline/BSplineSurface */ "../../core/geometry/lib/esm/bspline/BSplineSurface.js");
249104
+ /* harmony import */ var _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../bspline/InterpolationCurve3d */ "../../core/geometry/lib/esm/bspline/InterpolationCurve3d.js");
249105
+ /* harmony import */ var _curve_Arc3d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../curve/Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
249106
+ /* harmony import */ var _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../curve/CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
249107
+ /* harmony import */ var _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../curve/GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
249108
+ /* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
249109
+ /* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
249110
+ /* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
249111
+ /* harmony import */ var _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../curve/ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
249112
+ /* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
249113
+ /* harmony import */ var _curve_PointString3d__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../curve/PointString3d */ "../../core/geometry/lib/esm/curve/PointString3d.js");
249114
+ /* harmony import */ var _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../curve/spiral/DirectSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/DirectSpiral3d.js");
249115
+ /* harmony import */ var _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../curve/spiral/IntegratedSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/IntegratedSpiral3d.js");
249116
+ /* harmony import */ var _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../curve/spiral/TransitionSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/TransitionSpiral3d.js");
249117
+ /* harmony import */ var _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../curve/UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
249118
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
249119
+ /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
249120
+ /* harmony import */ var _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/AngleSweep */ "../../core/geometry/lib/esm/geometry3d/AngleSweep.js");
249121
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
249122
+ /* harmony import */ var _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/PointHelpers */ "../../core/geometry/lib/esm/geometry3d/PointHelpers.js");
249123
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
249124
+ /* harmony import */ var _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/Segment1d */ "../../core/geometry/lib/esm/geometry3d/Segment1d.js");
249125
+ /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
249126
+ /* harmony import */ var _polyface_AuxData__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../polyface/AuxData */ "../../core/geometry/lib/esm/polyface/AuxData.js");
249127
+ /* harmony import */ var _polyface_Polyface__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../polyface/Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
249128
+ /* harmony import */ var _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../polyface/TaggedNumericData */ "../../core/geometry/lib/esm/polyface/TaggedNumericData.js");
249129
+ /* harmony import */ var _solid_Box__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../solid/Box */ "../../core/geometry/lib/esm/solid/Box.js");
249130
+ /* harmony import */ var _solid_Cone__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../solid/Cone */ "../../core/geometry/lib/esm/solid/Cone.js");
249131
+ /* harmony import */ var _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../solid/LinearSweep */ "../../core/geometry/lib/esm/solid/LinearSweep.js");
249132
+ /* harmony import */ var _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../solid/RotationalSweep */ "../../core/geometry/lib/esm/solid/RotationalSweep.js");
249133
+ /* harmony import */ var _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../solid/RuledSweep */ "../../core/geometry/lib/esm/solid/RuledSweep.js");
249134
+ /* harmony import */ var _solid_Sphere__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../solid/Sphere */ "../../core/geometry/lib/esm/solid/Sphere.js");
249135
+ /* harmony import */ var _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../solid/TorusPipe */ "../../core/geometry/lib/esm/solid/TorusPipe.js");
249136
+ /* harmony import */ var _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BGFBAccessors */ "../../core/geometry/lib/esm/serialization/BGFBAccessors.js");
249137
+ /* harmony import */ var _SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SerializationHelpers */ "../../core/geometry/lib/esm/serialization/SerializationHelpers.js");
248992
249138
  /*---------------------------------------------------------------------------------------------
248993
249139
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
248994
249140
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -249030,6 +249176,7 @@ __webpack_require__.r(__webpack_exports__);
249030
249176
 
249031
249177
 
249032
249178
 
249179
+
249033
249180
 
249034
249181
 
249035
249182
  /** * Context to write to a flatbuffer blob.
@@ -249047,8 +249194,8 @@ class BGFBReader {
249047
249194
  readBSplineSurfaceFromVariant(variantHeader) {
249048
249195
  let newSurface;
249049
249196
  const geometryType = variantHeader.geometryType();
249050
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagBsplineSurface) {
249051
- const bsurfHeader = variantHeader.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.BsplineSurface());
249197
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagBsplineSurface) {
249198
+ const bsurfHeader = variantHeader.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.BsplineSurface());
249052
249199
  if (bsurfHeader !== null) {
249053
249200
  const orderU = bsurfHeader.orderU();
249054
249201
  const orderV = bsurfHeader.orderV();
@@ -249061,23 +249208,23 @@ class BGFBReader {
249061
249208
  const closedU = bsurfHeader.closedU();
249062
249209
  const closedV = bsurfHeader.closedV();
249063
249210
  if (xyzArray !== null && knotArrayU !== null && knotArrayV !== null) {
249064
- const myData = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_2__.SerializationHelpers.createBSplineSurfaceData(xyzArray, 3, knotArrayU, numPolesU, orderU, knotArrayV, numPolesV, orderV);
249211
+ const myData = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.createBSplineSurfaceData(xyzArray, 3, knotArrayU, numPolesU, orderU, knotArrayV, numPolesV, orderV);
249065
249212
  if (weightArray !== null)
249066
249213
  myData.weights = weightArray;
249067
249214
  if (closedU)
249068
249215
  myData.uParams.closed = true;
249069
249216
  if (closedV)
249070
249217
  myData.vParams.closed = true;
249071
- if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_2__.SerializationHelpers.Import.prepareBSplineSurfaceData(myData, { jsonPoles: false })) {
249218
+ if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.Import.prepareBSplineSurfaceData(myData, { jsonPoles: false })) {
249072
249219
  if (undefined === myData.weights)
249073
- newSurface = _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_3__.BSplineSurface3d.create(myData.poles, myData.uParams.numPoles, myData.uParams.order, myData.uParams.knots, myData.vParams.numPoles, myData.vParams.order, myData.vParams.knots);
249220
+ newSurface = _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_4__.BSplineSurface3d.create(myData.poles, myData.uParams.numPoles, myData.uParams.order, myData.uParams.knots, myData.vParams.numPoles, myData.vParams.order, myData.vParams.knots);
249074
249221
  else
249075
- newSurface = _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_3__.BSplineSurface3dH.create(myData.poles, myData.weights, myData.uParams.numPoles, myData.uParams.order, myData.uParams.knots, myData.vParams.numPoles, myData.vParams.order, myData.vParams.knots);
249222
+ newSurface = _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_4__.BSplineSurface3dH.create(myData.poles, myData.weights, myData.uParams.numPoles, myData.uParams.order, myData.uParams.knots, myData.vParams.numPoles, myData.vParams.order, myData.vParams.knots);
249076
249223
  if (undefined !== newSurface) {
249077
249224
  if (undefined !== myData.uParams.wrapMode)
249078
- newSurface.setWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_3__.UVSelect.uDirection, myData.uParams.wrapMode);
249225
+ newSurface.setWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_4__.UVSelect.uDirection, myData.uParams.wrapMode);
249079
249226
  if (undefined !== myData.vParams.wrapMode)
249080
- newSurface.setWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_3__.UVSelect.vDirection, myData.vParams.wrapMode);
249227
+ newSurface.setWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_4__.UVSelect.vDirection, myData.vParams.wrapMode);
249081
249228
  }
249082
249229
  }
249083
249230
  }
@@ -249093,11 +249240,11 @@ class BGFBReader {
249093
249240
  const xyzArray = header.fitPointsArray();
249094
249241
  if (xyzArray instanceof Float64Array) {
249095
249242
  const knots = header.knotsArray();
249096
- const options = new _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_4__.InterpolationCurve3dOptions(_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_5__.Point3dArray.clonePoint3dArray(xyzArray), knots ? _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_5__.NumberArray.create(knots) : undefined);
249243
+ const options = new _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_5__.InterpolationCurve3dOptions(_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_6__.Point3dArray.clonePoint3dArray(xyzArray), knots ? _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_6__.NumberArray.create(knots) : undefined);
249097
249244
  const startTangent = header.startTangent();
249098
249245
  const endTangent = header.endTangent();
249099
- options.captureOptionalProps(header.order(), header.closed(), header.isChordLenKnots(), header.isColinearTangents(), header.isChordLenTangents(), header.isNaturalTangents(), startTangent !== null ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create(startTangent.x(), startTangent.y(), startTangent.z()) : undefined, endTangent !== null ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create(endTangent.x(), endTangent.y(), endTangent.z()) : undefined);
249100
- return _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_4__.InterpolationCurve3d.createCapture(options);
249246
+ options.captureOptionalProps(header.order(), header.closed(), header.isChordLenKnots(), header.isColinearTangents(), header.isChordLenTangents(), header.isNaturalTangents(), startTangent !== null ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.create(startTangent.x(), startTangent.y(), startTangent.z()) : undefined, endTangent !== null ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.create(endTangent.x(), endTangent.y(), endTangent.z()) : undefined);
249247
+ return _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_5__.InterpolationCurve3d.createCapture(options);
249101
249248
  }
249102
249249
  return undefined;
249103
249250
  }
@@ -249108,8 +249255,8 @@ class BGFBReader {
249108
249255
  readAkimaCurve3d(header) {
249109
249256
  const xyzArray = header.pointsArray();
249110
249257
  if (xyzArray instanceof Float64Array) {
249111
- const options = new _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_7__.AkimaCurve3dOptions(_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_5__.Point3dArray.clonePoint3dArray(xyzArray));
249112
- return _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_7__.AkimaCurve3d.createCapture(options);
249258
+ const options = new _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_8__.AkimaCurve3dOptions(_geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_6__.Point3dArray.clonePoint3dArray(xyzArray));
249259
+ return _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_8__.AkimaCurve3d.createCapture(options);
249113
249260
  }
249114
249261
  return undefined;
249115
249262
  }
@@ -249126,17 +249273,17 @@ class BGFBReader {
249126
249273
  const closed = header.closed();
249127
249274
  if (xyzArray !== null && knots !== null) {
249128
249275
  const numPoles = Math.floor(xyzArray.length / 3);
249129
- const myData = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_2__.SerializationHelpers.createBSplineCurveData(xyzArray, 3, knots, numPoles, order);
249276
+ const myData = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.createBSplineCurveData(xyzArray, 3, knots, numPoles, order);
249130
249277
  if (closed)
249131
249278
  myData.params.closed = true;
249132
249279
  if (weightsArray === null) {
249133
- if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_2__.SerializationHelpers.Import.prepareBSplineCurveData(myData))
249134
- newCurve = _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_8__.BSplineCurve3d.create(myData.poles, myData.params.knots, myData.params.order);
249280
+ if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.Import.prepareBSplineCurveData(myData))
249281
+ newCurve = _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__.BSplineCurve3d.create(myData.poles, myData.params.knots, myData.params.order);
249135
249282
  }
249136
249283
  else {
249137
249284
  myData.weights = weightsArray;
249138
- if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_2__.SerializationHelpers.Import.prepareBSplineCurveData(myData, { jsonPoles: false }))
249139
- newCurve = _bspline_BSplineCurve3dH__WEBPACK_IMPORTED_MODULE_9__.BSplineCurve3dH.create({ xyz: myData.poles, weights: myData.weights }, myData.params.knots, myData.params.order);
249285
+ if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.Import.prepareBSplineCurveData(myData, { jsonPoles: false }))
249286
+ newCurve = _bspline_BSplineCurve3dH__WEBPACK_IMPORTED_MODULE_10__.BSplineCurve3dH.create({ xyz: myData.poles, weights: myData.weights }, myData.params.knots, myData.params.order);
249140
249287
  }
249141
249288
  if (undefined !== newCurve) {
249142
249289
  if (undefined !== myData.params.wrapMode)
@@ -249160,17 +249307,17 @@ class BGFBReader {
249160
249307
  const bearing0Radians = detailHeader.bearing0Radians();
249161
249308
  const bearing1Radians = detailHeader.bearing1Radians();
249162
249309
  const fbTransform = detailHeader.transform();
249163
- const localToWorld = fbTransform ? _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__.Transform.createRowValues(fbTransform.axx(), fbTransform.axy(), fbTransform.axz(), fbTransform.axw(), fbTransform.ayx(), fbTransform.ayy(), fbTransform.ayz(), fbTransform.ayw(), fbTransform.azx(), fbTransform.azy(), fbTransform.azz(), fbTransform.azw()) :
249164
- _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__.Transform.createIdentity();
249165
- const activeFractionInterval = _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_11__.Segment1d.create(detailHeader.fractionA(), detailHeader.fractionB());
249310
+ const localToWorld = fbTransform ? _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__.Transform.createRowValues(fbTransform.axx(), fbTransform.axy(), fbTransform.axz(), fbTransform.axw(), fbTransform.ayx(), fbTransform.ayy(), fbTransform.ayz(), fbTransform.ayw(), fbTransform.azx(), fbTransform.azy(), fbTransform.azz(), fbTransform.azw()) :
249311
+ _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__.Transform.createIdentity();
249312
+ const activeFractionInterval = _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_12__.Segment1d.create(detailHeader.fractionA(), detailHeader.fractionB());
249166
249313
  if (!directDetailHeader) {
249167
- const integratedSpiral = _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_12__.IntegratedSpiral3d.createRadiusRadiusBearingBearing(_geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_11__.Segment1d.create(_curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_12__.IntegratedSpiral3d.curvatureToRadius(curvature0), _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_12__.IntegratedSpiral3d.curvatureToRadius(curvature1)), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_13__.AngleSweep.createStartEndRadians(bearing0Radians, bearing1Radians), activeFractionInterval, localToWorld, spiralTypeName);
249314
+ const integratedSpiral = _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_13__.IntegratedSpiral3d.createRadiusRadiusBearingBearing(_geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_12__.Segment1d.create(_curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_13__.IntegratedSpiral3d.curvatureToRadius(curvature0), _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_13__.IntegratedSpiral3d.curvatureToRadius(curvature1)), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_14__.AngleSweep.createStartEndRadians(bearing0Radians, bearing1Radians), activeFractionInterval, localToWorld, spiralTypeName);
249168
249315
  if (integratedSpiral)
249169
249316
  return integratedSpiral;
249170
- const radius0 = _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_14__.TransitionSpiral3d.curvatureToRadius(curvature0);
249171
- const radius1 = _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_14__.TransitionSpiral3d.curvatureToRadius(curvature1);
249172
- const arcLength = _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_14__.TransitionSpiral3d.radiusRadiusSweepRadiansToArcLength(radius0, radius1, bearing1Radians - bearing0Radians);
249173
- const directSpiral = _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_15__.DirectSpiral3d.createFromLengthAndRadius(spiralTypeName, radius0, radius1, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_16__.Angle.createRadians(bearing0Radians), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_16__.Angle.createRadians(bearing1Radians), arcLength, activeFractionInterval, localToWorld);
249317
+ const radius0 = _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_15__.TransitionSpiral3d.curvatureToRadius(curvature0);
249318
+ const radius1 = _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_15__.TransitionSpiral3d.curvatureToRadius(curvature1);
249319
+ const arcLength = _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_15__.TransitionSpiral3d.radiusRadiusSweepRadiansToArcLength(radius0, radius1, bearing1Radians - bearing0Radians);
249320
+ const directSpiral = _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_16__.DirectSpiral3d.createFromLengthAndRadius(spiralTypeName, radius0, radius1, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_17__.Angle.createRadians(bearing0Radians), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_17__.Angle.createRadians(bearing1Radians), arcLength, activeFractionInterval, localToWorld);
249174
249321
  if (directSpiral)
249175
249322
  return directSpiral;
249176
249323
  }
@@ -249183,42 +249330,42 @@ class BGFBReader {
249183
249330
  */
249184
249331
  readCurvePrimitiveFromVariant(variant) {
249185
249332
  const geometryType = variant.geometryType();
249186
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagLineSegment) {
249187
- const offsetToLineSegment = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.LineSegment());
249333
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagLineSegment) {
249334
+ const offsetToLineSegment = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.LineSegment());
249188
249335
  const offsetToCoordinates = offsetToLineSegment.segment();
249189
- return _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_17__.LineSegment3d.createXYZXYZ(offsetToCoordinates.point0X(), offsetToCoordinates.point0Y(), offsetToCoordinates.point0Z(), offsetToCoordinates.point1X(), offsetToCoordinates.point1Y(), offsetToCoordinates.point1Z());
249336
+ return _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_18__.LineSegment3d.createXYZXYZ(offsetToCoordinates.point0X(), offsetToCoordinates.point0Y(), offsetToCoordinates.point0Z(), offsetToCoordinates.point1X(), offsetToCoordinates.point1Y(), offsetToCoordinates.point1Z());
249190
249337
  }
249191
- else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagEllipticArc) {
249192
- const offsetToEllipticArc = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.EllipticArc());
249338
+ else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagEllipticArc) {
249339
+ const offsetToEllipticArc = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.EllipticArc());
249193
249340
  const offsetToCoordinates = offsetToEllipticArc.arc();
249194
- return _curve_Arc3d__WEBPACK_IMPORTED_MODULE_18__.Arc3d.createXYZXYZXYZ(offsetToCoordinates.centerX(), offsetToCoordinates.centerY(), offsetToCoordinates.centerZ(), offsetToCoordinates.vector0X(), offsetToCoordinates.vector0Y(), offsetToCoordinates.vector0Z(), offsetToCoordinates.vector90X(), offsetToCoordinates.vector90Y(), offsetToCoordinates.vector90Z(), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_13__.AngleSweep.createStartSweepRadians(offsetToCoordinates.startRadians(), offsetToCoordinates?.sweepRadians()));
249341
+ return _curve_Arc3d__WEBPACK_IMPORTED_MODULE_19__.Arc3d.createXYZXYZXYZ(offsetToCoordinates.centerX(), offsetToCoordinates.centerY(), offsetToCoordinates.centerZ(), offsetToCoordinates.vector0X(), offsetToCoordinates.vector0Y(), offsetToCoordinates.vector0Z(), offsetToCoordinates.vector90X(), offsetToCoordinates.vector90Y(), offsetToCoordinates.vector90Z(), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_14__.AngleSweep.createStartSweepRadians(offsetToCoordinates.startRadians(), offsetToCoordinates?.sweepRadians()));
249195
249342
  }
249196
- else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagLineString) {
249197
- const offsetToLineString = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.LineString());
249343
+ else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagLineString) {
249344
+ const offsetToLineString = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.LineString());
249198
249345
  const numCoordinates = offsetToLineString.pointsLength();
249199
- const result = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_19__.LineString3d.create();
249346
+ const result = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_20__.LineString3d.create();
249200
249347
  for (let i = 0; i + 2 < numCoordinates; i += 3) {
249201
249348
  result.packedPoints.pushXYZ(offsetToLineString.points(i), offsetToLineString.points(i + 1), offsetToLineString.points(i + 2));
249202
249349
  }
249203
249350
  return result;
249204
249351
  }
249205
- else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagBsplineCurve) {
249206
- const offsetToBCurve = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.BsplineCurve());
249352
+ else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagBsplineCurve) {
249353
+ const offsetToBCurve = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.BsplineCurve());
249207
249354
  if (offsetToBCurve !== null)
249208
249355
  return this.readBSplineCurve(offsetToBCurve);
249209
249356
  }
249210
- else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagTransitionSpiral) {
249211
- const offsetToTransitionSpiralTable = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.TransitionSpiral());
249357
+ else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagTransitionSpiral) {
249358
+ const offsetToTransitionSpiralTable = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.TransitionSpiral());
249212
249359
  if (offsetToTransitionSpiralTable !== null)
249213
249360
  return this.readTransitionSpiral(offsetToTransitionSpiralTable);
249214
249361
  }
249215
- else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagInterpolationCurve) {
249216
- const offsetToInterpolationCurveTable = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.InterpolationCurve());
249362
+ else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagInterpolationCurve) {
249363
+ const offsetToInterpolationCurveTable = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.InterpolationCurve());
249217
249364
  if (offsetToInterpolationCurveTable !== null)
249218
249365
  return this.readInterpolationCurve3d(offsetToInterpolationCurveTable);
249219
249366
  }
249220
- else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagAkimaCurve) {
249221
- const offsetToAkimaCurveTable = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.AkimaCurve());
249367
+ else if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagAkimaCurve) {
249368
+ const offsetToAkimaCurveTable = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.AkimaCurve());
249222
249369
  if (offsetToAkimaCurveTable !== null)
249223
249370
  return this.readAkimaCurve3d(offsetToAkimaCurveTable);
249224
249371
  }
@@ -249230,34 +249377,28 @@ class BGFBReader {
249230
249377
  */
249231
249378
  readPointStringFromVariant(variant) {
249232
249379
  const geometryType = variant.geometryType();
249233
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagPointString) {
249234
- const offsetToLineString = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.PointString());
249380
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagPointString) {
249381
+ const offsetToLineString = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.PointString());
249235
249382
  const numCoordinates = offsetToLineString.pointsLength();
249236
- const result = _curve_PointString3d__WEBPACK_IMPORTED_MODULE_20__.PointString3d.create();
249383
+ const result = _curve_PointString3d__WEBPACK_IMPORTED_MODULE_21__.PointString3d.create();
249237
249384
  for (let i = 0; i + 2 < numCoordinates; i += 3) {
249238
- result.points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create(offsetToLineString.points(i), offsetToLineString.points(i + 1), offsetToLineString.points(i + 2)));
249385
+ result.points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create(offsetToLineString.points(i), offsetToLineString.points(i + 1), offsetToLineString.points(i + 2)));
249239
249386
  }
249240
249387
  return result;
249241
249388
  }
249242
249389
  return undefined;
249243
249390
  }
249244
- /**
249245
- * Extract auxData for a mesh
249246
- * @param variant read position in the flat buffer.
249247
- */
249391
+ /** Extract auxData channel data for a mesh */
249248
249392
  readPolyfaceAuxChannelData(channelDataHeader) {
249249
249393
  if (channelDataHeader !== null) {
249250
249394
  const input = channelDataHeader.input();
249251
249395
  const values = channelDataHeader.valuesArray();
249252
249396
  if (values !== null)
249253
- return new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_21__.AuxChannelData(input, values);
249397
+ return new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_22__.AuxChannelData(input, values);
249254
249398
  }
249255
249399
  return undefined;
249256
249400
  }
249257
- /**
249258
- * Extract auxData for a mesh
249259
- * @param variant read position in the flat buffer.
249260
- */
249401
+ /** Extract auxData channel for a mesh */
249261
249402
  readPolyfaceAuxChannel(channelHeader) {
249262
249403
  if (channelHeader) {
249263
249404
  const dataType = channelHeader.dataType();
@@ -249270,43 +249411,107 @@ class BGFBReader {
249270
249411
  if (channelData)
249271
249412
  channelDataArray.push(channelData);
249272
249413
  }
249273
- return new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_21__.AuxChannel(channelDataArray, dataType, name ? name : undefined, inputName ? inputName : undefined);
249414
+ return new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_22__.AuxChannel(channelDataArray, dataType, name ? name : undefined, inputName ? inputName : undefined);
249274
249415
  }
249275
249416
  return undefined;
249276
249417
  }
249277
- /**
249278
- * Extract auxData for a mesh
249279
- * @param variant read position in the flat buffer.
249280
- */
249281
- readPolyfaceAuxData(auxDataHeader) {
249282
- if (auxDataHeader) {
249283
- const channelsLength = auxDataHeader.channelsLength();
249284
- const indicesArray = auxDataHeader.indicesArray();
249285
- const indices = [];
249286
- const channels = [];
249287
- if (null !== indicesArray) {
249288
- for (const i of indicesArray)
249289
- indices.push(i);
249290
- }
249291
- if (0 !== channelsLength) {
249292
- for (let i = 0; i < channelsLength; i++) {
249293
- const channelHeader = auxDataHeader.channels(i);
249294
- const channelContent = this.readPolyfaceAuxChannel(channelHeader);
249295
- if (channelContent)
249296
- channels.push(channelContent);
249297
- }
249298
- }
249299
- return new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_21__.PolyfaceAuxData(channels, indices);
249418
+ /** Compute the number of logical entries in every flat data array in the AuxData */
249419
+ static channelDataLength(fbAuxData) {
249420
+ if (fbAuxData.channelsLength() <= 0)
249421
+ return 0;
249422
+ const fbChannel0 = nullToUndefined(fbAuxData.channels(0));
249423
+ if (!fbChannel0)
249424
+ return 0;
249425
+ const numChannel0Data = fbChannel0.dataLength();
249426
+ if (numChannel0Data <= 0)
249427
+ return 0;
249428
+ const fbChannel0Data0 = nullToUndefined(fbChannel0.data(0));
249429
+ if (!fbChannel0Data0)
249430
+ return 0;
249431
+ const numChannelDataValues = fbChannel0Data0.valuesLength();
249432
+ if (numChannelDataValues <= 0)
249433
+ return 0;
249434
+ return numChannelDataValues / _polyface_AuxData__WEBPACK_IMPORTED_MODULE_22__.AuxChannel.entriesPerValue(fbChannel0.dataType());
249435
+ }
249436
+ /** Examine int array for range and zero count */
249437
+ countIntArray(ints) {
249438
+ let min = Infinity;
249439
+ let max = -Infinity;
249440
+ let numZeroes = 0;
249441
+ for (const i of ints) {
249442
+ if (min > i)
249443
+ min = i;
249444
+ if (max < i)
249445
+ max = i;
249446
+ if (0 === i)
249447
+ ++numZeroes;
249448
+ }
249449
+ return { min, max, numZeroes };
249450
+ }
249451
+ /**
249452
+ * Extract auxData for a mesh.
249453
+ * Typescript object format for Polyface/PolyfaceAuxData indices is 0-based, unterminated.
249454
+ * FlatBuffer format for Polyface/PolyfaceAuxData indices is 1-based, 0-terminated/padded.
249455
+ * Typescript API previously wrote FlatBuffer PolyfaceAuxData indices as 0-based, unterminated;
249456
+ * heuristics are used herein to identify this legacy format so it can still be read.
249457
+ */
249458
+ readPolyfaceAuxData(fbPolyface, fbAuxData) {
249459
+ if (!fbPolyface || !fbAuxData)
249460
+ return undefined;
249461
+ const fbPointIndices = nullToUndefined(fbPolyface.pointIndexArray());
249462
+ const fbAuxIndices = nullToUndefined(fbAuxData.indicesArray());
249463
+ const numChannels = fbAuxData.channelsLength();
249464
+ const fbNumData = BGFBReader.channelDataLength(fbAuxData);
249465
+ if (!fbPointIndices || !fbPointIndices.length || !fbAuxIndices || !fbAuxIndices.length || numChannels <= 0 || fbNumData <= 0)
249466
+ return undefined;
249467
+ const numPerFace = fbPolyface.numPerFace();
249468
+ // HEURISTICS to detect legacy AuxData indices, previously mistakenly serialized by BGFBWriter.writePolyfaceAsFBVariantGeometry as 0-based unblocked indices
249469
+ let isLegacy = false;
249470
+ const pointIndicesPadCount = fbPointIndices.filter((index) => index === 0).length;
249471
+ if (numPerFace > 1) {
249472
+ const auxIndexCounts = this.countIntArray(fbAuxIndices);
249473
+ if (auxIndexCounts.max > fbNumData) // auxIndices invalid
249474
+ return undefined;
249475
+ if (auxIndexCounts.max === fbNumData) // auxIndices 1-based
249476
+ isLegacy = false;
249477
+ else if (auxIndexCounts.max <= 0 || auxIndexCounts.min < 0) // auxIndices 1-based (signed)
249478
+ isLegacy = false;
249479
+ else if (auxIndexCounts.min === 0) // auxIndices likely legacy 0-based index, but could be modern with padding
249480
+ isLegacy = pointIndicesPadCount !== auxIndexCounts.numZeroes;
249481
+ else if (auxIndexCounts.min > 0) // auxIndices likely modern without padding, but could be legacy if first datum not indexed
249482
+ isLegacy = pointIndicesPadCount > 0;
249300
249483
  }
249301
- return undefined;
249484
+ else {
249485
+ isLegacy = (fbAuxIndices.length < fbPointIndices.length) && (fbAuxIndices.length + pointIndicesPadCount === fbPointIndices.length);
249486
+ }
249487
+ if (!isLegacy && fbAuxIndices.length !== fbPointIndices.length)
249488
+ return undefined; // auxIndices invalid
249489
+ const indices = [];
249490
+ if (isLegacy)
249491
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.announceZeroBasedIndicesWithExternalBlocking(fbAuxIndices, fbPointIndices, numPerFace, (i0) => { indices.push(i0); });
249492
+ else
249493
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(fbAuxIndices, numPerFace, (i0) => { indices.push(i0); });
249494
+ if (indices.length + pointIndicesPadCount !== fbPointIndices.length)
249495
+ return undefined;
249496
+ const maxIndex = Math.max(...indices);
249497
+ const channels = [];
249498
+ for (let i = 0; i < numChannels; i++) {
249499
+ const channelHeader = fbAuxData.channels(i);
249500
+ const channelContent = this.readPolyfaceAuxChannel(channelHeader);
249501
+ if (channelContent) {
249502
+ if (maxIndex >= channelContent.valueCount)
249503
+ return undefined; // invalid index
249504
+ channels.push(channelContent);
249505
+ }
249506
+ }
249507
+ if (!channels.length)
249508
+ return undefined;
249509
+ return new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_22__.PolyfaceAuxData(channels, indices);
249302
249510
  }
249303
- /**
249304
- * Extract auxData for a mesh
249305
- * @param variant read position in the flat buffer.
249306
- */
249511
+ /** Extract tagged numeric data for a mesh */
249307
249512
  readTaggedNumericData(accessor) {
249308
249513
  if (accessor) {
249309
- const taggedNumericData = new _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_22__.TaggedNumericData(accessor.tagA(), accessor.tagB());
249514
+ const taggedNumericData = new _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_23__.TaggedNumericData(accessor.tagA(), accessor.tagB());
249310
249515
  const intDataArray = nullToUndefined(accessor.intDataArray());
249311
249516
  const doubleDataArray = nullToUndefined(accessor.doubleDataArray());
249312
249517
  if (intDataArray) {
@@ -249324,13 +249529,13 @@ class BGFBReader {
249324
249529
  return undefined;
249325
249530
  }
249326
249531
  /**
249327
- * Extract a mesh
249328
- * @param variant read position in the flat buffer.
249329
- */
249532
+ * Extract a mesh
249533
+ * @param variant read position in the flat buffer.
249534
+ */
249330
249535
  readPolyfaceFromVariant(variant) {
249331
249536
  const geometryType = variant.geometryType();
249332
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagPolyface) {
249333
- const polyfaceHeader = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.Polyface());
249537
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagPolyface) {
249538
+ const polyfaceHeader = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.Polyface());
249334
249539
  if (polyfaceHeader) {
249335
249540
  const twoSided = polyfaceHeader.twoSided();
249336
249541
  const expectedClosure = polyfaceHeader.expectedClosure();
@@ -249345,59 +249550,35 @@ class BGFBReader {
249345
249550
  const normalIndexI32 = nullToUndefined(polyfaceHeader.normalIndexArray());
249346
249551
  const colorIndexI32 = nullToUndefined(polyfaceHeader.colorIndexArray());
249347
249552
  const taggedNumericDataOffset = polyfaceHeader.taggedNumericData();
249553
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.assert)(meshStyle === 1, "Unrecognized flatbuffer mesh style");
249554
+ // The flatbuffer data is one based.
249555
+ // If numPerFace is less than 2, facets are variable size and zero terminated
249556
+ // If numPerFace is 2 or more, indices are blocked
249348
249557
  if (meshStyle === 1 && pointF64 && pointIndexI32) {
249349
- const polyface = _polyface_Polyface__WEBPACK_IMPORTED_MODULE_23__.IndexedPolyface.create(normalF64 !== undefined, paramF64 !== undefined, intColorU32 !== undefined, twoSided);
249558
+ const polyface = _polyface_Polyface__WEBPACK_IMPORTED_MODULE_24__.IndexedPolyface.create();
249559
+ polyface.twoSided = twoSided;
249350
249560
  polyface.expectedClosure = expectedClosure;
249351
- for (let i = 0; i + 2 < pointF64?.length; i += 3)
249352
- polyface.data.point.pushXYZ(pointF64[i], pointF64[i + 1], pointF64[i + 2]);
249353
- if (paramF64) {
249354
- for (let i = 0; i + 1 < paramF64?.length; i += 2)
249355
- polyface.data.param.pushXY(paramF64[i], paramF64[i + 1]);
249561
+ if (normalF64 && normalIndexI32) {
249562
+ for (let i = 0; i + 2 < normalF64.length; i += 3)
249563
+ polyface.addNormalXYZ(normalF64[i], normalF64[i + 1], normalF64[i + 2]);
249564
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(normalIndexI32, numPerFace, (i) => { polyface.addNormalIndex(i); });
249356
249565
  }
249357
- if (normalF64) {
249358
- for (let i = 0; i + 2 < normalF64?.length; i += 3)
249359
- polyface.data.normal.pushXYZ(normalF64[i], normalF64[i + 1], normalF64[i + 2]);
249566
+ if (paramF64 && paramIndexI32) {
249567
+ for (let i = 0; i + 1 < paramF64.length; i += 2)
249568
+ polyface.addParamUV(paramF64[i], paramF64[i + 1]);
249569
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(paramIndexI32, numPerFace, (i) => { polyface.addParamIndex(i); });
249360
249570
  }
249361
- if (intColorU32) {
249571
+ if (intColorU32 && colorIndexI32) {
249362
249572
  for (const c of intColorU32)
249363
- polyface.data.color.push(c);
249364
- }
249365
- // The flatbuffer data is one based.
249366
- // If numPerFace is less than 2, facets are variable size and zero terminated
249367
- // If numPerFace is 2 or more, indices are blocked
249368
- const numIndex = pointIndexI32.length;
249369
- const addIndicesInBlock = (k0, k1) => {
249370
- for (let k = k0; k < k1; k++) {
249371
- const q = pointIndexI32[k];
249372
- polyface.addPointIndex(Math.abs(q) - 1, q > 0);
249373
- if (normalF64 && normalIndexI32) {
249374
- polyface.addNormalIndex(Math.abs(normalIndexI32[k]) - 1);
249375
- }
249376
- if (paramF64 && paramIndexI32) {
249377
- polyface.addParamIndex(Math.abs(paramIndexI32[k]) - 1);
249378
- }
249379
- if (intColorU32 && colorIndexI32) {
249380
- polyface.addColorIndex(Math.abs(colorIndexI32[k]) - 1);
249381
- }
249382
- }
249383
- };
249384
- if (numPerFace > 1) {
249385
- for (let i0 = 0; i0 + numPerFace <= numIndex; i0 += numPerFace) {
249386
- addIndicesInBlock(i0, i0 + numPerFace);
249387
- polyface.terminateFacet(true);
249388
- }
249573
+ polyface.addColor(c);
249574
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(colorIndexI32, numPerFace, (i) => { polyface.addColorIndex(i); });
249389
249575
  }
249390
- else {
249391
- let i0 = 0;
249392
- for (let i1 = i0; i1 < numIndex; i1++) {
249393
- if (pointIndexI32[i1] === 0) {
249394
- addIndicesInBlock(i0, i1);
249395
- polyface.terminateFacet(true);
249396
- i0 = i1 + 1;
249397
- }
249398
- }
249399
- }
249400
- polyface.data.auxData = this.readPolyfaceAuxData(polyfaceHeader.auxData());
249576
+ for (let i = 0; i + 2 < pointF64.length; i += 3)
249577
+ polyface.addPointXYZ(pointF64[i], pointF64[i + 1], pointF64[i + 2]);
249578
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_3__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(pointIndexI32, numPerFace, (i, v) => { polyface.addPointIndex(i, v); }, () => { polyface.terminateFacet(false); });
249579
+ if (!polyface.validateAllIndices())
249580
+ return undefined;
249581
+ polyface.data.auxData = this.readPolyfaceAuxData(polyfaceHeader, polyfaceHeader.auxData());
249401
249582
  if (taggedNumericDataOffset) {
249402
249583
  const taggedNumericDataAccessor = nullToUndefined(taggedNumericDataOffset);
249403
249584
  if (taggedNumericDataAccessor !== undefined) {
@@ -249437,8 +249618,8 @@ class BGFBReader {
249437
249618
  */
249438
249619
  readCurveCollectionFromVariantGeometry(variant) {
249439
249620
  const geometryType = variant.geometryType();
249440
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagCurveVector) {
249441
- const cvTable = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.CurveVector());
249621
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagCurveVector) {
249622
+ const cvTable = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.CurveVector());
249442
249623
  return this.readCurveCollectionFromCurveVectorTable(cvTable);
249443
249624
  }
249444
249625
  return undefined;
@@ -249449,66 +249630,66 @@ class BGFBReader {
249449
249630
  */
249450
249631
  readSolidPrimitiveFromVariant(variant) {
249451
249632
  const geometryType = variant.geometryType();
249452
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnBox) {
249453
- const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.DgnBox());
249633
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnBox) {
249634
+ const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.DgnBox());
249454
249635
  const detail = header.detail();
249455
- return _solid_Box__WEBPACK_IMPORTED_MODULE_24__.Box.createDgnBox(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create(detail.baseOriginX(), detail.baseOriginY(), detail.baseOriginZ()), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create(detail.vectorXX(), detail.vectorXY(), detail.vectorXZ()), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create(detail.vectorYX(), detail.vectorYY(), detail.vectorYZ()), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create(detail.topOriginX(), detail.topOriginY(), detail.topOriginZ()), detail.baseX(), detail.baseY(), detail.topX(), detail.topY(), detail.capped());
249636
+ return _solid_Box__WEBPACK_IMPORTED_MODULE_25__.Box.createDgnBox(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create(detail.baseOriginX(), detail.baseOriginY(), detail.baseOriginZ()), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.create(detail.vectorXX(), detail.vectorXY(), detail.vectorXZ()), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.create(detail.vectorYX(), detail.vectorYY(), detail.vectorYZ()), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create(detail.topOriginX(), detail.topOriginY(), detail.topOriginZ()), detail.baseX(), detail.baseY(), detail.topX(), detail.topY(), detail.capped());
249456
249637
  }
249457
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnSphere) {
249458
- const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.DgnSphere());
249638
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnSphere) {
249639
+ const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.DgnSphere());
249459
249640
  const detail = header.detail();
249460
249641
  const lToWDetail = detail.localToWorld();
249461
- const localToWorld = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_10__.Transform.createRowValues(lToWDetail.axx(), lToWDetail.axy(), lToWDetail.axz(), lToWDetail.axw(), lToWDetail.ayx(), lToWDetail.ayy(), lToWDetail.ayz(), lToWDetail.ayw(), lToWDetail.azx(), lToWDetail.azy(), lToWDetail.azz(), lToWDetail.azw());
249462
- return _solid_Sphere__WEBPACK_IMPORTED_MODULE_25__.Sphere.createEllipsoid(localToWorld, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_13__.AngleSweep.createStartSweepRadians(detail.startLatitudeRadians(), detail.latitudeSweepRadians()), detail.capped());
249642
+ const localToWorld = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_11__.Transform.createRowValues(lToWDetail.axx(), lToWDetail.axy(), lToWDetail.axz(), lToWDetail.axw(), lToWDetail.ayx(), lToWDetail.ayy(), lToWDetail.ayz(), lToWDetail.ayw(), lToWDetail.azx(), lToWDetail.azy(), lToWDetail.azz(), lToWDetail.azw());
249643
+ return _solid_Sphere__WEBPACK_IMPORTED_MODULE_26__.Sphere.createEllipsoid(localToWorld, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_14__.AngleSweep.createStartSweepRadians(detail.startLatitudeRadians(), detail.latitudeSweepRadians()), detail.capped());
249463
249644
  }
249464
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnCone) {
249465
- const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.DgnCone());
249645
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnCone) {
249646
+ const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.DgnCone());
249466
249647
  const detail = header.detail();
249467
- const centerA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create(detail.centerAX(), detail.centerAY(), detail.centerAZ());
249468
- const centerB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create(detail.centerBX(), detail.centerBY(), detail.centerBZ());
249469
- const vector0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create(detail.vector0X(), detail.vector0Y(), detail.vector0Z());
249470
- const vector90 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create(detail.vector90X(), detail.vector90Y(), detail.vector90Z());
249648
+ const centerA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create(detail.centerAX(), detail.centerAY(), detail.centerAZ());
249649
+ const centerB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create(detail.centerBX(), detail.centerBY(), detail.centerBZ());
249650
+ const vector0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.create(detail.vector0X(), detail.vector0Y(), detail.vector0Z());
249651
+ const vector90 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.create(detail.vector90X(), detail.vector90Y(), detail.vector90Z());
249471
249652
  const radiusA = detail.radiusA();
249472
249653
  const radiusB = detail.radiusB();
249473
- return _solid_Cone__WEBPACK_IMPORTED_MODULE_26__.Cone.createBaseAndTarget(centerA, centerB, vector0, vector90, radiusA, radiusB, detail.capped());
249654
+ return _solid_Cone__WEBPACK_IMPORTED_MODULE_27__.Cone.createBaseAndTarget(centerA, centerB, vector0, vector90, radiusA, radiusB, detail.capped());
249474
249655
  }
249475
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnTorusPipe) {
249476
- const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.DgnTorusPipe());
249656
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnTorusPipe) {
249657
+ const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.DgnTorusPipe());
249477
249658
  const detail = header.detail();
249478
- const center = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create(detail.centerX(), detail.centerY(), detail.centerZ());
249479
- const vectorX = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create(detail.vectorXX(), detail.vectorXY(), detail.vectorXZ());
249480
- const vectorY = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create(detail.vectorYX(), detail.vectorYY(), detail.vectorYZ());
249659
+ const center = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create(detail.centerX(), detail.centerY(), detail.centerZ());
249660
+ const vectorX = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.create(detail.vectorXX(), detail.vectorXY(), detail.vectorXZ());
249661
+ const vectorY = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.create(detail.vectorYX(), detail.vectorYY(), detail.vectorYZ());
249481
249662
  const sweepRadians = detail.sweepRadians();
249482
249663
  const majorRadius = detail.majorRadius();
249483
249664
  const minorRadius = detail.minorRadius();
249484
- return _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_27__.TorusPipe.createDgnTorusPipe(center, vectorX, vectorY, majorRadius, minorRadius, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_16__.Angle.createRadians(sweepRadians), detail.capped());
249665
+ return _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_28__.TorusPipe.createDgnTorusPipe(center, vectorX, vectorY, majorRadius, minorRadius, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_17__.Angle.createRadians(sweepRadians), detail.capped());
249485
249666
  }
249486
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnExtrusion) {
249487
- const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.DgnExtrusion());
249488
- const dVector = new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.DVector3d();
249667
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnExtrusion) {
249668
+ const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.DgnExtrusion());
249669
+ const dVector = new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.DVector3d();
249489
249670
  header.extrusionVector(dVector);
249490
- const extrusionVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Vector3d.create(dVector.x(), dVector.y(), dVector.z());
249671
+ const extrusionVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.create(dVector.x(), dVector.y(), dVector.z());
249491
249672
  const baseCurve = header.baseCurve();
249492
249673
  if (baseCurve !== null) {
249493
249674
  const contour = this.readCurveCollectionFromCurveVectorTable(baseCurve);
249494
- return _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_28__.LinearSweep.create(contour, extrusionVector, header.capped());
249675
+ return _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_29__.LinearSweep.create(contour, extrusionVector, header.capped());
249495
249676
  }
249496
249677
  }
249497
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnRotationalSweep) {
249498
- const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.DgnRotationalSweep());
249499
- const dAxis = new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.DRay3d();
249678
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnRotationalSweep) {
249679
+ const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.DgnRotationalSweep());
249680
+ const dAxis = new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.DRay3d();
249500
249681
  header.axis(dAxis);
249501
- const axis = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_29__.Ray3d.createXYZUVW(dAxis.x(), dAxis.y(), dAxis.z(), dAxis.ux(), dAxis.uy(), dAxis.uz());
249502
- const sweepAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_16__.Angle.createRadians(header.sweepRadians());
249682
+ const axis = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_30__.Ray3d.createXYZUVW(dAxis.x(), dAxis.y(), dAxis.z(), dAxis.ux(), dAxis.uy(), dAxis.uz());
249683
+ const sweepAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_17__.Angle.createRadians(header.sweepRadians());
249503
249684
  // const numVRules = header.numVRules();
249504
249685
  const baseCurve = header.baseCurve();
249505
249686
  if (baseCurve !== null) {
249506
249687
  const contour = this.readCurveCollectionFromCurveVectorTable(baseCurve);
249507
- return _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_30__.RotationalSweep.create(contour, axis, sweepAngle, header.capped());
249688
+ return _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_31__.RotationalSweep.create(contour, axis, sweepAngle, header.capped());
249508
249689
  }
249509
249690
  }
249510
- if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnRuledSweep) {
249511
- const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.DgnRuledSweep());
249691
+ if (geometryType === _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnRuledSweep) {
249692
+ const header = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.DgnRuledSweep());
249512
249693
  const numCurves = header.curvesLength();
249513
249694
  const contours = [];
249514
249695
  for (let i = 0; i < numCurves; i++) {
@@ -249520,7 +249701,7 @@ class BGFBReader {
249520
249701
  }
249521
249702
  }
249522
249703
  if (contours.length > 0) {
249523
- return _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_31__.RuledSweep.create(contours, header.capped());
249704
+ return _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_32__.RuledSweep.create(contours, header.capped());
249524
249705
  }
249525
249706
  }
249526
249707
  return undefined;
@@ -249532,43 +249713,43 @@ class BGFBReader {
249532
249713
  readGeometryQueryFromVariant(variant) {
249533
249714
  const rootType = variant.geometryType();
249534
249715
  switch (rootType) {
249535
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagLineSegment:
249536
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagLineString:
249537
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagEllipticArc:
249538
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagBsplineCurve:
249539
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagTransitionSpiral:
249540
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagInterpolationCurve:
249541
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagAkimaCurve:
249716
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagLineSegment:
249717
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagLineString:
249718
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagEllipticArc:
249719
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagBsplineCurve:
249720
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagTransitionSpiral:
249721
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagInterpolationCurve:
249722
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagAkimaCurve:
249542
249723
  {
249543
249724
  return this.readCurvePrimitiveFromVariant(variant);
249544
249725
  }
249545
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagCurveVector:
249726
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagCurveVector:
249546
249727
  {
249547
249728
  return this.readCurveCollectionFromVariantGeometry(variant);
249548
249729
  }
249549
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagPolyface:
249730
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagPolyface:
249550
249731
  {
249551
249732
  return this.readPolyfaceFromVariant(variant);
249552
249733
  }
249553
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnBox:
249554
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnCone:
249555
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnTorusPipe:
249556
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnSphere:
249557
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnExtrusion:
249558
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnRotationalSweep:
249559
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagDgnRuledSweep:
249734
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnBox:
249735
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnCone:
249736
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnTorusPipe:
249737
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnSphere:
249738
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnExtrusion:
249739
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnRotationalSweep:
249740
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagDgnRuledSweep:
249560
249741
  {
249561
249742
  return this.readSolidPrimitiveFromVariant(variant);
249562
249743
  }
249563
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagVectorOfVariantGeometry:
249744
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagVectorOfVariantGeometry:
249564
249745
  {
249565
249746
  const geometry = [];
249566
- const offsetToVectorOfVariantGeometry = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VectorOfVariantGeometry());
249747
+ const offsetToVectorOfVariantGeometry = variant.geometry(new _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VectorOfVariantGeometry());
249567
249748
  for (let i = 0; i < offsetToVectorOfVariantGeometry.membersLength(); i++) {
249568
249749
  const child = offsetToVectorOfVariantGeometry.members(i);
249569
249750
  if (child !== null) {
249570
249751
  const childGeometry = this.readGeometryQueryFromVariant(child);
249571
- if (childGeometry instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_32__.GeometryQuery) {
249752
+ if (childGeometry instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_33__.GeometryQuery) {
249572
249753
  geometry.push(childGeometry);
249573
249754
  }
249574
249755
  else if (Array.isArray(childGeometry)) {
@@ -249578,10 +249759,10 @@ class BGFBReader {
249578
249759
  }
249579
249760
  return geometry;
249580
249761
  }
249581
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagBsplineSurface: {
249762
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagBsplineSurface: {
249582
249763
  return this.readBSplineSurfaceFromVariant(variant);
249583
249764
  }
249584
- case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometryUnion.tagPointString:
249765
+ case _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometryUnion.tagPointString:
249585
249766
  {
249586
249767
  return this.readPointStringFromVariant(variant);
249587
249768
  }
@@ -249602,7 +249783,7 @@ class BGFBReader {
249602
249783
  return undefined;
249603
249784
  newByteBuffer.setPosition(signature.length);
249604
249785
  }
249605
- const root = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_1__.BGFBAccessors.VariantGeometry.getRootAsVariantGeometry(newByteBuffer);
249786
+ const root = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_2__.BGFBAccessors.VariantGeometry.getRootAsVariantGeometry(newByteBuffer);
249606
249787
  const reader = new BGFBReader();
249607
249788
  return reader.readGeometryQueryFromVariant(root);
249608
249789
  }
@@ -249618,14 +249799,14 @@ function nullToUndefined(data) {
249618
249799
  }
249619
249800
  function createTypedCurveCollection(collectionType) {
249620
249801
  if (collectionType === 1)
249621
- return new _curve_Path__WEBPACK_IMPORTED_MODULE_33__.Path();
249802
+ return new _curve_Path__WEBPACK_IMPORTED_MODULE_34__.Path();
249622
249803
  if (collectionType === 2 || collectionType === 3)
249623
- return new _curve_Loop__WEBPACK_IMPORTED_MODULE_34__.Loop();
249804
+ return new _curve_Loop__WEBPACK_IMPORTED_MODULE_35__.Loop();
249624
249805
  if (collectionType === 4)
249625
- return new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_35__.ParityRegion();
249806
+ return new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_36__.ParityRegion();
249626
249807
  if (collectionType === 5)
249627
- return new _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_36__.UnionRegion();
249628
- return new _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_37__.BagOfCurves();
249808
+ return new _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_37__.UnionRegion();
249809
+ return new _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_38__.BagOfCurves();
249629
249810
  }
249630
249811
  /**
249631
249812
  * mappings between typescript spiral type strings and native integers.
@@ -249643,7 +249824,7 @@ class DgnSpiralTypeQueries {
249643
249824
  /** Convert typescript string to native integer type */
249644
249825
  static stringToTypeCode(s, defaultToClothoid = true) {
249645
249826
  for (const entry of DgnSpiralTypeQueries.spiralTypeCodeMap) {
249646
- if (_Geometry__WEBPACK_IMPORTED_MODULE_38__.Geometry.equalStringNoCase(s, entry[1]))
249827
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_39__.Geometry.equalStringNoCase(s, entry[1]))
249647
249828
  return entry[0];
249648
249829
  }
249649
249830
  return defaultToClothoid ? 10 : undefined;
@@ -250147,14 +250328,15 @@ class BGFBWriter {
250147
250328
  }
250148
250329
  return undefined;
250149
250330
  }
250150
- writePolyfaceAuxDataAsFBVariantGeometry(data) {
250331
+ writePolyfaceAuxDataAsFBVariantGeometry(mesh, data) {
250151
250332
  if (data instanceof _polyface_AuxData__WEBPACK_IMPORTED_MODULE_31__.PolyfaceAuxData) {
250152
250333
  const channelOffsets = [];
250153
- for (const channel of data.channels) {
250334
+ for (const channel of data.channels)
250154
250335
  channelOffsets.push(this.writePolyfaceAuxChannelAsFBVariantGeometry(channel));
250155
- }
250156
250336
  const channelOffsetsOffset = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.PolyfaceAuxChannel.createDataVector(this.builder, channelOffsets);
250157
- const indicesOffset = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.PolyfaceAuxData.createIndicesVector(this.builder, data.indices);
250337
+ const indexArray = [];
250338
+ this.fillOneBasedIndexArray(mesh, data.indices, undefined, 0, indexArray);
250339
+ const indicesOffset = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.PolyfaceAuxData.createIndicesVector(this.builder, indexArray);
250158
250340
  return _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.PolyfaceAuxData.createPolyfaceAuxData(this.builder, indicesOffset, channelOffsetsOffset);
250159
250341
  }
250160
250342
  return undefined;
@@ -250182,8 +250364,8 @@ class BGFBWriter {
250182
250364
  let paramOffset = 0;
250183
250365
  let auxDataOffset = 0;
250184
250366
  let taggedNumericDataOffset = 0;
250185
- const meshStyle = 1; // That is . . . MESH_ELM_STYLE_INDEXED_FACE_LOOPS (and specifically, variable size with with 0 terminators)
250186
- const numPerFace = 0;
250367
+ const meshStyle = 1; // That is . . . MESH_ELM_STYLE_INDEXED_FACE_LOOPS
250368
+ const numPerFace = 0; // specifically, variable size with 0 terminators
250187
250369
  this.fillOneBasedIndexArray(mesh, mesh.data.pointIndex, mesh.data.edgeVisible, 0, indexArray);
250188
250370
  const twoSided = mesh.twoSided;
250189
250371
  const pointIndexOffset = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.Polyface.createPointIndexVector(this.builder, indexArray);
@@ -250202,12 +250384,6 @@ class BGFBWriter {
250202
250384
  if (mesh.data.color !== undefined && mesh.data.color.length > 0) {
250203
250385
  intColorOffset = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.Polyface.createIntColorVector(this.builder, mesh.data.color);
250204
250386
  }
250205
- /*
250206
- if (mesh.data.face !== undefined && mesh.data.face.length > 0) {
250207
- this.writeOneBasedIndexArray(mesh, mesh.data.face, undefined, 0, indexArray);
250208
- BGFBAccessors.Polyface.createFaceDataVector(this.builder, indexArray);
250209
- }
250210
- */
250211
250387
  if (mesh.data.normal) {
250212
250388
  copyToPackedNumberArray(numberArray, mesh.data.normal.float64Data(), mesh.data.normal.float64Length);
250213
250389
  normalOffset = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.Polyface.createNormalVector(this.builder, numberArray);
@@ -250216,12 +250392,12 @@ class BGFBWriter {
250216
250392
  copyToPackedNumberArray(numberArray, mesh.data.param.float64Data(), mesh.data.param.float64Length);
250217
250393
  paramOffset = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.Polyface.createPointVector(this.builder, numberArray);
250218
250394
  }
250219
- if (mesh.data.auxData) {
250220
- auxDataOffset = this.writePolyfaceAuxDataAsFBVariantGeometry(mesh.data.auxData);
250221
- }
250395
+ if (mesh.data.auxData)
250396
+ auxDataOffset = this.writePolyfaceAuxDataAsFBVariantGeometry(mesh, mesh.data.auxData);
250222
250397
  if (mesh.data.taggedNumericData)
250223
250398
  taggedNumericDataOffset = this.writeTaggedNumericDataArray(mesh.data.taggedNumericData);
250224
250399
  const expectedClosure = mesh.expectedClosure;
250400
+ // NOTE: mesh.data.face is not persistent
250225
250401
  const polyfaceOffset = _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.Polyface.createPolyface(this.builder, pointOffset, paramOffset, normalOffset, 0, intColorOffset, pointIndexOffset, paramIndexOffset, normalIndexOffset, colorIndexOffset, 0, 0, 0, meshStyle, twoSided, numPerFace, 0, auxDataOffset, expectedClosure, taggedNumericDataOffset);
250226
250402
  return _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.VariantGeometry.createVariantGeometry(this.builder, _BGFBAccessors__WEBPACK_IMPORTED_MODULE_3__.BGFBAccessors.VariantGeometryUnion.tagPolyface, polyfaceOffset, 0);
250227
250403
  }
@@ -253086,48 +253262,49 @@ __webpack_require__.r(__webpack_exports__);
253086
253262
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
253087
253263
  /* harmony export */ "IModelJson": () => (/* binding */ IModelJson)
253088
253264
  /* harmony export */ });
253089
- /* harmony import */ var _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../bspline/AkimaCurve3d */ "../../core/geometry/lib/esm/bspline/AkimaCurve3d.js");
253090
- /* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
253091
- /* harmony import */ var _bspline_BSplineCurve3dH__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../bspline/BSplineCurve3dH */ "../../core/geometry/lib/esm/bspline/BSplineCurve3dH.js");
253092
- /* harmony import */ var _bspline_BSplineCurveOps__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../bspline/BSplineCurveOps */ "../../core/geometry/lib/esm/bspline/BSplineCurveOps.js");
253093
- /* harmony import */ var _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../bspline/BSplineSurface */ "../../core/geometry/lib/esm/bspline/BSplineSurface.js");
253094
- /* harmony import */ var _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../bspline/InterpolationCurve3d */ "../../core/geometry/lib/esm/bspline/InterpolationCurve3d.js");
253095
- /* harmony import */ var _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../bspline/KnotVector */ "../../core/geometry/lib/esm/bspline/KnotVector.js");
253096
- /* harmony import */ var _curve_Arc3d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../curve/Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
253097
- /* harmony import */ var _curve_CoordinateXYZ__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../curve/CoordinateXYZ */ "../../core/geometry/lib/esm/curve/CoordinateXYZ.js");
253098
- /* harmony import */ var _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../curve/CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
253099
- /* harmony import */ var _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../curve/GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
253100
- /* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
253101
- /* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
253102
- /* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
253103
- /* harmony import */ var _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../curve/ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
253104
- /* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
253105
- /* harmony import */ var _curve_PointString3d__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../curve/PointString3d */ "../../core/geometry/lib/esm/curve/PointString3d.js");
253106
- /* harmony import */ var _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../curve/spiral/DirectSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/DirectSpiral3d.js");
253107
- /* harmony import */ var _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../curve/spiral/IntegratedSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/IntegratedSpiral3d.js");
253108
- /* harmony import */ var _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../curve/UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
253109
- /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
253110
- /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
253111
- /* harmony import */ var _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/AngleSweep */ "../../core/geometry/lib/esm/geometry3d/AngleSweep.js");
253112
- /* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
253113
- /* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
253114
- /* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
253115
- /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
253116
- /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
253117
- /* harmony import */ var _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Segment1d */ "../../core/geometry/lib/esm/geometry3d/Segment1d.js");
253118
- /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
253119
- /* harmony import */ var _geometry3d_YawPitchRollAngles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/YawPitchRollAngles */ "../../core/geometry/lib/esm/geometry3d/YawPitchRollAngles.js");
253120
- /* harmony import */ var _polyface_AuxData__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../polyface/AuxData */ "../../core/geometry/lib/esm/polyface/AuxData.js");
253121
- /* harmony import */ var _polyface_Polyface__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../polyface/Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
253122
- /* harmony import */ var _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../polyface/TaggedNumericData */ "../../core/geometry/lib/esm/polyface/TaggedNumericData.js");
253123
- /* harmony import */ var _solid_Box__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../solid/Box */ "../../core/geometry/lib/esm/solid/Box.js");
253124
- /* harmony import */ var _solid_Cone__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../solid/Cone */ "../../core/geometry/lib/esm/solid/Cone.js");
253125
- /* harmony import */ var _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../solid/LinearSweep */ "../../core/geometry/lib/esm/solid/LinearSweep.js");
253126
- /* harmony import */ var _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../solid/RotationalSweep */ "../../core/geometry/lib/esm/solid/RotationalSweep.js");
253127
- /* harmony import */ var _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../solid/RuledSweep */ "../../core/geometry/lib/esm/solid/RuledSweep.js");
253128
- /* harmony import */ var _solid_Sphere__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../solid/Sphere */ "../../core/geometry/lib/esm/solid/Sphere.js");
253129
- /* harmony import */ var _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../solid/TorusPipe */ "../../core/geometry/lib/esm/solid/TorusPipe.js");
253130
- /* harmony import */ var _SerializationHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SerializationHelpers */ "../../core/geometry/lib/esm/serialization/SerializationHelpers.js");
253265
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
253266
+ /* harmony import */ var _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../bspline/AkimaCurve3d */ "../../core/geometry/lib/esm/bspline/AkimaCurve3d.js");
253267
+ /* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
253268
+ /* harmony import */ var _bspline_BSplineCurve3dH__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../bspline/BSplineCurve3dH */ "../../core/geometry/lib/esm/bspline/BSplineCurve3dH.js");
253269
+ /* harmony import */ var _bspline_BSplineCurveOps__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../bspline/BSplineCurveOps */ "../../core/geometry/lib/esm/bspline/BSplineCurveOps.js");
253270
+ /* harmony import */ var _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../bspline/BSplineSurface */ "../../core/geometry/lib/esm/bspline/BSplineSurface.js");
253271
+ /* harmony import */ var _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../bspline/InterpolationCurve3d */ "../../core/geometry/lib/esm/bspline/InterpolationCurve3d.js");
253272
+ /* harmony import */ var _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../bspline/KnotVector */ "../../core/geometry/lib/esm/bspline/KnotVector.js");
253273
+ /* harmony import */ var _curve_Arc3d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../curve/Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
253274
+ /* harmony import */ var _curve_CoordinateXYZ__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../curve/CoordinateXYZ */ "../../core/geometry/lib/esm/curve/CoordinateXYZ.js");
253275
+ /* harmony import */ var _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
253276
+ /* harmony import */ var _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../curve/GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
253277
+ /* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
253278
+ /* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
253279
+ /* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
253280
+ /* harmony import */ var _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../curve/ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
253281
+ /* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
253282
+ /* harmony import */ var _curve_PointString3d__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../curve/PointString3d */ "../../core/geometry/lib/esm/curve/PointString3d.js");
253283
+ /* harmony import */ var _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../curve/spiral/DirectSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/DirectSpiral3d.js");
253284
+ /* harmony import */ var _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../curve/spiral/IntegratedSpiral3d */ "../../core/geometry/lib/esm/curve/spiral/IntegratedSpiral3d.js");
253285
+ /* harmony import */ var _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../curve/UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
253286
+ /* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
253287
+ /* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
253288
+ /* harmony import */ var _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/AngleSweep */ "../../core/geometry/lib/esm/geometry3d/AngleSweep.js");
253289
+ /* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
253290
+ /* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
253291
+ /* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
253292
+ /* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
253293
+ /* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
253294
+ /* harmony import */ var _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Segment1d */ "../../core/geometry/lib/esm/geometry3d/Segment1d.js");
253295
+ /* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
253296
+ /* harmony import */ var _geometry3d_YawPitchRollAngles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/YawPitchRollAngles */ "../../core/geometry/lib/esm/geometry3d/YawPitchRollAngles.js");
253297
+ /* harmony import */ var _polyface_AuxData__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../polyface/AuxData */ "../../core/geometry/lib/esm/polyface/AuxData.js");
253298
+ /* harmony import */ var _polyface_Polyface__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../polyface/Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
253299
+ /* harmony import */ var _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../polyface/TaggedNumericData */ "../../core/geometry/lib/esm/polyface/TaggedNumericData.js");
253300
+ /* harmony import */ var _solid_Box__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../solid/Box */ "../../core/geometry/lib/esm/solid/Box.js");
253301
+ /* harmony import */ var _solid_Cone__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../solid/Cone */ "../../core/geometry/lib/esm/solid/Cone.js");
253302
+ /* harmony import */ var _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../solid/LinearSweep */ "../../core/geometry/lib/esm/solid/LinearSweep.js");
253303
+ /* harmony import */ var _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../solid/RotationalSweep */ "../../core/geometry/lib/esm/solid/RotationalSweep.js");
253304
+ /* harmony import */ var _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../solid/RuledSweep */ "../../core/geometry/lib/esm/solid/RuledSweep.js");
253305
+ /* harmony import */ var _solid_Sphere__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../solid/Sphere */ "../../core/geometry/lib/esm/solid/Sphere.js");
253306
+ /* harmony import */ var _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../solid/TorusPipe */ "../../core/geometry/lib/esm/solid/TorusPipe.js");
253307
+ /* harmony import */ var _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./SerializationHelpers */ "../../core/geometry/lib/esm/serialization/SerializationHelpers.js");
253131
253308
  /*---------------------------------------------------------------------------------------------
253132
253309
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
253133
253310
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -253175,6 +253352,7 @@ __webpack_require__.r(__webpack_exports__);
253175
253352
 
253176
253353
 
253177
253354
 
253355
+
253178
253356
 
253179
253357
 
253180
253358
  // cspell:word bagof
@@ -253195,32 +253373,32 @@ var IModelJson;
253195
253373
  static parseVector3dProperty(json, propertyName, defaultValue) {
253196
253374
  if (json.hasOwnProperty(propertyName)) {
253197
253375
  const value = json[propertyName];
253198
- if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(value, 3))
253199
- return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(value[0], value[1], value[2]);
253200
- if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(value, 2))
253201
- return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(value[0], value[1]);
253202
- if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.XYZ.isXAndY(value))
253203
- return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.fromJSON(value);
253376
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isNumberArray(value, 3))
253377
+ return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(value[0], value[1], value[2]);
253378
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isNumberArray(value, 2))
253379
+ return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(value[0], value[1]);
253380
+ if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.XYZ.isXAndY(value))
253381
+ return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.fromJSON(value);
253204
253382
  }
253205
253383
  return defaultValue;
253206
253384
  }
253207
253385
  static parsePoint3dProperty(json, propertyName, defaultValue) {
253208
253386
  if (json.hasOwnProperty(propertyName)) {
253209
253387
  const value = json[propertyName];
253210
- if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(value, 3))
253211
- return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(value[0], value[1], value[2]);
253212
- if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(value, 2))
253213
- return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(value[0], value[1]);
253214
- if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.XYZ.isXAndY(value))
253215
- return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(value);
253388
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isNumberArray(value, 3))
253389
+ return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(value[0], value[1], value[2]);
253390
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isNumberArray(value, 2))
253391
+ return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(value[0], value[1]);
253392
+ if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.XYZ.isXAndY(value))
253393
+ return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(value);
253216
253394
  }
253217
253395
  return defaultValue;
253218
253396
  }
253219
253397
  static parseSegment1dProperty(json, propertyName, defaultValue) {
253220
253398
  if (json.hasOwnProperty(propertyName)) {
253221
253399
  const value = json[propertyName];
253222
- if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(value, 2))
253223
- return _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_2__.Segment1d.create(value[0], value[1]);
253400
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isNumberArray(value, 2))
253401
+ return _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_3__.Segment1d.create(value[0], value[1]);
253224
253402
  }
253225
253403
  return defaultValue;
253226
253404
  }
@@ -253239,7 +253417,7 @@ var IModelJson;
253239
253417
  const tagA = this.parseNumberProperty(json, "tagA");
253240
253418
  const tagB = this.parseNumberProperty(json, "tagB", 0);
253241
253419
  if (tagA !== undefined) {
253242
- const result = new _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_3__.TaggedNumericData(tagA, tagB);
253420
+ const result = new _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_4__.TaggedNumericData(tagA, tagB);
253243
253421
  if (json.hasOwnProperty("intData"))
253244
253422
  result.intData = this.parseNumberArrayProperty(json, "intData", 0, undefined);
253245
253423
  if (json.hasOwnProperty("doubleData"))
@@ -253265,7 +253443,7 @@ var IModelJson;
253265
253443
  static parseAngleProperty(json, propertyName, defaultValue) {
253266
253444
  if (json.hasOwnProperty(propertyName)) {
253267
253445
  const value = json[propertyName];
253268
- return _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.fromJSON(value);
253446
+ return _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_5__.Angle.fromJSON(value);
253269
253447
  }
253270
253448
  return defaultValue;
253271
253449
  }
@@ -253275,7 +253453,7 @@ var IModelJson;
253275
253453
  static parseAngleSweepProps(json, propertyName, defaultFunction) {
253276
253454
  if (json.hasOwnProperty(propertyName)) {
253277
253455
  const value = json[propertyName];
253278
- return _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_5__.AngleSweep.fromJSON(value);
253456
+ return _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_6__.AngleSweep.fromJSON(value);
253279
253457
  }
253280
253458
  if (defaultFunction === undefined)
253281
253459
  return undefined;
@@ -253298,7 +253476,7 @@ var IModelJson;
253298
253476
  const result = [];
253299
253477
  for (const contourData of value) {
253300
253478
  const contour = Reader.parse(contourData);
253301
- if (contour instanceof _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_6__.CurveCollection) {
253479
+ if (contour instanceof _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_7__.CurveCollection) {
253302
253480
  result.push(contour);
253303
253481
  }
253304
253482
  }
@@ -253309,7 +253487,7 @@ var IModelJson;
253309
253487
  return undefined;
253310
253488
  }
253311
253489
  static parseYawPitchRollAnglesToMatrix3d(json) {
253312
- const ypr = _geometry3d_YawPitchRollAngles__WEBPACK_IMPORTED_MODULE_7__.YawPitchRollAngles.fromJSON(json);
253490
+ const ypr = _geometry3d_YawPitchRollAngles__WEBPACK_IMPORTED_MODULE_8__.YawPitchRollAngles.fromJSON(json);
253313
253491
  return ypr.toMatrix3d();
253314
253492
  }
253315
253493
  static parseStringProperty(json, propertyName, defaultValue) {
@@ -253322,14 +253500,14 @@ var IModelJson;
253322
253500
  }
253323
253501
  static parseAxesFromVectors(json, axisOrder, createDefaultIdentity) {
253324
253502
  if (Array.isArray(json) && json.length === 2) {
253325
- const xVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.fromJSON(json[0]);
253326
- const yVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.fromJSON(json[1]);
253327
- const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createRigidFromColumns(xVector, yVector, axisOrder);
253503
+ const xVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.fromJSON(json[0]);
253504
+ const yVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.fromJSON(json[1]);
253505
+ const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_9__.Matrix3d.createRigidFromColumns(xVector, yVector, axisOrder);
253328
253506
  if (matrix)
253329
253507
  return matrix;
253330
253508
  }
253331
253509
  if (createDefaultIdentity)
253332
- return _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createIdentity();
253510
+ return _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_9__.Matrix3d.createIdentity();
253333
253511
  return undefined;
253334
253512
  }
253335
253513
  /**
@@ -253346,13 +253524,13 @@ var IModelJson;
253346
253524
  return Reader.parseYawPitchRollAnglesToMatrix3d(json.yawPitchRollAngles);
253347
253525
  }
253348
253526
  else if (json.xyVectors) {
253349
- return Reader.parseAxesFromVectors(json.xyVectors, _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.XYZ, createDefaultIdentity);
253527
+ return Reader.parseAxesFromVectors(json.xyVectors, _Geometry__WEBPACK_IMPORTED_MODULE_1__.AxisOrder.XYZ, createDefaultIdentity);
253350
253528
  }
253351
253529
  else if (json.zxVectors) {
253352
- return Reader.parseAxesFromVectors(json.zxVectors, _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.ZXY, createDefaultIdentity);
253530
+ return Reader.parseAxesFromVectors(json.zxVectors, _Geometry__WEBPACK_IMPORTED_MODULE_1__.AxisOrder.ZXY, createDefaultIdentity);
253353
253531
  }
253354
253532
  if (createDefaultIdentity)
253355
- return _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createIdentity();
253533
+ return _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_9__.Matrix3d.createIdentity();
253356
253534
  return undefined;
253357
253535
  }
253358
253536
  static parseArcByVectorProps(data) {
@@ -253361,17 +253539,17 @@ var IModelJson;
253361
253539
  && data.vectorX !== undefined
253362
253540
  && data.vectorY !== undefined
253363
253541
  && data.sweepStartEnd !== undefined) {
253364
- return _curve_Arc3d__WEBPACK_IMPORTED_MODULE_9__.Arc3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(data.center), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.fromJSON(data.vectorX), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.fromJSON(data.vectorY), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_5__.AngleSweep.fromJSON(data.sweepStartEnd));
253542
+ return _curve_Arc3d__WEBPACK_IMPORTED_MODULE_10__.Arc3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(data.center), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.fromJSON(data.vectorX), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.fromJSON(data.vectorY), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_6__.AngleSweep.fromJSON(data.sweepStartEnd));
253365
253543
  }
253366
253544
  return undefined;
253367
253545
  }
253368
253546
  // remark: Returns LineString3d as last default when give points are colinear.
253369
253547
  static parseArcBy3Points(data) {
253370
253548
  if (Array.isArray(data) && data.length > 2) {
253371
- const pointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(data[0]);
253372
- const pointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(data[1]);
253373
- const pointC = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(data[2]);
253374
- return _curve_Arc3d__WEBPACK_IMPORTED_MODULE_9__.Arc3d.createCircularStartMiddleEnd(pointA, pointB, pointC);
253549
+ const pointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(data[0]);
253550
+ const pointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(data[1]);
253551
+ const pointC = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(data[2]);
253552
+ return _curve_Arc3d__WEBPACK_IMPORTED_MODULE_10__.Arc3d.createCircularStartMiddleEnd(pointA, pointB, pointC);
253375
253553
  }
253376
253554
  return undefined;
253377
253555
  }
@@ -253384,9 +253562,9 @@ var IModelJson;
253384
253562
  }
253385
253563
  /** Parse point content (right side) `[1,2,3]` to a CoordinateXYZ object. */
253386
253564
  static parseCoordinate(data) {
253387
- const point = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(data);
253565
+ const point = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(data);
253388
253566
  if (point)
253389
- return _curve_CoordinateXYZ__WEBPACK_IMPORTED_MODULE_10__.CoordinateXYZ.create(point);
253567
+ return _curve_CoordinateXYZ__WEBPACK_IMPORTED_MODULE_11__.CoordinateXYZ.create(point);
253390
253568
  return undefined;
253391
253569
  }
253392
253570
  /** Parse TransitionSpiral content (right side) to TransitionSpiral3d. */
@@ -253410,10 +253588,10 @@ var IModelJson;
253410
253588
  // REMARK: Our job is to parse and pass data along -- inscrutable validation happens in the implementation classes . . .
253411
253589
  if (origin) {
253412
253590
  let candidate;
253413
- candidate = _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_11__.IntegratedSpiral3d.createFrom4OutOf5(spiralType, startRadius, endRadius, startBearing, endBearing, length, interval, _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_12__.Transform.createOriginAndMatrix(origin, axes));
253591
+ candidate = _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_12__.IntegratedSpiral3d.createFrom4OutOf5(spiralType, startRadius, endRadius, startBearing, endBearing, length, interval, _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_13__.Transform.createOriginAndMatrix(origin, axes));
253414
253592
  if (candidate)
253415
253593
  return candidate;
253416
- candidate = _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_13__.DirectSpiral3d.createFromLengthAndRadius(spiralType, startRadius, endRadius, startBearing, endBearing, length, interval, _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_12__.Transform.createOriginAndMatrix(origin, axes));
253594
+ candidate = _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_14__.DirectSpiral3d.createFromLengthAndRadius(spiralType, startRadius, endRadius, startBearing, endBearing, length, interval, _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_13__.Transform.createOriginAndMatrix(origin, axes));
253417
253595
  if (candidate)
253418
253596
  return candidate;
253419
253597
  }
@@ -253428,14 +253606,14 @@ var IModelJson;
253428
253606
  && data.hasOwnProperty("order") && Number.isFinite(data.order)
253429
253607
  && data.hasOwnProperty("points") && Array.isArray(data.points) && Array.isArray(data.points[0])
253430
253608
  && (dim = data.points[0].length) >= 3 && dim <= 4) {
253431
- const myData = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_14__.SerializationHelpers.createBSplineCurveData(data.points, dim, data.knots, data.points.length, data.order);
253609
+ const myData = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.createBSplineCurveData(data.points, dim, data.knots, data.points.length, data.order);
253432
253610
  if (data.hasOwnProperty("closed") && true === data.closed)
253433
253611
  myData.params.closed = true;
253434
- if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_14__.SerializationHelpers.Import.prepareBSplineCurveData(myData)) {
253612
+ if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.Import.prepareBSplineCurveData(myData)) {
253435
253613
  if (dim === 3)
253436
- newCurve = _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_15__.BSplineCurve3d.create(myData.poles, myData.params.knots, myData.params.order);
253614
+ newCurve = _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_16__.BSplineCurve3d.create(myData.poles, myData.params.knots, myData.params.order);
253437
253615
  else
253438
- newCurve = _bspline_BSplineCurve3dH__WEBPACK_IMPORTED_MODULE_16__.BSplineCurve3dH.create(myData.poles, myData.params.knots, myData.params.order);
253616
+ newCurve = _bspline_BSplineCurve3dH__WEBPACK_IMPORTED_MODULE_17__.BSplineCurve3dH.create(myData.poles, myData.params.knots, myData.params.order);
253439
253617
  if (undefined !== newCurve) {
253440
253618
  if (undefined !== myData.params.wrapMode)
253441
253619
  newCurve.setWrappable(myData.params.wrapMode);
@@ -253448,13 +253626,13 @@ var IModelJson;
253448
253626
  static parseInterpolationCurve(data) {
253449
253627
  if (data === undefined)
253450
253628
  return undefined;
253451
- return _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_17__.InterpolationCurve3d.create(data);
253629
+ return _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_18__.InterpolationCurve3d.create(data);
253452
253630
  }
253453
253631
  /** Parse `bcurve` content to an Akima curve object. */
253454
253632
  static parseAkimaCurve3d(data) {
253455
253633
  if (data === undefined)
253456
253634
  return undefined;
253457
- return _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_18__.AkimaCurve3d.create(data);
253635
+ return _bspline_AkimaCurve3d__WEBPACK_IMPORTED_MODULE_19__.AkimaCurve3d.create(data);
253458
253636
  }
253459
253637
  /** Parse array of json objects to array of instances. */
253460
253638
  static parseArray(data) {
@@ -253470,24 +253648,6 @@ var IModelJson;
253470
253648
  }
253471
253649
  return undefined;
253472
253650
  }
253473
- // For each nonzero index, Announce Math.abs (value) -1
253474
- static addZeroBasedIndicesFromSignedOneBased(data, numPerFace, f) {
253475
- if (data && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(data)) {
253476
- if (numPerFace > 1) {
253477
- // all indices are used ...
253478
- for (const value of data) {
253479
- f(Math.abs(value) - 1);
253480
- }
253481
- }
253482
- else {
253483
- // ignore separator zeros ...
253484
- for (const value of data) {
253485
- if (value !== 0)
253486
- f(Math.abs(value) - 1);
253487
- }
253488
- }
253489
- }
253490
- }
253491
253651
  /** parse polyface aux data content to PolyfaceAuxData instance */
253492
253652
  static parsePolyfaceAuxData(data = undefined, numPerFace = 0) {
253493
253653
  if (!Array.isArray(data.channels) || !Array.isArray(data.indices))
@@ -253498,13 +253658,13 @@ var IModelJson;
253498
253658
  const outChannelData = [];
253499
253659
  for (const inChannelData of inChannel.data) {
253500
253660
  if (inChannelData.hasOwnProperty("input") && Array.isArray(inChannelData.values))
253501
- outChannelData.push(new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_19__.AuxChannelData(inChannelData.input, inChannelData.values));
253661
+ outChannelData.push(new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_20__.AuxChannelData(inChannelData.input, inChannelData.values));
253502
253662
  }
253503
- outChannels.push(new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_19__.AuxChannel(outChannelData, inChannel.dataType, inChannel.name, inChannel.inputName));
253663
+ outChannels.push(new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_20__.AuxChannel(outChannelData, inChannel.dataType, inChannel.name, inChannel.inputName));
253504
253664
  }
253505
253665
  }
253506
- const auxData = new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_19__.PolyfaceAuxData(outChannels, []);
253507
- Reader.addZeroBasedIndicesFromSignedOneBased(data.indices, numPerFace, (x) => { auxData.indices.push(x); });
253666
+ const auxData = new _polyface_AuxData__WEBPACK_IMPORTED_MODULE_20__.PolyfaceAuxData(outChannels, []);
253667
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(data.indices, numPerFace, (x) => { auxData.indices.push(x); });
253508
253668
  return auxData;
253509
253669
  }
253510
253670
  /** parse indexed mesh content to an IndexedPolyface instance */
@@ -253513,75 +253673,50 @@ var IModelJson;
253513
253673
  // CoordIndex[1,2,3,0] -- zero-terminated, one based !!!
253514
253674
  if (data.hasOwnProperty("point") && Array.isArray(data.point)
253515
253675
  && data.hasOwnProperty("pointIndex") && Array.isArray(data.pointIndex)) {
253516
- const polyface = _polyface_Polyface__WEBPACK_IMPORTED_MODULE_20__.IndexedPolyface.create();
253517
- if (data.hasOwnProperty("normal") && Array.isArray(data.normal)) {
253518
- // for normals, addNormal() is overeager to detect the (common) case of duplicate normals in sequence.
253519
- // use addNormalXYZ which always creates a new one.
253520
- // likewise for params
253521
- for (const uvw of data.normal) {
253522
- if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(uvw, 3))
253523
- polyface.addNormalXYZ(uvw[0], uvw[1], uvw[2]);
253524
- }
253525
- }
253676
+ const polyface = _polyface_Polyface__WEBPACK_IMPORTED_MODULE_21__.IndexedPolyface.create();
253677
+ const numPerFace = data.hasOwnProperty("numPerFace") ? data.numPerFace : 0;
253526
253678
  if (data.hasOwnProperty("twoSided")) {
253527
253679
  const q = data.twoSided;
253528
253680
  if (q === true || q === false) {
253529
253681
  polyface.twoSided = q;
253530
253682
  }
253531
253683
  }
253532
- const numPerFace = data.hasOwnProperty("numPerFace") ? data.numPerFace : 0;
253533
253684
  if (data.hasOwnProperty("expectedClosure")) {
253534
253685
  const q = data.expectedClosure;
253535
253686
  if (Number.isFinite(q)) {
253536
253687
  polyface.expectedClosure = q;
253537
253688
  }
253538
253689
  }
253539
- if (data.hasOwnProperty("param") && Array.isArray(data.param)) {
253690
+ if (data.hasOwnProperty("normal") && Array.isArray(data.normal) && data.hasOwnProperty("normalIndex")) {
253691
+ // For normals, addNormal() is overeager to detect the (common) case of duplicate normals in sequence.
253692
+ // Use addNormalXYZ which always creates a new one. Likewise for params.
253693
+ for (const uvw of data.normal) {
253694
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isNumberArray(uvw, 3))
253695
+ polyface.addNormalXYZ(uvw[0], uvw[1], uvw[2]);
253696
+ }
253697
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(data.normalIndex, numPerFace, (x) => { polyface.addNormalIndex(x); });
253698
+ }
253699
+ if (data.hasOwnProperty("param") && Array.isArray(data.param) && data.hasOwnProperty("paramIndex")) {
253540
253700
  for (const uv of data.param) {
253541
- if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(uv, 2))
253701
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isNumberArray(uv, 2))
253542
253702
  polyface.addParamUV(uv[0], uv[1]);
253543
253703
  }
253704
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(data.paramIndex, numPerFace, (x) => { polyface.addParamIndex(x); });
253544
253705
  }
253545
- if (data.hasOwnProperty("color") && Array.isArray(data.color)) {
253546
- for (const c of data.color) {
253706
+ if (data.hasOwnProperty("color") && Array.isArray(data.color) && data.hasOwnProperty("colorIndex")) {
253707
+ for (const c of data.color)
253547
253708
  polyface.addColor(c);
253548
- }
253709
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(data.colorIndex, numPerFace, (x) => { polyface.addColorIndex(x); });
253549
253710
  }
253550
253711
  for (const p of data.point)
253551
253712
  polyface.addPointXYZ(p[0], p[1], p[2]);
253552
- if (numPerFace > 1) {
253553
- for (let i = 0; i < data.pointIndex.length; i++) {
253554
- const p = data.pointIndex[i];
253555
- const p0 = Math.abs(p) - 1;
253556
- polyface.addPointIndex(p0, p > 0);
253557
- if ((i + 1) % numPerFace === 0)
253558
- polyface.terminateFacet(false);
253559
- }
253560
- }
253561
- else {
253562
- for (const p of data.pointIndex) {
253563
- if (p === 0)
253564
- polyface.terminateFacet(false); // we are responsible for index checking !!!
253565
- else {
253566
- const p0 = Math.abs(p) - 1;
253567
- polyface.addPointIndex(p0, p > 0);
253568
- }
253569
- }
253570
- }
253571
- if (data.hasOwnProperty("normalIndex")) {
253572
- Reader.addZeroBasedIndicesFromSignedOneBased(data.normalIndex, numPerFace, (x) => { polyface.addNormalIndex(x); });
253573
- }
253574
- if (data.hasOwnProperty("paramIndex")) {
253575
- Reader.addZeroBasedIndicesFromSignedOneBased(data.paramIndex, numPerFace, (x) => { polyface.addParamIndex(x); });
253576
- }
253577
- if (data.hasOwnProperty("colorIndex")) {
253578
- Reader.addZeroBasedIndicesFromSignedOneBased(data.colorIndex, numPerFace, (x) => { polyface.addColorIndex(x); });
253579
- }
253713
+ _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices(data.pointIndex, numPerFace, (i, v) => { polyface.addPointIndex(i, v); }, () => { polyface.terminateFacet(false); });
253714
+ if (!polyface.validateAllIndices())
253715
+ return undefined;
253580
253716
  if (data.hasOwnProperty("auxData"))
253581
253717
  polyface.data.auxData = Reader.parsePolyfaceAuxData(data.auxData, numPerFace);
253582
- if (data.hasOwnProperty("tags")) {
253718
+ if (data.hasOwnProperty("tags"))
253583
253719
  polyface.data.taggedNumericData = Reader.parseTaggedNumericProps(data.tags);
253584
- }
253585
253720
  return polyface;
253586
253721
  }
253587
253722
  return undefined;
@@ -253591,7 +253726,7 @@ var IModelJson;
253591
253726
  if (data && Array.isArray(data)) {
253592
253727
  for (const c of data) {
253593
253728
  const g = Reader.parse(c);
253594
- if (g instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_21__.GeometryQuery && ("curveCollection" === g.geometryCategory || "curvePrimitive" === g.geometryCategory))
253729
+ if (g instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_22__.GeometryQuery && ("curveCollection" === g.geometryCategory || "curvePrimitive" === g.geometryCategory))
253595
253730
  result.tryAddChild(g);
253596
253731
  }
253597
253732
  return result;
@@ -253609,21 +253744,21 @@ var IModelJson;
253609
253744
  && data.hasOwnProperty("orderV") && Number.isFinite(data.orderV)
253610
253745
  && data.hasOwnProperty("points") && Array.isArray(data.points) && Array.isArray(data.points[0]) && Array.isArray(data.points[0][0])
253611
253746
  && (dim = data.points[0][0].length) >= 3 && dim <= 4) {
253612
- const myData = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_14__.SerializationHelpers.createBSplineSurfaceData(data.points, dim, data.uKnots, data.points[0].length, data.orderU, data.vKnots, data.points.length, data.orderV);
253747
+ const myData = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.createBSplineSurfaceData(data.points, dim, data.uKnots, data.points[0].length, data.orderU, data.vKnots, data.points.length, data.orderV);
253613
253748
  if (data.hasOwnProperty("closedU") && true === data.closedU)
253614
253749
  myData.uParams.closed = true;
253615
253750
  if (data.hasOwnProperty("closedV") && true === data.closedV)
253616
253751
  myData.vParams.closed = true;
253617
- if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_14__.SerializationHelpers.Import.prepareBSplineSurfaceData(myData, { jsonPoles: true })) {
253752
+ if (_SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.Import.prepareBSplineSurfaceData(myData, { jsonPoles: true })) {
253618
253753
  if (dim === 3)
253619
- newSurface = _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.BSplineSurface3d.createGrid(myData.poles, myData.uParams.order, myData.uParams.knots, myData.vParams.order, myData.vParams.knots);
253754
+ newSurface = _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.BSplineSurface3d.createGrid(myData.poles, myData.uParams.order, myData.uParams.knots, myData.vParams.order, myData.vParams.knots);
253620
253755
  else
253621
- newSurface = _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.BSplineSurface3dH.createGrid(myData.poles, _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.WeightStyle.WeightsAlreadyAppliedToCoordinates, myData.uParams.order, myData.uParams.knots, myData.vParams.order, myData.vParams.knots);
253756
+ newSurface = _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.BSplineSurface3dH.createGrid(myData.poles, _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.WeightStyle.WeightsAlreadyAppliedToCoordinates, myData.uParams.order, myData.uParams.knots, myData.vParams.order, myData.vParams.knots);
253622
253757
  if (undefined !== newSurface) {
253623
253758
  if (undefined !== myData.uParams.wrapMode)
253624
- newSurface.setWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.uDirection, myData.uParams.wrapMode);
253759
+ newSurface.setWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.uDirection, myData.uParams.wrapMode);
253625
253760
  if (undefined !== myData.vParams.wrapMode)
253626
- newSurface.setWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.vDirection, myData.vParams.wrapMode);
253761
+ newSurface.setWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.vDirection, myData.vParams.wrapMode);
253627
253762
  }
253628
253763
  }
253629
253764
  }
@@ -253643,14 +253778,14 @@ var IModelJson;
253643
253778
  && startRadius !== undefined
253644
253779
  && endRadius !== undefined) {
253645
253780
  if (axes === undefined) {
253646
- const axisVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createStartEnd(start, end);
253647
- const frame = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createRigidHeadsUp(axisVector, _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.ZXY);
253781
+ const axisVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(start, end);
253782
+ const frame = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_9__.Matrix3d.createRigidHeadsUp(axisVector, _Geometry__WEBPACK_IMPORTED_MODULE_1__.AxisOrder.ZXY);
253648
253783
  const vectorX = frame.columnX();
253649
253784
  const vectorY = frame.columnY();
253650
- return _solid_Cone__WEBPACK_IMPORTED_MODULE_23__.Cone.createBaseAndTarget(start, end, vectorX, vectorY, startRadius, endRadius, capped);
253785
+ return _solid_Cone__WEBPACK_IMPORTED_MODULE_24__.Cone.createBaseAndTarget(start, end, vectorX, vectorY, startRadius, endRadius, capped);
253651
253786
  }
253652
253787
  else {
253653
- return _solid_Cone__WEBPACK_IMPORTED_MODULE_23__.Cone.createBaseAndTarget(start, end, axes.columnX(), axes.columnY(), startRadius, endRadius, capped);
253788
+ return _solid_Cone__WEBPACK_IMPORTED_MODULE_24__.Cone.createBaseAndTarget(start, end, axes.columnX(), axes.columnY(), startRadius, endRadius, capped);
253654
253789
  }
253655
253790
  }
253656
253791
  return undefined;
@@ -253664,14 +253799,14 @@ var IModelJson;
253664
253799
  if (start
253665
253800
  && end
253666
253801
  && radius !== undefined) {
253667
- return _solid_Cone__WEBPACK_IMPORTED_MODULE_23__.Cone.createAxisPoints(start, end, radius, radius, capped);
253802
+ return _solid_Cone__WEBPACK_IMPORTED_MODULE_24__.Cone.createAxisPoints(start, end, radius, radius, capped);
253668
253803
  }
253669
253804
  return undefined;
253670
253805
  }
253671
253806
  /** Parse line segment (array of 2 points) properties to `LineSegment3d` instance */
253672
253807
  static parseLineSegmentProps(value) {
253673
253808
  if (Array.isArray(value) && value.length > 1)
253674
- return _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_24__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(value[0]), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(value[1]));
253809
+ return _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_25__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(value[0]), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(value[1]));
253675
253810
  else
253676
253811
  return undefined;
253677
253812
  }
@@ -253680,11 +253815,11 @@ var IModelJson;
253680
253815
  const contour = Reader.parse(json.contour);
253681
253816
  const capped = Reader.parseBooleanProperty(json, "capped");
253682
253817
  const extrusionVector = Reader.parseVector3dProperty(json, "vector");
253683
- if (contour instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_21__.GeometryQuery
253818
+ if (contour instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_22__.GeometryQuery
253684
253819
  && "curveCollection" === contour.geometryCategory
253685
253820
  && capped !== undefined
253686
253821
  && extrusionVector) {
253687
- return _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_25__.LinearSweep.create(contour, extrusionVector, capped);
253822
+ return _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_26__.LinearSweep.create(contour, extrusionVector, capped);
253688
253823
  }
253689
253824
  return undefined;
253690
253825
  }
@@ -253697,13 +253832,13 @@ var IModelJson;
253697
253832
  const axisVector = Reader.parseVector3dProperty(json, "axis");
253698
253833
  const center = Reader.parsePoint3dProperty(json, "center");
253699
253834
  const sweepDegrees = Reader.parseNumberProperty(json, "sweepAngle");
253700
- if (contour instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_21__.GeometryQuery
253835
+ if (contour instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_22__.GeometryQuery
253701
253836
  && "curveCollection" === contour.geometryCategory
253702
253837
  && sweepDegrees !== undefined
253703
253838
  && capped !== undefined
253704
253839
  && axisVector
253705
253840
  && center) {
253706
- return _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_26__.RotationalSweep.create(contour, _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_27__.Ray3d.createCapture(center, axisVector), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.createDegrees(sweepDegrees), capped);
253841
+ return _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_27__.RotationalSweep.create(contour, _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_28__.Ray3d.createCapture(center, axisVector), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_5__.Angle.createDegrees(sweepDegrees), capped);
253707
253842
  }
253708
253843
  return undefined;
253709
253844
  }
@@ -253721,7 +253856,7 @@ var IModelJson;
253721
253856
  const height = Reader.parseNumberProperty(json, "height", baseX);
253722
253857
  const axes = Reader.parseOrientation(json, true);
253723
253858
  if (origin && !topOrigin && height)
253724
- topOrigin = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.xyzPlusMatrixTimesXYZ(origin, axes, _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(0, 0, height));
253859
+ topOrigin = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_9__.Matrix3d.xyzPlusMatrixTimesXYZ(origin, axes, _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create(0, 0, height));
253725
253860
  if (capped !== undefined
253726
253861
  && baseX !== undefined
253727
253862
  && baseY !== undefined
@@ -253730,7 +253865,7 @@ var IModelJson;
253730
253865
  && axes
253731
253866
  && origin
253732
253867
  && topOrigin) {
253733
- return _solid_Box__WEBPACK_IMPORTED_MODULE_28__.Box.createDgnBoxWithAxes(origin, axes, topOrigin, baseX, baseY, topX, topY, capped);
253868
+ return _solid_Box__WEBPACK_IMPORTED_MODULE_29__.Box.createDgnBoxWithAxes(origin, axes, topOrigin, baseX, baseY, topX, topY, capped);
253734
253869
  }
253735
253870
  return undefined;
253736
253871
  }
@@ -253752,7 +253887,7 @@ var IModelJson;
253752
253887
  && radiusY !== undefined
253753
253888
  && radiusZ !== undefined
253754
253889
  && capped !== undefined) {
253755
- return _solid_Sphere__WEBPACK_IMPORTED_MODULE_29__.Sphere.createFromAxesAndScales(center, axes, radiusX, radiusY, radiusZ, latitudeStartEnd, capped);
253890
+ return _solid_Sphere__WEBPACK_IMPORTED_MODULE_30__.Sphere.createFromAxesAndScales(center, axes, radiusX, radiusY, radiusZ, latitudeStartEnd, capped);
253756
253891
  }
253757
253892
  return undefined;
253758
253893
  }
@@ -253762,7 +253897,7 @@ var IModelJson;
253762
253897
  const contours = this.loadContourArray(json, "contour");
253763
253898
  if (contours !== undefined
253764
253899
  && capped !== undefined) {
253765
- return _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_30__.RuledSweep.create(contours, capped);
253900
+ return _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_31__.RuledSweep.create(contours, capped);
253766
253901
  }
253767
253902
  return undefined;
253768
253903
  }
@@ -253777,7 +253912,7 @@ var IModelJson;
253777
253912
  if (center
253778
253913
  && radiusA !== undefined
253779
253914
  && radiusB !== undefined) {
253780
- return _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_31__.TorusPipe.createDgnTorusPipe(center, axes.columnX(), axes.columnY(), radiusA, radiusB, sweepAngle ? sweepAngle : _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.createDegrees(360), capped);
253915
+ return _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_32__.TorusPipe.createDgnTorusPipe(center, axes.columnX(), axes.columnY(), radiusA, radiusB, sweepAngle ? sweepAngle : _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_5__.Angle.createDegrees(360), capped);
253781
253916
  }
253782
253917
  return undefined;
253783
253918
  }
@@ -253786,11 +253921,11 @@ var IModelJson;
253786
253921
  const points = [];
253787
253922
  if (json && Array.isArray(json)) {
253788
253923
  for (const member of json) {
253789
- if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.XYZ.isXAndY(member)) {
253790
- points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(member));
253924
+ if (_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.XYZ.isXAndY(member)) {
253925
+ points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(member));
253791
253926
  }
253792
- else if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(member, 2)) {
253793
- points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(member));
253927
+ else if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isNumberArray(member, 2)) {
253928
+ points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(member));
253794
253929
  }
253795
253930
  }
253796
253931
  }
@@ -253803,7 +253938,7 @@ var IModelJson;
253803
253938
  return Reader.parseLineSegmentProps(json.lineSegment);
253804
253939
  }
253805
253940
  else if (json.lineString !== undefined) {
253806
- return _curve_LineString3d__WEBPACK_IMPORTED_MODULE_32__.LineString3d.create(Reader.parsePointArray(json.lineString));
253941
+ return _curve_LineString3d__WEBPACK_IMPORTED_MODULE_33__.LineString3d.create(Reader.parsePointArray(json.lineString));
253807
253942
  }
253808
253943
  else if (json.arc !== undefined) {
253809
253944
  return Reader.parseArcObject(json.arc);
@@ -253821,19 +253956,19 @@ var IModelJson;
253821
253956
  return Reader.parseAkimaCurve3d(json.akimaCurve);
253822
253957
  }
253823
253958
  else if (json.hasOwnProperty("path")) {
253824
- return Reader.parseCurveCollectionMembers(new _curve_Path__WEBPACK_IMPORTED_MODULE_33__.Path(), json.path);
253959
+ return Reader.parseCurveCollectionMembers(new _curve_Path__WEBPACK_IMPORTED_MODULE_34__.Path(), json.path);
253825
253960
  }
253826
253961
  else if (json.hasOwnProperty("loop")) {
253827
- return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_34__.Loop(), json.loop);
253962
+ return Reader.parseCurveCollectionMembers(new _curve_Loop__WEBPACK_IMPORTED_MODULE_35__.Loop(), json.loop);
253828
253963
  }
253829
253964
  else if (json.hasOwnProperty("parityRegion")) {
253830
- return Reader.parseCurveCollectionMembers(new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_35__.ParityRegion(), json.parityRegion);
253965
+ return Reader.parseCurveCollectionMembers(new _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_36__.ParityRegion(), json.parityRegion);
253831
253966
  }
253832
253967
  else if (json.hasOwnProperty("unionRegion")) {
253833
- return Reader.parseCurveCollectionMembers(new _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_36__.UnionRegion(), json.unionRegion);
253968
+ return Reader.parseCurveCollectionMembers(new _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_37__.UnionRegion(), json.unionRegion);
253834
253969
  }
253835
253970
  else if (json.hasOwnProperty("bagOfCurves")) {
253836
- return Reader.parseCurveCollectionMembers(new _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_6__.BagOfCurves(), json.bagOfCurves);
253971
+ return Reader.parseCurveCollectionMembers(new _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_7__.BagOfCurves(), json.bagOfCurves);
253837
253972
  }
253838
253973
  else if (json.hasOwnProperty("indexedMesh")) {
253839
253974
  return Reader.parseIndexedMesh(json.indexedMesh);
@@ -253866,7 +254001,7 @@ var IModelJson;
253866
254001
  return Reader.parseTorusPipe(json.torusPipe);
253867
254002
  }
253868
254003
  else if (json.hasOwnProperty("pointString")) {
253869
- return _curve_PointString3d__WEBPACK_IMPORTED_MODULE_37__.PointString3d.create(Reader.parsePointArray(json.pointString));
254004
+ return _curve_PointString3d__WEBPACK_IMPORTED_MODULE_38__.PointString3d.create(Reader.parsePointArray(json.pointString));
253870
254005
  }
253871
254006
  else if (json.hasOwnProperty("transitionSpiral")) {
253872
254007
  return Reader.parseTransitionSpiral(json.transitionSpiral);
@@ -253887,7 +254022,7 @@ var IModelJson;
253887
254022
  * Class to deserialize json objects into GeometryQuery objects
253888
254023
  * @public
253889
254024
  */
253890
- class Writer extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_38__.GeometryHandler {
254025
+ class Writer extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_39__.GeometryHandler {
253891
254026
  handleTaggedNumericData(data) {
253892
254027
  const result = { tagA: data.tagA, tagB: data.tagB };
253893
254028
  if (data.intData !== undefined && data.intData.length > 0)
@@ -253967,7 +254102,7 @@ var IModelJson;
253967
254102
  // TODO: HANDLE NONRIGID TRANSFORM !!
253968
254103
  // the spiral may have indication of how it was defined. If so, use defined/undefined state of the original data
253969
254104
  // as indication of what current data to use. (Current data may have changed due to transforms.)
253970
- if (data instanceof _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_13__.DirectSpiral3d) {
254105
+ if (data instanceof _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_14__.DirectSpiral3d) {
253971
254106
  const value = {
253972
254107
  origin: data.localToWorld.origin.toJSON(),
253973
254108
  type: data.spiralType,
@@ -253981,7 +254116,7 @@ var IModelJson;
253981
254116
  value.length = data.nominalL1;
253982
254117
  return { transitionSpiral: value };
253983
254118
  }
253984
- else if (data instanceof _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_11__.IntegratedSpiral3d) {
254119
+ else if (data instanceof _curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_12__.IntegratedSpiral3d) {
253985
254120
  // TODO: HANDLE NONRIGID TRANSFORM !!
253986
254121
  // the spiral may have indication of how it was defined. If so, use defined/undefined state of the original data
253987
254122
  // as indication of what current data to use. (Current data may have changed due to transforms.)
@@ -254031,12 +254166,12 @@ var IModelJson;
254031
254166
  const centerB = data.getCenterB();
254032
254167
  const vectorX = data.getVectorX();
254033
254168
  const vectorY = data.getVectorY();
254034
- const axisVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createStartEnd(centerA, centerB);
254035
- if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(radiusA, radiusB)
254169
+ const axisVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(centerA, centerB);
254170
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(radiusA, radiusB)
254036
254171
  && vectorX.isPerpendicularTo(axisVector)
254037
254172
  && vectorY.isPerpendicularTo(axisVector)
254038
- && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(vectorX.magnitude(), 1.0)
254039
- && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(vectorY.magnitude(), 1.0)) {
254173
+ && _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(vectorX.magnitude(), 1.0)
254174
+ && _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(vectorY.magnitude(), 1.0)) {
254040
254175
  return {
254041
254176
  cylinder: {
254042
254177
  capped: data.capped,
@@ -254076,7 +254211,7 @@ var IModelJson;
254076
254211
  const fullSweep = latitudeSweep.isFullLatitudeSweep;
254077
254212
  if (data.capped && !fullSweep)
254078
254213
  value.capped = data.capped;
254079
- if (_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(rX, rY) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(rX, rZ))
254214
+ if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(rX, rY) && _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(rX, rZ))
254080
254215
  value.radius = rX;
254081
254216
  else {
254082
254217
  value.radiusX = rX;
@@ -254230,35 +254365,25 @@ var IModelJson;
254230
254365
  };
254231
254366
  const outBox = out.box;
254232
254367
  Writer.insertXYOrientation(outBox, box.getVectorX(), box.getVectorY(), true);
254233
- if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(box.getTopX(), box.getBaseX()))
254368
+ if (!_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(box.getTopX(), box.getBaseX()))
254234
254369
  outBox.topX = box.getTopX();
254235
- if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(box.getTopY(), box.getBaseY()))
254370
+ if (!_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(box.getTopY(), box.getBaseY()))
254236
254371
  outBox.topY = box.getTopY();
254237
254372
  return out;
254238
254373
  }
254239
254374
  handlePolyfaceAuxData(auxData, pf) {
254240
- const contents = {};
254241
- contents.indices = [];
254375
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(auxData === pf.data.auxData);
254376
+ const contents = { indices: [], channels: [] };
254242
254377
  const visitor = pf.createVisitor(0);
254243
- if (!visitor.auxData)
254244
- return;
254245
254378
  while (visitor.moveToNextFacet()) {
254246
- for (let i = 0; i < visitor.indexCount; i++) {
254379
+ for (let i = 0; i < visitor.indexCount; i++)
254247
254380
  contents.indices.push(visitor.auxData.indices[i] + 1);
254248
- }
254249
254381
  contents.indices.push(0); // facet terminator.
254250
254382
  }
254251
- contents.channels = [];
254252
254383
  for (const inChannel of auxData.channels) {
254253
- const outChannel = {};
254254
- outChannel.dataType = inChannel.dataType;
254255
- outChannel.name = inChannel.name;
254256
- outChannel.inputName = inChannel.inputName;
254257
- outChannel.data = [];
254384
+ const outChannel = { data: [], dataType: inChannel.dataType, name: inChannel.name, inputName: inChannel.inputName };
254258
254385
  for (const inData of inChannel.data) {
254259
- const outData = {};
254260
- outData.input = inData.input;
254261
- outData.values = inData.values.slice(0);
254386
+ const outData = { input: inData.input, values: inData.values.slice(0) };
254262
254387
  outChannel.data.push(outData);
254263
254388
  }
254264
254389
  contents.channels.push(outChannel);
@@ -254273,20 +254398,20 @@ var IModelJson;
254273
254398
  const params = [];
254274
254399
  const colors = [];
254275
254400
  {
254276
- const p = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
254401
+ const p = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create();
254277
254402
  for (let i = 0; pf.data.point.getPoint3dAtCheckedPointIndex(i, p); i++)
254278
254403
  points.push(p.toJSON());
254279
254404
  }
254280
254405
  if (pf.data.normal) {
254281
254406
  const numNormal = pf.data.normal.length;
254282
- const normal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
254407
+ const normal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
254283
254408
  for (let i = 0; i < numNormal; i++) {
254284
254409
  pf.data.normal.getVector3dAtCheckedVectorIndex(i, normal);
254285
254410
  normals.push(normal.toJSON());
254286
254411
  }
254287
254412
  }
254288
254413
  if (pf.data.param) {
254289
- const uv = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_39__.Point2d.create();
254414
+ const uv = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_40__.Point2d.create();
254290
254415
  for (let i = 0; pf.data.param.getPoint2dAtCheckedPointIndex(i, uv); i++)
254291
254416
  params.push(uv.toJSON());
254292
254417
  }
@@ -254357,11 +254482,11 @@ var IModelJson;
254357
254482
  return { indexedMesh: contents };
254358
254483
  }
254359
254484
  handleBSplineCurve(curve) {
254360
- const data = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_14__.SerializationHelpers.createBSplineCurveData(curve.polesRef, curve.poleDimension, curve.knotsRef, curve.numPoles, curve.order);
254485
+ const data = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.createBSplineCurveData(curve.polesRef, curve.poleDimension, curve.knotsRef, curve.numPoles, curve.order);
254361
254486
  const wrapMode = curve.getWrappable();
254362
- if (_bspline_KnotVector__WEBPACK_IMPORTED_MODULE_40__.BSplineWrapMode.None !== wrapMode)
254487
+ if (_bspline_KnotVector__WEBPACK_IMPORTED_MODULE_41__.BSplineWrapMode.None !== wrapMode)
254363
254488
  data.params.wrapMode = wrapMode;
254364
- if (!_SerializationHelpers__WEBPACK_IMPORTED_MODULE_14__.SerializationHelpers.Export.prepareBSplineCurveData(data, { jsonPoles: true, jsonKnots: true }))
254489
+ if (!_SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.Export.prepareBSplineCurveData(data, { jsonPoles: true, jsonKnots: true }))
254365
254490
  return undefined;
254366
254491
  return {
254367
254492
  bcurve: {
@@ -254379,7 +254504,7 @@ var IModelJson;
254379
254504
  /** Convert strongly typed instance to tagged json */
254380
254505
  handleInterpolationCurve3d(curve) {
254381
254506
  const props = curve.cloneProps();
254382
- _bspline_BSplineCurveOps__WEBPACK_IMPORTED_MODULE_41__.BSplineCurveOps.C2CubicFit.convertToJsonKnots(props);
254507
+ _bspline_BSplineCurveOps__WEBPACK_IMPORTED_MODULE_42__.BSplineCurveOps.C2CubicFit.convertToJsonKnots(props);
254383
254508
  return { interpolationCurve: props };
254384
254509
  }
254385
254510
  /** Convert strongly typed instance to tagged json */
@@ -254428,14 +254553,14 @@ var IModelJson;
254428
254553
  }
254429
254554
  /** Convert strongly typed instance to tagged json */
254430
254555
  handleBSplineSurface(surface) {
254431
- const data = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_14__.SerializationHelpers.createBSplineSurfaceData(surface.coffs, surface.poleDimension, surface.knots[_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.uDirection].knots, surface.numPolesUV(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.uDirection), surface.orderUV(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.uDirection), surface.knots[_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.vDirection].knots, surface.numPolesUV(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.vDirection), surface.orderUV(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.vDirection));
254432
- const wrapModeU = surface.getWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.uDirection);
254433
- const wrapModeV = surface.getWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_22__.UVSelect.vDirection);
254434
- if (_bspline_KnotVector__WEBPACK_IMPORTED_MODULE_40__.BSplineWrapMode.None !== wrapModeU)
254556
+ const data = _SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.createBSplineSurfaceData(surface.coffs, surface.poleDimension, surface.knots[_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.uDirection].knots, surface.numPolesUV(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.uDirection), surface.orderUV(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.uDirection), surface.knots[_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.vDirection].knots, surface.numPolesUV(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.vDirection), surface.orderUV(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.vDirection));
254557
+ const wrapModeU = surface.getWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.uDirection);
254558
+ const wrapModeV = surface.getWrappable(_bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_23__.UVSelect.vDirection);
254559
+ if (_bspline_KnotVector__WEBPACK_IMPORTED_MODULE_41__.BSplineWrapMode.None !== wrapModeU)
254435
254560
  data.uParams.wrapMode = wrapModeU;
254436
- if (_bspline_KnotVector__WEBPACK_IMPORTED_MODULE_40__.BSplineWrapMode.None !== wrapModeV)
254561
+ if (_bspline_KnotVector__WEBPACK_IMPORTED_MODULE_41__.BSplineWrapMode.None !== wrapModeV)
254437
254562
  data.vParams.wrapMode = wrapModeV;
254438
- if (!_SerializationHelpers__WEBPACK_IMPORTED_MODULE_14__.SerializationHelpers.Export.prepareBSplineSurfaceData(data, { jsonPoles: true, jsonKnots: true }))
254563
+ if (!_SerializationHelpers__WEBPACK_IMPORTED_MODULE_15__.SerializationHelpers.Export.prepareBSplineSurfaceData(data, { jsonPoles: true, jsonKnots: true }))
254439
254564
  return undefined;
254440
254565
  return {
254441
254566
  bsurf: {
@@ -254466,10 +254591,10 @@ var IModelJson;
254466
254591
  emit(data) {
254467
254592
  if (Array.isArray(data))
254468
254593
  return this.emitArray(data);
254469
- if (data instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_21__.GeometryQuery) {
254594
+ if (data instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_22__.GeometryQuery) {
254470
254595
  return data.dispatchToGeometryHandler(this);
254471
254596
  }
254472
- else if (data instanceof _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_3__.TaggedNumericData) {
254597
+ else if (data instanceof _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_4__.TaggedNumericData) {
254473
254598
  return this.handleTaggedNumericData(data);
254474
254599
  }
254475
254600
  return undefined;
@@ -254722,6 +254847,91 @@ var SerializationHelpers;
254722
254847
  data.vParams.knots = _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.pack(data.vParams.knots);
254723
254848
  }
254724
254849
  }
254850
+ /**
254851
+ * Process 1-based blocked indices into 0-based indices.
254852
+ * @param sourceIndices signed, 1-based, 0-terminated/padded source indices, blocking specified by `numPerBlock`
254853
+ * @param numPerBlock index blocking: fixed blocks of size numPerBlock > 1, possibly 0-padded; otherwise, variable-sized blocks terminated by 0
254854
+ * @param announceZeroBasedIndex callback to receive a 0-based index and optional flag indicating whether the sign of the source index is positive
254855
+ * @param terminateBlock optional callback called after each index block has been announced
254856
+ */
254857
+ function announceZeroBasedIndicesFromSignedOneBasedIndices(sourceIndices, numPerBlock, announceZeroBasedIndex, terminateBlock) {
254858
+ let numIndices = sourceIndices.length;
254859
+ if (!numIndices)
254860
+ return;
254861
+ if (numPerBlock > 1) {
254862
+ numIndices -= sourceIndices.length % numPerBlock;
254863
+ for (let i = 0; i < numIndices; i++) {
254864
+ const p = sourceIndices[i];
254865
+ if (p !== 0) // skip padding
254866
+ announceZeroBasedIndex(Math.abs(p) - 1, p > 0);
254867
+ if (terminateBlock && ((i + 1) % numPerBlock) === 0)
254868
+ terminateBlock();
254869
+ }
254870
+ }
254871
+ else {
254872
+ for (let i = 0; i < numIndices; i++) {
254873
+ const p = sourceIndices[i];
254874
+ if (p !== 0) // skip terminator
254875
+ announceZeroBasedIndex(Math.abs(p) - 1, p > 0);
254876
+ if (terminateBlock) {
254877
+ if (p === 0) {
254878
+ if (i + 1 === numIndices || sourceIndices[i + 1] !== 0) // skip extra terminators
254879
+ terminateBlock();
254880
+ }
254881
+ else {
254882
+ if (i + 1 === numIndices) // missing last terminator
254883
+ terminateBlock();
254884
+ }
254885
+ }
254886
+ }
254887
+ }
254888
+ }
254889
+ SerializationHelpers.announceZeroBasedIndicesFromSignedOneBasedIndices = announceZeroBasedIndicesFromSignedOneBasedIndices;
254890
+ /**
254891
+ * Process 0-based indices with blocking specified by another index array.
254892
+ * @param sourceIndices 0-based source indices. This array is compressed (has no blocking).
254893
+ * @param blockingIndices 1-based source indices, blocking specified by `numPerBlock`. Assumed to have length equal to its zero count plus `sourceIndices.length`.
254894
+ * @param numPerBlock index blocking: fixed blocks of size numPerBlock > 1, possibly 0-padded; otherwise, variable-sized blocks terminated by 0
254895
+ * @param announceZeroBasedIndex callback to receive a 0-based index
254896
+ * @param terminateBlock optional callback called after each index block has been announced
254897
+ */
254898
+ function announceZeroBasedIndicesWithExternalBlocking(sourceIndices, blockingIndices, numPerBlock, announceZeroBasedIndex, terminateBlock) {
254899
+ if (!sourceIndices.length || !blockingIndices.length)
254900
+ return;
254901
+ const blockingZeroCount = blockingIndices.filter((i) => i === 0).length;
254902
+ if (sourceIndices.length + blockingZeroCount !== blockingIndices.length)
254903
+ return; // invalid input
254904
+ let iSource = 0;
254905
+ let numBlocking = blockingIndices.length;
254906
+ if (numPerBlock > 1) {
254907
+ numBlocking -= blockingIndices.length % numPerBlock;
254908
+ for (let iBlocking = 0; iBlocking < numBlocking && iSource < sourceIndices.length; iBlocking++) {
254909
+ const p = blockingIndices[iBlocking];
254910
+ if (p !== 0) // skip padding
254911
+ announceZeroBasedIndex(sourceIndices[iSource++]);
254912
+ if (terminateBlock && ((iBlocking + 1) % numPerBlock) === 0)
254913
+ terminateBlock();
254914
+ }
254915
+ }
254916
+ else {
254917
+ for (let iBlocking = 0; iBlocking < numBlocking && iSource < sourceIndices.length; iBlocking++) {
254918
+ const p = blockingIndices[iBlocking];
254919
+ if (p !== 0) // skip terminator
254920
+ announceZeroBasedIndex(sourceIndices[iSource++]);
254921
+ if (terminateBlock) {
254922
+ if (p === 0) {
254923
+ if (iBlocking + 1 === numBlocking || blockingIndices[iBlocking + 1] !== 0) // skip extra terminators
254924
+ terminateBlock();
254925
+ }
254926
+ else {
254927
+ if (iBlocking + 1 === numBlocking) // missing last terminator
254928
+ terminateBlock();
254929
+ }
254930
+ }
254931
+ }
254932
+ }
254933
+ }
254934
+ SerializationHelpers.announceZeroBasedIndicesWithExternalBlocking = announceZeroBasedIndicesWithExternalBlocking;
254725
254935
  /** Helper class for preparing geometry data for import. */
254726
254936
  class Import {
254727
254937
  /** copy knots, with options to control destination type and extraneous knot removal */
@@ -256276,12 +256486,14 @@ class Sphere extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive
256276
256486
  uFractionToRadians(u) {
256277
256487
  return u * Math.PI * 2.0;
256278
256488
  }
256489
+ /** Constructor CAPTURES inputs */
256279
256490
  constructor(localToWorld, latitudeSweep, capped) {
256280
256491
  super(capped);
256281
256492
  /** String name for schema properties */
256282
256493
  this.solidPrimitiveType = "sphere";
256283
256494
  this._localToWorld = localToWorld;
256284
256495
  this._latitudeSweep = latitudeSweep ? latitudeSweep : _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_1__.AngleSweep.createFullLatitude();
256496
+ this._latitudeSweep.capLatitudeInPlace();
256285
256497
  }
256286
256498
  /** return a deep clone */
256287
256499
  clone() {
@@ -256320,11 +256532,11 @@ class Sphere extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive
256320
256532
  /** Create from center and radius, with optional restricted latitudes. */
256321
256533
  static createCenterRadius(center, radius, latitudeSweep) {
256322
256534
  const localToWorld = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createOriginAndMatrix(center, _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createUniformScale(radius));
256323
- return new Sphere(localToWorld, latitudeSweep ? latitudeSweep : _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_1__.AngleSweep.createFullLatitude(), false);
256535
+ return new Sphere(localToWorld, latitudeSweep ? latitudeSweep.clone() : _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_1__.AngleSweep.createFullLatitude(), false);
256324
256536
  }
256325
256537
  /** Create an ellipsoid which is a unit sphere mapped to position by an (arbitrary, possibly skewed and scaled) transform. */
256326
256538
  static createEllipsoid(localToWorld, latitudeSweep, capped) {
256327
- return new Sphere(localToWorld, latitudeSweep, capped);
256539
+ return new Sphere(localToWorld.clone(), latitudeSweep.clone(), capped);
256328
256540
  }
256329
256541
  /** Create a sphere from the typical parameters of the Dgn file */
256330
256542
  static createDgnSphere(center, vectorX, vectorZ, radiusXY, radiusZ, latitudeSweep, capped) {
@@ -297167,7 +297379,7 @@ var loadLanguages = instance.loadLanguages;
297167
297379
  /***/ ((module) => {
297168
297380
 
297169
297381
  "use strict";
297170
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.7.0-dev.0","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.7.0-dev.0","@itwin/core-bentley":"workspace:^4.7.0-dev.0","@itwin/core-common":"workspace:^4.7.0-dev.0","@itwin/core-geometry":"workspace:^4.7.0-dev.0","@itwin/core-orbitgt":"workspace:^4.7.0-dev.0","@itwin/core-quantity":"workspace:^4.7.0-dev.0"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.52","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.3.3","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
297382
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.7.0-dev.11","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.7.0-dev.11","@itwin/core-bentley":"workspace:^4.7.0-dev.11","@itwin/core-common":"workspace:^4.7.0-dev.11","@itwin/core-geometry":"workspace:^4.7.0-dev.11","@itwin/core-orbitgt":"workspace:^4.7.0-dev.11","@itwin/core-quantity":"workspace:^4.7.0-dev.11"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.2","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.3.3","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
297171
297383
 
297172
297384
  /***/ })
297173
297385