@itwin/ecschema-rpcinterface-tests 5.1.0-dev.55 → 5.1.0-dev.56

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.
@@ -38437,6 +38437,10 @@ var RenderSchedule;
38437
38437
  cuttingPlane;
38438
38438
  /** The total time period represented by this timeline. */
38439
38439
  duration;
38440
+ /** Indicates whether the schedule editing session has been finalized and is no longer active.
38441
+ * @internal
38442
+ */
38443
+ isEditingCommitted = false;
38440
38444
  constructor(props) {
38441
38445
  this.duration = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createNull();
38442
38446
  if (props.visibilityTimeline) {
@@ -70043,6 +70047,20 @@ class SchemaFormatsProvider {
70043
70047
  this._formatsRetrieved.clear();
70044
70048
  this.onFormatsChanged.raiseEvent({ formatsChanged });
70045
70049
  }
70050
+ /** When using a presentation unit from a KindOfQuantity, the label and description should come from the KindOfQuantity */
70051
+ convertToFormatDefinition(format, kindOfQuantity) {
70052
+ // Destructure all properties except 'rest'
70053
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
70054
+ const { name, label, description, $schema, schema, schemaVersion, schemaItemType,
70055
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
70056
+ customAttributes, originalECSpecMajorVersion, originalECSpecMinorVersion, ...rest } = format;
70057
+ return {
70058
+ ...rest,
70059
+ name: kindOfQuantity.fullName,
70060
+ label: kindOfQuantity.label ?? format.label,
70061
+ description: kindOfQuantity.description ?? format.description,
70062
+ };
70063
+ }
70046
70064
  async getKindOfQuantityFormatFromSchema(itemKey) {
70047
70065
  let kindOfQuantity;
70048
70066
  try {
@@ -70068,7 +70086,8 @@ class SchemaFormatsProvider {
70068
70086
  const currentUnitSystem = await unit.unitSystem;
70069
70087
  if (currentUnitSystem && matcher(currentUnitSystem)) {
70070
70088
  this._formatsRetrieved.add(itemKey.fullName);
70071
- return (0,_Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_6__.getFormatProps)(format);
70089
+ const props = (0,_Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_6__.getFormatProps)(format);
70090
+ return this.convertToFormatDefinition(props, kindOfQuantity);
70072
70091
  }
70073
70092
  }
70074
70093
  }
@@ -70077,14 +70096,16 @@ class SchemaFormatsProvider {
70077
70096
  const persistenceUnitSystem = await persistenceUnit?.unitSystem;
70078
70097
  if (persistenceUnitSystem && unitSystemMatchers.some((matcher) => matcher(persistenceUnitSystem))) {
70079
70098
  this._formatsRetrieved.add(itemKey.fullName);
70080
- return getPersistenceUnitFormatProps(persistenceUnit);
70099
+ const props = getPersistenceUnitFormatProps(persistenceUnit);
70100
+ return this.convertToFormatDefinition(props, kindOfQuantity);
70081
70101
  }
70082
70102
  const defaultFormat = kindOfQuantity.defaultPresentationFormat;
70083
70103
  if (!defaultFormat) {
70084
70104
  return undefined;
70085
70105
  }
70086
70106
  this._formatsRetrieved.add(itemKey.fullName);
70087
- return (0,_Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_6__.getFormatProps)(await defaultFormat);
70107
+ const defaultProps = (0,_Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_6__.getFormatProps)(await defaultFormat);
70108
+ return this.convertToFormatDefinition(defaultProps, kindOfQuantity);
70088
70109
  }
70089
70110
  /**
70090
70111
  * Retrieves a Format from a SchemaContext. If the format is part of a KindOfQuantity, the first presentation format in the KindOfQuantity that matches the current unit system will be retrieved.
@@ -79193,6 +79214,7 @@ __webpack_require__.r(__webpack_exports__);
79193
79214
  /* harmony import */ var _PlanarClipMaskState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PlanarClipMaskState */ "../../core/frontend/lib/esm/PlanarClipMaskState.js");
79194
79215
  /* harmony import */ var _tile_internal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./tile/internal */ "../../core/frontend/lib/esm/tile/internal.js");
79195
79216
  /* harmony import */ var _common_internal_Symbols__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./common/internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
79217
+ /* harmony import */ var _internal_ScriptUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internal/ScriptUtils */ "../../core/frontend/lib/esm/internal/ScriptUtils.js");
79196
79218
  /*---------------------------------------------------------------------------------------------
79197
79219
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
79198
79220
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -79211,6 +79233,7 @@ __webpack_require__.r(__webpack_exports__);
79211
79233
 
79212
79234
 
79213
79235
 
79236
+
79214
79237
  /** @internal */
79215
79238
  class TerrainDisplayOverrides {
79216
79239
  wantSkirts;
@@ -79233,6 +79256,14 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
79233
79256
  */
79234
79257
  [_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_10__._onScheduleScriptReferenceChanged] = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
79235
79258
  _scriptReference;
79259
+ /** Event raised when schedule script edits are made, providing changed element IDs and the editing scope.
79260
+ * @beta
79261
+ */
79262
+ onScheduleEditingChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
79263
+ /** Event raised when schedule script edits are committed (finalized).
79264
+ * @beta
79265
+ */
79266
+ onScheduleEditingCommitted = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
79236
79267
  /** Event raised just before the [[scheduleScript]] property is changed. */
79237
79268
  onScheduleScriptChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
79238
79269
  /** Event raised just after [[setOSMBuildingDisplay]] changes the enabled state of the OSM buildings. */
@@ -79435,6 +79466,62 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
79435
79466
  if (this._queryRenderTimelinePropsPromise)
79436
79467
  await this._queryRenderTimelinePropsPromise;
79437
79468
  }
79469
+ /**
79470
+ * Begins or updates a schedule script editing session for the current display style.
79471
+ * During an editing session, changes to the schedule script are applied incrementally
79472
+ * using temporary dynamic tiles, allowing for interactive preview of visual changes like color,
79473
+ * transforms, visibility, and cutting planes — without requiring a full tile tree reload.
79474
+ *
79475
+ * Calling this method multiple times will update the current editing session with new script changes.
79476
+ * When all edits are complete, you must invoke [[commitScheduleEditing]] to finalize the session and
79477
+ * trigger a full tile tree refresh with the committed script.
79478
+ *
79479
+ * @note You cannot use schedule script editing while a @see [[GraphicalEditingScope]] is active.
79480
+ *
79481
+ * Example:
79482
+ * ```ts
79483
+ * [[include:ScheduleScript_editingMode]]
79484
+ * ```
79485
+ *
79486
+ * @beta
79487
+ */
79488
+ setScheduleEditing(newScript) {
79489
+ const prevScript = this.scheduleScript;
79490
+ const changes = [];
79491
+ const globalDelta = (0,_internal_ScriptUtils__WEBPACK_IMPORTED_MODULE_11__.getScriptDelta)(prevScript, newScript);
79492
+ for (const timeline of newScript.modelTimelines) {
79493
+ const ids = new Set();
79494
+ for (const et of timeline.elementTimelines) {
79495
+ for (const id of et.elementIds) {
79496
+ if (globalDelta.has(id))
79497
+ ids.add(id);
79498
+ }
79499
+ }
79500
+ if (ids.size > 0)
79501
+ changes.push({ timeline, elements: ids });
79502
+ }
79503
+ this.scheduleScript = newScript;
79504
+ this.onScheduleEditingChanged.raiseEvent(changes);
79505
+ for (const modelTimeline of this.scheduleScript.modelTimelines) {
79506
+ modelTimeline.isEditingCommitted = false;
79507
+ }
79508
+ }
79509
+ /**
79510
+ * Finalizes a script editing session previously started with [[setScheduleEditing]].
79511
+ * This applies all pending script changes and triggers a full tile tree reload to reflect them in the viewport.
79512
+ * After this call, the schedule script is considered committed and editing mode ends.
79513
+ *
79514
+ * @see [[setScheduleEditing]] to begin a schedule script editing session.
79515
+ * @beta
79516
+ */
79517
+ commitScheduleEditing() {
79518
+ this.onScheduleEditingCommitted.raiseEvent();
79519
+ if (!this.scheduleScript)
79520
+ return;
79521
+ for (const modelTimeline of this.scheduleScript.modelTimelines) {
79522
+ modelTimeline.isEditingCommitted = true;
79523
+ }
79524
+ }
79438
79525
  /** The [RenderSchedule.Script]($common) that animates the contents of the view, if any.
79439
79526
  * @see [[changeRenderTimeline]] to change the script.
79440
79527
  */
@@ -97007,6 +97094,22 @@ class Viewport {
97007
97094
  };
97008
97095
  removals.push(settings.onTimePointChanged.addListener(scheduleChanged));
97009
97096
  removals.push(style.onScheduleScriptChanged.addListener(scriptChanged));
97097
+ const scheduleEditingChanged = async (changes) => {
97098
+ for (const ref of this.getTileTreeRefs()) {
97099
+ const tree = ref.treeOwner.tileTree;
97100
+ await tree?.onScheduleEditingChanged(changes);
97101
+ }
97102
+ };
97103
+ const scheduleEditingCommitted = () => {
97104
+ for (const ref of this.getTileTreeRefs()) {
97105
+ const tree = ref.treeOwner.tileTree;
97106
+ tree?.onScheduleEditingCommitted();
97107
+ }
97108
+ };
97109
+ removals.push(style.onScheduleEditingChanged.addListener((changes) => {
97110
+ void scheduleEditingChanged(changes);
97111
+ }));
97112
+ removals.push(style.onScheduleEditingCommitted.addListener(scheduleEditingCommitted));
97010
97113
  removals.push(settings.onViewFlagsChanged.addListener((vf) => {
97011
97114
  if (vf.backgroundMap !== this.viewFlags.backgroundMap)
97012
97115
  this.invalidateController();
@@ -107978,7 +108081,7 @@ __webpack_require__.r(__webpack_exports__);
107978
108081
  /**
107979
108082
  * @docs-group-description TileStorage
107980
108083
  * Class for working with cloud storage using iTwin/object-storage cloud providers
107981
- */
108084
+ */
107982
108085
 
107983
108086
 
107984
108087
  /***/ }),
@@ -108965,6 +109068,137 @@ class RealityDataSourceGoogle3dTilesImpl {
108965
109068
  }
108966
109069
 
108967
109070
 
109071
+ /***/ }),
109072
+
109073
+ /***/ "../../core/frontend/lib/esm/internal/ScriptUtils.js":
109074
+ /*!***********************************************************!*\
109075
+ !*** ../../core/frontend/lib/esm/internal/ScriptUtils.js ***!
109076
+ \***********************************************************/
109077
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
109078
+
109079
+ "use strict";
109080
+ __webpack_require__.r(__webpack_exports__);
109081
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
109082
+ /* harmony export */ getScriptDelta: () => (/* binding */ getScriptDelta)
109083
+ /* harmony export */ });
109084
+ /** @internal */
109085
+ function getScriptDelta(prev, next) {
109086
+ if (!prev || !prev.modelTimelines || prev.modelTimelines.length === 0) {
109087
+ return getAllElementIdsFromScript(next);
109088
+ }
109089
+ const changed = new Set();
109090
+ const prevModels = new Map(prev.modelTimelines.map(m => [m.modelId, m]));
109091
+ const nextModels = new Map(next.modelTimelines.map(m => [m.modelId, m]));
109092
+ for (const modelId of new Set([...prevModels.keys(), ...nextModels.keys()])) {
109093
+ const prevModel = prevModels.get(modelId);
109094
+ const nextModel = nextModels.get(modelId);
109095
+ if (!prevModel || !nextModel) {
109096
+ const timelines = (prevModel ?? nextModel)?.elementTimelines ?? [];
109097
+ for (const timeline of timelines)
109098
+ for (const id of timeline.elementIds)
109099
+ changed.add(id);
109100
+ continue;
109101
+ }
109102
+ const prevTimelineMap = new Map(prevModel.elementTimelines.map(et => [et.batchId, et]));
109103
+ const nextTimelineMap = new Map(nextModel.elementTimelines.map(et => [et.batchId, et]));
109104
+ const allBatchIds = new Set([...prevTimelineMap.keys(), ...nextTimelineMap.keys()]);
109105
+ for (const batchId of allBatchIds) {
109106
+ const prevTimeline = prevTimelineMap.get(batchId);
109107
+ const nextTimeline = nextTimelineMap.get(batchId);
109108
+ if (!prevTimeline || !nextTimeline) {
109109
+ const ids = (prevTimeline ?? nextTimeline)?.elementIds ?? [];
109110
+ for (const id of ids)
109111
+ changed.add(id);
109112
+ continue;
109113
+ }
109114
+ if (!isTimelineEntryEqual(prevTimeline, nextTimeline)) {
109115
+ for (const id of nextTimeline.elementIds)
109116
+ changed.add(id);
109117
+ }
109118
+ }
109119
+ }
109120
+ return changed;
109121
+ }
109122
+ function collectTimelineEntryTimes(timeline) {
109123
+ const result = new Set();
109124
+ if (timeline.cuttingPlane) {
109125
+ for (const entry of timeline.cuttingPlane) {
109126
+ result.add(entry.time);
109127
+ }
109128
+ }
109129
+ if (timeline.visibility) {
109130
+ for (const entry of timeline.visibility) {
109131
+ result.add(entry.time);
109132
+ }
109133
+ }
109134
+ if (timeline.transform) {
109135
+ for (const entry of timeline.transform) {
109136
+ result.add(entry.time);
109137
+ }
109138
+ }
109139
+ if (timeline.color) {
109140
+ for (const entry of timeline.color) {
109141
+ result.add(entry.time);
109142
+ }
109143
+ }
109144
+ return Array.from(result);
109145
+ }
109146
+ function isTimelineEntryEqual(a, b) {
109147
+ const timesSet = new Set([
109148
+ ...collectTimelineEntryTimes(a),
109149
+ ...collectTimelineEntryTimes(b),
109150
+ ]);
109151
+ let times = Array.from(timesSet).sort((x, y) => x - y);
109152
+ if (times.length === 0) {
109153
+ times = [0, 0.25, 0.5, 0.75, 1];
109154
+ }
109155
+ for (const [] of a.elementIds) {
109156
+ for (const t of times) {
109157
+ // Check visibility
109158
+ const v1 = a.getVisibility(t);
109159
+ const v2 = b.getVisibility(t);
109160
+ if (Math.abs(v1 - v2) > 0.01)
109161
+ return false;
109162
+ // Check Transform
109163
+ const tf1 = a.getAnimationTransform(t);
109164
+ const tf2 = b.getAnimationTransform(t);
109165
+ if (!tf1.isAlmostEqual(tf2))
109166
+ return false;
109167
+ // Check Color
109168
+ const c1 = a.getColor(t);
109169
+ const c2 = b.getColor(t);
109170
+ if ((c1 === undefined) !== (c2 === undefined))
109171
+ return false;
109172
+ if (c1 !== undefined && !c1.equals(c2))
109173
+ return false;
109174
+ // Cutting Plane (CLIPPING)
109175
+ const clip1 = a.getCuttingPlane?.(t);
109176
+ const clip2 = b.getCuttingPlane?.(t);
109177
+ const oneUndefined = (clip1 === undefined) !== (clip2 === undefined);
109178
+ if (oneUndefined)
109179
+ return false;
109180
+ if (clip1 && clip2) {
109181
+ if (!clip1.getOriginRef().isAlmostEqual(clip2.getOriginRef(), 1e-6) ||
109182
+ !clip1.getNormalRef().isAlmostEqual(clip2.getNormalRef(), 1e-6)) {
109183
+ return false;
109184
+ }
109185
+ }
109186
+ }
109187
+ }
109188
+ return true;
109189
+ }
109190
+ function getAllElementIdsFromScript(script) {
109191
+ const ids = new Set();
109192
+ for (const modelTimeline of script.modelTimelines) {
109193
+ for (const elementTimeline of modelTimeline.elementTimelines) {
109194
+ for (const id of elementTimeline.elementIds)
109195
+ ids.add(id);
109196
+ }
109197
+ }
109198
+ return ids;
109199
+ }
109200
+
109201
+
108968
109202
  /***/ }),
108969
109203
 
108970
109204
  /***/ "../../core/frontend/lib/esm/internal/cross-package.js":
@@ -142588,6 +142822,19 @@ class DynamicState {
142588
142822
  };
142589
142823
  }
142590
142824
  }
142825
+ class ScheduleScriptDynamicState {
142826
+ type = "dynamic";
142827
+ rootTile;
142828
+ _dispose;
142829
+ [Symbol.dispose]() {
142830
+ this._dispose();
142831
+ this.rootTile[Symbol.dispose]();
142832
+ }
142833
+ constructor(root, elemChanges) {
142834
+ this.rootTile = _tile_internal__WEBPACK_IMPORTED_MODULE_6__.DynamicIModelTile.create(root, elemChanges);
142835
+ this._dispose = () => { };
142836
+ }
142837
+ }
142591
142838
  /** The tile tree has been disposed. */
142592
142839
  class DisposedState {
142593
142840
  type = "disposed";
@@ -142826,6 +143073,51 @@ class IModelTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_6__.TileTre
142826
143073
  get containsTransformNodes() {
142827
143074
  return undefined !== this._transformNodeRanges;
142828
143075
  }
143076
+ async onScheduleEditingChanged(changes) {
143077
+ const displayStyle = _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.viewManager.selectedView?.displayStyle;
143078
+ const newScript = displayStyle?.scheduleScript;
143079
+ const scriptRef = newScript ? new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderSchedule.ScriptReference(displayStyle.id, newScript) : undefined;
143080
+ const scriptInfo = _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.tileAdmin.getScriptInfoForTreeId(this.modelId, scriptRef);
143081
+ if (scriptInfo?.timeline && this.timeline !== scriptInfo.timeline) {
143082
+ this.decoder = (0,_tile_internal__WEBPACK_IMPORTED_MODULE_6__.acquireImdlDecoder)({
143083
+ type: this.batchType,
143084
+ omitEdges: this.edgeOptions === false,
143085
+ timeline: scriptInfo.timeline,
143086
+ iModel: this.iModel,
143087
+ batchModelId: this.modelId,
143088
+ is3d: this.is3d,
143089
+ containsTransformNodes: this.containsTransformNodes,
143090
+ noWorker: !_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.tileAdmin.decodeImdlInWorker,
143091
+ });
143092
+ this._options.timeline = scriptInfo.timeline;
143093
+ }
143094
+ const relevantChange = changes.find((c) => c.timeline.modelId === this.modelId);
143095
+ if (!relevantChange || relevantChange.elements.size === 0)
143096
+ return;
143097
+ const elementIds = Array.from(relevantChange.elements);
143098
+ const placements = await this.iModel.elements.getPlacements(elementIds, {
143099
+ type: this.is3d ? "3d" : "2d",
143100
+ });
143101
+ if (placements.length === 0)
143102
+ return;
143103
+ const changedElements = placements.map((x) => {
143104
+ return {
143105
+ id: x.elementId,
143106
+ type: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.DbOpcode.Update,
143107
+ range: x.calculateRange(),
143108
+ };
143109
+ });
143110
+ if (changedElements.length === 0)
143111
+ return;
143112
+ if (this._rootTile.tileState.type === "dynamic") {
143113
+ this._rootTile.transition(new StaticState(this._rootTile));
143114
+ }
143115
+ this._rootTile.transition(new ScheduleScriptDynamicState(this._rootTile, changedElements));
143116
+ }
143117
+ onScheduleEditingCommitted() {
143118
+ if (this._rootTile.tileState.type !== "static")
143119
+ this._rootTile.transition(new StaticState(this._rootTile));
143120
+ }
142829
143121
  }
142830
143122
 
142831
143123
 
@@ -145205,7 +145497,7 @@ class PrimaryTreeReference extends _tile_internal__WEBPACK_IMPORTED_MODULE_6__.T
145205
145497
  get treeOwner() {
145206
145498
  const newId = this.createTreeId(this.view, this._id.modelId);
145207
145499
  const timeline = _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.tileAdmin.getScriptInfoForTreeId(this._id.modelId, this.view.displayStyle[_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_7__._scheduleScriptReference])?.timeline;
145208
- if (0 !== (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.compareIModelTileTreeIds)(newId, this._id.treeId) || timeline !== this._id.timeline) {
145500
+ if (0 !== (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.compareIModelTileTreeIds)(newId, this._id.treeId) || timeline?.isEditingCommitted) {
145209
145501
  this._id = {
145210
145502
  modelId: this._id.modelId,
145211
145503
  is3d: this._id.is3d,
@@ -161525,6 +161817,19 @@ class TileTree {
161525
161817
  */
161526
161818
  collectTileGeometry(_collector) {
161527
161819
  }
161820
+ /**
161821
+ * Invoked when a schedule script is edited.
161822
+ * Override to handle updates for affected elements or timelines.
161823
+ *
161824
+ * @internal
161825
+ */
161826
+ async onScheduleEditingChanged(_changes) { }
161827
+ /**
161828
+ * Invoked when a schedule script is committed during editing.
161829
+ * Override in specific tile tree types to handle the change.
161830
+ * @internal
161831
+ */
161832
+ onScheduleEditingCommitted() { }
161528
161833
  }
161529
161834
 
161530
161835
 
@@ -271467,6 +271772,13 @@ class Box extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive {
271467
271772
  if (transform.matrix.isSingular())
271468
271773
  return false;
271469
271774
  transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);
271775
+ if (transform.matrix.determinant() < 0.0) {
271776
+ // if mirror, reverse z-axis (origin and direction) to preserve outward normals
271777
+ this._localToWorld.origin.addInPlace(this._localToWorld.matrix.columnZ());
271778
+ this._localToWorld.matrix.scaleColumnsInPlace(1, 1, -1);
271779
+ [this._baseX, this._topX] = [this._topX, this._baseX];
271780
+ [this._baseY, this._topY] = [this._topY, this._baseY];
271781
+ }
271470
271782
  return true;
271471
271783
  }
271472
271784
  /**
@@ -271742,6 +272054,12 @@ class Cone extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive {
271742
272054
  if (transform.matrix.isSingular())
271743
272055
  return false;
271744
272056
  transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);
272057
+ if (transform.matrix.determinant() < 0.0) {
272058
+ // if mirror, reverse z-axis (origin and direction) to preserve outward normals
272059
+ this._localToWorld.origin.addInPlace(this._localToWorld.matrix.columnZ());
272060
+ this._localToWorld.matrix.scaleColumnsInPlace(1, 1, -1);
272061
+ [this._radiusA, this._radiusB] = [this._radiusB, this._radiusA];
272062
+ }
271745
272063
  return true;
271746
272064
  }
271747
272065
  /**
@@ -272078,11 +272396,16 @@ class LinearSweep extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrim
272078
272396
  tryTransformInPlace(transform) {
272079
272397
  if (transform.matrix.isSingular())
272080
272398
  return false;
272081
- if (this._contour.tryTransformInPlace(transform)) {
272082
- transform.multiplyVector(this._direction, this._direction);
272083
- return true;
272399
+ if (!this._contour.tryTransformInPlace(transform))
272400
+ return false;
272401
+ transform.multiplyVector(this._direction, this._direction);
272402
+ if (transform.matrix.determinant() < 0.0) {
272403
+ // if mirror, reverse the sweep (origin and direction) to preserve outward normals
272404
+ if (!this._contour.tryTransformInPlace(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_7__.Transform.createTranslation(this._direction)))
272405
+ return false;
272406
+ this._direction.scaleInPlace(-1.0);
272084
272407
  }
272085
- return false;
272408
+ return true;
272086
272409
  }
272087
272410
  /** Return a coordinate frame (right handed unit vectors)
272088
272411
  * * origin on base contour
@@ -272367,7 +272690,7 @@ __webpack_require__.r(__webpack_exports__);
272367
272690
 
272368
272691
  /**
272369
272692
  * A ruled sweep (surface) is a collection of 2 or more contours.
272370
- * * All contours must have identical number and type of geometry. (paths, loops, parity regions, lines, arcs, other curves).
272693
+ * * All contours must have identical number and type of geometry: (paths, loops, parity regions, lines, arcs, other curves).
272371
272694
  * @public
272372
272695
  */
272373
272696
  class RuledSweep extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive {
@@ -272433,6 +272756,10 @@ class RuledSweep extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimi
272433
272756
  if (!contour.tryTransformInPlace(transform))
272434
272757
  return false;
272435
272758
  }
272759
+ if (transform.matrix.determinant() < 0.0) {
272760
+ // if mirror, reverse the sweep order to preserve outward normals
272761
+ this._contours.reverse();
272762
+ }
272436
272763
  return true;
272437
272764
  }
272438
272765
  /**
@@ -272700,8 +273027,11 @@ class Sphere extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive
272700
273027
  if (transform.matrix.isSingular())
272701
273028
  return false;
272702
273029
  transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);
272703
- if (transform.matrix.determinant() < 0.0)
272704
- this._latitudeSweep.reverseInPlace();
273030
+ if (transform.matrix.determinant() < 0.0) {
273031
+ // if mirror, reverse z-axis to preserve outward normals
273032
+ this._localToWorld.matrix.scaleColumnsInPlace(1, 1, -1);
273033
+ this._latitudeSweep.setStartEndRadians(-this._latitudeSweep.endRadians, -this._latitudeSweep.startRadians);
273034
+ }
272705
273035
  return true;
272706
273036
  }
272707
273037
  /**
@@ -273357,6 +273687,10 @@ class TorusPipe extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimit
273357
273687
  if (transform.matrix.isSingular())
273358
273688
  return false;
273359
273689
  transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);
273690
+ if (transform.matrix.determinant() < 0.0) {
273691
+ // if mirror, reverse z-axis to preserve outward normals
273692
+ this._localToWorld.matrix.scaleColumnsInPlace(1, 1, -1);
273693
+ }
273360
273694
  return true;
273361
273695
  }
273362
273696
  /**
@@ -299437,7 +299771,7 @@ class Formatter {
299437
299771
  let unitValue = 0.0;
299438
299772
  if (spec.format.type === _FormatEnums__WEBPACK_IMPORTED_MODULE_2__.FormatType.Ratio) {
299439
299773
  if (1 !== spec.format.units.length)
299440
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name} has an invalid unit specification, we require single presentation unit when using format type 'ratio'`);
299774
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format '${spec.format.name}' with type 'ratio' must have exactly one unit.`);
299441
299775
  try {
299442
299776
  unitValue = (0,_Quantity__WEBPACK_IMPORTED_MODULE_3__.applyConversion)(posMagnitude, unitConversion) + this.FPV_MINTHRESHOLD;
299443
299777
  }
@@ -314707,7 +315041,7 @@ var loadLanguages = instance.loadLanguages;
314707
315041
  /***/ ((module) => {
314708
315042
 
314709
315043
  "use strict";
314710
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.55","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 ES2022 --outDir lib/esm","clean":"rimraf -g 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 --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 \\"./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 webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","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:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//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/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//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.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
315044
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.56","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 ES2022 --outDir lib/esm","clean":"rimraf -g 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 --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 \\"./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 webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","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:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//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/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//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.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
314711
315045
 
314712
315046
  /***/ })
314713
315047