@itwin/rpcinterface-full-stack-tests 5.10.0-dev.6 → 5.10.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/bundled-tests.js +239 -189
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -195303,12 +195303,12 @@ class QuantityFormatter {
|
|
|
195303
195303
|
const effectiveSystem = args.system ?? this._activeUnitSystem;
|
|
195304
195304
|
return this._formatSpecsRegistry.get(args.name)?.get(args.persistenceUnitName)?.get(effectiveSystem);
|
|
195305
195305
|
}
|
|
195306
|
-
/** Create a
|
|
195307
|
-
* The handle
|
|
195306
|
+
/** Create a handle to formatting specs for a specific KoQ and persistence unit.
|
|
195307
|
+
* The handle reads the current specs from the formatter on access. Call `dispose()` when done.
|
|
195308
195308
|
*
|
|
195309
195309
|
* @param koqName - The KindOfQuantity name (e.g., "DefaultToolsUnits.LENGTH")
|
|
195310
195310
|
* @param persistenceUnit - The persistence unit name (e.g., "Units.M")
|
|
195311
|
-
* @returns A FormatSpecHandle that
|
|
195311
|
+
* @returns A FormatSpecHandle that reflects current formatter state
|
|
195312
195312
|
* @beta
|
|
195313
195313
|
*/
|
|
195314
195314
|
getFormatSpecHandle(koqName, persistenceUnit, system) {
|
|
@@ -195336,12 +195336,17 @@ class QuantityFormatter {
|
|
|
195336
195336
|
formatProps,
|
|
195337
195337
|
formatName: name,
|
|
195338
195338
|
});
|
|
195339
|
-
|
|
195340
|
-
|
|
195341
|
-
|
|
195342
|
-
|
|
195343
|
-
|
|
195344
|
-
unitMap.get(persistenceUnitName)
|
|
195339
|
+
let unitMap = this._formatSpecsRegistry.get(name);
|
|
195340
|
+
if (!unitMap) {
|
|
195341
|
+
unitMap = new Map();
|
|
195342
|
+
this._formatSpecsRegistry.set(name, unitMap);
|
|
195343
|
+
}
|
|
195344
|
+
let systemMap = unitMap.get(persistenceUnitName);
|
|
195345
|
+
if (!systemMap) {
|
|
195346
|
+
systemMap = new Map();
|
|
195347
|
+
unitMap.set(persistenceUnitName, systemMap);
|
|
195348
|
+
}
|
|
195349
|
+
systemMap.set(effectiveSystem, { formatterSpec, parserSpec });
|
|
195345
195350
|
}
|
|
195346
195351
|
else {
|
|
195347
195352
|
throw new Error(`Unable to find format properties for ${name} with persistence unit ${persistenceUnitName}`);
|
|
@@ -234056,30 +234061,36 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
234056
234061
|
/* harmony export */ BooleanClipNodeParity: () => (/* binding */ BooleanClipNodeParity),
|
|
234057
234062
|
/* harmony export */ BooleanClipNodeUnion: () => (/* binding */ BooleanClipNodeUnion)
|
|
234058
234063
|
/* harmony export */ });
|
|
234059
|
-
/* harmony import */ var
|
|
234060
|
-
/* harmony import */ var
|
|
234061
|
-
/* harmony import */ var
|
|
234064
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
234065
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
234066
|
+
/* harmony import */ var _numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../numerics/Range1dArray */ "../../core/geometry/lib/esm/numerics/Range1dArray.js");
|
|
234067
|
+
/* harmony import */ var _ClipUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ClipUtils */ "../../core/geometry/lib/esm/clipping/ClipUtils.js");
|
|
234062
234068
|
/*---------------------------------------------------------------------------------------------
|
|
234063
234069
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
234064
234070
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
234065
234071
|
*--------------------------------------------------------------------------------------------*/
|
|
234072
|
+
/** @packageDocumentation
|
|
234073
|
+
* @module CartesianGeometry
|
|
234074
|
+
*/
|
|
234066
234075
|
|
|
234067
234076
|
|
|
234068
234077
|
|
|
234069
|
-
|
|
234070
|
-
|
|
234078
|
+
|
|
234079
|
+
/**
|
|
234080
|
+
* BooleanClipNode is an abstract base class for boolean actions by an array of clippers.
|
|
234081
|
+
* * Derived class must implement:
|
|
234071
234082
|
* * The single point test `isPointOnOrInsideChildren`
|
|
234072
234083
|
* * Boolean operation on 1d intervals `combineIntervals`
|
|
234073
|
-
* * The `keepInside` flag controls an additional optional flip of the boolean result
|
|
234074
|
-
* * if `keepInside === true`, accept the "inside" of the
|
|
234084
|
+
* * The `keepInside` flag controls an additional optional flip of the boolean result:
|
|
234085
|
+
* * if `keepInside === true`, accept the "inside" of the child clippers.
|
|
234075
234086
|
* * if `keepInside === false`, accept the "outside" of the child clippers.
|
|
234076
|
-
* * Hence the combinations of derived classes for (OR, AND, XOR) and keepInside are
|
|
234077
|
-
* * (OR, true) = simple union (OR), i.e
|
|
234078
|
-
* * (OR, false) = complement of union (NOR), i.e
|
|
234079
|
-
* * (AND, true) = simple intersection (AND), i.e
|
|
234080
|
-
* * (AND, false) = complement of intersection (NAND), i.e
|
|
234081
|
-
* * (XOR,true) = simple parity, i.e
|
|
234082
|
-
* * (XOR,false) = complement of parity
|
|
234087
|
+
* * Hence the combinations of derived classes for (OR, AND, XOR) and keepInside are:
|
|
234088
|
+
* * (OR, true) = simple union (OR), i.e., "in" one or more clips.
|
|
234089
|
+
* * (OR, false) = complement of union (NOR), i.e., "outside" all clips.
|
|
234090
|
+
* * (AND, true) = simple intersection (AND), i.e., "in" all clips.
|
|
234091
|
+
* * (AND, false) = complement of intersection (NAND), i.e., "outside" one or more clips.
|
|
234092
|
+
* * (XOR, true) = simple parity, i.e., "in" an odd number of clips.
|
|
234093
|
+
* * (XOR, false) = complement of parity, i.e., "in" an even number of clips.
|
|
234083
234094
|
* @internal
|
|
234084
234095
|
*/
|
|
234085
234096
|
class BooleanClipNode {
|
|
@@ -234116,18 +234127,18 @@ class BooleanClipNode {
|
|
|
234116
234127
|
this._clippers.push(child);
|
|
234117
234128
|
}
|
|
234118
234129
|
}
|
|
234119
|
-
/** Toggle the "keepInside" behavior. Return the prior value.
|
|
234130
|
+
/** Toggle the "keepInside" behavior. Return the prior value. */
|
|
234120
234131
|
toggleResult() {
|
|
234121
234132
|
return this.selectResult(!this._keepInside);
|
|
234122
234133
|
}
|
|
234123
|
-
/** Set the "keepInside" behavior
|
|
234134
|
+
/** Set the "keepInside" behavior. */
|
|
234124
234135
|
selectResult(keepInside) {
|
|
234125
234136
|
const s = this._keepInside;
|
|
234126
234137
|
this._keepInside = keepInside;
|
|
234127
234138
|
return s;
|
|
234128
234139
|
}
|
|
234129
234140
|
/**
|
|
234130
|
-
* Conditionally (if a1 > a0 strictly) call announce
|
|
234141
|
+
* Conditionally (if a1 > a0 strictly) call `announce(a0, a1)`.
|
|
234131
234142
|
* * Return 0 if not called, 1 if called.
|
|
234132
234143
|
*/
|
|
234133
234144
|
testedAnnounceNN(a0, a1, announce) {
|
|
@@ -234139,7 +234150,7 @@ class BooleanClipNode {
|
|
|
234139
234150
|
return 0;
|
|
234140
234151
|
}
|
|
234141
234152
|
/**
|
|
234142
|
-
* Conditionally (if a1 > a0 strictly) call announce
|
|
234153
|
+
* Conditionally (if a1 > a0 strictly) call `announce(a0, a1, cp)`.
|
|
234143
234154
|
* * Return 0 if not called, 1 if called.
|
|
234144
234155
|
*/
|
|
234145
234156
|
testedAnnounceNNC(a0, a1, cp, announce) {
|
|
@@ -234150,14 +234161,14 @@ class BooleanClipNode {
|
|
|
234150
234161
|
}
|
|
234151
234162
|
return 0;
|
|
234152
234163
|
}
|
|
234153
|
-
/** Swap the _intervalsA and _intervalsB */
|
|
234164
|
+
/** Swap the `_intervalsA` and `_intervalsB`. */
|
|
234154
234165
|
swapAB() {
|
|
234155
234166
|
const q = this._intervalsA;
|
|
234156
234167
|
this._intervalsA = this._intervalsB;
|
|
234157
234168
|
this._intervalsB = q;
|
|
234158
234169
|
}
|
|
234159
234170
|
/**
|
|
234160
|
-
* Announce all "outside intervals" --not masked by intervals
|
|
234171
|
+
* Announce all "outside intervals" -- not masked by intervals.
|
|
234161
234172
|
* * Return true if any intervals announced.
|
|
234162
234173
|
*/
|
|
234163
234174
|
announcePartsNN(keepInside, intervals, f0, f1, announce) {
|
|
@@ -234179,7 +234190,7 @@ class BooleanClipNode {
|
|
|
234179
234190
|
return numAnnounce > 0;
|
|
234180
234191
|
}
|
|
234181
234192
|
/**
|
|
234182
|
-
* Announce all "outside intervals" --not masked by intervals
|
|
234193
|
+
* Announce all "outside intervals" -- not masked by intervals.
|
|
234183
234194
|
* * Return true if any intervals announced.
|
|
234184
234195
|
*/
|
|
234185
234196
|
announcePartsNNC(keepInside, intervals, f0, f1, cp, announce) {
|
|
@@ -234200,16 +234211,16 @@ class BooleanClipNode {
|
|
|
234200
234211
|
}
|
|
234201
234212
|
return numAnnounce > 0;
|
|
234202
234213
|
}
|
|
234203
|
-
/** Invoke callback to test if a point is "in" this clipper */
|
|
234214
|
+
/** Invoke callback to test if a point is "in" this clipper. */
|
|
234204
234215
|
isPointOnOrInside(point) {
|
|
234205
234216
|
const q = this.isPointOnOrInsideChildren(point);
|
|
234206
234217
|
return this._keepInside ? q : !q;
|
|
234207
234218
|
}
|
|
234208
|
-
/**
|
|
234219
|
+
/** Method from [[Clipper]] interface. */
|
|
234209
234220
|
announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
|
|
234210
234221
|
this._intervalsA.length = 0;
|
|
234211
234222
|
const announceIntervalB = (a0, a1) => {
|
|
234212
|
-
this._intervalsB.push(
|
|
234223
|
+
this._intervalsB.push(_geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range1d.createXX(a0, a1));
|
|
234213
234224
|
};
|
|
234214
234225
|
// Strategy:
|
|
234215
234226
|
// _intervalsA is the accumulated UNION of from clippers
|
|
@@ -234221,7 +234232,7 @@ class BooleanClipNode {
|
|
|
234221
234232
|
for (const c of this._clippers) {
|
|
234222
234233
|
this._intervalsB.length = 0;
|
|
234223
234234
|
c.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announceIntervalB);
|
|
234224
|
-
|
|
234235
|
+
_numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_2__.Range1dArray.simplifySortUnion(this._intervalsB);
|
|
234225
234236
|
if (i === 0) {
|
|
234226
234237
|
this.swapAB();
|
|
234227
234238
|
}
|
|
@@ -234232,17 +234243,17 @@ class BooleanClipNode {
|
|
|
234232
234243
|
}
|
|
234233
234244
|
return this.announcePartsNN(this._keepInside, this._intervalsA, f0, f1, announce);
|
|
234234
234245
|
}
|
|
234235
|
-
/**
|
|
234246
|
+
/** Method from [[Clipper]] interface. */
|
|
234236
234247
|
announceClippedArcIntervals(arc, announce) {
|
|
234237
234248
|
this._intervalsA.length = 0;
|
|
234238
234249
|
const announceIntervalB = (a0, a1) => {
|
|
234239
|
-
this._intervalsB.push(
|
|
234250
|
+
this._intervalsB.push(_geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range1d.createXX(a0, a1));
|
|
234240
234251
|
};
|
|
234241
234252
|
let i = 0;
|
|
234242
234253
|
for (const c of this._clippers) {
|
|
234243
234254
|
this._intervalsB.length = 0;
|
|
234244
234255
|
c.announceClippedArcIntervals(arc, announceIntervalB);
|
|
234245
|
-
|
|
234256
|
+
_numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_2__.Range1dArray.simplifySortUnion(this._intervalsB);
|
|
234246
234257
|
if (i === 0) {
|
|
234247
234258
|
this.swapAB();
|
|
234248
234259
|
}
|
|
@@ -234253,17 +234264,40 @@ class BooleanClipNode {
|
|
|
234253
234264
|
}
|
|
234254
234265
|
return this.announcePartsNNC(this._keepInside, this._intervalsA, 0, 1, arc, announce);
|
|
234255
234266
|
}
|
|
234267
|
+
/* Method from [[Clipper]] interface. */
|
|
234268
|
+
announceClippedCurveIntervals(curve, announce) {
|
|
234269
|
+
this._intervalsA.length = 0;
|
|
234270
|
+
const announceIntervalB = (a0, a1, _cp) => {
|
|
234271
|
+
this._intervalsB.push(_geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range1d.createXX(a0, a1));
|
|
234272
|
+
};
|
|
234273
|
+
let i = 0;
|
|
234274
|
+
for (const c of this._clippers) {
|
|
234275
|
+
this._intervalsB.length = 0;
|
|
234276
|
+
c.announceClippedCurveIntervals?.(curve, announceIntervalB) ?? (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, () => `Expect ${c.constructor.name} to implement announceClippedCurveIntervals`);
|
|
234277
|
+
_numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_2__.Range1dArray.simplifySortUnion(this._intervalsB);
|
|
234278
|
+
if (i === 0) {
|
|
234279
|
+
this.swapAB();
|
|
234280
|
+
}
|
|
234281
|
+
else {
|
|
234282
|
+
this._intervalsA = this.combineIntervals(this._intervalsA, this._intervalsB);
|
|
234283
|
+
}
|
|
234284
|
+
i++;
|
|
234285
|
+
}
|
|
234286
|
+
return this.announcePartsNNC(this._keepInside, this._intervalsA, 0, 1, curve, announce);
|
|
234287
|
+
}
|
|
234256
234288
|
}
|
|
234257
234289
|
/**
|
|
234258
|
-
* Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children
|
|
234290
|
+
* Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children.
|
|
234259
234291
|
* @internal
|
|
234260
234292
|
*/
|
|
234261
234293
|
class BooleanClipNodeUnion extends BooleanClipNode {
|
|
234262
|
-
get operationName() {
|
|
234294
|
+
get operationName() {
|
|
234295
|
+
return this._keepInside ? "OR" : "NOR";
|
|
234296
|
+
}
|
|
234263
234297
|
constructor(keepInside) {
|
|
234264
234298
|
super(keepInside);
|
|
234265
234299
|
}
|
|
234266
|
-
/** Return true if inside any child clipper */
|
|
234300
|
+
/** Return true if inside any child clipper. */
|
|
234267
234301
|
isPointOnOrInsideChildren(point) {
|
|
234268
234302
|
for (const clipper of this._clippers) {
|
|
234269
234303
|
if (clipper.isPointOnOrInside(point))
|
|
@@ -234272,22 +234306,24 @@ class BooleanClipNodeUnion extends BooleanClipNode {
|
|
|
234272
234306
|
return false;
|
|
234273
234307
|
}
|
|
234274
234308
|
combineIntervals(operandA, operandB) {
|
|
234275
|
-
return
|
|
234309
|
+
return _numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_2__.Range1dArray.unionSorted(operandA, operandB);
|
|
234276
234310
|
}
|
|
234277
234311
|
appendPolygonClip(xyz, insideFragments, outsideFragments, arrayCache) {
|
|
234278
|
-
|
|
234312
|
+
_ClipUtils__WEBPACK_IMPORTED_MODULE_3__.ClipUtilities.doPolygonClipSequence(xyz, this._clippers, this._keepInside ? insideFragments : outsideFragments, this._keepInside ? outsideFragments : insideFragments, undefined, _ClipUtils__WEBPACK_IMPORTED_MODULE_3__.ClipStepAction.acceptIn, _ClipUtils__WEBPACK_IMPORTED_MODULE_3__.ClipStepAction.passToNextStep, _ClipUtils__WEBPACK_IMPORTED_MODULE_3__.ClipStepAction.acceptOut, arrayCache);
|
|
234279
234313
|
}
|
|
234280
234314
|
}
|
|
234281
234315
|
/**
|
|
234282
|
-
* Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children
|
|
234316
|
+
* Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children.
|
|
234283
234317
|
* @internal
|
|
234284
234318
|
*/
|
|
234285
234319
|
class BooleanClipNodeParity extends BooleanClipNode {
|
|
234286
|
-
get operationName() {
|
|
234320
|
+
get operationName() {
|
|
234321
|
+
return this._keepInside ? "XOR" : "NXOR";
|
|
234322
|
+
}
|
|
234287
234323
|
constructor(keepInside) {
|
|
234288
234324
|
super(keepInside);
|
|
234289
234325
|
}
|
|
234290
|
-
/** Return true if inside an odd number of clippers child clipper */
|
|
234326
|
+
/** Return true if inside an odd number of clippers child clipper. */
|
|
234291
234327
|
isPointOnOrInsideChildren(point) {
|
|
234292
234328
|
let q = false;
|
|
234293
234329
|
for (const clipper of this._clippers) {
|
|
@@ -234297,18 +234333,20 @@ class BooleanClipNodeParity extends BooleanClipNode {
|
|
|
234297
234333
|
return q;
|
|
234298
234334
|
}
|
|
234299
234335
|
combineIntervals(operandA, operandB) {
|
|
234300
|
-
return
|
|
234336
|
+
return _numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_2__.Range1dArray.paritySorted(operandA, operandB);
|
|
234301
234337
|
}
|
|
234302
234338
|
appendPolygonClip(xyz, insideFragments, outsideFragments, arrayCache) {
|
|
234303
|
-
|
|
234339
|
+
_ClipUtils__WEBPACK_IMPORTED_MODULE_3__.ClipUtilities.doPolygonClipParitySequence(xyz, this._clippers, this._keepInside ? insideFragments : outsideFragments, this._keepInside ? outsideFragments : insideFragments, arrayCache);
|
|
234304
234340
|
}
|
|
234305
234341
|
}
|
|
234306
234342
|
/**
|
|
234307
|
-
* Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children
|
|
234343
|
+
* Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children.
|
|
234308
234344
|
* @internal
|
|
234309
234345
|
*/
|
|
234310
234346
|
class BooleanClipNodeIntersection extends BooleanClipNode {
|
|
234311
|
-
get operationName() {
|
|
234347
|
+
get operationName() {
|
|
234348
|
+
return this._keepInside ? "AND" : "NAND";
|
|
234349
|
+
}
|
|
234312
234350
|
constructor(keepInside) {
|
|
234313
234351
|
super(keepInside);
|
|
234314
234352
|
}
|
|
@@ -234321,10 +234359,10 @@ class BooleanClipNodeIntersection extends BooleanClipNode {
|
|
|
234321
234359
|
return true;
|
|
234322
234360
|
}
|
|
234323
234361
|
combineIntervals(operandA, operandB) {
|
|
234324
|
-
return
|
|
234362
|
+
return _numerics_Range1dArray__WEBPACK_IMPORTED_MODULE_2__.Range1dArray.intersectSorted(operandA, operandB);
|
|
234325
234363
|
}
|
|
234326
234364
|
appendPolygonClip(xyz, insideFragments, outsideFragments, arrayCache) {
|
|
234327
|
-
|
|
234365
|
+
_ClipUtils__WEBPACK_IMPORTED_MODULE_3__.ClipUtilities.doPolygonClipSequence(xyz, this._clippers, this._keepInside ? insideFragments : outsideFragments, this._keepInside ? outsideFragments : insideFragments, undefined, _ClipUtils__WEBPACK_IMPORTED_MODULE_3__.ClipStepAction.passToNextStep, _ClipUtils__WEBPACK_IMPORTED_MODULE_3__.ClipStepAction.acceptOut, _ClipUtils__WEBPACK_IMPORTED_MODULE_3__.ClipStepAction.acceptIn, arrayCache);
|
|
234328
234366
|
}
|
|
234329
234367
|
}
|
|
234330
234368
|
|
|
@@ -234384,7 +234422,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
234384
234422
|
* More details can be found at docs/learning/geometry/Clipping.md
|
|
234385
234423
|
*
|
|
234386
234424
|
* Hence
|
|
234387
|
-
* * The halfspace function evaluation for
|
|
234425
|
+
* * The halfspace function evaluation for point (x,y,z) is `(x,y,z) DOT (u,v,w) - signedDistance`.
|
|
234388
234426
|
* * POSITIVE values of the halfspace function are "inside".
|
|
234389
234427
|
* * ZERO value of the halfspace function is "on".
|
|
234390
234428
|
* * NEGATIVE value of the halfspace function is "outside".
|
|
@@ -234397,7 +234435,7 @@ class ClipPlane extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_1__.Plane3d
|
|
|
234397
234435
|
/**
|
|
234398
234436
|
* Construct a parallel plane through the origin.
|
|
234399
234437
|
* * Move it to the actual position.
|
|
234400
|
-
* * _distanceFromOrigin is the distance it moved, with the (inward) normal direction as positive
|
|
234438
|
+
* * _distanceFromOrigin is the distance it moved, with the (inward) normal direction as positive.
|
|
234401
234439
|
*/
|
|
234402
234440
|
_distanceFromOrigin;
|
|
234403
234441
|
_invisible;
|
|
@@ -234733,9 +234771,9 @@ class ClipPlane extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_1__.Plane3d
|
|
|
234733
234771
|
return Math.abs(this.altitude(point)) <= tolerance;
|
|
234734
234772
|
}
|
|
234735
234773
|
/**
|
|
234736
|
-
* Compute intersections of an (UNBOUNDED) arc with the plane.
|
|
234737
|
-
* @param arc arc to test.
|
|
234738
|
-
* @param intersectionRadians array to receive results
|
|
234774
|
+
* Compute intersections of an (UNBOUNDED) arc with the plane. Append them (as radians) to a growing array.
|
|
234775
|
+
* @param arc arc to test. The angle limits of the arc are NOT considered.
|
|
234776
|
+
* @param intersectionRadians array to receive results.
|
|
234739
234777
|
*/
|
|
234740
234778
|
appendIntersectionRadians(arc, intersectionRadians) {
|
|
234741
234779
|
const arcVectors = arc.toVectors();
|
|
@@ -234744,18 +234782,25 @@ class ClipPlane extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_1__.Plane3d
|
|
|
234744
234782
|
const gamma = this.velocity(arcVectors.vector90);
|
|
234745
234783
|
_numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, undefined, undefined, intersectionRadians);
|
|
234746
234784
|
}
|
|
234747
|
-
static
|
|
234748
|
-
/**
|
|
234749
|
-
* Announce fractional intervals of arc clip.
|
|
234750
|
-
* * Each call to `announce(fraction0, fraction1, arc)` announces one interval that is inside the clip plane.
|
|
234751
|
-
*/
|
|
234785
|
+
static _clipFractionArray = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_7__.GrowableFloat64Array();
|
|
234786
|
+
/** Method from [[Clipper]] interface. */
|
|
234752
234787
|
announceClippedArcIntervals(arc, announce) {
|
|
234753
|
-
const breaks = ClipPlane.
|
|
234788
|
+
const breaks = ClipPlane._clipFractionArray;
|
|
234754
234789
|
breaks.clear();
|
|
234755
234790
|
this.appendIntersectionRadians(arc, breaks);
|
|
234756
234791
|
arc.sweep.radiansArrayToPositivePeriodicFractions(breaks);
|
|
234757
234792
|
return _ClipUtils__WEBPACK_IMPORTED_MODULE_8__.ClipUtilities.selectIntervals01(arc, breaks, this, announce);
|
|
234758
234793
|
}
|
|
234794
|
+
/** Method from [[Clipper]] interface. */
|
|
234795
|
+
announceClippedCurveIntervals(curve, announce) {
|
|
234796
|
+
const breaks = ClipPlane._clipFractionArray;
|
|
234797
|
+
breaks.clear();
|
|
234798
|
+
const results = [];
|
|
234799
|
+
curve.appendPlaneIntersectionPoints(this, results);
|
|
234800
|
+
for (const r of results)
|
|
234801
|
+
breaks.push(r.fraction);
|
|
234802
|
+
return _ClipUtils__WEBPACK_IMPORTED_MODULE_8__.ClipUtilities.selectIntervals01(curve, breaks, this, announce);
|
|
234803
|
+
}
|
|
234759
234804
|
/**
|
|
234760
234805
|
* Compute intersection of (unbounded) segment with the plane.
|
|
234761
234806
|
* * If the ends are on the same side of the plane, return undefined.
|
|
@@ -234850,7 +234895,7 @@ class ClipPlane extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_1__.Plane3d
|
|
|
234850
234895
|
this.setPlane4d(plane);
|
|
234851
234896
|
return true;
|
|
234852
234897
|
}
|
|
234853
|
-
/**
|
|
234898
|
+
/** Method from [[Clipper]] interface. */
|
|
234854
234899
|
announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
|
|
234855
234900
|
if (f1 < f0)
|
|
234856
234901
|
return false;
|
|
@@ -235054,7 +235099,7 @@ var ClipMaskXYZRangePlanes;
|
|
|
235054
235099
|
class ClipPrimitive {
|
|
235055
235100
|
/** The (union of) convex regions. */
|
|
235056
235101
|
_clipPlanes;
|
|
235057
|
-
/** If true, pointInside inverts the sense of the pointInside for the _clipPlanes */
|
|
235102
|
+
/** If true, pointInside inverts the sense of the pointInside for the _clipPlanes. */
|
|
235058
235103
|
_invisible;
|
|
235059
235104
|
/**
|
|
235060
235105
|
* Get a reference to the `UnionOfConvexClipPlaneSets`.
|
|
@@ -235142,7 +235187,7 @@ class ClipPrimitive {
|
|
|
235142
235187
|
}
|
|
235143
235188
|
/**
|
|
235144
235189
|
* Method from [[Clipper]] interface.
|
|
235145
|
-
* * Implement as dispatch to
|
|
235190
|
+
* * Implement as dispatch to clip volume as supplied by derived class.
|
|
235146
235191
|
*/
|
|
235147
235192
|
announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
|
|
235148
235193
|
this.ensurePlaneSets();
|
|
@@ -235153,7 +235198,7 @@ class ClipPrimitive {
|
|
|
235153
235198
|
}
|
|
235154
235199
|
/**
|
|
235155
235200
|
* Method from [[Clipper]] interface.
|
|
235156
|
-
* * Implement as dispatch to
|
|
235201
|
+
* * Implement as dispatch to clip volume as supplied by derived class.
|
|
235157
235202
|
*/
|
|
235158
235203
|
announceClippedArcIntervals(arc, announce) {
|
|
235159
235204
|
this.ensurePlaneSets();
|
|
@@ -235162,6 +235207,17 @@ class ClipPrimitive {
|
|
|
235162
235207
|
hasInsideParts = this._clipPlanes.announceClippedArcIntervals(arc, announce);
|
|
235163
235208
|
return hasInsideParts;
|
|
235164
235209
|
}
|
|
235210
|
+
/**
|
|
235211
|
+
* Method from [[Clipper]] interface.
|
|
235212
|
+
* * Implement as dispatch to clip volume as supplied by derived class.
|
|
235213
|
+
*/
|
|
235214
|
+
announceClippedCurveIntervals(curve, announce) {
|
|
235215
|
+
this.ensurePlaneSets();
|
|
235216
|
+
let hasInsideParts = false;
|
|
235217
|
+
if (this._clipPlanes)
|
|
235218
|
+
hasInsideParts = this._clipPlanes.announceClippedCurveIntervals(curve, announce);
|
|
235219
|
+
return hasInsideParts;
|
|
235220
|
+
}
|
|
235165
235221
|
/**
|
|
235166
235222
|
* Multiply all ClipPlanes DPoint4d by matrix.
|
|
235167
235223
|
* @param matrix matrix to apply.
|
|
@@ -235287,13 +235343,13 @@ class PolyEdge {
|
|
|
235287
235343
|
class ClipShape extends ClipPrimitive {
|
|
235288
235344
|
/** Points of the polygon, in the xy plane of the local coordinate system. */
|
|
235289
235345
|
_polygon;
|
|
235290
|
-
/**
|
|
235346
|
+
/** Optional low z (in local coordinates). */
|
|
235291
235347
|
_zLow;
|
|
235292
|
-
/**
|
|
235348
|
+
/** Optional high z (in local coordinates). */
|
|
235293
235349
|
_zHigh;
|
|
235294
|
-
/**
|
|
235350
|
+
/** True if this is considered a hole (keep geometry outside of the polygon). */
|
|
235295
235351
|
_isMask;
|
|
235296
|
-
/**
|
|
235352
|
+
/** Transform from local to world. */
|
|
235297
235353
|
_transformFromClip;
|
|
235298
235354
|
/** Transform from world to local. */
|
|
235299
235355
|
_transformToClip;
|
|
@@ -236884,7 +236940,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
236884
236940
|
|
|
236885
236941
|
|
|
236886
236942
|
/**
|
|
236887
|
-
* Class holding an array structure of shapes defined by `ClipPrimitive
|
|
236943
|
+
* Class holding an array structure of shapes defined by `ClipPrimitive`.
|
|
236888
236944
|
* * The `ClipVector` defines an intersection of the member `ClipPrimitive` regions.
|
|
236889
236945
|
* * In the most common usage, one of the `ClipPrimitive` will be an outer region, and all others are holes with marker
|
|
236890
236946
|
* flag indicating that the outside of each hole is live.
|
|
@@ -236900,12 +236956,16 @@ class ClipVector {
|
|
|
236900
236956
|
*/
|
|
236901
236957
|
boundingRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
|
|
236902
236958
|
/** Returns a reference to the array of ClipShapes. */
|
|
236903
|
-
get clips() {
|
|
236959
|
+
get clips() {
|
|
236960
|
+
return this._clips;
|
|
236961
|
+
}
|
|
236904
236962
|
constructor(clips) {
|
|
236905
236963
|
this._clips = clips ? clips : [];
|
|
236906
236964
|
}
|
|
236907
236965
|
/** Returns true if this ClipVector contains a ClipPrimitive. */
|
|
236908
|
-
get isValid() {
|
|
236966
|
+
get isValid() {
|
|
236967
|
+
return this._clips.length > 0;
|
|
236968
|
+
}
|
|
236909
236969
|
/** Create a ClipVector with an empty set of ClipShapes. */
|
|
236910
236970
|
static createEmpty(result) {
|
|
236911
236971
|
if (result) {
|
|
@@ -237000,7 +237060,7 @@ class ClipVector {
|
|
|
237000
237060
|
}
|
|
237001
237061
|
return true;
|
|
237002
237062
|
}
|
|
237003
|
-
// Proxy object to implement
|
|
237063
|
+
// Proxy object to implement curve clipping.
|
|
237004
237064
|
_clipNodeProxy;
|
|
237005
237065
|
ensureProxyClipNode() {
|
|
237006
237066
|
if (this._clipNodeProxy)
|
|
@@ -237018,7 +237078,7 @@ class ClipVector {
|
|
|
237018
237078
|
}
|
|
237019
237079
|
/**
|
|
237020
237080
|
* Method from [[Clipper]] interface.
|
|
237021
|
-
* * Implement as
|
|
237081
|
+
* * Implement as intersection of child clippers.
|
|
237022
237082
|
*/
|
|
237023
237083
|
announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
|
|
237024
237084
|
this.ensureProxyClipNode();
|
|
@@ -237026,8 +237086,9 @@ class ClipVector {
|
|
|
237026
237086
|
return this._clipNodeProxy.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce);
|
|
237027
237087
|
return false;
|
|
237028
237088
|
}
|
|
237029
|
-
/**
|
|
237030
|
-
*
|
|
237089
|
+
/**
|
|
237090
|
+
* Method from [[Clipper]] interface.
|
|
237091
|
+
* * Implement as intersection of child clippers.
|
|
237031
237092
|
*/
|
|
237032
237093
|
announceClippedArcIntervals(arc, announce) {
|
|
237033
237094
|
this.ensureProxyClipNode();
|
|
@@ -237035,6 +237096,16 @@ class ClipVector {
|
|
|
237035
237096
|
return this._clipNodeProxy.announceClippedArcIntervals(arc, announce);
|
|
237036
237097
|
return false;
|
|
237037
237098
|
}
|
|
237099
|
+
/**
|
|
237100
|
+
* Method from [[Clipper]] interface.
|
|
237101
|
+
* * Implement as intersection of child clippers.
|
|
237102
|
+
*/
|
|
237103
|
+
announceClippedCurveIntervals(curve, announce) {
|
|
237104
|
+
this.ensureProxyClipNode();
|
|
237105
|
+
if (this._clipNodeProxy)
|
|
237106
|
+
return this._clipNodeProxy.announceClippedCurveIntervals(curve, announce);
|
|
237107
|
+
return false;
|
|
237108
|
+
}
|
|
237038
237109
|
/** Execute polygon clip as intersection of the child primitives. */
|
|
237039
237110
|
appendPolygonClip(xyz, insideFragments, outsideFragments, arrayCache) {
|
|
237040
237111
|
this.ensureProxyClipNode();
|
|
@@ -237363,6 +237434,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
237363
237434
|
|
|
237364
237435
|
/**
|
|
237365
237436
|
* A ConvexClipPlaneSet is a collection of ClipPlanes, often used for bounding regions of space.
|
|
237437
|
+
* The collection must form a single convex volume.
|
|
237366
237438
|
* @public
|
|
237367
237439
|
*/
|
|
237368
237440
|
class ConvexClipPlaneSet {
|
|
@@ -237678,20 +237750,7 @@ class ConvexClipPlaneSet {
|
|
|
237678
237750
|
}
|
|
237679
237751
|
return true;
|
|
237680
237752
|
}
|
|
237681
|
-
/**
|
|
237682
|
-
* Find the parts of the line segment (if any) that is within the convex clip volume.
|
|
237683
|
-
* * The line segment is defined by `pointA` and `pointB`.
|
|
237684
|
-
* * The input fractional interval from `fraction0` to `fraction1` (increasing) is the active part to consider.
|
|
237685
|
-
* * To clip to the usual bounded line segment, start with fractions (0,1).
|
|
237686
|
-
* If the clip volume is unbounded, the line interval may also be unbounded.
|
|
237687
|
-
* * An unbounded line portion will have fraction coordinates positive or negative `Number.MAX_VALUE`.
|
|
237688
|
-
* @param f0 fraction that is the initial lower fraction of the active interval (e.g., 0.0 for bounded segment).
|
|
237689
|
-
* @param f1 fraction that is the initial upper fraction of the active interval (e.g., 1.0 for bounded segment).
|
|
237690
|
-
* @param pointA segment start (fraction 0)
|
|
237691
|
-
* @param pointB segment end (fraction 1)
|
|
237692
|
-
* @param announce function to be called to announce a fraction interval that is within the convex clip volume.
|
|
237693
|
-
* @returns true if a segment was announced, false if entirely outside.
|
|
237694
|
-
*/
|
|
237753
|
+
/** Method from [[Clipper]] interface. */
|
|
237695
237754
|
announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
|
|
237696
237755
|
let fraction;
|
|
237697
237756
|
if (f1 < f0)
|
|
@@ -237730,13 +237789,10 @@ class ConvexClipPlaneSet {
|
|
|
237730
237789
|
}
|
|
237731
237790
|
return false;
|
|
237732
237791
|
}
|
|
237733
|
-
static
|
|
237734
|
-
/**
|
|
237735
|
-
* Find fractional parts of the arc that are within this ClipPlaneSet, and announce each as
|
|
237736
|
-
* * `announce(fraction, fraction, curve)`
|
|
237737
|
-
*/
|
|
237792
|
+
static _clipFractionArray = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_4__.GrowableFloat64Array();
|
|
237793
|
+
/** Method from [[Clipper]] interface. */
|
|
237738
237794
|
announceClippedArcIntervals(arc, announce) {
|
|
237739
|
-
const breaks = ConvexClipPlaneSet.
|
|
237795
|
+
const breaks = ConvexClipPlaneSet._clipFractionArray;
|
|
237740
237796
|
breaks.clear();
|
|
237741
237797
|
for (const clipPlane of this.planes) {
|
|
237742
237798
|
clipPlane.appendIntersectionRadians(arc, breaks);
|
|
@@ -237744,6 +237800,17 @@ class ConvexClipPlaneSet {
|
|
|
237744
237800
|
arc.sweep.radiansArrayToPositivePeriodicFractions(breaks);
|
|
237745
237801
|
return _ClipUtils__WEBPACK_IMPORTED_MODULE_5__.ClipUtilities.selectIntervals01(arc, breaks, this, announce);
|
|
237746
237802
|
}
|
|
237803
|
+
/** Method from [[Clipper]] interface. */
|
|
237804
|
+
announceClippedCurveIntervals(curve, announce) {
|
|
237805
|
+
const breaks = ConvexClipPlaneSet._clipFractionArray;
|
|
237806
|
+
breaks.clear();
|
|
237807
|
+
const results = [];
|
|
237808
|
+
for (const clipPlane of this.planes)
|
|
237809
|
+
curve.appendPlaneIntersectionPoints(clipPlane, results);
|
|
237810
|
+
for (const r of results)
|
|
237811
|
+
breaks.push(r.fraction);
|
|
237812
|
+
return _ClipUtils__WEBPACK_IMPORTED_MODULE_5__.ClipUtilities.selectIntervals01(curve, breaks, this, announce);
|
|
237813
|
+
}
|
|
237747
237814
|
/**
|
|
237748
237815
|
* Find the parts of the (unbounded) line segment (if any) that is within the convex clip volume.
|
|
237749
237816
|
* @param pointA segment start (fraction 0)
|
|
@@ -238144,7 +238211,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
238144
238211
|
|
|
238145
238212
|
/**
|
|
238146
238213
|
* A collection of ConvexClipPlaneSets.
|
|
238147
|
-
* * A point is "in" the clip plane set if it is "in" one or more of
|
|
238214
|
+
* * A point is "in" the clip plane set if it is "in" one or more of the ConvexClipPlaneSets.
|
|
238148
238215
|
* * Hence the boolean logic is that the ClipPlaneSet is a UNION of its constituents.
|
|
238149
238216
|
* @public
|
|
238150
238217
|
*/
|
|
@@ -238337,17 +238404,7 @@ class UnionOfConvexClipPlaneSets {
|
|
|
238337
238404
|
output.push(convexSetOutput);
|
|
238338
238405
|
}
|
|
238339
238406
|
}
|
|
238340
|
-
/**
|
|
238341
|
-
* Announce clipSegment() for each convexSet in this ClipPlaneSet.
|
|
238342
|
-
* * all clipPlaneSets are inspected.
|
|
238343
|
-
* * announced intervals are for each individual clipPlaneSet -- adjacent intervals are not consolidated.
|
|
238344
|
-
* @param f0 active interval start.
|
|
238345
|
-
* @param f1 active interval end.
|
|
238346
|
-
* @param pointA line segment start.
|
|
238347
|
-
* @param pointB line segment end.
|
|
238348
|
-
* @param announce function to announce interval.
|
|
238349
|
-
* @returns Return true if any announcements are made.
|
|
238350
|
-
*/
|
|
238407
|
+
/** Method from [[Clipper]] interface. */
|
|
238351
238408
|
announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
|
|
238352
238409
|
let numAnnounce = 0;
|
|
238353
238410
|
for (const convexSet of this._convexSets) {
|
|
@@ -238356,22 +238413,29 @@ class UnionOfConvexClipPlaneSets {
|
|
|
238356
238413
|
}
|
|
238357
238414
|
return numAnnounce > 0;
|
|
238358
238415
|
}
|
|
238359
|
-
static
|
|
238360
|
-
/**
|
|
238361
|
-
* Find parts of an arc that are inside any member clipper.
|
|
238362
|
-
* Announce each with `announce(startFraction, endFraction, this)`
|
|
238363
|
-
*/
|
|
238416
|
+
static _clipFractionArray = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__.GrowableFloat64Array();
|
|
238417
|
+
/** Method from [[Clipper]] interface. */
|
|
238364
238418
|
announceClippedArcIntervals(arc, announce) {
|
|
238365
|
-
const breaks = UnionOfConvexClipPlaneSets.
|
|
238419
|
+
const breaks = UnionOfConvexClipPlaneSets._clipFractionArray;
|
|
238366
238420
|
breaks.clear();
|
|
238367
|
-
for (const convexSet of this._convexSets)
|
|
238368
|
-
for (const clipPlane of convexSet.planes)
|
|
238421
|
+
for (const convexSet of this._convexSets)
|
|
238422
|
+
for (const clipPlane of convexSet.planes)
|
|
238369
238423
|
clipPlane.appendIntersectionRadians(arc, breaks);
|
|
238370
|
-
}
|
|
238371
|
-
}
|
|
238372
238424
|
arc.sweep.radiansArrayToPositivePeriodicFractions(breaks);
|
|
238373
238425
|
return _ClipUtils__WEBPACK_IMPORTED_MODULE_4__.ClipUtilities.selectIntervals01(arc, breaks, this, announce);
|
|
238374
238426
|
}
|
|
238427
|
+
/** Method from [[Clipper]] interface. */
|
|
238428
|
+
announceClippedCurveIntervals(curve, announce) {
|
|
238429
|
+
const breaks = UnionOfConvexClipPlaneSets._clipFractionArray;
|
|
238430
|
+
breaks.clear();
|
|
238431
|
+
const results = [];
|
|
238432
|
+
for (const convexSet of this._convexSets)
|
|
238433
|
+
for (const clipPlane of convexSet.planes)
|
|
238434
|
+
curve.appendPlaneIntersectionPoints(clipPlane, results);
|
|
238435
|
+
for (const r of results)
|
|
238436
|
+
breaks.push(r.fraction);
|
|
238437
|
+
return _ClipUtils__WEBPACK_IMPORTED_MODULE_4__.ClipUtilities.selectIntervals01(curve, breaks, this, announce);
|
|
238438
|
+
}
|
|
238375
238439
|
/**
|
|
238376
238440
|
* Collect the output from computePlanePlanePlaneIntersections in all the contained convex sets.
|
|
238377
238441
|
* @param points (optional) array to which computed points are to be added.
|
|
@@ -245445,15 +245509,14 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
245445
245509
|
return closestTangent;
|
|
245446
245510
|
}
|
|
245447
245511
|
/**
|
|
245448
|
-
* Find intervals of this
|
|
245512
|
+
* Find intervals of this curve that are interior to the clipper.
|
|
245513
|
+
* * Default implementation calls `clipper.announceClippedCurveIntervals`; subclasses can implement more efficiently as necessary.
|
|
245449
245514
|
* @param clipper clip structure (e.g. clip planes)
|
|
245450
|
-
* @param announce (optional)
|
|
245451
|
-
* `announce(fraction0, fraction1, curvePrimitive)`
|
|
245515
|
+
* @param announce (optional) called to announce each fractional interval: `announce(fraction0, fraction1, this)`
|
|
245452
245516
|
* @returns true if any "in" segments are announced.
|
|
245453
245517
|
*/
|
|
245454
|
-
announceClipIntervals(
|
|
245455
|
-
|
|
245456
|
-
return false;
|
|
245518
|
+
announceClipIntervals(clipper, announce) {
|
|
245519
|
+
return clipper.announceClippedCurveIntervals?.(this, announce) ?? false;
|
|
245457
245520
|
}
|
|
245458
245521
|
/**
|
|
245459
245522
|
* Return (if possible) a curve primitive which is a portion of this curve.
|
|
@@ -247770,13 +247833,11 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__.CurvePri
|
|
|
247770
247833
|
dispatchToGeometryHandler(handler) {
|
|
247771
247834
|
return handler.handleLineString3d(this);
|
|
247772
247835
|
}
|
|
247773
|
-
// HARD TO TEST -- tests that get to announceClipInterval for arc, bspline do NOT get here with
|
|
247774
|
-
// linestring because the controller has special case loops through segments?
|
|
247775
247836
|
/**
|
|
247776
|
-
* Find intervals of this CurvePrimitive that are interior to a clipper
|
|
247777
|
-
* @param clipper clip structure (e.g. clip planes)
|
|
247778
|
-
* @param announce (optional) function to be called announcing fractional intervals
|
|
247779
|
-
* `
|
|
247837
|
+
* Find intervals of this CurvePrimitive that are interior to a clipper.
|
|
247838
|
+
* @param clipper clip structure (e.g. clip planes).
|
|
247839
|
+
* @param announce (optional) function to be called announcing fractional intervals
|
|
247840
|
+
* `announce(fraction0, fraction1, curvePrimitive)`.
|
|
247780
247841
|
* @returns true if any "in" segments are announced.
|
|
247781
247842
|
*/
|
|
247782
247843
|
announceClipIntervals(clipper, announce) {
|
|
@@ -253333,7 +253394,7 @@ class AppendPlaneIntersectionStrokeHandler extends _numerics_Newton__WEBPACK_IMP
|
|
|
253333
253394
|
_intersections;
|
|
253334
253395
|
_fractionA = 0;
|
|
253335
253396
|
_functionA = 0;
|
|
253336
|
-
// private derivativeA: number;
|
|
253397
|
+
// private derivativeA: number; <---- Not currently used
|
|
253337
253398
|
_functionB = 0;
|
|
253338
253399
|
_fractionB = 0;
|
|
253339
253400
|
_derivativeB = 0;
|
|
@@ -253365,8 +253426,7 @@ class AppendPlaneIntersectionStrokeHandler extends _numerics_Newton__WEBPACK_IMP
|
|
|
253365
253426
|
this._functionA = 0.0;
|
|
253366
253427
|
// this.derivativeA = 0.0;
|
|
253367
253428
|
}
|
|
253368
|
-
endCurvePrimitive() {
|
|
253369
|
-
}
|
|
253429
|
+
endCurvePrimitive() { }
|
|
253370
253430
|
announceIntervalForUniformStepStrokes(cp, numStrokes, fraction0, fraction1) {
|
|
253371
253431
|
this.startCurvePrimitive(cp);
|
|
253372
253432
|
if (numStrokes < 1)
|
|
@@ -253406,13 +253466,13 @@ class AppendPlaneIntersectionStrokeHandler extends _numerics_Newton__WEBPACK_IMP
|
|
|
253406
253466
|
const curve = this.effectiveCurve();
|
|
253407
253467
|
if (!curve)
|
|
253408
253468
|
return false;
|
|
253469
|
+
// the Newton function is just plane altitude: curve points that lie on the plane are altitude roots (i.e., altitude = 0).
|
|
253409
253470
|
this.currentF = this._plane.altitude(curve.fractionToPoint(fraction));
|
|
253410
253471
|
return true;
|
|
253411
253472
|
}
|
|
253412
253473
|
/**
|
|
253413
|
-
* * ASSUME both the "A" and "B"
|
|
253414
|
-
* * If function value changed sign between, interpolate an approximate root and improve it with
|
|
253415
|
-
* the newton solver.
|
|
253474
|
+
* * ASSUME both the "A" and "B" evaluations (fraction, function, and derivative) are known.
|
|
253475
|
+
* * If function value changed sign between, interpolate an approximate root and improve it with the newton solver.
|
|
253416
253476
|
*/
|
|
253417
253477
|
searchInterval() {
|
|
253418
253478
|
if (this._functionA * this._functionB > 0)
|
|
@@ -267087,7 +267147,8 @@ class Ellipsoid {
|
|
|
267087
267147
|
this._workPointA = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create();
|
|
267088
267148
|
this._workPointB = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create();
|
|
267089
267149
|
}
|
|
267090
|
-
/**
|
|
267150
|
+
/**
|
|
267151
|
+
* Create with a clone (not capture) with given transform.
|
|
267091
267152
|
* * If transform is undefined, create a unit sphere.
|
|
267092
267153
|
*/
|
|
267093
267154
|
static create(matrixOrTransform) {
|
|
@@ -267121,7 +267182,9 @@ class Ellipsoid {
|
|
|
267121
267182
|
* * In the sphere space, an xyz (vector from origin) with magnitude less than 1 is INSIDE the sphere (hence its world image is INSIDE the ellipsoid)
|
|
267122
267183
|
* * In the sphere space, an xyz (vector from origin) with magnitude greater than 1 is OUTSIDE the sphere (hence its world image is OUTSIDE the ellipsoid)
|
|
267123
267184
|
*/
|
|
267124
|
-
get transformRef() {
|
|
267185
|
+
get transformRef() {
|
|
267186
|
+
return this._transform;
|
|
267187
|
+
}
|
|
267125
267188
|
/**
|
|
267126
267189
|
* * Convert a world point to point within the underlying mapped sphere space.
|
|
267127
267190
|
* * In the sphere space, an xyz (vector from origin) with magnitude equal to 1 is ON the sphere (hence its world image is ON the ellipsoid)
|
|
@@ -267586,7 +267649,7 @@ class Ellipsoid {
|
|
|
267586
267649
|
return localPoint.magnitude() <= 1.0;
|
|
267587
267650
|
return false;
|
|
267588
267651
|
}
|
|
267589
|
-
/**
|
|
267652
|
+
/** Method from [[Clipper]] interface. */
|
|
267590
267653
|
announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
|
|
267591
267654
|
const localA = this._transform.multiplyInversePoint3d(pointA, this._workPointA);
|
|
267592
267655
|
const localB = this._transform.multiplyInversePoint3d(pointB, this._workPointB);
|
|
@@ -267625,7 +267688,7 @@ class Ellipsoid {
|
|
|
267625
267688
|
}
|
|
267626
267689
|
return false;
|
|
267627
267690
|
}
|
|
267628
|
-
/**
|
|
267691
|
+
/** Method from [[Clipper]] interface. */
|
|
267629
267692
|
announceClippedArcIntervals(arc, announce) {
|
|
267630
267693
|
const arcData = arc.toVectors();
|
|
267631
267694
|
let numAnnounce = 0;
|
|
@@ -275305,31 +275368,36 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
275305
275368
|
|
|
275306
275369
|
/**
|
|
275307
275370
|
* Plane3d is the abstract base class for multiple 3d plane representations:
|
|
275308
|
-
* * [[Plane3dByOriginAndUnitNormal]] -- plane defined by origin and normal, with no preferred in-plane directions
|
|
275309
|
-
* * [[Plane3dByOriginAndVectors]] -- plane defined by origin and 2 vectors in the plane, with normal implied by the
|
|
275371
|
+
* * [[Plane3dByOriginAndUnitNormal]] -- plane defined by origin and normal, with no preferred in-plane directions.
|
|
275372
|
+
* * [[Plane3dByOriginAndVectors]] -- plane defined by origin and 2 vectors in the plane, with normal implied by the
|
|
275373
|
+
* vectors' cross product.
|
|
275310
275374
|
* * [[Point4d]] -- homogeneous form of xyzw plane.
|
|
275311
|
-
* * [[ClipPlane]] -- implicit plane with additional markup as used by compound clip structures such as
|
|
275375
|
+
* * [[ClipPlane]] -- implicit plane with additional markup as used by compound clip structures such as
|
|
275376
|
+
* [[ConvexClipPlaneSet]] and [[UnionOfConvexClipPlaneSets]].
|
|
275312
275377
|
*
|
|
275313
275378
|
* As an abstract base class, Plane3d demands that its derived classes implement queries to answer questions
|
|
275314
|
-
* about the plane's normal and the altitude of points above or below the plane
|
|
275379
|
+
* about the plane's normal and the altitude of points above or below the plane (altitude is measured perpendicular
|
|
275380
|
+
* to the plane).
|
|
275315
275381
|
* These abstract methods are:
|
|
275316
|
-
* * altitude(Point3d), altitudeXYZ(x,y,z), and altitudeXYZW(Point4d) -- evaluate altitude
|
|
275382
|
+
* * altitude(Point3d), altitudeXYZ(x,y,z), and altitudeXYZW(Point4d) -- evaluate altitude.
|
|
275317
275383
|
* * normalX(), normalY(), normalZ() -- return components of the plane's normal vector.
|
|
275318
275384
|
* * velocity(Vector3d), velocityXYZ(x,y,z) -- return dot product of the input vector with the plane normal.
|
|
275319
|
-
* * projectPointToPlane
|
|
275385
|
+
* * projectPointToPlane(spacePoint: Point3d) -- return projection of spacePoint into the plane.
|
|
275320
275386
|
*
|
|
275321
|
-
* The Plane3d base class also provides implementations of several queries which it can implement by calling
|
|
275387
|
+
* The Plane3d base class also provides implementations of several queries which it can implement by calling
|
|
275388
|
+
* the abstract queries.
|
|
275322
275389
|
* * Derived classes may choose to override these default implementations using private knowledge of what they have stored.
|
|
275323
|
-
* * isPointInPlane(spacePoint, tolerance?) -- test if spacePoint is in the plane with tolerance.
|
|
275324
|
-
*
|
|
275325
|
-
*
|
|
275390
|
+
* * isPointInPlane(spacePoint, tolerance?) -- test if spacePoint is in the plane with tolerance. Default tolerance is
|
|
275391
|
+
* small metric distance.
|
|
275392
|
+
* * classifyAltitude(spacePoint, tolerance?), classifyAltitudeXYZ(x,y,z,tolerance?) -- return -1,0,1 indicating if
|
|
275393
|
+
* spacePoint's altitude is negative, near zero, or positive.
|
|
275326
275394
|
*
|
|
275327
275395
|
* Notes about scaling and signs in methods that compute altitudes, normal components and velocities:
|
|
275328
275396
|
* * The term "altitude" indicates a _signed_ distance from the plane.
|
|
275329
275397
|
* * altitude zero is _on_ the plane
|
|
275330
275398
|
* * positive altitudes are on one side
|
|
275331
275399
|
* * negatives are on the other.
|
|
275332
|
-
* * Altitude values and normal components are not strictly required to be true cartesian distance.
|
|
275400
|
+
* * Altitude values and normal components are not strictly required to be true cartesian distance. If the calling code happens to use "distance scaled by 1000X" it
|
|
275333
275401
|
* understands that it can be OK for its plane implementation to have that scaling.
|
|
275334
275402
|
* * By convention, derived classes whose definitions (normals and vectors in plane) are simple cartesian are expected
|
|
275335
275403
|
* to return true distances. This applies to:
|
|
@@ -345777,19 +345845,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
345777
345845
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
345778
345846
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
345779
345847
|
*--------------------------------------------------------------------------------------------*/
|
|
345780
|
-
/** A
|
|
345781
|
-
*
|
|
345848
|
+
/** A handle to formatting and parsing specs for a specific KoQ and persistence unit.
|
|
345849
|
+
* Reads the current specs from the provider on access. Use [[QuantityFormatter.getFormatSpecHandle]]
|
|
345782
345850
|
* to create instances.
|
|
345783
345851
|
*
|
|
345784
345852
|
* When formatting is not yet ready, [[format]] returns a `value.toString()` fallback.
|
|
345785
|
-
*
|
|
345853
|
+
* Dispose the handle when it is no longer needed to invalidate it.
|
|
345786
345854
|
*
|
|
345787
345855
|
* @beta
|
|
345788
345856
|
*/
|
|
345789
345857
|
class FormatSpecHandle {
|
|
345790
|
-
|
|
345791
|
-
_parserSpec;
|
|
345792
|
-
_removeListener;
|
|
345858
|
+
_disposed = false;
|
|
345793
345859
|
_provider;
|
|
345794
345860
|
_koqName;
|
|
345795
345861
|
_persistenceUnit;
|
|
@@ -345800,10 +345866,6 @@ class FormatSpecHandle {
|
|
|
345800
345866
|
this._koqName = args.name;
|
|
345801
345867
|
this._persistenceUnit = args.persistenceUnitName;
|
|
345802
345868
|
this._system = args.system;
|
|
345803
|
-
this._removeListener = args.provider.onFormattingReady.addListener(() => {
|
|
345804
|
-
this._refresh();
|
|
345805
|
-
});
|
|
345806
|
-
this._refresh();
|
|
345807
345869
|
}
|
|
345808
345870
|
/** The KoQ name this handle is keyed to. */
|
|
345809
345871
|
get koqName() { return this._koqName; }
|
|
@@ -345812,47 +345874,35 @@ class FormatSpecHandle {
|
|
|
345812
345874
|
/** The unit system this handle is pinned to, or `undefined` for the active system. */
|
|
345813
345875
|
get system() { return this._system; }
|
|
345814
345876
|
/** The current FormatterSpec, or undefined if not yet loaded. */
|
|
345815
|
-
get formatterSpec() { return this.
|
|
345877
|
+
get formatterSpec() { return this._getEntry()?.formatterSpec; }
|
|
345816
345878
|
/** The current ParserSpec, or undefined if not yet loaded. */
|
|
345817
|
-
get parserSpec() { return this.
|
|
345879
|
+
get parserSpec() { return this._getEntry()?.parserSpec; }
|
|
345818
345880
|
/** Format a quantity value using the current spec.
|
|
345819
345881
|
* If the formatter is not yet ready, returns `value.toString()` as a fallback.
|
|
345820
345882
|
* @param value - The numeric value to format.
|
|
345821
345883
|
* @returns The formatted string.
|
|
345822
345884
|
*/
|
|
345823
345885
|
format(value) {
|
|
345824
|
-
|
|
345886
|
+
const formatterSpec = this.formatterSpec;
|
|
345887
|
+
if (!formatterSpec)
|
|
345825
345888
|
return value.toString();
|
|
345826
|
-
return this._provider.formatQuantity(value,
|
|
345889
|
+
return this._provider.formatQuantity(value, formatterSpec);
|
|
345827
345890
|
}
|
|
345828
|
-
/**
|
|
345829
|
-
* Idempotent and safe to call
|
|
345891
|
+
/** Invalidate this handle.
|
|
345892
|
+
* Idempotent and safe to call multiple times.
|
|
345893
|
+
* No additional teardown is required because the handle owns no external resources.
|
|
345830
345894
|
*/
|
|
345831
345895
|
[Symbol.dispose]() {
|
|
345832
|
-
|
|
345833
|
-
this._removeListener();
|
|
345834
|
-
this._removeListener = undefined;
|
|
345835
|
-
}
|
|
345836
|
-
this._formatterSpec = undefined;
|
|
345837
|
-
this._parserSpec = undefined;
|
|
345896
|
+
this._disposed = true;
|
|
345838
345897
|
}
|
|
345839
|
-
|
|
345840
|
-
|
|
345841
|
-
|
|
345842
|
-
|
|
345843
|
-
const entry = this._provider.getSpecsByNameAndUnit({
|
|
345898
|
+
_getEntry() {
|
|
345899
|
+
if (this._disposed)
|
|
345900
|
+
return undefined;
|
|
345901
|
+
return this._provider.getSpecsByNameAndUnit({
|
|
345844
345902
|
name: this._koqName,
|
|
345845
345903
|
persistenceUnitName: this._persistenceUnit,
|
|
345846
345904
|
system: this._system,
|
|
345847
345905
|
});
|
|
345848
|
-
if (entry) {
|
|
345849
|
-
this._formatterSpec = entry.formatterSpec;
|
|
345850
|
-
this._parserSpec = entry.parserSpec;
|
|
345851
|
-
}
|
|
345852
|
-
else {
|
|
345853
|
-
this._formatterSpec = undefined;
|
|
345854
|
-
this._parserSpec = undefined;
|
|
345855
|
-
}
|
|
345856
345906
|
}
|
|
345857
345907
|
}
|
|
345858
345908
|
|
|
@@ -350649,7 +350699,7 @@ class TestContext {
|
|
|
350649
350699
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
350650
350700
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
350651
350701
|
await core_frontend_1.NoRenderApp.startup({
|
|
350652
|
-
applicationVersion: "5.10.0-dev.
|
|
350702
|
+
applicationVersion: "5.10.0-dev.7",
|
|
350653
350703
|
applicationId: this.settings.gprid,
|
|
350654
350704
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
350655
350705
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -378358,7 +378408,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
378358
378408
|
/***/ ((module) => {
|
|
378359
378409
|
|
|
378360
378410
|
"use strict";
|
|
378361
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.10.0-dev.
|
|
378411
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.10.0-dev.7","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 && npm run -s copy:draco","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","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./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 && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","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","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.9","@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/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"~4.3.4","@loaders.gl/draco":"~4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
378362
378412
|
|
|
378363
378413
|
/***/ }),
|
|
378364
378414
|
|