@itwin/rpcinterface-full-stack-tests 4.4.0-dev.21 → 4.4.0-dev.24
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/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +2239 -260
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js +5 -5
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
|
|
22
22
|
/***/ }),
|
|
23
23
|
|
|
24
|
-
/***/ "../../common/temp/node_modules/.pnpm/@itwin+certa@3.
|
|
25
|
-
|
|
26
|
-
!*** ../../common/temp/node_modules/.pnpm/@itwin+certa@3.
|
|
27
|
-
|
|
24
|
+
/***/ "../../common/temp/node_modules/.pnpm/@itwin+certa@3.8.0/node_modules/@itwin/certa/lib/utils/CallbackUtils.js":
|
|
25
|
+
/*!********************************************************************************************************************!*\
|
|
26
|
+
!*** ../../common/temp/node_modules/.pnpm/@itwin+certa@3.8.0/node_modules/@itwin/certa/lib/utils/CallbackUtils.js ***!
|
|
27
|
+
\********************************************************************************************************************/
|
|
28
28
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
29
29
|
|
|
30
30
|
"use strict";
|
|
@@ -3183,7 +3183,7 @@ exports.getAccessTokenFromBackend = exports.getTokenCallbackName = void 0;
|
|
|
3183
3183
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3184
3184
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
3185
3185
|
*--------------------------------------------------------------------------------------------*/
|
|
3186
|
-
const CallbackUtils_1 = __webpack_require__(/*! @itwin/certa/lib/utils/CallbackUtils */ "../../common/temp/node_modules/.pnpm/@itwin+certa@3.
|
|
3186
|
+
const CallbackUtils_1 = __webpack_require__(/*! @itwin/certa/lib/utils/CallbackUtils */ "../../common/temp/node_modules/.pnpm/@itwin+certa@3.8.0/node_modules/@itwin/certa/lib/utils/CallbackUtils.js");
|
|
3187
3187
|
// Shared by both the frontend and backend side of the tests
|
|
3188
3188
|
exports.getTokenCallbackName = "getToken";
|
|
3189
3189
|
async function getAccessTokenFromBackend(user, oidcConfig) {
|
|
@@ -21931,8 +21931,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21931
21931
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21932
21932
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
21933
21933
|
/* harmony export */ });
|
|
21934
|
-
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
21935
|
-
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
21934
|
+
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
|
|
21935
|
+
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/createClass.js");
|
|
21936
21936
|
|
|
21937
21937
|
|
|
21938
21938
|
|
|
@@ -32856,6 +32856,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
32856
32856
|
/**
|
|
32857
32857
|
* Mirrors the SpanKind enum from [@opentelemetry/api](https://open-telemetry.github.io/opentelemetry-js/enums/_opentelemetry_api.SpanKind.html)
|
|
32858
32858
|
* @public
|
|
32859
|
+
* @deprecated in 4.4 - OpenTelemetry Tracing helpers will become internal in a future release. Apps should use `@opentelemetry/api` directly.
|
|
32859
32860
|
*/
|
|
32860
32861
|
var SpanKind;
|
|
32861
32862
|
(function (SpanKind) {
|
|
@@ -32911,9 +32912,11 @@ function* getFlatEntries(obj, path = "") {
|
|
|
32911
32912
|
function flattenObject(obj) {
|
|
32912
32913
|
return Object.fromEntries(getFlatEntries(obj));
|
|
32913
32914
|
}
|
|
32915
|
+
/* eslint-disable deprecation/deprecation -- lots of self-references here... */
|
|
32914
32916
|
/**
|
|
32915
32917
|
* Enables OpenTelemetry tracing in addition to traditional logging.
|
|
32916
32918
|
* @public
|
|
32919
|
+
* @deprecated in 4.4 - OpenTelemetry Tracing helpers will become internal in a future release. Apps should use `@opentelemetry/api` directly.
|
|
32917
32920
|
*/
|
|
32918
32921
|
class Tracing {
|
|
32919
32922
|
/**
|
|
@@ -32945,6 +32948,14 @@ class Tracing {
|
|
|
32945
32948
|
}
|
|
32946
32949
|
});
|
|
32947
32950
|
}
|
|
32951
|
+
/**
|
|
32952
|
+
* Adds a span event describing a runtime exception, as advised in OpenTelemetry documentation
|
|
32953
|
+
* @param e error (exception) object
|
|
32954
|
+
* @internal
|
|
32955
|
+
*/
|
|
32956
|
+
static recordException(e) {
|
|
32957
|
+
Tracing._openTelemetry?.trace.getSpan(Tracing._openTelemetry.context.active())?.recordException(e);
|
|
32958
|
+
}
|
|
32948
32959
|
/**
|
|
32949
32960
|
* Enable logging to OpenTelemetry. [[Tracing.withSpan]] will be enabled, all log entries will be attached to active span as span events.
|
|
32950
32961
|
* [IModelHost.startup]($backend) will call this automatically if the `enableOpenTelemetry` option is enabled and it succeeds in requiring `@opentelemetry/api`.
|
|
@@ -32994,6 +33005,7 @@ class Tracing {
|
|
|
32994
33005
|
Tracing._openTelemetry?.trace.getSpan(Tracing._openTelemetry.context.active())?.setAttributes(attributes);
|
|
32995
33006
|
}
|
|
32996
33007
|
}
|
|
33008
|
+
/* eslint-enable deprecation/deprecation */
|
|
32997
33009
|
|
|
32998
33010
|
|
|
32999
33011
|
/***/ }),
|
|
@@ -40351,6 +40363,11 @@ class PackedFeatureTable {
|
|
|
40351
40363
|
result.modelId.upper = this.batchModelIdPair.upper;
|
|
40352
40364
|
return result;
|
|
40353
40365
|
}
|
|
40366
|
+
getModelIdPair(_featureIndex, out) {
|
|
40367
|
+
out.lower = this.batchModelIdPair.lower;
|
|
40368
|
+
out.upper = this.batchModelIdPair.upper;
|
|
40369
|
+
return out;
|
|
40370
|
+
}
|
|
40354
40371
|
/** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */
|
|
40355
40372
|
findElementId(featureIndex) {
|
|
40356
40373
|
if (featureIndex >= this.numFeatures)
|
|
@@ -40504,6 +40521,10 @@ class MultiModelPackedFeatureTable {
|
|
|
40504
40521
|
getElementIdPair(featureIndex, out) {
|
|
40505
40522
|
return this._features.getElementIdPair(featureIndex, out);
|
|
40506
40523
|
}
|
|
40524
|
+
getModelIdPair(featureIndex, out) {
|
|
40525
|
+
this._models.getModelIdPair(featureIndex, out);
|
|
40526
|
+
return out;
|
|
40527
|
+
}
|
|
40507
40528
|
findElementId(featureIndex) {
|
|
40508
40529
|
return this._features.findElementId(featureIndex);
|
|
40509
40530
|
}
|
|
@@ -44486,6 +44507,12 @@ class PlanProjectionSettings {
|
|
|
44486
44507
|
props.enforceDisplayPriority = changedProps.enforceDisplayPriority;
|
|
44487
44508
|
return new PlanProjectionSettings(props);
|
|
44488
44509
|
}
|
|
44510
|
+
/** Return true if these settings are equivalent to the specified settings. */
|
|
44511
|
+
equals(other) {
|
|
44512
|
+
if (this === other)
|
|
44513
|
+
return true;
|
|
44514
|
+
return this.elevation === other.elevation && this.transparency === other.transparency && this.overlay === other.overlay && this.enforceDisplayPriority === other.enforceDisplayPriority;
|
|
44515
|
+
}
|
|
44489
44516
|
}
|
|
44490
44517
|
|
|
44491
44518
|
|
|
@@ -61444,7 +61471,7 @@ class RpcInvocation {
|
|
|
61444
61471
|
// this catch block is intentionally placed inside `runActivity` to attach the right logging metadata and use the correct openTelemetry span.
|
|
61445
61472
|
if (!(error instanceof _RpcControl__WEBPACK_IMPORTED_MODULE_6__.RpcPendingResponse)) {
|
|
61446
61473
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(_CommonLoggerCategory__WEBPACK_IMPORTED_MODULE_1__.CommonLoggerCategory.RpcInterfaceBackend, "Error in RPC operation", { error: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError.getErrorProps(error) });
|
|
61447
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Tracing.
|
|
61474
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Tracing.recordException(error);
|
|
61448
61475
|
}
|
|
61449
61476
|
throw error;
|
|
61450
61477
|
}));
|
|
@@ -97928,6 +97955,7 @@ class Viewport {
|
|
|
97928
97955
|
invalidateScene() {
|
|
97929
97956
|
this._sceneValid = false;
|
|
97930
97957
|
this._timePointValid = false;
|
|
97958
|
+
this.onSceneInvalidated.raiseEvent(this);
|
|
97931
97959
|
this.invalidateDecorations();
|
|
97932
97960
|
}
|
|
97933
97961
|
/** Mark the viewport's "render plan" as having changed, so that the next call to [[renderFrame]] will recreate it.
|
|
@@ -98548,6 +98576,11 @@ class Viewport {
|
|
|
98548
98576
|
* @beta
|
|
98549
98577
|
*/
|
|
98550
98578
|
this.onMapLayerScaleRangeVisibilityChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
98579
|
+
/** Event invoked every time [[invalidateScene]] is called.
|
|
98580
|
+
* @note This event will be raised **very** frequently. Avoid doing significant work inside of your event listener.
|
|
98581
|
+
* @beta
|
|
98582
|
+
*/
|
|
98583
|
+
this.onSceneInvalidated = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
98551
98584
|
/** @internal */
|
|
98552
98585
|
this._hasMissingTiles = false;
|
|
98553
98586
|
/** A function executed by `setView()` when `this._view` changes. */
|
|
@@ -102379,9 +102412,17 @@ function collectTransferables(document) {
|
|
|
102379
102412
|
break;
|
|
102380
102413
|
}
|
|
102381
102414
|
};
|
|
102382
|
-
for (const node of document.nodes)
|
|
102383
|
-
|
|
102384
|
-
|
|
102415
|
+
for (const node of document.nodes) {
|
|
102416
|
+
if (undefined !== node.groupId) {
|
|
102417
|
+
for (const primNode of node.nodes)
|
|
102418
|
+
for (const primitive of primNode.primitives)
|
|
102419
|
+
addPrimitive(primitive);
|
|
102420
|
+
}
|
|
102421
|
+
else {
|
|
102422
|
+
for (const primitive of node.primitives)
|
|
102423
|
+
addPrimitive(primitive);
|
|
102424
|
+
}
|
|
102425
|
+
}
|
|
102385
102426
|
for (const primitives of document.patterns.values())
|
|
102386
102427
|
for (const primitive of primitives)
|
|
102387
102428
|
addPrimitive(primitive);
|
|
@@ -102668,7 +102709,8 @@ class Parser {
|
|
|
102668
102709
|
y: this._document.rtcCenter[1] ?? 0,
|
|
102669
102710
|
z: this._document.rtcCenter[2] ?? 0,
|
|
102670
102711
|
} : undefined;
|
|
102671
|
-
const
|
|
102712
|
+
const primitiveNodes = this.parseNodes(featureTable);
|
|
102713
|
+
const nodes = this.groupPrimitiveNodes(primitiveNodes, featureTable);
|
|
102672
102714
|
return {
|
|
102673
102715
|
featureTable,
|
|
102674
102716
|
nodes,
|
|
@@ -102787,8 +102829,12 @@ class Parser {
|
|
|
102787
102829
|
const docPrimitives = docMesh.primitives;
|
|
102788
102830
|
if (!docPrimitives)
|
|
102789
102831
|
return;
|
|
102832
|
+
const primitives = docPrimitives.map((x) => this.parseNodePrimitive(x)).filter((x) => x !== undefined);
|
|
102833
|
+
if (primitives.length === 0)
|
|
102834
|
+
return;
|
|
102790
102835
|
const nodesById = new Map();
|
|
102791
102836
|
const getNode = (nodeId) => {
|
|
102837
|
+
nodeId = nodeId ?? _render_AnimationNodeId__WEBPACK_IMPORTED_MODULE_8__.AnimationNodeId.Untransformed;
|
|
102792
102838
|
let node = nodesById.get(nodeId);
|
|
102793
102839
|
if (!node) {
|
|
102794
102840
|
node = {
|
|
@@ -102811,6 +102857,9 @@ class Parser {
|
|
|
102811
102857
|
const nodeId = featureTable.getAnimationNodeId(featureIndex);
|
|
102812
102858
|
return 0 !== nodeId && discreteNodeIds.has(nodeId) ? nodeId : 0;
|
|
102813
102859
|
};
|
|
102860
|
+
this.splitPrimitives(primitives, featureTable, computeNodeId, getNode);
|
|
102861
|
+
}
|
|
102862
|
+
splitPrimitives(primitives, featureTable, computeNodeId, getPrimitivesNode) {
|
|
102814
102863
|
const splitArgs = {
|
|
102815
102864
|
maxDimension: this._options.maxVertexTableSize,
|
|
102816
102865
|
computeNodeId,
|
|
@@ -102824,15 +102873,13 @@ class Parser {
|
|
|
102824
102873
|
const material = (typeof imdl.material === "string") ? this.materialFromJson(imdl.material) : Material.create(toMaterialParams(imdl.material));
|
|
102825
102874
|
return material ? { isAtlas: false, material } : undefined;
|
|
102826
102875
|
};
|
|
102827
|
-
for (const
|
|
102828
|
-
const primitive = this.parseNodePrimitive(docPrimitive);
|
|
102829
|
-
if (!primitive)
|
|
102830
|
-
continue;
|
|
102876
|
+
for (const primitive of primitives) {
|
|
102831
102877
|
switch (primitive.type) {
|
|
102832
|
-
case "pattern":
|
|
102833
|
-
// ###TODO
|
|
102834
|
-
|
|
102878
|
+
case "pattern": {
|
|
102879
|
+
// ###TODO splitting area patterns
|
|
102880
|
+
getPrimitivesNode(undefined).primitives.push(primitive);
|
|
102835
102881
|
break;
|
|
102882
|
+
}
|
|
102836
102883
|
case "mesh": {
|
|
102837
102884
|
const mesh = primitive.params;
|
|
102838
102885
|
const texMap = mesh.surface.textureMapping;
|
|
@@ -102869,8 +102916,9 @@ class Parser {
|
|
|
102869
102916
|
}
|
|
102870
102917
|
}
|
|
102871
102918
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(p.surface.textureMapping === undefined || p.surface.textureMapping.texture instanceof Texture);
|
|
102872
|
-
|
|
102919
|
+
getPrimitivesNode(nodeId).primitives.push({
|
|
102873
102920
|
type: "mesh",
|
|
102921
|
+
modifier: primitive.modifier,
|
|
102874
102922
|
params: {
|
|
102875
102923
|
vertices: fromVertexTable(p.vertices),
|
|
102876
102924
|
surface: {
|
|
@@ -102898,8 +102946,9 @@ class Parser {
|
|
|
102898
102946
|
};
|
|
102899
102947
|
const split = (0,_render_primitives_VertexTableSplitter__WEBPACK_IMPORTED_MODULE_7__.splitPointStringParams)({ ...splitArgs, params });
|
|
102900
102948
|
for (const [nodeId, p] of split) {
|
|
102901
|
-
|
|
102949
|
+
getPrimitivesNode(nodeId).primitives.push({
|
|
102902
102950
|
type: "point",
|
|
102951
|
+
modifier: primitive.modifier,
|
|
102903
102952
|
params: {
|
|
102904
102953
|
vertices: fromVertexTable(p.vertices),
|
|
102905
102954
|
indices: p.indices.data,
|
|
@@ -102921,8 +102970,9 @@ class Parser {
|
|
|
102921
102970
|
};
|
|
102922
102971
|
const split = (0,_render_primitives_VertexTableSplitter__WEBPACK_IMPORTED_MODULE_7__.splitPolylineParams)({ ...splitArgs, params });
|
|
102923
102972
|
for (const [nodeId, p] of split) {
|
|
102924
|
-
|
|
102973
|
+
getPrimitivesNode(nodeId).primitives.push({
|
|
102925
102974
|
type: "polyline",
|
|
102975
|
+
modifier: primitive.modifier,
|
|
102926
102976
|
params: {
|
|
102927
102977
|
...p,
|
|
102928
102978
|
vertices: fromVertexTable(p.vertices),
|
|
@@ -102939,6 +102989,52 @@ class Parser {
|
|
|
102939
102989
|
}
|
|
102940
102990
|
}
|
|
102941
102991
|
}
|
|
102992
|
+
groupPrimitiveNodes(inputNodes, imdlFeatureTable) {
|
|
102993
|
+
const modelGroups = this._options.modelGroups;
|
|
102994
|
+
if (!modelGroups?.length)
|
|
102995
|
+
return inputNodes;
|
|
102996
|
+
const groupNodes = [];
|
|
102997
|
+
let orphanNode;
|
|
102998
|
+
const getGroupNode = (groupId) => {
|
|
102999
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(groupId <= modelGroups.length);
|
|
103000
|
+
if (groupId === modelGroups.length) {
|
|
103001
|
+
// This would happen if:
|
|
103002
|
+
// - The tile contains geometry from a model not present in modelGroups (should never occur); or
|
|
103003
|
+
// - The tile contains an area pattern (we haven't yet implemented splitting for them).
|
|
103004
|
+
// In either case, orphaned geometry will end up getting discarded.
|
|
103005
|
+
return orphanNode ?? (orphanNode = { groupId, nodes: [] });
|
|
103006
|
+
}
|
|
103007
|
+
let groupNode = groupNodes[groupId];
|
|
103008
|
+
if (!groupNode)
|
|
103009
|
+
groupNodes[groupId] = groupNode = { groupId, nodes: [] };
|
|
103010
|
+
return groupNode;
|
|
103011
|
+
};
|
|
103012
|
+
const featureTable = convertFeatureTable(imdlFeatureTable, this._options.batchModelId);
|
|
103013
|
+
const modelIdPair = { lower: 0, upper: 0 };
|
|
103014
|
+
const computeNodeId = (featureIndex) => {
|
|
103015
|
+
featureTable.getModelIdPair(featureIndex, modelIdPair);
|
|
103016
|
+
const modelId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(modelIdPair);
|
|
103017
|
+
for (let i = 0; i < modelGroups.length; i++) {
|
|
103018
|
+
if (modelGroups[i].has(modelId))
|
|
103019
|
+
return i;
|
|
103020
|
+
}
|
|
103021
|
+
return modelGroups.length;
|
|
103022
|
+
};
|
|
103023
|
+
for (const inputNode of inputNodes) {
|
|
103024
|
+
// Indexed by model group index.
|
|
103025
|
+
const splitNodes = [];
|
|
103026
|
+
const getSplitNode = (groupIndex) => {
|
|
103027
|
+
groupIndex = groupIndex ?? modelGroups.length;
|
|
103028
|
+
if (!splitNodes[groupIndex]) {
|
|
103029
|
+
const splitNode = splitNodes[groupIndex] = { ...inputNode, primitives: [] };
|
|
103030
|
+
getGroupNode(groupIndex).nodes.push(splitNode);
|
|
103031
|
+
}
|
|
103032
|
+
return splitNodes[groupIndex];
|
|
103033
|
+
};
|
|
103034
|
+
this.splitPrimitives(inputNode.primitives, featureTable, computeNodeId, getSplitNode);
|
|
103035
|
+
}
|
|
103036
|
+
return groupNodes.filter((x) => undefined !== x);
|
|
103037
|
+
}
|
|
102942
103038
|
parseTesselatedPolyline(json) {
|
|
102943
103039
|
const indices = this.findBuffer(json.indices);
|
|
102944
103040
|
const prevIndices = this.findBuffer(json.prevIndices);
|
|
@@ -115643,6 +115739,7 @@ class BranchState {
|
|
|
115643
115739
|
get secondaryClassifiers() { return this._opts.secondaryClassifiers; }
|
|
115644
115740
|
get realityModelDisplaySettings() { return this._opts.realityModelDisplaySettings; }
|
|
115645
115741
|
get viewAttachmentId() { return this._opts.viewAttachmentId; }
|
|
115742
|
+
get groupNodeId() { return this._opts.groupNodeId; }
|
|
115646
115743
|
get symbologyOverrides() {
|
|
115647
115744
|
return this._opts.symbologyOverrides;
|
|
115648
115745
|
}
|
|
@@ -115673,6 +115770,7 @@ class BranchState {
|
|
|
115673
115770
|
appearanceProvider: branch.appearanceProvider ?? (branch.branch.symbologyOverrides ? undefined : prev.appearanceProvider),
|
|
115674
115771
|
realityModelDisplaySettings: branch.branch.realityModelDisplaySettings ?? prev.realityModelDisplaySettings,
|
|
115675
115772
|
viewAttachmentId: branch.viewAttachmentId ?? prev.viewAttachmentId,
|
|
115773
|
+
groupNodeId: branch.branch.groupNodeId ?? prev.groupNodeId,
|
|
115676
115774
|
});
|
|
115677
115775
|
}
|
|
115678
115776
|
getFeatureAppearance(overrides, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId) {
|
|
@@ -120093,6 +120191,9 @@ class Branch extends Graphic {
|
|
|
120093
120191
|
this.branch.collectStatistics(stats);
|
|
120094
120192
|
}
|
|
120095
120193
|
shouldAddCommands(commands) {
|
|
120194
|
+
const group = commands.target.currentBranch.groupNodeId;
|
|
120195
|
+
if (undefined !== group && undefined !== this.branch.groupNodeId && this.branch.groupNodeId !== group)
|
|
120196
|
+
return false;
|
|
120096
120197
|
const nodeId = commands.target.getAnimationTransformNodeId(this.branch.animationNodeId);
|
|
120097
120198
|
return undefined === nodeId || nodeId === commands.target.currentAnimationTransformNodeId;
|
|
120098
120199
|
}
|
|
@@ -146819,12 +146920,39 @@ function createPatternGraphic(params, options) {
|
|
|
146819
146920
|
return branch.isEmpty ? undefined : options.system.createGraphicBranch(branch, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(), { clipVolume });
|
|
146820
146921
|
}
|
|
146821
146922
|
function createNodeGraphics(node, options) {
|
|
146923
|
+
if (undefined === node.groupId)
|
|
146924
|
+
return createPrimitivesNodeGraphics(node, options);
|
|
146822
146925
|
const graphics = [];
|
|
146926
|
+
for (const child of node.nodes) {
|
|
146927
|
+
graphics.push(...createPrimitivesNodeGraphics(child, options));
|
|
146928
|
+
}
|
|
146929
|
+
if (graphics.length === 0)
|
|
146930
|
+
return graphics;
|
|
146931
|
+
const branch = new _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_7__.GraphicBranch(true);
|
|
146932
|
+
branch.groupNodeId = node.groupId;
|
|
146933
|
+
branch.entries.push(...graphics);
|
|
146934
|
+
return [options.system.createBranch(branch, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity())];
|
|
146935
|
+
}
|
|
146936
|
+
function createPrimitivesNodeGraphics(node, options) {
|
|
146937
|
+
let graphics = [];
|
|
146823
146938
|
for (const primitive of node.primitives) {
|
|
146824
146939
|
const graphic = primitive.type === "pattern" ? createPatternGraphic(primitive.params, options) : createPrimitiveGraphic(primitive, options);
|
|
146825
146940
|
if (graphic)
|
|
146826
146941
|
graphics.push(graphic);
|
|
146827
146942
|
}
|
|
146943
|
+
if (!graphics.length)
|
|
146944
|
+
return graphics;
|
|
146945
|
+
if (undefined !== node.layerId) {
|
|
146946
|
+
const layerGraphic = 1 === graphics.length ? graphics[0] : options.system.createGraphicList(graphics);
|
|
146947
|
+
graphics = [options.system.createGraphicLayer(layerGraphic, node.layerId)];
|
|
146948
|
+
}
|
|
146949
|
+
else if (undefined !== node.animationNodeId) {
|
|
146950
|
+
const branch = new _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_7__.GraphicBranch(true);
|
|
146951
|
+
branch.animationId = node.animationId;
|
|
146952
|
+
branch.animationNodeId = node.animationNodeId;
|
|
146953
|
+
branch.entries.push(...graphics);
|
|
146954
|
+
graphics = [options.system.createBranch(branch, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity())];
|
|
146955
|
+
}
|
|
146828
146956
|
return graphics;
|
|
146829
146957
|
}
|
|
146830
146958
|
/** @internal */
|
|
@@ -146839,23 +146967,7 @@ async function decodeImdlGraphics(options) {
|
|
|
146839
146967
|
const system = options.system;
|
|
146840
146968
|
const graphics = [];
|
|
146841
146969
|
for (const node of options.document.nodes) {
|
|
146842
|
-
|
|
146843
|
-
if (nodeGraphics.length === 0)
|
|
146844
|
-
continue;
|
|
146845
|
-
if (undefined !== node.layerId) {
|
|
146846
|
-
const layerGraphic = 1 === nodeGraphics.length ? nodeGraphics[0] : system.createGraphicList(nodeGraphics);
|
|
146847
|
-
graphics.push(system.createGraphicLayer(layerGraphic, node.layerId));
|
|
146848
|
-
}
|
|
146849
|
-
else if (undefined !== node.animationNodeId) {
|
|
146850
|
-
const branch = new _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_7__.GraphicBranch(true);
|
|
146851
|
-
branch.animationId = node.animationId;
|
|
146852
|
-
branch.animationNodeId = node.animationNodeId;
|
|
146853
|
-
branch.entries.push(...nodeGraphics);
|
|
146854
|
-
graphics.push(system.createBranch(branch, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity()));
|
|
146855
|
-
}
|
|
146856
|
-
else {
|
|
146857
|
-
graphics.push(...nodeGraphics);
|
|
146858
|
-
}
|
|
146970
|
+
graphics.push(...createNodeGraphics(node, graphicsOptions));
|
|
146859
146971
|
}
|
|
146860
146972
|
switch (graphics.length) {
|
|
146861
146973
|
case 0: return undefined;
|
|
@@ -147034,6 +147146,7 @@ async function readImdlContent(args) {
|
|
|
147034
147146
|
maxVertexTableSize: _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.renderSystem.maxTextureSize,
|
|
147035
147147
|
omitEdges: false === args.loadEdges,
|
|
147036
147148
|
createUntransformedRootNode: args.containsTransformNodes,
|
|
147149
|
+
modelGroups: args.modelGroups,
|
|
147037
147150
|
};
|
|
147038
147151
|
const document = args.parseDocument ? (await args.parseDocument(parseOpts)) : (0,_common_imdl_ParseImdlDocument__WEBPACK_IMPORTED_MODULE_5__.parseImdlDocument)({ ...parseOpts, timeline: args.timeline });
|
|
147039
147152
|
if (isCanceled())
|
|
@@ -152492,6 +152605,7 @@ class TileDrawArgs {
|
|
|
152492
152605
|
this._appearanceProvider = params.appearanceProvider;
|
|
152493
152606
|
this.hiddenLineSettings = params.hiddenLineSettings;
|
|
152494
152607
|
this.animationTransformNodeId = params.animationTransformNodeId;
|
|
152608
|
+
this.groupNodeId = params.groupNodeId;
|
|
152495
152609
|
this.boundingRange = params.boundingRange;
|
|
152496
152610
|
this.maximumScreenSpaceError = params.maximumScreenSpaceError ?? 16; // 16 is Cesium's default.
|
|
152497
152611
|
// Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.
|
|
@@ -152570,6 +152684,12 @@ class TileDrawArgs {
|
|
|
152570
152684
|
let graphic = this.context.createGraphicBranch(graphics, this.location, opts);
|
|
152571
152685
|
if (undefined !== this.animationTransformNodeId)
|
|
152572
152686
|
graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);
|
|
152687
|
+
if (undefined !== this.groupNodeId) {
|
|
152688
|
+
const branch = new _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_2__.GraphicBranch();
|
|
152689
|
+
branch.add(graphic);
|
|
152690
|
+
branch.groupNodeId = this.groupNodeId;
|
|
152691
|
+
graphic = this.context.createGraphicBranch(branch, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.identity);
|
|
152692
|
+
}
|
|
152573
152693
|
return graphic;
|
|
152574
152694
|
}
|
|
152575
152695
|
/** Output graphics for all accumulated tiles. */
|
|
@@ -153794,12 +153914,17 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
|
|
|
153794
153914
|
appearanceProvider: this.getAppearanceProvider(tree),
|
|
153795
153915
|
hiddenLineSettings: this.getHiddenLineSettings(tree),
|
|
153796
153916
|
animationTransformNodeId: this.getAnimationTransformNodeId(tree),
|
|
153917
|
+
groupNodeId: this.getGroupNodeId(tree),
|
|
153797
153918
|
});
|
|
153798
153919
|
}
|
|
153799
153920
|
/** @internal */
|
|
153800
153921
|
getAnimationTransformNodeId(_tree) {
|
|
153801
153922
|
return undefined;
|
|
153802
153923
|
}
|
|
153924
|
+
/** @internal */
|
|
153925
|
+
getGroupNodeId(_tree) {
|
|
153926
|
+
return undefined;
|
|
153927
|
+
}
|
|
153803
153928
|
/** Supply transform from this tile tree reference's location to iModel coordinate space.
|
|
153804
153929
|
* @returns undefined if the TileTree is not yet loaded.
|
|
153805
153930
|
*/
|
|
@@ -177399,7 +177524,9 @@ class Geometry {
|
|
|
177399
177524
|
/**
|
|
177400
177525
|
* Clone an array whose members have type `T`, which implements the clone method.
|
|
177401
177526
|
* * If the clone method returns `undefined`, then `undefined` is forced into the cloned array.
|
|
177527
|
+
* @deprecated in 4.x. Use cloneArray.
|
|
177402
177528
|
*/
|
|
177529
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
177403
177530
|
static cloneMembers(array) {
|
|
177404
177531
|
if (array === undefined)
|
|
177405
177532
|
return undefined;
|
|
@@ -177409,6 +177536,18 @@ class Geometry {
|
|
|
177409
177536
|
}
|
|
177410
177537
|
return clonedArray;
|
|
177411
177538
|
}
|
|
177539
|
+
/**
|
|
177540
|
+
* Clone an array whose members have the cloneable type `T`.
|
|
177541
|
+
*/
|
|
177542
|
+
static cloneArray(array) {
|
|
177543
|
+
if (array === undefined)
|
|
177544
|
+
return undefined;
|
|
177545
|
+
const clonedArray = [];
|
|
177546
|
+
for (const element of array) {
|
|
177547
|
+
clonedArray.push(element.clone());
|
|
177548
|
+
}
|
|
177549
|
+
return clonedArray;
|
|
177550
|
+
}
|
|
177412
177551
|
}
|
|
177413
177552
|
/** Tolerance for small distances in metric coordinates. */
|
|
177414
177553
|
Geometry.smallMetricDistance = 1.0e-6;
|
|
@@ -188332,7 +188471,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188332
188471
|
/* harmony export */ "BSplineWrapMode": () => (/* reexport safe */ _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_108__.BSplineWrapMode),
|
|
188333
188472
|
/* harmony export */ "BagOfCurves": () => (/* reexport safe */ _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_64__.BagOfCurves),
|
|
188334
188473
|
/* harmony export */ "BarycentricTriangle": () => (/* reexport safe */ _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_3__.BarycentricTriangle),
|
|
188335
|
-
/* harmony export */ "BentleyGeometryFlatBuffer": () => (/* reexport safe */
|
|
188474
|
+
/* harmony export */ "BentleyGeometryFlatBuffer": () => (/* reexport safe */ _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_129__.BentleyGeometryFlatBuffer),
|
|
188336
188475
|
/* harmony export */ "Bezier1dNd": () => (/* reexport safe */ _bspline_Bezier1dNd__WEBPACK_IMPORTED_MODULE_98__.Bezier1dNd),
|
|
188337
188476
|
/* harmony export */ "BezierCoffs": () => (/* reexport safe */ _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_51__.BezierCoffs),
|
|
188338
188477
|
/* harmony export */ "BezierCurve3d": () => (/* reexport safe */ _bspline_BezierCurve3d__WEBPACK_IMPORTED_MODULE_100__.BezierCurve3d),
|
|
@@ -188381,7 +188520,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188381
188520
|
/* harmony export */ "CurveSearchStatus": () => (/* reexport safe */ _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_66__.CurveSearchStatus),
|
|
188382
188521
|
/* harmony export */ "CutLoop": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.CutLoop),
|
|
188383
188522
|
/* harmony export */ "CutLoopMergeContext": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.CutLoopMergeContext),
|
|
188384
|
-
/* harmony export */ "DeepCompare": () => (/* reexport safe */
|
|
188523
|
+
/* harmony export */ "DeepCompare": () => (/* reexport safe */ _serialization_DeepCompare__WEBPACK_IMPORTED_MODULE_127__.DeepCompare),
|
|
188385
188524
|
/* harmony export */ "Degree2PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.Degree2PowerPolynomial),
|
|
188386
188525
|
/* harmony export */ "Degree3PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.Degree3PowerPolynomial),
|
|
188387
188526
|
/* harmony export */ "Degree4PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.Degree4PowerPolynomial),
|
|
@@ -188391,6 +188530,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188391
188530
|
/* harmony export */ "EllipsoidPatch": () => (/* reexport safe */ _geometry3d_Ellipsoid__WEBPACK_IMPORTED_MODULE_5__.EllipsoidPatch),
|
|
188392
188531
|
/* harmony export */ "FacetFaceData": () => (/* reexport safe */ _polyface_FacetFaceData__WEBPACK_IMPORTED_MODULE_111__.FacetFaceData),
|
|
188393
188532
|
/* harmony export */ "FacetIntersectOptions": () => (/* reexport safe */ _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__.FacetIntersectOptions),
|
|
188533
|
+
/* harmony export */ "FacetLocationDetailPair": () => (/* reexport safe */ _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__.FacetLocationDetailPair),
|
|
188394
188534
|
/* harmony export */ "FrameBuilder": () => (/* reexport safe */ _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_6__.FrameBuilder),
|
|
188395
188535
|
/* harmony export */ "GaussMapper": () => (/* reexport safe */ _numerics_Quadrature__WEBPACK_IMPORTED_MODULE_56__.GaussMapper),
|
|
188396
188536
|
/* harmony export */ "GeodesicPathPoint": () => (/* reexport safe */ _geometry3d_Ellipsoid__WEBPACK_IMPORTED_MODULE_5__.GeodesicPathPoint),
|
|
@@ -188404,10 +188544,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188404
188544
|
/* harmony export */ "GrowableFloat64Array": () => (/* reexport safe */ _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_10__.GrowableFloat64Array),
|
|
188405
188545
|
/* harmony export */ "GrowableXYArray": () => (/* reexport safe */ _geometry3d_GrowableXYArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYArray),
|
|
188406
188546
|
/* harmony export */ "GrowableXYZArray": () => (/* reexport safe */ _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__.GrowableXYZArray),
|
|
188407
|
-
/* harmony export */ "
|
|
188408
|
-
/* harmony export */ "HalfEdgeGraph": () => (/* reexport safe */ _topology_Graph__WEBPACK_IMPORTED_MODULE_122__.HalfEdgeGraph),
|
|
188409
|
-
/* harmony export */ "HalfEdgeMask": () => (/* reexport safe */ _topology_Graph__WEBPACK_IMPORTED_MODULE_122__.HalfEdgeMask),
|
|
188410
|
-
/* harmony export */ "IModelJson": () => (/* reexport safe */ _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_125__.IModelJson),
|
|
188547
|
+
/* harmony export */ "IModelJson": () => (/* reexport safe */ _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_126__.IModelJson),
|
|
188411
188548
|
/* harmony export */ "ImplicitLineXY": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.ImplicitLineXY),
|
|
188412
188549
|
/* harmony export */ "IndexedCollectionInterval": () => (/* reexport safe */ _geometry3d_IndexedCollectionInterval__WEBPACK_IMPORTED_MODULE_13__.IndexedCollectionInterval),
|
|
188413
188550
|
/* harmony export */ "IndexedPolyface": () => (/* reexport safe */ _polyface_Polyface__WEBPACK_IMPORTED_MODULE_112__.IndexedPolyface),
|
|
@@ -188426,6 +188563,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188426
188563
|
/* harmony export */ "KnotVector": () => (/* reexport safe */ _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_108__.KnotVector),
|
|
188427
188564
|
/* harmony export */ "LineSegment3d": () => (/* reexport safe */ _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_72__.LineSegment3d),
|
|
188428
188565
|
/* harmony export */ "LineString3d": () => (/* reexport safe */ _curve_LineString3d__WEBPACK_IMPORTED_MODULE_73__.LineString3d),
|
|
188566
|
+
/* harmony export */ "LineString3dRangeTreeContext": () => (/* reexport safe */ _polyface_RangeTree_LineString3dRangeTreeContext__WEBPACK_IMPORTED_MODULE_122__.LineString3dRangeTreeContext),
|
|
188429
188567
|
/* harmony export */ "LinearSweep": () => (/* reexport safe */ _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_90__.LinearSweep),
|
|
188430
188568
|
/* harmony export */ "LongitudeLatitudeNumber": () => (/* reexport safe */ _geometry3d_LongitudeLatitudeAltitude__WEBPACK_IMPORTED_MODULE_2__.LongitudeLatitudeNumber),
|
|
188431
188569
|
/* harmony export */ "Loop": () => (/* reexport safe */ _curve_Loop__WEBPACK_IMPORTED_MODULE_74__.Loop),
|
|
@@ -188461,6 +188599,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188461
188599
|
/* harmony export */ "Point3dArray": () => (/* reexport safe */ _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_24__.Point3dArray),
|
|
188462
188600
|
/* harmony export */ "Point3dArrayCarrier": () => (/* reexport safe */ _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_25__.Point3dArrayCarrier),
|
|
188463
188601
|
/* harmony export */ "Point3dArrayPolygonOps": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.Point3dArrayPolygonOps),
|
|
188602
|
+
/* harmony export */ "Point3dArrayRangeTreeContext": () => (/* reexport safe */ _polyface_RangeTree_Point3dArrayRangeTreeContext__WEBPACK_IMPORTED_MODULE_121__.Point3dArrayRangeTreeContext),
|
|
188464
188603
|
/* harmony export */ "Point4d": () => (/* reexport safe */ _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_47__.Point4d),
|
|
188465
188604
|
/* harmony export */ "Point4dArray": () => (/* reexport safe */ _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_24__.Point4dArray),
|
|
188466
188605
|
/* harmony export */ "PointString3d": () => (/* reexport safe */ _curve_PointString3d__WEBPACK_IMPORTED_MODULE_80__.PointString3d),
|
|
@@ -188470,8 +188609,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188470
188609
|
/* harmony export */ "PolyfaceClip": () => (/* reexport safe */ _polyface_PolyfaceClip__WEBPACK_IMPORTED_MODULE_120__.PolyfaceClip),
|
|
188471
188610
|
/* harmony export */ "PolyfaceData": () => (/* reexport safe */ _polyface_PolyfaceData__WEBPACK_IMPORTED_MODULE_118__.PolyfaceData),
|
|
188472
188611
|
/* harmony export */ "PolyfaceQuery": () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_119__.PolyfaceQuery),
|
|
188612
|
+
/* harmony export */ "PolyfaceRangeTreeContext": () => (/* reexport safe */ _polyface_RangeTree_PolyfaceRangeTreeContext__WEBPACK_IMPORTED_MODULE_123__.PolyfaceRangeTreeContext),
|
|
188473
188613
|
/* harmony export */ "PolygonLocation": () => (/* reexport safe */ _Geometry__WEBPACK_IMPORTED_MODULE_36__.PolygonLocation),
|
|
188474
188614
|
/* harmony export */ "PolygonLocationDetail": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonLocationDetail),
|
|
188615
|
+
/* harmony export */ "PolygonLocationDetailPair": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonLocationDetailPair),
|
|
188475
188616
|
/* harmony export */ "PolygonOps": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonOps),
|
|
188476
188617
|
/* harmony export */ "PolylineOps": () => (/* reexport safe */ _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_26__.PolylineOps),
|
|
188477
188618
|
/* harmony export */ "PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.PowerPolynomial),
|
|
@@ -188492,24 +188633,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188492
188633
|
/* harmony export */ "RegionOps": () => (/* reexport safe */ _curve_RegionOps__WEBPACK_IMPORTED_MODULE_79__.RegionOps),
|
|
188493
188634
|
/* harmony export */ "RotationalSweep": () => (/* reexport safe */ _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_91__.RotationalSweep),
|
|
188494
188635
|
/* harmony export */ "RuledSweep": () => (/* reexport safe */ _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_92__.RuledSweep),
|
|
188495
|
-
/* harmony export */ "Sample": () => (/* reexport safe */
|
|
188636
|
+
/* harmony export */ "Sample": () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__.Sample),
|
|
188496
188637
|
/* harmony export */ "Segment1d": () => (/* reexport safe */ _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_31__.Segment1d),
|
|
188497
188638
|
/* harmony export */ "SineCosinePolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SineCosinePolynomial),
|
|
188498
188639
|
/* harmony export */ "SmallSystem": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SmallSystem),
|
|
188499
188640
|
/* harmony export */ "SmoothTransformBetweenFrusta": () => (/* reexport safe */ _geometry3d_FrustumAnimation__WEBPACK_IMPORTED_MODULE_7__.SmoothTransformBetweenFrusta),
|
|
188500
188641
|
/* harmony export */ "SolidPrimitive": () => (/* reexport safe */ _solid_SolidPrimitive__WEBPACK_IMPORTED_MODULE_93__.SolidPrimitive),
|
|
188501
|
-
/* harmony export */ "SpacePolygonTriangulation": () => (/* reexport safe */
|
|
188642
|
+
/* harmony export */ "SpacePolygonTriangulation": () => (/* reexport safe */ _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_125__.SpacePolygonTriangulation),
|
|
188502
188643
|
/* harmony export */ "Sphere": () => (/* reexport safe */ _solid_Sphere__WEBPACK_IMPORTED_MODULE_94__.Sphere),
|
|
188503
188644
|
/* harmony export */ "SphereImplicit": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SphereImplicit),
|
|
188504
188645
|
/* harmony export */ "StandardViewIndex": () => (/* reexport safe */ _Geometry__WEBPACK_IMPORTED_MODULE_36__.StandardViewIndex),
|
|
188505
|
-
/* harmony export */ "SteppedIndexFunctionFactory": () => (/* reexport safe */
|
|
188646
|
+
/* harmony export */ "SteppedIndexFunctionFactory": () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__.SteppedIndexFunctionFactory),
|
|
188506
188647
|
/* harmony export */ "StringifiedClipVector": () => (/* reexport safe */ _clipping_ClipVector__WEBPACK_IMPORTED_MODULE_43__.StringifiedClipVector),
|
|
188507
188648
|
/* harmony export */ "StrokeCountMap": () => (/* reexport safe */ _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_87__.StrokeCountMap),
|
|
188508
188649
|
/* harmony export */ "StrokeOptions": () => (/* reexport safe */ _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_82__.StrokeOptions),
|
|
188509
188650
|
/* harmony export */ "SweepContour": () => (/* reexport safe */ _solid_SweepContour__WEBPACK_IMPORTED_MODULE_95__.SweepContour),
|
|
188510
188651
|
/* harmony export */ "SweepLineStringToFacetsOptions": () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_119__.SweepLineStringToFacetsOptions),
|
|
188511
|
-
/* harmony export */ "TaggedNumericConstants": () => (/* reexport safe */
|
|
188512
|
-
/* harmony export */ "TaggedNumericData": () => (/* reexport safe */
|
|
188652
|
+
/* harmony export */ "TaggedNumericConstants": () => (/* reexport safe */ _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_124__.TaggedNumericConstants),
|
|
188653
|
+
/* harmony export */ "TaggedNumericData": () => (/* reexport safe */ _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_124__.TaggedNumericData),
|
|
188513
188654
|
/* harmony export */ "TorusImplicit": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.TorusImplicit),
|
|
188514
188655
|
/* harmony export */ "TorusPipe": () => (/* reexport safe */ _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_96__.TorusPipe),
|
|
188515
188656
|
/* harmony export */ "Transform": () => (/* reexport safe */ _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_32__.Transform),
|
|
@@ -188517,7 +188658,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188517
188658
|
/* harmony export */ "TriDiagonalSystem": () => (/* reexport safe */ _numerics_TriDiagonalSystem__WEBPACK_IMPORTED_MODULE_58__.TriDiagonalSystem),
|
|
188518
188659
|
/* harmony export */ "TriangleLocationDetail": () => (/* reexport safe */ _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_3__.TriangleLocationDetail),
|
|
188519
188660
|
/* harmony export */ "TriangularFacetLocationDetail": () => (/* reexport safe */ _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__.TriangularFacetLocationDetail),
|
|
188520
|
-
/* harmony export */ "Triangulator": () => (/* reexport safe */ _topology_Triangulation__WEBPACK_IMPORTED_MODULE_123__.Triangulator),
|
|
188521
188661
|
/* harmony export */ "TrigPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.TrigPolynomial),
|
|
188522
188662
|
/* harmony export */ "UVSelect": () => (/* reexport safe */ _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_106__.UVSelect),
|
|
188523
188663
|
/* harmony export */ "UVSurfaceOps": () => (/* reexport safe */ _geometry3d_UVSurfaceOps__WEBPACK_IMPORTED_MODULE_33__.UVSurfaceOps),
|
|
@@ -188656,14 +188796,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188656
188796
|
/* harmony import */ var _polyface_PolyfaceData__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./polyface/PolyfaceData */ "../../core/geometry/lib/esm/polyface/PolyfaceData.js");
|
|
188657
188797
|
/* harmony import */ var _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./polyface/PolyfaceQuery */ "../../core/geometry/lib/esm/polyface/PolyfaceQuery.js");
|
|
188658
188798
|
/* harmony import */ var _polyface_PolyfaceClip__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./polyface/PolyfaceClip */ "../../core/geometry/lib/esm/polyface/PolyfaceClip.js");
|
|
188659
|
-
/* harmony import */ var
|
|
188660
|
-
/* harmony import */ var
|
|
188661
|
-
/* harmony import */ var
|
|
188662
|
-
/* harmony import */ var
|
|
188663
|
-
/* harmony import */ var
|
|
188664
|
-
/* harmony import */ var
|
|
188665
|
-
/* harmony import */ var
|
|
188666
|
-
/* harmony import */ var
|
|
188799
|
+
/* harmony import */ var _polyface_RangeTree_Point3dArrayRangeTreeContext__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./polyface/RangeTree/Point3dArrayRangeTreeContext */ "../../core/geometry/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js");
|
|
188800
|
+
/* harmony import */ var _polyface_RangeTree_LineString3dRangeTreeContext__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! ./polyface/RangeTree/LineString3dRangeTreeContext */ "../../core/geometry/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js");
|
|
188801
|
+
/* harmony import */ var _polyface_RangeTree_PolyfaceRangeTreeContext__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! ./polyface/RangeTree/PolyfaceRangeTreeContext */ "../../core/geometry/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js");
|
|
188802
|
+
/* harmony import */ var _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(/*! ./polyface/TaggedNumericData */ "../../core/geometry/lib/esm/polyface/TaggedNumericData.js");
|
|
188803
|
+
/* harmony import */ var _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(/*! ./topology/SpaceTriangulation */ "../../core/geometry/lib/esm/topology/SpaceTriangulation.js");
|
|
188804
|
+
/* harmony import */ var _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(/*! ./serialization/IModelJsonSchema */ "../../core/geometry/lib/esm/serialization/IModelJsonSchema.js");
|
|
188805
|
+
/* harmony import */ var _serialization_DeepCompare__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(/*! ./serialization/DeepCompare */ "../../core/geometry/lib/esm/serialization/DeepCompare.js");
|
|
188806
|
+
/* harmony import */ var _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(/*! ./serialization/GeometrySamples */ "../../core/geometry/lib/esm/serialization/GeometrySamples.js");
|
|
188807
|
+
/* harmony import */ var _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./serialization/BentleyGeometryFlatBuffer */ "../../core/geometry/lib/esm/serialization/BentleyGeometryFlatBuffer.js");
|
|
188667
188808
|
/*---------------------------------------------------------------------------------------------
|
|
188668
188809
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
188669
188810
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -188914,6 +189055,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188914
189055
|
|
|
188915
189056
|
|
|
188916
189057
|
|
|
189058
|
+
|
|
188917
189059
|
|
|
188918
189060
|
|
|
188919
189061
|
/***/ }),
|
|
@@ -190797,7 +190939,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
190797
190939
|
const distanceA = startFraction * this._totalLength;
|
|
190798
190940
|
const distanceB = distanceA + signedDistance;
|
|
190799
190941
|
const fragmentB = this.chainDistanceToFragment(distanceB, true);
|
|
190800
|
-
const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result); // local detail related to the child curve
|
|
190942
|
+
const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result?.childDetail); // local detail related to the child curve
|
|
190801
190943
|
const endFraction = startFraction + (signedDistance / this._totalLength);
|
|
190802
190944
|
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__.CurveLocationDetail.createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result); // global detail related to the curve chain
|
|
190803
190945
|
chainDetail.childDetail = childDetail;
|
|
@@ -190908,8 +191050,8 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
190908
191050
|
}
|
|
190909
191051
|
/**
|
|
190910
191052
|
* Compute the global chain detail corresponding to a local child detail.
|
|
190911
|
-
* @param childDetail the local detail,
|
|
190912
|
-
* @returns
|
|
191053
|
+
* @param childDetail the local (fragment) detail, captured.
|
|
191054
|
+
* @returns newly allocated global (chain) detail with `childDetail` field pointing to the input, and `a` field copied from the input
|
|
190913
191055
|
*/
|
|
190914
191056
|
computeChainDetail(childDetail) {
|
|
190915
191057
|
if (!childDetail.curve)
|
|
@@ -191555,8 +191697,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
191555
191697
|
* @module Curve
|
|
191556
191698
|
*/
|
|
191557
191699
|
|
|
191558
|
-
/**
|
|
191559
|
-
/** enumeration of condition for extending a curve beyond start or end point.
|
|
191700
|
+
/** Enumeration of condition for extending a curve beyond start or end point.
|
|
191560
191701
|
* * Not all CurvePrimitives support these modes.
|
|
191561
191702
|
* @public
|
|
191562
191703
|
*/
|
|
@@ -191573,10 +191714,12 @@ var CurveExtendMode;
|
|
|
191573
191714
|
* @public
|
|
191574
191715
|
*/
|
|
191575
191716
|
class CurveExtendOptions {
|
|
191576
|
-
/**
|
|
191577
|
-
*
|
|
191578
|
-
* *
|
|
191579
|
-
* * Return
|
|
191717
|
+
/**
|
|
191718
|
+
* Given an VariantCurveExtendParameter, isolate the particular CurveExtendMode in effect at an end.
|
|
191719
|
+
* * Return `CurveExtendMode.None` if `param === false`.
|
|
191720
|
+
* * Return `CurveExtendMode.OnCurve` if `param === true`.
|
|
191721
|
+
* * Return the param if it is a single CurveExtendMode.
|
|
191722
|
+
* * Return dereferenced array at entry `endIndex` if the param is an array of CurveExtendMode.
|
|
191580
191723
|
*/
|
|
191581
191724
|
static resolveVariantCurveExtendParameterToCurveExtendMode(param, endIndex) {
|
|
191582
191725
|
if (param === false)
|
|
@@ -192343,17 +192486,14 @@ var CurveSearchStatus;
|
|
|
192343
192486
|
CurveSearchStatus[CurveSearchStatus["stoppedAtBoundary"] = 2] = "stoppedAtBoundary";
|
|
192344
192487
|
})(CurveSearchStatus || (CurveSearchStatus = {}));
|
|
192345
192488
|
/**
|
|
192346
|
-
* Use to update a
|
|
192489
|
+
* Use to update a cloneable object when source and/or prior result are possibly undefined.
|
|
192347
192490
|
* * Any undefined source returns undefined.
|
|
192348
192491
|
* * For defined source, reuse optional result if available.
|
|
192349
192492
|
* @param source optional source
|
|
192350
192493
|
* @param result optional result
|
|
192351
192494
|
*/
|
|
192352
|
-
function
|
|
192353
|
-
|
|
192354
|
-
return source.clone(result);
|
|
192355
|
-
}
|
|
192356
|
-
return undefined;
|
|
192495
|
+
function optionalUpdate(source, result) {
|
|
192496
|
+
return source ? source.clone(result) : undefined;
|
|
192357
192497
|
}
|
|
192358
192498
|
/**
|
|
192359
192499
|
* CurveLocationDetail carries point and parameter data about a point evaluated on a curve.
|
|
@@ -192420,10 +192560,11 @@ class CurveLocationDetail {
|
|
|
192420
192560
|
result.curve = this.curve;
|
|
192421
192561
|
result.fraction = this.fraction;
|
|
192422
192562
|
result.fraction1 = this.fraction1;
|
|
192423
|
-
result.point1 = this.point1;
|
|
192563
|
+
result.point1 = optionalUpdate(this.point1, result.point1);
|
|
192424
192564
|
result.point.setFromPoint3d(this.point);
|
|
192425
|
-
result.vectorInCurveLocationDetail =
|
|
192565
|
+
result.vectorInCurveLocationDetail = optionalUpdate(this.vectorInCurveLocationDetail, result.vectorInCurveLocationDetail);
|
|
192426
192566
|
result.a = this.a;
|
|
192567
|
+
result.childDetail = optionalUpdate(this.childDetail, result.childDetail);
|
|
192427
192568
|
result.curveSearchStatus = this.curveSearchStatus;
|
|
192428
192569
|
return result;
|
|
192429
192570
|
}
|
|
@@ -192438,8 +192579,8 @@ class CurveLocationDetail {
|
|
|
192438
192579
|
*/
|
|
192439
192580
|
setFP(fraction, point, vector, a = 0.0) {
|
|
192440
192581
|
this.fraction = fraction;
|
|
192441
|
-
this.point.
|
|
192442
|
-
this.vectorInCurveLocationDetail =
|
|
192582
|
+
this.point.setFromPoint3d(point);
|
|
192583
|
+
this.vectorInCurveLocationDetail = optionalUpdate(vector, this.vectorInCurveLocationDetail);
|
|
192443
192584
|
this.a = a;
|
|
192444
192585
|
}
|
|
192445
192586
|
/**
|
|
@@ -192475,6 +192616,7 @@ class CurveLocationDetail {
|
|
|
192475
192616
|
result.point.setFromPoint3d(point);
|
|
192476
192617
|
result.vectorInCurveLocationDetail = undefined;
|
|
192477
192618
|
result.a = 0.0;
|
|
192619
|
+
result.childDetail = undefined;
|
|
192478
192620
|
result.curveSearchStatus = undefined;
|
|
192479
192621
|
return result;
|
|
192480
192622
|
}
|
|
@@ -192494,6 +192636,7 @@ class CurveLocationDetail {
|
|
|
192494
192636
|
result.point.setFromPoint3d(point);
|
|
192495
192637
|
result.vectorInCurveLocationDetail = undefined;
|
|
192496
192638
|
result.a = distance;
|
|
192639
|
+
result.childDetail = undefined;
|
|
192497
192640
|
result.curveSearchStatus = status;
|
|
192498
192641
|
return result;
|
|
192499
192642
|
}
|
|
@@ -192517,9 +192660,10 @@ class CurveLocationDetail {
|
|
|
192517
192660
|
result = result ? result : new CurveLocationDetail();
|
|
192518
192661
|
result.curve = curve;
|
|
192519
192662
|
result.fraction = endFraction;
|
|
192520
|
-
|
|
192663
|
+
curve.fractionToPoint(endFraction, result.point);
|
|
192521
192664
|
result.vectorInCurveLocationDetail = undefined;
|
|
192522
192665
|
result.a = a;
|
|
192666
|
+
result.childDetail = undefined;
|
|
192523
192667
|
result.curveSearchStatus = status;
|
|
192524
192668
|
return result;
|
|
192525
192669
|
}
|
|
@@ -192528,10 +192672,11 @@ class CurveLocationDetail {
|
|
|
192528
192672
|
result = result ? result : new CurveLocationDetail();
|
|
192529
192673
|
result.curve = curve;
|
|
192530
192674
|
result.fraction = fraction;
|
|
192531
|
-
|
|
192675
|
+
curve.fractionToPoint(fraction, result.point);
|
|
192532
192676
|
result.vectorInCurveLocationDetail = undefined;
|
|
192533
|
-
result.curveSearchStatus = undefined;
|
|
192534
192677
|
result.a = 0.0;
|
|
192678
|
+
result.childDetail = undefined;
|
|
192679
|
+
result.curveSearchStatus = undefined;
|
|
192535
192680
|
return result;
|
|
192536
192681
|
}
|
|
192537
192682
|
/** Create with CurvePrimitive pointer and fraction for evaluation. */
|
|
@@ -192540,10 +192685,11 @@ class CurveLocationDetail {
|
|
|
192540
192685
|
result.curve = curve;
|
|
192541
192686
|
result.fraction = fraction;
|
|
192542
192687
|
const ray = curve.fractionToPointAndDerivative(fraction);
|
|
192543
|
-
result.point
|
|
192688
|
+
result.point.setFromPoint3d(ray.origin);
|
|
192544
192689
|
result.vectorInCurveLocationDetail = ray.direction;
|
|
192545
|
-
result.curveSearchStatus = undefined;
|
|
192546
192690
|
result.a = 0.0;
|
|
192691
|
+
result.childDetail = undefined;
|
|
192692
|
+
result.curveSearchStatus = undefined;
|
|
192547
192693
|
return result;
|
|
192548
192694
|
}
|
|
192549
192695
|
/** Create with CurvePrimitive pointer and 2 fractions for evaluation. */
|
|
@@ -192551,12 +192697,13 @@ class CurveLocationDetail {
|
|
|
192551
192697
|
result = result ? result : new CurveLocationDetail();
|
|
192552
192698
|
result.curve = curve;
|
|
192553
192699
|
result.fraction = fraction0;
|
|
192554
|
-
|
|
192700
|
+
curve.fractionToPoint(fraction0, result.point);
|
|
192555
192701
|
result.fraction1 = fraction1;
|
|
192556
|
-
result.point1 = curve.fractionToPoint(fraction1);
|
|
192702
|
+
result.point1 = curve.fractionToPoint(fraction1, result.point1);
|
|
192557
192703
|
result.vectorInCurveLocationDetail = undefined;
|
|
192558
|
-
result.curveSearchStatus = undefined;
|
|
192559
192704
|
result.a = 0.0;
|
|
192705
|
+
result.childDetail = undefined;
|
|
192706
|
+
result.curveSearchStatus = undefined;
|
|
192560
192707
|
return result;
|
|
192561
192708
|
}
|
|
192562
192709
|
/** Create with CurvePrimitive pointer, fraction, and point coordinates. */
|
|
@@ -192567,6 +192714,7 @@ class CurveLocationDetail {
|
|
|
192567
192714
|
result.point.setFromPoint3d(point);
|
|
192568
192715
|
result.vectorInCurveLocationDetail = undefined;
|
|
192569
192716
|
result.a = a;
|
|
192717
|
+
result.childDetail = undefined;
|
|
192570
192718
|
result.curveSearchStatus = undefined;
|
|
192571
192719
|
return result;
|
|
192572
192720
|
}
|
|
@@ -193869,21 +194017,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193869
194017
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
193870
194018
|
/* harmony export */ "LineSegment3d": () => (/* binding */ LineSegment3d)
|
|
193871
194019
|
/* harmony export */ });
|
|
193872
|
-
/* harmony import */ var
|
|
193873
|
-
/* harmony import */ var
|
|
193874
|
-
/* harmony import */ var
|
|
193875
|
-
/* harmony import */ var
|
|
193876
|
-
/* harmony import */ var
|
|
193877
|
-
/* harmony import */ var
|
|
193878
|
-
/* harmony import */ var
|
|
193879
|
-
/* harmony import */ var
|
|
193880
|
-
/* harmony import */ var
|
|
193881
|
-
/* harmony import */ var
|
|
193882
|
-
/* harmony import */ var
|
|
194020
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
194021
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
194022
|
+
/* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
|
|
194023
|
+
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
194024
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
194025
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
194026
|
+
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
194027
|
+
/* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
|
|
194028
|
+
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
194029
|
+
/* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
194030
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
194031
|
+
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
194032
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
194033
|
+
/* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
|
|
193883
194034
|
/*---------------------------------------------------------------------------------------------
|
|
193884
194035
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
193885
194036
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
193886
194037
|
*--------------------------------------------------------------------------------------------*/
|
|
194038
|
+
/** @packageDocumentation
|
|
194039
|
+
* @module Curve
|
|
194040
|
+
*/
|
|
194041
|
+
|
|
194042
|
+
|
|
194043
|
+
|
|
193887
194044
|
|
|
193888
194045
|
|
|
193889
194046
|
|
|
@@ -193910,7 +194067,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193910
194067
|
* ```
|
|
193911
194068
|
* @public
|
|
193912
194069
|
*/
|
|
193913
|
-
class LineSegment3d extends
|
|
194070
|
+
class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive {
|
|
193914
194071
|
/** Test if `other` is of class `LineSegment3d` */
|
|
193915
194072
|
isSameGeometryClass(other) {
|
|
193916
194073
|
return other instanceof LineSegment3d;
|
|
@@ -193978,7 +194135,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
193978
194135
|
}
|
|
193979
194136
|
/** Return the point and derivative vector at fractional position along the line segment. */
|
|
193980
194137
|
fractionToPointAndDerivative(fraction, result) {
|
|
193981
|
-
result = result ? result :
|
|
194138
|
+
result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_2__.Ray3d.createZero();
|
|
193982
194139
|
result.direction.setStartEnd(this._point0, this._point1);
|
|
193983
194140
|
this._point0.interpolate(fraction, this._point1, result.origin);
|
|
193984
194141
|
return result;
|
|
@@ -193990,7 +194147,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
193990
194147
|
* * y axis is the second derivative, i.e. 000
|
|
193991
194148
|
*/
|
|
193992
194149
|
fractionToPointAnd2Derivatives(fraction, result) {
|
|
193993
|
-
result = result ? result :
|
|
194150
|
+
result = result ? result : _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_3__.Plane3dByOriginAndVectors.createXYPlane();
|
|
193994
194151
|
result.vectorU.setStartEnd(this._point0, this._point1);
|
|
193995
194152
|
result.vectorV.set(0, 0, 0);
|
|
193996
194153
|
this._point0.interpolate(fraction, this._point1, result.origin);
|
|
@@ -194033,7 +194190,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194033
194190
|
result._point1.set(x1, y1, z);
|
|
194034
194191
|
return result;
|
|
194035
194192
|
}
|
|
194036
|
-
return new LineSegment3d(
|
|
194193
|
+
return new LineSegment3d(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create(x0, y0, z), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create(x1, y1, z));
|
|
194037
194194
|
}
|
|
194038
194195
|
/**
|
|
194039
194196
|
* Create a LineSegment3d from xy coordinates of start and end, with common z.
|
|
@@ -194050,7 +194207,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194050
194207
|
result._point1.set(x1, y1, z1);
|
|
194051
194208
|
return result;
|
|
194052
194209
|
}
|
|
194053
|
-
return new LineSegment3d(
|
|
194210
|
+
return new LineSegment3d(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create(x0, y0, z0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create(x1, y1, z1));
|
|
194054
194211
|
}
|
|
194055
194212
|
/** Return the point at fractional position along the line segment. */
|
|
194056
194213
|
fractionToPoint(fraction, result) {
|
|
@@ -194073,19 +194230,118 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194073
194230
|
* @param spacePoint point in space
|
|
194074
194231
|
* @param extend if false, only return points within the bounded line segment. If true, allow the point to be on
|
|
194075
194232
|
* the unbounded line that contains the bounded segment.
|
|
194233
|
+
* @param result optional pre-allocated object to populate and return
|
|
194234
|
+
* @returns detail, with `a` field set to the distance from `spacePoint` to the closest point
|
|
194076
194235
|
*/
|
|
194077
194236
|
closestPoint(spacePoint, extend, result) {
|
|
194078
194237
|
let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);
|
|
194079
|
-
fraction =
|
|
194080
|
-
result =
|
|
194081
|
-
// remark: This can be done by result.setFP (fraction, thePoint, undefined, a)
|
|
194082
|
-
// but that creates a temporary point.
|
|
194238
|
+
fraction = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__.CurveExtendOptions.correctFraction(extend, fraction);
|
|
194239
|
+
result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.create(this, result);
|
|
194083
194240
|
result.fraction = fraction;
|
|
194084
194241
|
this._point0.interpolate(fraction, this._point1, result.point);
|
|
194085
194242
|
result.vectorInCurveLocationDetail = undefined;
|
|
194086
194243
|
result.a = result.point.distance(spacePoint);
|
|
194087
194244
|
return result;
|
|
194088
194245
|
}
|
|
194246
|
+
/**
|
|
194247
|
+
* Compute the closest approach between a pair of line segments.
|
|
194248
|
+
* * The approach distance is returned in the `a` fields of the details.
|
|
194249
|
+
* @param segmentA first line segment
|
|
194250
|
+
* @param extendA how to extend segmentA forward/backward
|
|
194251
|
+
* @param segmentB second line segment
|
|
194252
|
+
* @param extendB how to extend segmentB forward/backward
|
|
194253
|
+
* @param result optional pre-allocated object to populate and return
|
|
194254
|
+
* @returns pair of details, one per segment, each with `a` field set to the closest approach distance
|
|
194255
|
+
*/
|
|
194256
|
+
static closestApproach(segmentA, extendA, segmentB, extendB, result) {
|
|
194257
|
+
const unboundedFractions = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_7__.Vector2d.create();
|
|
194258
|
+
if (result === undefined)
|
|
194259
|
+
result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetailPair.createCapture(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.create(), _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.create());
|
|
194260
|
+
if (_numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dClosestApproachUnbounded(segmentA._point0, segmentA._point1, segmentB._point0, segmentB._point1, unboundedFractions)) {
|
|
194261
|
+
// There is a simple approach between the unbounded segments. Maybe its a really easy case ...
|
|
194262
|
+
const fractionA = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__.CurveExtendOptions.correctFraction(extendA, unboundedFractions.x);
|
|
194263
|
+
const fractionB = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__.CurveExtendOptions.correctFraction(extendB, unboundedFractions.y);
|
|
194264
|
+
// if neither fraction was corrected, just accept !!!
|
|
194265
|
+
if (fractionA === unboundedFractions.x && fractionB === unboundedFractions.y) {
|
|
194266
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentA, fractionA, result.detailA);
|
|
194267
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentB, fractionB, result.detailB);
|
|
194268
|
+
result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);
|
|
194269
|
+
return result;
|
|
194270
|
+
}
|
|
194271
|
+
// One or both of the fractions were clamped back to an endpoint.
|
|
194272
|
+
// Claim: (????!!!????) The only proximity candidates that matter are from clamped point onto the other.
|
|
194273
|
+
if (fractionA !== unboundedFractions.x && fractionB !== unboundedFractions.y) {
|
|
194274
|
+
// Fill in (in the result) both individual details with "projected" points and distance.
|
|
194275
|
+
// The "loser" will have its contents replaced.
|
|
194276
|
+
const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;
|
|
194277
|
+
const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;
|
|
194278
|
+
segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);
|
|
194279
|
+
segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);
|
|
194280
|
+
if (result.detailA.a <= result.detailB.a) {
|
|
194281
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveFractionPoint(segmentB, fractionB, clampedPointOnB, result.detailB);
|
|
194282
|
+
}
|
|
194283
|
+
else {
|
|
194284
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveFractionPoint(segmentA, fractionA, clampedPointOnA, result.detailA);
|
|
194285
|
+
}
|
|
194286
|
+
}
|
|
194287
|
+
else if (fractionB !== unboundedFractions.y) {
|
|
194288
|
+
// B (only) was clamped.
|
|
194289
|
+
const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;
|
|
194290
|
+
segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);
|
|
194291
|
+
result.detailB.setCurve(segmentB);
|
|
194292
|
+
result.detailB.point.setFrom(clampedPointOnB);
|
|
194293
|
+
result.detailB.fraction = fractionB;
|
|
194294
|
+
}
|
|
194295
|
+
else {
|
|
194296
|
+
// fractionA was clamped.
|
|
194297
|
+
const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;
|
|
194298
|
+
segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);
|
|
194299
|
+
result.detailA.setCurve(segmentA);
|
|
194300
|
+
result.detailA.point.setFrom(clampedPointOnA);
|
|
194301
|
+
result.detailA.fraction = fractionA;
|
|
194302
|
+
}
|
|
194303
|
+
result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);
|
|
194304
|
+
return result;
|
|
194305
|
+
}
|
|
194306
|
+
// (probably? certainly?) parallel (possibly coincident) lines.
|
|
194307
|
+
// run all 4 endpoint-to-other cases . . . reassemble carefully ...
|
|
194308
|
+
const resultSet = [
|
|
194309
|
+
segmentA.closestPoint(segmentB._point0, extendA),
|
|
194310
|
+
segmentA.closestPoint(segmentB._point1, extendA),
|
|
194311
|
+
segmentB.closestPoint(segmentA._point0, extendB),
|
|
194312
|
+
segmentB.closestPoint(segmentA._point1, extendB),
|
|
194313
|
+
];
|
|
194314
|
+
let dMin = resultSet[0].a;
|
|
194315
|
+
let iMin = 0;
|
|
194316
|
+
for (let i = 1; i < 4; i++) {
|
|
194317
|
+
if (resultSet[i].a < dMin) {
|
|
194318
|
+
iMin = i;
|
|
194319
|
+
dMin = resultSet[i].a;
|
|
194320
|
+
}
|
|
194321
|
+
}
|
|
194322
|
+
if (iMin === 0) {
|
|
194323
|
+
resultSet[0].clone(result.detailA);
|
|
194324
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 0.0, result.detailB);
|
|
194325
|
+
result.detailB.a = result.detailA.a;
|
|
194326
|
+
}
|
|
194327
|
+
else if (iMin === 1) {
|
|
194328
|
+
resultSet[1].clone(result.detailA);
|
|
194329
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 1.0, result.detailB);
|
|
194330
|
+
result.detailB.a = result.detailA.a;
|
|
194331
|
+
}
|
|
194332
|
+
else if (iMin === 2) {
|
|
194333
|
+
resultSet[2].clone(result.detailB);
|
|
194334
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 0.0, result.detailA);
|
|
194335
|
+
result.detailA.a = result.detailB.a;
|
|
194336
|
+
}
|
|
194337
|
+
else {
|
|
194338
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(iMin === 3);
|
|
194339
|
+
resultSet[3].clone(result.detailB);
|
|
194340
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 1.0, result.detailA);
|
|
194341
|
+
result.detailA.a = result.detailB.a;
|
|
194342
|
+
}
|
|
194343
|
+
return result;
|
|
194344
|
+
}
|
|
194089
194345
|
/** Swap the endpoint references. */
|
|
194090
194346
|
reverseInPlace() {
|
|
194091
194347
|
const a = this._point0;
|
|
@@ -194100,8 +194356,8 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194100
194356
|
}
|
|
194101
194357
|
/** Test if both endpoints are in a plane (within tolerance) */
|
|
194102
194358
|
isInPlane(plane) {
|
|
194103
|
-
return
|
|
194104
|
-
&&
|
|
194359
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_9__.Geometry.isSmallMetricDistance(plane.altitude(this._point0))
|
|
194360
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_9__.Geometry.isSmallMetricDistance(plane.altitude(this._point1));
|
|
194105
194361
|
}
|
|
194106
194362
|
/**
|
|
194107
194363
|
* Compute points of simple (transverse) with a plane.
|
|
@@ -194110,12 +194366,12 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194110
194366
|
appendPlaneIntersectionPoints(plane, result) {
|
|
194111
194367
|
const h0 = plane.altitude(this._point0);
|
|
194112
194368
|
const h1 = plane.altitude(this._point1);
|
|
194113
|
-
const fraction =
|
|
194369
|
+
const fraction = _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_10__.Order2Bezier.solveCoffs(h0, h1);
|
|
194114
194370
|
let numIntersection = 0;
|
|
194115
194371
|
if (fraction !== undefined) {
|
|
194116
194372
|
numIntersection++;
|
|
194117
|
-
const detail =
|
|
194118
|
-
detail.intervalRole =
|
|
194373
|
+
const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));
|
|
194374
|
+
detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveIntervalRole.isolated;
|
|
194119
194375
|
result.push(detail);
|
|
194120
194376
|
}
|
|
194121
194377
|
return numIntersection;
|
|
@@ -194174,7 +194430,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194174
194430
|
}
|
|
194175
194431
|
/** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */
|
|
194176
194432
|
static fromJSON(json) {
|
|
194177
|
-
const result = new LineSegment3d(
|
|
194433
|
+
const result = new LineSegment3d(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.createZero(), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create());
|
|
194178
194434
|
result.setFromJSON(json);
|
|
194179
194435
|
return result;
|
|
194180
194436
|
}
|
|
@@ -194238,7 +194494,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194238
194494
|
rangeBetweenFractions(fraction0, fraction1, transform) {
|
|
194239
194495
|
// (This is cheap -- don't bother testing for fraction0===fraction1)
|
|
194240
194496
|
if (!transform) {
|
|
194241
|
-
const range =
|
|
194497
|
+
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_11__.Range3d.create();
|
|
194242
194498
|
range.extendInterpolated(this._point0, fraction0, this._point1);
|
|
194243
194499
|
range.extendInterpolated(this._point0, fraction1, this._point1);
|
|
194244
194500
|
return range;
|
|
@@ -194249,17 +194505,17 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194249
194505
|
transform.multiplyPoint3d(point0, point0);
|
|
194250
194506
|
transform.multiplyPoint3d(point1, point1);
|
|
194251
194507
|
}
|
|
194252
|
-
return
|
|
194508
|
+
return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_11__.Range3d.create(point0, point1);
|
|
194253
194509
|
}
|
|
194254
194510
|
/**
|
|
194255
194511
|
* Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).
|
|
194256
194512
|
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
|
|
194257
194513
|
*/
|
|
194258
194514
|
constructOffsetXY(offsetDistanceOrOptions) {
|
|
194259
|
-
const offsetVec =
|
|
194515
|
+
const offsetVec = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d.createStartEnd(this._point0, this._point1);
|
|
194260
194516
|
if (offsetVec.normalizeInPlace()) {
|
|
194261
194517
|
offsetVec.rotate90CCWXY(offsetVec);
|
|
194262
|
-
const offsetDist =
|
|
194518
|
+
const offsetDist = _OffsetOptions__WEBPACK_IMPORTED_MODULE_12__.OffsetOptions.getOffsetDistance(offsetDistanceOrOptions);
|
|
194263
194519
|
return LineSegment3d.create(this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist));
|
|
194264
194520
|
}
|
|
194265
194521
|
return undefined;
|
|
@@ -194273,7 +194529,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194273
194529
|
* end of the ray.
|
|
194274
194530
|
*/
|
|
194275
194531
|
projectedParameterRange(ray, lowHigh) {
|
|
194276
|
-
return
|
|
194532
|
+
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
194277
194533
|
}
|
|
194278
194534
|
}
|
|
194279
194535
|
|
|
@@ -194330,7 +194586,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
194330
194586
|
|
|
194331
194587
|
|
|
194332
194588
|
|
|
194333
|
-
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
194334
194589
|
/**
|
|
194335
194590
|
* Starting with baseIndex and moving index by stepDirection:
|
|
194336
194591
|
* If the vector from baseIndex to baseIndex +1 crossed with vectorA can be normalized, accumulate it (scaled) to normal.
|
|
@@ -194449,10 +194704,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194449
194704
|
result.addPoints(points);
|
|
194450
194705
|
return result;
|
|
194451
194706
|
}
|
|
194452
|
-
/**
|
|
194453
|
-
* Create a linestring, capturing the given GrowableXYZArray as the points.
|
|
194454
|
-
* Point3d, Point2d, `[1,2,3]', array of any of those, or GrowableXYZArray
|
|
194455
|
-
*/
|
|
194707
|
+
/** Create a linestring, capturing the given GrowableXYZArray as the points. */
|
|
194456
194708
|
static createCapture(points) {
|
|
194457
194709
|
return new LineString3d(points);
|
|
194458
194710
|
}
|
|
@@ -194476,7 +194728,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194476
194728
|
return result;
|
|
194477
194729
|
}
|
|
194478
194730
|
/**
|
|
194479
|
-
* Add points to the linestring.
|
|
194731
|
+
* Add copies of points to the linestring.
|
|
194480
194732
|
* Valid inputs are:
|
|
194481
194733
|
* * a Point2d
|
|
194482
194734
|
* * a point3d
|
|
@@ -194862,24 +195114,33 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194862
195114
|
return result;
|
|
194863
195115
|
}
|
|
194864
195116
|
/**
|
|
194865
|
-
* Convert a segment index and local fraction to a global fraction.
|
|
195117
|
+
* Convert a segment index and local fraction to a global linestring fraction.
|
|
194866
195118
|
* @param index index of segment being evaluated
|
|
194867
195119
|
* @param localFraction local fraction in [0,1] within the segment
|
|
195120
|
+
* @param numSegment number N of segments in the linestring
|
|
194868
195121
|
* @return global fraction f in [0,1] such that the segment is parameterized by index/N <= f <= (index+1)/N.
|
|
194869
195122
|
*/
|
|
194870
|
-
|
|
194871
|
-
const numSegment = this._points.length - 1;
|
|
195123
|
+
static mapLocalToGlobalFraction(index, localFraction, numSegment) {
|
|
194872
195124
|
if (numSegment < 1)
|
|
194873
195125
|
return 0.0;
|
|
194874
195126
|
return (index + localFraction) / numSegment;
|
|
194875
195127
|
}
|
|
195128
|
+
/**
|
|
195129
|
+
* Convert a segment index and local fraction to a global linestring fraction.
|
|
195130
|
+
* @param index index of segment being evaluated
|
|
195131
|
+
* @param localFraction local fraction in [0,1] within the segment
|
|
195132
|
+
* @return global fraction f in [0,1] such that the segment is parameterized by index/N <= f <= (index+1)/N.
|
|
195133
|
+
*/
|
|
195134
|
+
segmentIndexAndLocalFractionToGlobalFraction(index, localFraction) {
|
|
195135
|
+
return LineString3d.mapLocalToGlobalFraction(index, localFraction, this._points.length - 1);
|
|
195136
|
+
}
|
|
194876
195137
|
/**
|
|
194877
195138
|
* Convert a global fraction to a segment index and local fraction.
|
|
194878
195139
|
* @param globalFraction a fraction f in [0,1] in the linestring parameterization, where the i_th segment
|
|
194879
195140
|
* (0 <= i < N) is parameterized by i/N <= f <= (i+1)/N.
|
|
195141
|
+
* @returns segment index and local fraction
|
|
194880
195142
|
*/
|
|
194881
|
-
|
|
194882
|
-
const numSegment = this._points.length - 1;
|
|
195143
|
+
static mapGlobalToLocalFraction(globalFraction, numSegment) {
|
|
194883
195144
|
if (numSegment < 1)
|
|
194884
195145
|
return { index: 0, fraction: 0.0 };
|
|
194885
195146
|
const scaledGlobalFraction = globalFraction * numSegment;
|
|
@@ -194890,8 +195151,17 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194890
195151
|
segmentIndex = numSegment - 1;
|
|
194891
195152
|
else // globalFraction in [0,1]
|
|
194892
195153
|
segmentIndex = Math.floor(scaledGlobalFraction);
|
|
194893
|
-
|
|
194894
|
-
|
|
195154
|
+
return { index: segmentIndex, fraction: scaledGlobalFraction - segmentIndex };
|
|
195155
|
+
}
|
|
195156
|
+
/**
|
|
195157
|
+
* Convert a global linestring fraction to a segment index and local fraction.
|
|
195158
|
+
* @param globalFraction a fraction f in [0,1] in the linestring parameterization, where the i_th segment
|
|
195159
|
+
* (0 <= i < N) is parameterized by i/N <= f <= (i+1)/N.
|
|
195160
|
+
* @param numSegment number N of segments in the linestring
|
|
195161
|
+
* @returns segment index and local fraction
|
|
195162
|
+
*/
|
|
195163
|
+
globalFractionToSegmentIndexAndLocalFraction(globalFraction) {
|
|
195164
|
+
return LineString3d.mapGlobalToLocalFraction(globalFraction, this._points.length - 1);
|
|
194895
195165
|
}
|
|
194896
195166
|
/** Return a frenet frame, using nearby points to estimate a plane. */
|
|
194897
195167
|
fractionToFrenetFrame(fraction, result) {
|
|
@@ -194972,6 +195242,10 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194972
195242
|
numPoints() {
|
|
194973
195243
|
return this._points.length;
|
|
194974
195244
|
}
|
|
195245
|
+
/** Return the number of edges in this linestring. */
|
|
195246
|
+
numEdges() {
|
|
195247
|
+
return this._points.length > 0 ? this._points.length - 1 : 0;
|
|
195248
|
+
}
|
|
194975
195249
|
/** Evaluate the end point of the linestring. */
|
|
194976
195250
|
endPoint() {
|
|
194977
195251
|
if (this._points.length === 0)
|
|
@@ -195557,9 +195831,9 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
195557
195831
|
return result;
|
|
195558
195832
|
}
|
|
195559
195833
|
/** Return (if possible) a specific segment of the linestring */
|
|
195560
|
-
getIndexedSegment(index) {
|
|
195834
|
+
getIndexedSegment(index, result) {
|
|
195561
195835
|
if (index >= 0 && index + 1 < this._points.length)
|
|
195562
|
-
return _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d.create(this._points.getPoint3dAtCheckedPointIndex(index), this._points.getPoint3dAtCheckedPointIndex(index + 1));
|
|
195836
|
+
return _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d.create(this._points.getPoint3dAtCheckedPointIndex(index), this._points.getPoint3dAtCheckedPointIndex(index + 1), result);
|
|
195563
195837
|
return undefined;
|
|
195564
195838
|
}
|
|
195565
195839
|
/** Returns true if first and last points are within metric tolerance. */
|
|
@@ -195669,6 +195943,26 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
195669
195943
|
projectedParameterRange(ray, lowHigh) {
|
|
195670
195944
|
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_18__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
195671
195945
|
}
|
|
195946
|
+
/**
|
|
195947
|
+
* Convert the segment detail to a linestring detail:
|
|
195948
|
+
* * `detail.childDetail` is set to a clone of the input segment detail (optionally populating pre-allocated `child` object).
|
|
195949
|
+
* * `childDetail.a` is set to `segmentIndex`.
|
|
195950
|
+
* * `detail.fraction` is set to the global linestring parameter.
|
|
195951
|
+
* * `detail.curve` is set to the parent linestring.
|
|
195952
|
+
* @param detail segment location detail, converted in place
|
|
195953
|
+
* @param segmentIndex index of segment in the linestring
|
|
195954
|
+
* @param numSegment linestring segment count
|
|
195955
|
+
* @param parent optional linestring primitive
|
|
195956
|
+
* @param child optional pre-allocated detail to use to clone the child data
|
|
195957
|
+
* @returns reference to input detail, with both linestring and segment data
|
|
195958
|
+
*/
|
|
195959
|
+
static convertLocalToGlobalDetail(detail, segmentIndex, numSegment, parent, child) {
|
|
195960
|
+
detail.childDetail = detail.clone(child);
|
|
195961
|
+
detail.childDetail.a = segmentIndex;
|
|
195962
|
+
detail.fraction = this.mapLocalToGlobalFraction(segmentIndex, detail.fraction, numSegment);
|
|
195963
|
+
detail.curve = parent;
|
|
195964
|
+
return detail;
|
|
195965
|
+
}
|
|
195672
195966
|
}
|
|
195673
195967
|
LineString3d._workPointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create();
|
|
195674
195968
|
LineString3d._workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create();
|
|
@@ -197263,10 +197557,10 @@ class PlanarSubdivision {
|
|
|
197263
197557
|
* * no action if start and end points are identical.
|
|
197264
197558
|
* @param graph containing graph.
|
|
197265
197559
|
* @param p the curve
|
|
197266
|
-
* @param fraction0 starting fraction
|
|
197267
197560
|
* @param point0 start point
|
|
197268
|
-
* @param
|
|
197561
|
+
* @param fraction0 starting fraction
|
|
197269
197562
|
* @param point1 end point
|
|
197563
|
+
* @param fraction1 end fraction
|
|
197270
197564
|
* @returns end point and fraction, or start point and fraction if no action
|
|
197271
197565
|
*/
|
|
197272
197566
|
static addHalfEdge(graph, p, point0, fraction0, point1, fraction1, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
|
|
@@ -199098,25 +199392,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
199098
199392
|
/* harmony export */ "RegionGroupOpType": () => (/* binding */ RegionGroupOpType),
|
|
199099
199393
|
/* harmony export */ "RegionOpsFaceToFaceSearch": () => (/* binding */ RegionOpsFaceToFaceSearch)
|
|
199100
199394
|
/* harmony export */ });
|
|
199395
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
199396
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
199397
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
199398
|
+
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
199101
199399
|
/* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
199102
199400
|
/* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
|
|
199103
199401
|
/* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
|
|
199104
199402
|
/* harmony import */ var _topology_RegularizeFace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../topology/RegularizeFace */ "../../core/geometry/lib/esm/topology/RegularizeFace.js");
|
|
199105
|
-
/* harmony import */ var
|
|
199106
|
-
/* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
|
|
199107
|
-
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
199403
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
199108
199404
|
/* harmony import */ var _CurveCurve__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./CurveCurve */ "../../core/geometry/lib/esm/curve/CurveCurve.js");
|
|
199109
|
-
/* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
|
|
199110
|
-
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
199111
|
-
/* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
|
|
199112
199405
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
199113
|
-
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
199114
|
-
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
199115
|
-
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
199116
|
-
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
199117
|
-
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
199118
199406
|
/* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
|
|
199119
|
-
/* harmony import */ var
|
|
199407
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
199408
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
199409
|
+
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
199410
|
+
/* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
|
|
199411
|
+
/* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
|
|
199412
|
+
/* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
|
|
199413
|
+
/* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
|
|
199120
199414
|
/*---------------------------------------------------------------------------------------------
|
|
199121
199415
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
199122
199416
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -212174,7 +212468,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
212174
212468
|
this.pushXY(p.x, p.y);
|
|
212175
212469
|
}
|
|
212176
212470
|
}
|
|
212177
|
-
/** Push points from variant sources.
|
|
212471
|
+
/** Push copies of points from variant sources.
|
|
212178
212472
|
* Valid inputs are:
|
|
212179
212473
|
* * Point2d
|
|
212180
212474
|
* * Point3d
|
|
@@ -212883,7 +213177,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
|
|
|
212883
213177
|
for (const p of points)
|
|
212884
213178
|
this.push(p);
|
|
212885
213179
|
}
|
|
212886
|
-
/** Push points from variant sources.
|
|
213180
|
+
/** Push copies of points from variant sources.
|
|
212887
213181
|
* Valid inputs are:
|
|
212888
213182
|
* * Point2d
|
|
212889
213183
|
* * Point3d
|
|
@@ -214087,6 +214381,19 @@ class IndexedXYZCollection {
|
|
|
214087
214381
|
return undefined;
|
|
214088
214382
|
return this.getPoint3dAtUncheckedPointIndex(this.length - 1, result);
|
|
214089
214383
|
}
|
|
214384
|
+
/**
|
|
214385
|
+
* Test whether the indexed points are equal within tolerance.
|
|
214386
|
+
* @param index0 index of first point
|
|
214387
|
+
* @param index1 index of second point
|
|
214388
|
+
* @param tolerance max coordinate difference to be considered equal. For exact test, pass 0. Defaults to `Geometry.smallMetricDistance`.
|
|
214389
|
+
*/
|
|
214390
|
+
almostEqualIndexIndex(index0, index1, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
214391
|
+
if (index0 < 0 || index0 >= this.length || index1 < 0 || index1 >= this.length)
|
|
214392
|
+
return undefined;
|
|
214393
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.getXAtUncheckedPointIndex(index0), this.getXAtUncheckedPointIndex(index1), tolerance)
|
|
214394
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.getYAtUncheckedPointIndex(index0), this.getYAtUncheckedPointIndex(index1), tolerance)
|
|
214395
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.getZAtUncheckedPointIndex(index0), this.getZAtUncheckedPointIndex(index1), tolerance);
|
|
214396
|
+
}
|
|
214090
214397
|
}
|
|
214091
214398
|
/**
|
|
214092
214399
|
* abstract base class extends IndexedXYZCollection, adding methods to push, peek, and pop, and rewrite.
|
|
@@ -221873,9 +222180,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
221873
222180
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
221874
222181
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
221875
222182
|
*--------------------------------------------------------------------------------------------*/
|
|
222183
|
+
/** @packageDocumentation
|
|
222184
|
+
* @module CartesianGeometry
|
|
222185
|
+
*/
|
|
221876
222186
|
|
|
221877
222187
|
|
|
221878
|
-
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
221879
222188
|
|
|
221880
222189
|
|
|
221881
222190
|
//
|
|
@@ -222067,12 +222376,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
222067
222376
|
/* harmony export */ "IndexedXYZCollectionPolygonOps": () => (/* binding */ IndexedXYZCollectionPolygonOps),
|
|
222068
222377
|
/* harmony export */ "Point3dArrayPolygonOps": () => (/* binding */ Point3dArrayPolygonOps),
|
|
222069
222378
|
/* harmony export */ "PolygonLocationDetail": () => (/* binding */ PolygonLocationDetail),
|
|
222379
|
+
/* harmony export */ "PolygonLocationDetailPair": () => (/* binding */ PolygonLocationDetailPair),
|
|
222070
222380
|
/* harmony export */ "PolygonOps": () => (/* binding */ PolygonOps)
|
|
222071
222381
|
/* harmony export */ });
|
|
222072
222382
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
222073
222383
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
222074
|
-
/* harmony import */ var
|
|
222075
|
-
/* harmony import */ var
|
|
222384
|
+
/* harmony import */ var _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry4d/Matrix4d */ "../../core/geometry/lib/esm/geometry4d/Matrix4d.js");
|
|
222385
|
+
/* harmony import */ var _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry4d/Point4d */ "../../core/geometry/lib/esm/geometry4d/Point4d.js");
|
|
222076
222386
|
/* harmony import */ var _topology_XYParitySearchContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../topology/XYParitySearchContext */ "../../core/geometry/lib/esm/topology/XYParitySearchContext.js");
|
|
222077
222387
|
/* harmony import */ var _FrameBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
|
|
222078
222388
|
/* harmony import */ var _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
|
|
@@ -222082,6 +222392,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
222082
222392
|
/* harmony import */ var _Point2dVector2d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
222083
222393
|
/* harmony import */ var _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
|
|
222084
222394
|
/* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
222395
|
+
/* harmony import */ var _PolylineOps__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./PolylineOps */ "../../core/geometry/lib/esm/geometry3d/PolylineOps.js");
|
|
222085
222396
|
/* harmony import */ var _Ray3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
222086
222397
|
/* harmony import */ var _SortablePolygon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
|
|
222087
222398
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -222106,6 +222417,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
222106
222417
|
|
|
222107
222418
|
|
|
222108
222419
|
|
|
222420
|
+
|
|
222109
222421
|
/**
|
|
222110
222422
|
* Carries data about a point in the plane of a polygon.
|
|
222111
222423
|
* @public
|
|
@@ -222159,6 +222471,51 @@ class PolygonLocationDetail {
|
|
|
222159
222471
|
this.code === _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonVertex || this.code === _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonEdgeInterior ||
|
|
222160
222472
|
this.code === _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.InsidePolygonProjectsToVertex || this.code === _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.InsidePolygonProjectsToEdgeInterior;
|
|
222161
222473
|
}
|
|
222474
|
+
/**
|
|
222475
|
+
* Set point, index, and fraction for an "at vertex" or "along edge" PolygonLocationDetail.
|
|
222476
|
+
* * Point is not captured; its coordinates are copied.
|
|
222477
|
+
*/
|
|
222478
|
+
static createAtVertexOrEdge(point, index, fraction = 0) {
|
|
222479
|
+
const detail = new PolygonLocationDetail();
|
|
222480
|
+
detail.point.setFrom(point);
|
|
222481
|
+
detail.closestEdgeIndex = index;
|
|
222482
|
+
detail.closestEdgeParam = fraction;
|
|
222483
|
+
fraction = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.clamp(fraction, 0, 1);
|
|
222484
|
+
detail.code = (fraction > 0 && fraction < 1) ? _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonEdgeInterior : _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonVertex;
|
|
222485
|
+
return detail;
|
|
222486
|
+
}
|
|
222487
|
+
}
|
|
222488
|
+
/**
|
|
222489
|
+
* A pair of PolygonLocationDetail.
|
|
222490
|
+
* @public
|
|
222491
|
+
*/
|
|
222492
|
+
class PolygonLocationDetailPair {
|
|
222493
|
+
/** Constructor, captures inputs */
|
|
222494
|
+
constructor(detailA, detailB) {
|
|
222495
|
+
this.detailA = detailA ? detailA : PolygonLocationDetail.create();
|
|
222496
|
+
this.detailB = detailB ? detailB : PolygonLocationDetail.create();
|
|
222497
|
+
}
|
|
222498
|
+
/** Create an instance by capturing inputs */
|
|
222499
|
+
static create(detailA, detailB, result) {
|
|
222500
|
+
if (!result)
|
|
222501
|
+
return new PolygonLocationDetailPair(detailA, detailB);
|
|
222502
|
+
result.detailA = detailA;
|
|
222503
|
+
result.detailB = detailB;
|
|
222504
|
+
return result;
|
|
222505
|
+
}
|
|
222506
|
+
/** Make a deep copy of this PolygonLocationDetailPair */
|
|
222507
|
+
clone(result) {
|
|
222508
|
+
result = result ? result : new PolygonLocationDetailPair();
|
|
222509
|
+
result.detailA.copyContentsFrom(this.detailA);
|
|
222510
|
+
result.detailB.copyContentsFrom(this.detailB);
|
|
222511
|
+
return result;
|
|
222512
|
+
}
|
|
222513
|
+
/** Swap the details of A, B */
|
|
222514
|
+
swapDetails() {
|
|
222515
|
+
const q = this.detailA;
|
|
222516
|
+
this.detailA = this.detailB;
|
|
222517
|
+
this.detailB = q;
|
|
222518
|
+
}
|
|
222162
222519
|
}
|
|
222163
222520
|
/**
|
|
222164
222521
|
* Carrier for a loop extracted from clip operation, annotated for sorting
|
|
@@ -222880,13 +223237,14 @@ class PolygonOps {
|
|
|
222880
223237
|
return sortedLoopsArray;
|
|
222881
223238
|
}
|
|
222882
223239
|
/** Compute the closest point on the polygon boundary to the given point.
|
|
223240
|
+
* * Compare to [[closestPoint]].
|
|
222883
223241
|
* @param polygon points of the polygon, closure point optional
|
|
222884
223242
|
* @param testPoint point p to project onto the polygon edges. Works best when p is in the plane of the polygon.
|
|
222885
223243
|
* @param tolerance optional distance tolerance to determine point-vertex and point-edge coincidence.
|
|
222886
223244
|
* @param result optional pre-allocated object to fill and return
|
|
222887
223245
|
* @returns details d of the closest point `d.point`:
|
|
222888
223246
|
* * `d.isValid()` returns true if and only if the polygon is nontrivial.
|
|
222889
|
-
* * `d.edgeIndex` and `d.edgeParam` specify the location of the closest point
|
|
223247
|
+
* * `d.edgeIndex` and `d.edgeParam` specify the location of the closest point.
|
|
222890
223248
|
* * `d.code` classifies the closest point as a vertex (`PolygonLocation.OnPolygonVertex`) or as a point on an edge (`PolygonLocation.OnPolygonEdgeInterior`).
|
|
222891
223249
|
* * `d.a` is the distance from testPoint to the closest point.
|
|
222892
223250
|
* * `d.v` can be used to classify p (if p and polygon are coplanar): if n is the polygon normal then `d.v.dotProduct(n)` is +/-/0 if and only if p is inside/outside/on the polygon.
|
|
@@ -222939,7 +223297,7 @@ class PolygonOps {
|
|
|
222939
223297
|
}
|
|
222940
223298
|
if (distToStart2 < minDist2) {
|
|
222941
223299
|
if (polygon.dotProductIndexIndexXYAndZ(iBase, iPrev, testPoint) <= 0.0) {
|
|
222942
|
-
// update candidate (to edge start) only if previous edge
|
|
223300
|
+
// update candidate (to edge start) only if testPoint projected beyond previous edge end
|
|
222943
223301
|
polygon.getPoint3dAtUncheckedPointIndex(iBase, result.point);
|
|
222944
223302
|
result.a = Math.sqrt(distToStart2);
|
|
222945
223303
|
polygon.crossProductIndexIndexIndex(iBase, iPrev, iNext, result.v);
|
|
@@ -223003,6 +223361,41 @@ class PolygonOps {
|
|
|
223003
223361
|
}
|
|
223004
223362
|
return result;
|
|
223005
223363
|
}
|
|
223364
|
+
/**
|
|
223365
|
+
* Compute the closest point on the polygon boundary or its interior to the given point.
|
|
223366
|
+
* * Compare to [[closestPointOnBoundary]].
|
|
223367
|
+
* @param polygon points of the polygon, closure point optional
|
|
223368
|
+
* @param testPoint point p to project onto the polygon edges. Works best when p is in the plane of the polygon.
|
|
223369
|
+
* @param tolerance optional distance tolerance for distinguishing boundary versus interior closest point.
|
|
223370
|
+
* @param result optional pre-allocated object to fill and return
|
|
223371
|
+
* @returns details d of the closest point `d.point`:
|
|
223372
|
+
* * `d.isValid()` returns true if and only if the polygon is nontrivial.
|
|
223373
|
+
* * `d.edgeIndex` and `d.edgeParam` specify the location of the (nearest) boundary point.
|
|
223374
|
+
* * `d.code` classifies the closest point: `PolygonLocation.OnPolygonVertex`, `PolygonLocation.OnPolygonEdgeInterior`, `PolygonLocation.InsidePolygonProjectsToVertex`, or `PolygonLocation.InsidePolygonProjectsToEdgeInterior`.
|
|
223375
|
+
* * `d.a` is the distance from testPoint to the closest point.
|
|
223376
|
+
*/
|
|
223377
|
+
static closestPoint(polygon, testPoint, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance, result) {
|
|
223378
|
+
if (!(polygon instanceof _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_5__.IndexedXYZCollection))
|
|
223379
|
+
return this.closestPoint(new _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_4__.Point3dArrayCarrier(polygon), testPoint, tolerance, result);
|
|
223380
|
+
if (!this.unitNormal(polygon, this._normal))
|
|
223381
|
+
return PolygonLocationDetail.create(result); // invalid
|
|
223382
|
+
const polygonPlane = this._workPlane = _Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_11__.Plane3dByOriginAndUnitNormal.createXYZUVW(polygon.getXAtUncheckedPointIndex(0), polygon.getYAtUncheckedPointIndex(0), polygon.getZAtUncheckedPointIndex(0), this._normal.x, this._normal.y, this._normal.z, this._workPlane);
|
|
223383
|
+
const planePoint = this._workXYZ = polygonPlane.projectPointToPlane(testPoint, this._workXYZ);
|
|
223384
|
+
result = this.closestPointOnBoundary(polygon, planePoint, tolerance, result);
|
|
223385
|
+
if (result.isValid) {
|
|
223386
|
+
const dot = result.v.dotProduct(this._normal);
|
|
223387
|
+
if (dot > 0.0) { // planePoint is inside, so return it instead of the closest boundary point
|
|
223388
|
+
result.point.setFrom(planePoint);
|
|
223389
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonVertex === result.code)
|
|
223390
|
+
result.code = _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.InsidePolygonProjectsToVertex;
|
|
223391
|
+
else if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonEdgeInterior === result.code)
|
|
223392
|
+
result.code = _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.InsidePolygonProjectsToEdgeInterior;
|
|
223393
|
+
}
|
|
223394
|
+
result.a = testPoint.distance(result.point);
|
|
223395
|
+
result.v.setZero(); // not relevant
|
|
223396
|
+
}
|
|
223397
|
+
return result;
|
|
223398
|
+
}
|
|
223006
223399
|
/** Compute the intersection of a line (parameterized as a ray) with the plane of this polygon.
|
|
223007
223400
|
* @param polygon points of the polygon, closure point optional
|
|
223008
223401
|
* @param ray infinite line to intersect, as a ray
|
|
@@ -223020,7 +223413,7 @@ class PolygonOps {
|
|
|
223020
223413
|
if (!this.unitNormal(polygon, this._normal))
|
|
223021
223414
|
return PolygonLocationDetail.create(result); // invalid
|
|
223022
223415
|
this._workPlane = _Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_11__.Plane3dByOriginAndUnitNormal.createXYZUVW(polygon.getXAtUncheckedPointIndex(0), polygon.getYAtUncheckedPointIndex(0), polygon.getZAtUncheckedPointIndex(0), this._normal.x, this._normal.y, this._normal.z, this._workPlane);
|
|
223023
|
-
const intersectionPoint = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero(this._workXYZ);
|
|
223416
|
+
const intersectionPoint = this._workXYZ = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero(this._workXYZ);
|
|
223024
223417
|
const rayParam = ray.intersectionWithPlane(this._workPlane, intersectionPoint);
|
|
223025
223418
|
if (undefined === rayParam)
|
|
223026
223419
|
return PolygonLocationDetail.create(result);
|
|
@@ -223193,15 +223586,80 @@ class PolygonOps {
|
|
|
223193
223586
|
coords[i] *= scale; // normalized
|
|
223194
223587
|
return coords;
|
|
223195
223588
|
}
|
|
223589
|
+
/**
|
|
223590
|
+
* Force the polygon to be closed.
|
|
223591
|
+
* * If first and last points are not within tolerance, push copy of first point
|
|
223592
|
+
* * If first and last points are within tolerance, set last point equal to first
|
|
223593
|
+
* @param polygon input polygon
|
|
223594
|
+
* @param tolerance closure distance tolerance
|
|
223595
|
+
*/
|
|
223596
|
+
static forceClosure(polygon, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
223597
|
+
if (polygon.length >= 2) {
|
|
223598
|
+
if (polygon instanceof _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_10__.GrowableXYZArray) {
|
|
223599
|
+
polygon.forceClosure(tolerance);
|
|
223600
|
+
}
|
|
223601
|
+
else if (polygon[0].distance(polygon[polygon.length - 1]) > tolerance) {
|
|
223602
|
+
polygon.push(polygon[0].clone());
|
|
223603
|
+
}
|
|
223604
|
+
else {
|
|
223605
|
+
polygon[polygon.length - 1].setFromPoint3d(polygon[0]);
|
|
223606
|
+
}
|
|
223607
|
+
}
|
|
223608
|
+
}
|
|
223609
|
+
/**
|
|
223610
|
+
* Return a closed polygon, cloning only if necessary.
|
|
223611
|
+
* * If the first and last points are not identical, call [[forceClosure]] on a clone of the polygon and return it.
|
|
223612
|
+
* * If the first and last points are already identical, just return the input.
|
|
223613
|
+
* @param polygon input polygon
|
|
223614
|
+
* @param tolerance closure distance tolerance
|
|
223615
|
+
*/
|
|
223616
|
+
static ensureClosed(polygon, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
223617
|
+
if (polygon.length >= 2) {
|
|
223618
|
+
let forceClosure = false;
|
|
223619
|
+
if (polygon instanceof _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_5__.IndexedXYZCollection)
|
|
223620
|
+
forceClosure = !polygon.almostEqualIndexIndex(0, polygon.length - 1, 0.0);
|
|
223621
|
+
else
|
|
223622
|
+
forceClosure = !polygon[0].isExactEqual(polygon[polygon.length - 1]);
|
|
223623
|
+
if (forceClosure) {
|
|
223624
|
+
const cloned = _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_10__.GrowableXYZArray.create(polygon);
|
|
223625
|
+
this.forceClosure(cloned, tolerance);
|
|
223626
|
+
polygon = cloned;
|
|
223627
|
+
}
|
|
223628
|
+
}
|
|
223629
|
+
return polygon;
|
|
223630
|
+
}
|
|
223631
|
+
/**
|
|
223632
|
+
* Find smallest distance between polygons.
|
|
223633
|
+
* * For efficiency, input polygons should include closure edge.
|
|
223634
|
+
* * If searching interiors for close approaches, the polygons are assumed to be convex.
|
|
223635
|
+
* @param polygonA first polygon
|
|
223636
|
+
* @param polygonB second polygon
|
|
223637
|
+
* @param dMax optional largest approach distance to consider
|
|
223638
|
+
* @param _searchInterior If true, include (convex) polygon interiors in computations (currently unimplemented).
|
|
223639
|
+
* If false (default): return closest approach between polygon boundaries only, using [[PolylineOps.closestApproach]].
|
|
223640
|
+
* @return pair of details, one per polygon. The `a` field of each detail stores the closest approach distance.
|
|
223641
|
+
*/
|
|
223642
|
+
static closestApproach(polygonA, polygonB, dMax = Number.MAX_VALUE, _searchInterior = false) {
|
|
223643
|
+
// TODO: handle interior close approaches as well...
|
|
223644
|
+
let result;
|
|
223645
|
+
const polyA = this.ensureClosed(polygonA);
|
|
223646
|
+
const polyB = this.ensureClosed(polygonB);
|
|
223647
|
+
const cld = this._workCLDPair = _PolylineOps__WEBPACK_IMPORTED_MODULE_13__.PolylineOps.closestApproach(polyA, false, polyB, false, dMax, this._workCLDPair);
|
|
223648
|
+
if (cld && cld.detailA.childDetail && cld.detailB.childDetail) {
|
|
223649
|
+
result = PolygonLocationDetailPair.create(PolygonLocationDetail.createAtVertexOrEdge(cld.detailA.point, cld.detailA.childDetail.a, cld.detailA.childDetail.fraction), PolygonLocationDetail.createAtVertexOrEdge(cld.detailB.point, cld.detailB.childDetail.a, cld.detailB.childDetail.fraction));
|
|
223650
|
+
result.detailA.a = result.detailB.a = cld.detailA.a;
|
|
223651
|
+
}
|
|
223652
|
+
return result;
|
|
223653
|
+
}
|
|
223196
223654
|
}
|
|
223197
223655
|
/** These values are the integrated area moment products [xx,xy,xz, x]
|
|
223198
223656
|
* for a right triangle in the first quadrant at the origin -- (0,0),(1,0),(0,1)
|
|
223199
223657
|
*/
|
|
223200
|
-
PolygonOps._triangleMomentWeights =
|
|
223658
|
+
PolygonOps._triangleMomentWeights = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__.Matrix4d.createRowValues(2.0 / 24.0, 1.0 / 24.0, 0, 4.0 / 24.0, 1.0 / 24.0, 2.0 / 24.0, 0, 4.0 / 24.0, 0, 0, 0, 0, 4.0 / 24.0, 4.0 / 24.0, 0, 12.0 / 24.0);
|
|
223201
223659
|
/** These values are the integrated volume moment products [xx,xy,xz, x, yx,yy,yz,y, zx,zy,zz,z,x,y,z,1]
|
|
223202
223660
|
* for a tetrahedron in the first quadrant at the origin -- (0,00),(1,0,0),(0,1,0),(0,0,1)
|
|
223203
223661
|
*/
|
|
223204
|
-
PolygonOps._tetrahedralMomentWeights =
|
|
223662
|
+
PolygonOps._tetrahedralMomentWeights = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__.Matrix4d.createRowValues(1.0 / 60.0, 1.0 / 120, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 60.0, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 120, 1.0 / 60.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 6.0);
|
|
223205
223663
|
// statics for shared reuse.
|
|
223206
223664
|
// many methods use these.
|
|
223207
223665
|
// only use them in "leaf" methods that are certain not to call other users . . .
|
|
@@ -223210,9 +223668,9 @@ PolygonOps._vector1 = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.cre
|
|
|
223210
223668
|
PolygonOps._vector2 = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
223211
223669
|
PolygonOps._vectorOrigin = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
223212
223670
|
PolygonOps._normal = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
223213
|
-
PolygonOps._matrixA =
|
|
223214
|
-
PolygonOps._matrixB =
|
|
223215
|
-
PolygonOps._matrixC =
|
|
223671
|
+
PolygonOps._matrixA = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__.Matrix4d.createIdentity();
|
|
223672
|
+
PolygonOps._matrixB = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__.Matrix4d.createIdentity();
|
|
223673
|
+
PolygonOps._matrixC = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__.Matrix4d.createIdentity();
|
|
223216
223674
|
|
|
223217
223675
|
/**
|
|
223218
223676
|
* `IndexedXYZCollectionPolygonOps` class contains _static_ methods for typical operations on polygons carried as `IndexedXYZCollection`
|
|
@@ -223447,7 +223905,7 @@ class IndexedXYZCollectionPolygonOps {
|
|
|
223447
223905
|
if (range.isNull)
|
|
223448
223906
|
return undefined;
|
|
223449
223907
|
const work = new _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_10__.GrowableXYZArray();
|
|
223450
|
-
const plane =
|
|
223908
|
+
const plane = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_15__.Point4d.create();
|
|
223451
223909
|
plane.set(0, 0, -1, range.high.z);
|
|
223452
223910
|
this.clipConvexPolygonInPlace(plane, xyz, work, true);
|
|
223453
223911
|
if (xyz.length === 0)
|
|
@@ -223866,9 +224324,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223866
224324
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
223867
224325
|
/* harmony export */ "PolylineOps": () => (/* binding */ PolylineOps)
|
|
223868
224326
|
/* harmony export */ });
|
|
224327
|
+
/* harmony import */ var _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
224328
|
+
/* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
224329
|
+
/* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
223869
224330
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
223870
224331
|
/* harmony import */ var _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
|
|
223871
224332
|
/* harmony import */ var _Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
|
|
224333
|
+
/* harmony import */ var _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
|
|
223872
224334
|
/* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
223873
224335
|
/* harmony import */ var _PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
|
|
223874
224336
|
/* harmony import */ var _Range__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
@@ -223885,6 +224347,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223885
224347
|
|
|
223886
224348
|
|
|
223887
224349
|
|
|
224350
|
+
|
|
224351
|
+
|
|
224352
|
+
|
|
224353
|
+
|
|
223888
224354
|
// cspell:word Puecker
|
|
223889
224355
|
/**
|
|
223890
224356
|
* PolylineOps is a collection of static methods operating on polylines.
|
|
@@ -224067,7 +224533,7 @@ class PolylineOps {
|
|
|
224067
224533
|
}
|
|
224068
224534
|
}
|
|
224069
224535
|
/**
|
|
224070
|
-
* Remove closure points a polyline or array of polylines
|
|
224536
|
+
* Remove closure points of a polyline or array of polylines
|
|
224071
224537
|
* @param data points.
|
|
224072
224538
|
*/
|
|
224073
224539
|
static removeClosurePoint(data) {
|
|
@@ -224138,6 +224604,74 @@ class PolylineOps {
|
|
|
224138
224604
|
}
|
|
224139
224605
|
return bisectorPlanes.length > 1 ? bisectorPlanes : undefined;
|
|
224140
224606
|
}
|
|
224607
|
+
/**
|
|
224608
|
+
* Find smallest distance between polylines.
|
|
224609
|
+
* * For polylines with many points, it is more efficient to use [[LineString3dRangeTreeContext.searchForClosestApproach]].
|
|
224610
|
+
* @param pointsA first polyline
|
|
224611
|
+
* @param extendA how to extend polylineA forward/backward
|
|
224612
|
+
* @param pointsB second polyline
|
|
224613
|
+
* @param extendB how to extend polylineB forward/backward
|
|
224614
|
+
* @param dMax largest approach distance to consider
|
|
224615
|
+
* @param result optional pre-allocated object to populate and return
|
|
224616
|
+
* @returns pair of details, one for each polyline, with field values:
|
|
224617
|
+
* * `a` is the closest approach distance
|
|
224618
|
+
* * `point` is the point of closest approach
|
|
224619
|
+
* * `fraction` is the global polyline fraction
|
|
224620
|
+
* * `childDetail.a` is the segment index
|
|
224621
|
+
* * `childDetail.fraction` is the local segment fraction
|
|
224622
|
+
*/
|
|
224623
|
+
static closestApproach(pointsA, extendA, pointsB, extendB, dMax = Number.MAX_VALUE, result) {
|
|
224624
|
+
if (Array.isArray(pointsA))
|
|
224625
|
+
pointsA = new _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_6__.Point3dArrayCarrier(pointsA);
|
|
224626
|
+
if (Array.isArray(pointsB))
|
|
224627
|
+
pointsB = new _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_6__.Point3dArrayCarrier(pointsB);
|
|
224628
|
+
let dMin = dMax;
|
|
224629
|
+
let foundMin = false;
|
|
224630
|
+
const numSegmentA = pointsA.length - 1;
|
|
224631
|
+
const numSegmentB = pointsB.length - 1;
|
|
224632
|
+
const extendSegA = [_curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None, _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None];
|
|
224633
|
+
const extendSegB = [_curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None, _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None];
|
|
224634
|
+
// lambda to set extension for first and last segment of a polyline
|
|
224635
|
+
const convertExtend = (extendOut, extendIn, segmentIndex, numSegments) => {
|
|
224636
|
+
extendOut[0] = extendOut[1] = _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None;
|
|
224637
|
+
if (segmentIndex === 0)
|
|
224638
|
+
extendOut[0] = _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extendIn, 0);
|
|
224639
|
+
else if (segmentIndex === numSegments - 1)
|
|
224640
|
+
extendOut[1] = _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extendIn, 1);
|
|
224641
|
+
};
|
|
224642
|
+
// lambda to extract LineSegment3d from polyline
|
|
224643
|
+
const fillSegment = (points, index, segment) => {
|
|
224644
|
+
if (segment === undefined)
|
|
224645
|
+
return _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_8__.LineSegment3d.createCapture(points.getPoint3dAtUncheckedPointIndex(index), points.getPoint3dAtUncheckedPointIndex(index + 1));
|
|
224646
|
+
points.getPoint3dAtUncheckedPointIndex(index, segment.point0Ref);
|
|
224647
|
+
points.getPoint3dAtUncheckedPointIndex(index + 1, segment.point1Ref);
|
|
224648
|
+
return segment;
|
|
224649
|
+
};
|
|
224650
|
+
// just test the segments
|
|
224651
|
+
for (let indexA = 0; indexA < numSegmentA; indexA++) {
|
|
224652
|
+
this._workSegmentA = fillSegment(pointsA, indexA, this._workSegmentA);
|
|
224653
|
+
convertExtend(extendSegA, extendA, indexA, numSegmentA);
|
|
224654
|
+
for (let indexB = 0; indexB < numSegmentB; indexB++) {
|
|
224655
|
+
this._workSegmentB = fillSegment(pointsB, indexB, this._workSegmentB);
|
|
224656
|
+
convertExtend(extendSegB, extendB, indexB, numSegmentB);
|
|
224657
|
+
if (undefined !== (this._workLocalDetailPair = _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_8__.LineSegment3d.closestApproach(this._workSegmentA, extendSegA, this._workSegmentB, extendSegB, this._workLocalDetailPair))) {
|
|
224658
|
+
const d = this._workLocalDetailPair.detailA.a;
|
|
224659
|
+
if (d < dMin) {
|
|
224660
|
+
const childDetailA = result?.detailA.childDetail; // save and reuse
|
|
224661
|
+
const childDetailB = result?.detailB.childDetail;
|
|
224662
|
+
result = this._workLocalDetailPair.clone(result); // overwrite previous result
|
|
224663
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.convertLocalToGlobalDetail(result.detailA, indexA, numSegmentA, undefined, childDetailA);
|
|
224664
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.convertLocalToGlobalDetail(result.detailB, indexB, numSegmentB, undefined, childDetailB);
|
|
224665
|
+
if (result.detailA.childDetail && result.detailB.childDetail)
|
|
224666
|
+
result.detailA.childDetail.curve = result.detailB.childDetail.curve = undefined; // no CurvePrimitives survive in output
|
|
224667
|
+
dMin = d;
|
|
224668
|
+
foundMin = true;
|
|
224669
|
+
}
|
|
224670
|
+
}
|
|
224671
|
+
}
|
|
224672
|
+
}
|
|
224673
|
+
return foundMin ? result : undefined;
|
|
224674
|
+
}
|
|
224141
224675
|
}
|
|
224142
224676
|
|
|
224143
224677
|
|
|
@@ -227199,7 +227733,7 @@ class Transform {
|
|
|
227199
227733
|
* @param other Transform to compare to.
|
|
227200
227734
|
*/
|
|
227201
227735
|
isAlmostEqual(other) {
|
|
227202
|
-
return this.origin.isAlmostEqual(other.origin) && this.matrix.isAlmostEqual(other.matrix);
|
|
227736
|
+
return this === other || this.origin.isAlmostEqual(other.origin) && this.matrix.isAlmostEqual(other.matrix);
|
|
227203
227737
|
}
|
|
227204
227738
|
/**
|
|
227205
227739
|
* Test for near equality with `other` Transform. Comparison uses the `isAlmostEqual` methods on the `origin` part
|
|
@@ -234714,8 +235248,20 @@ class SmallSystem {
|
|
|
234714
235248
|
return this.ray3dXYZUVWClosestApproachUnbounded(a0.x, a0.y, a0.z, a1.x - a0.x, a1.y - a0.y, a1.z - a0.z, b0.x, b0.y, b0.z, b1.x - b0.x, b1.y - b0.y, b1.z - b0.z, result);
|
|
234715
235249
|
}
|
|
234716
235250
|
/**
|
|
234717
|
-
* Return true if
|
|
235251
|
+
* Return true if the given rays have closest approach (go by each other) in 3d
|
|
234718
235252
|
* Return the fractional (not xy) coordinates as x and y parts of a Point2d.
|
|
235253
|
+
* @param ax x-coordinate of the origin of the first ray
|
|
235254
|
+
* @param ay y-coordinate of the origin of the first ray
|
|
235255
|
+
* @param az z-coordinate of the origin of the first ray
|
|
235256
|
+
* @param au x-coordinate of the direction vector of the first ray
|
|
235257
|
+
* @param av y-coordinate of the direction vector of the first ray
|
|
235258
|
+
* @param aw z-coordinate of the direction vector of the first ray
|
|
235259
|
+
* @param bx x-coordinate of the origin of the second ray
|
|
235260
|
+
* @param by y-coordinate of the origin of the second ray
|
|
235261
|
+
* @param bz z-coordinate of the origin of the second ray
|
|
235262
|
+
* @param bu x-coordinate of the direction vector of the second ray
|
|
235263
|
+
* @param bv y-coordinate of the direction vector of the second ray
|
|
235264
|
+
* @param bw z-coordinate of the direction vector of the second ray
|
|
234719
235265
|
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
234720
235266
|
*/
|
|
234721
235267
|
static ray3dXYZUVWClosestApproachUnbounded(ax, ay, az, au, av, aw, bx, by, bz, bu, bv, bw, result) {
|
|
@@ -236687,6 +237233,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
236687
237233
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
236688
237234
|
/* harmony export */ "ConvexFacetLocationDetail": () => (/* binding */ ConvexFacetLocationDetail),
|
|
236689
237235
|
/* harmony export */ "FacetIntersectOptions": () => (/* binding */ FacetIntersectOptions),
|
|
237236
|
+
/* harmony export */ "FacetLocationDetailPair": () => (/* binding */ FacetLocationDetailPair),
|
|
236690
237237
|
/* harmony export */ "NonConvexFacetLocationDetail": () => (/* binding */ NonConvexFacetLocationDetail),
|
|
236691
237238
|
/* harmony export */ "TriangularFacetLocationDetail": () => (/* binding */ TriangularFacetLocationDetail)
|
|
236692
237239
|
/* harmony export */ });
|
|
@@ -236720,6 +237267,21 @@ class FacetIntersectOptions {
|
|
|
236720
237267
|
this.parameterTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallFraction;
|
|
236721
237268
|
}
|
|
236722
237269
|
}
|
|
237270
|
+
/**
|
|
237271
|
+
* A pair of FacetLocationDetail.
|
|
237272
|
+
* @public
|
|
237273
|
+
*/
|
|
237274
|
+
class FacetLocationDetailPair {
|
|
237275
|
+
/** Constructor, captures inputs */
|
|
237276
|
+
constructor(detailA, detailB) {
|
|
237277
|
+
this.detailA = detailA;
|
|
237278
|
+
this.detailB = detailB;
|
|
237279
|
+
}
|
|
237280
|
+
/** Create a facet detail pair, capturing inputs. */
|
|
237281
|
+
static create(detailA, detailB) {
|
|
237282
|
+
return new FacetLocationDetailPair(detailA, detailB);
|
|
237283
|
+
}
|
|
237284
|
+
}
|
|
236723
237285
|
/**
|
|
236724
237286
|
* Implementation of `FacetLocationDetail` for a triangular facet.
|
|
236725
237287
|
* @public
|
|
@@ -236740,17 +237302,23 @@ class TriangularFacetLocationDetail {
|
|
|
236740
237302
|
this._color = undefined;
|
|
236741
237303
|
}
|
|
236742
237304
|
/** Create a detail.
|
|
237305
|
+
* @param detail optional, copied if given
|
|
236743
237306
|
* @param result optional pre-allocated object to fill and return
|
|
236744
237307
|
*/
|
|
236745
|
-
static create(facetIndex, detail, result) {
|
|
236746
|
-
if (
|
|
236747
|
-
|
|
236748
|
-
|
|
237308
|
+
static create(facetIndex = -1, detail, result) {
|
|
237309
|
+
if (!result)
|
|
237310
|
+
result = new TriangularFacetLocationDetail();
|
|
237311
|
+
else
|
|
237312
|
+
result.invalidate(false); // shallow: detail might be owned by result!
|
|
236749
237313
|
result._facetIndex = facetIndex;
|
|
236750
|
-
if (undefined !== detail)
|
|
237314
|
+
if (undefined !== detail && result._detail !== detail)
|
|
236751
237315
|
result._detail.copyContentsFrom(detail);
|
|
236752
237316
|
return result;
|
|
236753
237317
|
}
|
|
237318
|
+
/** Create a detail, capturing inputs. */
|
|
237319
|
+
static createCapture(facetIndex, detail) {
|
|
237320
|
+
return new TriangularFacetLocationDetail(facetIndex, detail);
|
|
237321
|
+
}
|
|
236754
237322
|
/** Get the facet index. */
|
|
236755
237323
|
get facetIndex() {
|
|
236756
237324
|
return this._facetIndex;
|
|
@@ -236851,7 +237419,7 @@ class TriangularFacetLocationDetail {
|
|
|
236851
237419
|
}
|
|
236852
237420
|
}
|
|
236853
237421
|
/**
|
|
236854
|
-
* Implementation of `FacetLocationDetail` for a
|
|
237422
|
+
* Implementation of `FacetLocationDetail` for a general facet, which may or may not be convex.
|
|
236855
237423
|
* * Facet vertex data interpolation is not available.
|
|
236856
237424
|
* @public
|
|
236857
237425
|
*/
|
|
@@ -236870,18 +237438,24 @@ class NonConvexFacetLocationDetail {
|
|
|
236870
237438
|
this._detail.invalidate();
|
|
236871
237439
|
}
|
|
236872
237440
|
/** Create a detail.
|
|
237441
|
+
* @param detail optional, copied if given
|
|
236873
237442
|
* @param result optional pre-allocated object to fill and return
|
|
236874
237443
|
*/
|
|
236875
|
-
static create(facetIndex, edgeCount, detail, result) {
|
|
236876
|
-
if (
|
|
236877
|
-
|
|
236878
|
-
|
|
237444
|
+
static create(facetIndex = -1, edgeCount = 0, detail, result) {
|
|
237445
|
+
if (!result)
|
|
237446
|
+
result = new NonConvexFacetLocationDetail();
|
|
237447
|
+
else
|
|
237448
|
+
result.invalidate(false); // shallow: detail might be owned by result!
|
|
236879
237449
|
result._facetIndex = facetIndex;
|
|
236880
237450
|
result._edgeCount = edgeCount;
|
|
236881
237451
|
if (undefined !== detail && result._detail !== detail)
|
|
236882
237452
|
result._detail.copyContentsFrom(detail);
|
|
236883
237453
|
return result;
|
|
236884
237454
|
}
|
|
237455
|
+
/** Create a detail, capturing inputs. */
|
|
237456
|
+
static createCapture(facetIndex, edgeCount, detail) {
|
|
237457
|
+
return new NonConvexFacetLocationDetail(facetIndex, edgeCount, detail);
|
|
237458
|
+
}
|
|
236885
237459
|
/** Get the facet index. */
|
|
236886
237460
|
get facetIndex() {
|
|
236887
237461
|
return this._facetIndex;
|
|
@@ -236910,7 +237484,7 @@ class NonConvexFacetLocationDetail {
|
|
|
236910
237484
|
get isValid() {
|
|
236911
237485
|
return this._isValid && this._detail.isValid;
|
|
236912
237486
|
}
|
|
236913
|
-
/** Whether the facet is convex. */
|
|
237487
|
+
/** Whether the facet is convex. Always returns false, as convexity is unknown to this detail. */
|
|
236914
237488
|
get isConvex() {
|
|
236915
237489
|
return false;
|
|
236916
237490
|
}
|
|
@@ -236980,13 +237554,20 @@ class ConvexFacetLocationDetail extends NonConvexFacetLocationDetail {
|
|
|
236980
237554
|
this._barycentricCoordinates = undefined;
|
|
236981
237555
|
}
|
|
236982
237556
|
/** Create a detail.
|
|
237557
|
+
* @param detail optional, copied if given
|
|
236983
237558
|
* @param result optional pre-allocated object to fill and return
|
|
236984
237559
|
*/
|
|
236985
|
-
static create(facetIndex, edgeCount, detail, result) {
|
|
236986
|
-
if (
|
|
236987
|
-
|
|
237560
|
+
static create(facetIndex = -1, edgeCount = 0, detail, result) {
|
|
237561
|
+
if (!result)
|
|
237562
|
+
result = new ConvexFacetLocationDetail();
|
|
237563
|
+
else
|
|
237564
|
+
result.invalidate(false); // shallow: detail might be owned by result!
|
|
236988
237565
|
return super.create(facetIndex, edgeCount, detail, result);
|
|
236989
237566
|
}
|
|
237567
|
+
/** Create a detail, capturing inputs. */
|
|
237568
|
+
static createCapture(facetIndex, edgeCount, detail) {
|
|
237569
|
+
return new ConvexFacetLocationDetail(facetIndex, edgeCount, detail);
|
|
237570
|
+
}
|
|
236990
237571
|
/** Whether the facet is convex. */
|
|
236991
237572
|
get isConvex() {
|
|
236992
237573
|
return true;
|
|
@@ -242029,6 +242610,22 @@ class PolyfaceQuery {
|
|
|
242029
242610
|
const inertiaProducts = PolyfaceQuery.sumFacetSecondVolumeMomentProducts(source, origin);
|
|
242030
242611
|
return _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_8__.MomentData.inertiaProductsToPrincipalAxes(origin, inertiaProducts);
|
|
242031
242612
|
}
|
|
242613
|
+
/** Determine whether all facets are convex.
|
|
242614
|
+
* @param source mesh to examine
|
|
242615
|
+
*/
|
|
242616
|
+
static areFacetsConvex(source) {
|
|
242617
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
|
|
242618
|
+
return this.areFacetsConvex(source.createVisitor(0));
|
|
242619
|
+
source.setNumWrap(0);
|
|
242620
|
+
source.reset();
|
|
242621
|
+
while (source.moveToNextFacet()) {
|
|
242622
|
+
if (source.pointCount > 3) {
|
|
242623
|
+
if (!_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__.PolygonOps.isConvex(source.point))
|
|
242624
|
+
return false;
|
|
242625
|
+
}
|
|
242626
|
+
}
|
|
242627
|
+
return true;
|
|
242628
|
+
}
|
|
242032
242629
|
/**
|
|
242033
242630
|
* Test for convex volume by dihedral angle tests on all edges.
|
|
242034
242631
|
* * This tests if all dihedral angles are positive.
|
|
@@ -242636,6 +243233,8 @@ class PolyfaceQuery {
|
|
|
242636
243233
|
* If not a polyface, visit all facets to find the largest index.
|
|
242637
243234
|
*/
|
|
242638
243235
|
static visitorClientPointCount(visitor) {
|
|
243236
|
+
if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
|
|
243237
|
+
return visitor.data.point.length;
|
|
242639
243238
|
const polyface = visitor.clientPolyface();
|
|
242640
243239
|
if (polyface !== undefined)
|
|
242641
243240
|
return polyface.data.point.length;
|
|
@@ -242652,6 +243251,11 @@ class PolyfaceQuery {
|
|
|
242652
243251
|
* If not a polyface, visit all facets to accumulate a count.
|
|
242653
243252
|
*/
|
|
242654
243253
|
static visitorClientFacetCount(visitor) {
|
|
243254
|
+
if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface) {
|
|
243255
|
+
if (visitor.facetCount !== undefined)
|
|
243256
|
+
return visitor.facetCount;
|
|
243257
|
+
visitor = visitor.createVisitor(0);
|
|
243258
|
+
}
|
|
242655
243259
|
const polyface = visitor.clientPolyface();
|
|
242656
243260
|
if (polyface !== undefined && polyface.facetCount !== undefined)
|
|
242657
243261
|
return polyface.facetCount;
|
|
@@ -243427,6 +244031,1307 @@ class RangeLengthData {
|
|
|
243427
244031
|
}
|
|
243428
244032
|
|
|
243429
244033
|
|
|
244034
|
+
/***/ }),
|
|
244035
|
+
|
|
244036
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js":
|
|
244037
|
+
/*!**************************************************************************************!*\
|
|
244038
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js ***!
|
|
244039
|
+
\**************************************************************************************/
|
|
244040
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244041
|
+
|
|
244042
|
+
"use strict";
|
|
244043
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244044
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244045
|
+
/* harmony export */ "LineString3dRangeTreeContext": () => (/* binding */ LineString3dRangeTreeContext)
|
|
244046
|
+
/* harmony export */ });
|
|
244047
|
+
/* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
244048
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
244049
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
244050
|
+
/* harmony import */ var _RangeTreeNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RangeTreeNode */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js");
|
|
244051
|
+
/* harmony import */ var _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RangeTreeSearchHandlers */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js");
|
|
244052
|
+
/*---------------------------------------------------------------------------------------------
|
|
244053
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244054
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244055
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244056
|
+
/** @packageDocumentation
|
|
244057
|
+
* @module RangeSearch
|
|
244058
|
+
*/
|
|
244059
|
+
|
|
244060
|
+
|
|
244061
|
+
|
|
244062
|
+
|
|
244063
|
+
|
|
244064
|
+
/**
|
|
244065
|
+
* Handler class for searching a range tree containing the segments of a linestring.
|
|
244066
|
+
* * Facilitates multiple searches for closest point and close approach calculations.
|
|
244067
|
+
* @public
|
|
244068
|
+
*/
|
|
244069
|
+
class LineString3dRangeTreeContext {
|
|
244070
|
+
/** Constructor: capture inputs, initialize debug counters */
|
|
244071
|
+
constructor(rangeTreeRoot, points) {
|
|
244072
|
+
this.lineString = points;
|
|
244073
|
+
this._rangeTreeRoot = rangeTreeRoot;
|
|
244074
|
+
this.numRangeTestTrue = 0;
|
|
244075
|
+
this.numRangeTestFalse = 0;
|
|
244076
|
+
this.numPointTest = 0;
|
|
244077
|
+
this.numSearch = 0;
|
|
244078
|
+
}
|
|
244079
|
+
/**
|
|
244080
|
+
* Create a range tree context for the polyline points:
|
|
244081
|
+
* * initialize with segment ranges
|
|
244082
|
+
* * appData are segment indices
|
|
244083
|
+
* @param linestring captured if LineString3d, otherwise copied
|
|
244084
|
+
* @param maxChildPerNode maximum children per range tree node (default 4)
|
|
244085
|
+
* @param maxAppDataPerLeaf maximum segment indices per leaf node (default 4)
|
|
244086
|
+
*/
|
|
244087
|
+
static createCapture(points, maxChildPerNode = 4, maxAppDataPerLeaf = 4) {
|
|
244088
|
+
const linestring = points instanceof _curve_LineString3d__WEBPACK_IMPORTED_MODULE_0__.LineString3d ? points : _curve_LineString3d__WEBPACK_IMPORTED_MODULE_0__.LineString3d.createPoints(points);
|
|
244089
|
+
const rangeTreeRoot = _RangeTreeNode__WEBPACK_IMPORTED_MODULE_1__.RangeTreeOps.createByIndexSplits(((index) => { return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__.Range3d.create(linestring.pointAt(index), linestring.pointAt(index + 1)); }), ((index) => { return index; }), linestring.numPoints() - 1, // number of segments
|
|
244090
|
+
maxChildPerNode, maxAppDataPerLeaf);
|
|
244091
|
+
return rangeTreeRoot ? new LineString3dRangeTreeContext(rangeTreeRoot, linestring) : undefined;
|
|
244092
|
+
}
|
|
244093
|
+
/**
|
|
244094
|
+
* Search the range tree for closest point(s) to spacePoint.
|
|
244095
|
+
* @param spacePoint point to test
|
|
244096
|
+
* @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point.
|
|
244097
|
+
* @return closest point detail(s) with detail.a set to the distance from spacePoint to detail.point
|
|
244098
|
+
*/
|
|
244099
|
+
searchForClosestPoint(spacePoint, maxDist) {
|
|
244100
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__.SingleTreeSearchHandlerForClosestPointOnLineString3d(spacePoint, this, maxDist);
|
|
244101
|
+
this.numSearch++;
|
|
244102
|
+
// seed the search with a few segments -- this reduces early trips deep into ranges that are far from spacePoint.
|
|
244103
|
+
const numTest = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.clamp(Math.floor(this.lineString.numPoints() / 20), 2, 7);
|
|
244104
|
+
const testStep = Math.floor(this.lineString.numPoints() / numTest);
|
|
244105
|
+
handler.processAppData(0);
|
|
244106
|
+
handler.processAppData(this.lineString.numPoints() - 2);
|
|
244107
|
+
for (let i = testStep; i + 1 < this.lineString.numPoints(); i += testStep)
|
|
244108
|
+
handler.processAppData(i);
|
|
244109
|
+
this._rangeTreeRoot.searchTopDown(handler);
|
|
244110
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244111
|
+
}
|
|
244112
|
+
/**
|
|
244113
|
+
* Search the range trees for closest approach(es) between the polylines.
|
|
244114
|
+
* @param contextA first polyline context
|
|
244115
|
+
* @param contextB second polyline context
|
|
244116
|
+
* @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach.
|
|
244117
|
+
* @return closest approach detail pair(s), one per context, with detail.a set to the approach distance
|
|
244118
|
+
*/
|
|
244119
|
+
static searchForClosestApproach(contextA, contextB, maxDist) {
|
|
244120
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__.TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach(contextA, contextB, maxDist);
|
|
244121
|
+
_RangeTreeNode__WEBPACK_IMPORTED_MODULE_1__.RangeTreeNode.searchTwoTreesTopDown(contextA._rangeTreeRoot, contextB._rangeTreeRoot, handler);
|
|
244122
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244123
|
+
}
|
|
244124
|
+
}
|
|
244125
|
+
|
|
244126
|
+
|
|
244127
|
+
/***/ }),
|
|
244128
|
+
|
|
244129
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/MinimumValueTester.js":
|
|
244130
|
+
/*!****************************************************************************!*\
|
|
244131
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/MinimumValueTester.js ***!
|
|
244132
|
+
\****************************************************************************/
|
|
244133
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244134
|
+
|
|
244135
|
+
"use strict";
|
|
244136
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244137
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244138
|
+
/* harmony export */ "MinimumValueTester": () => (/* binding */ MinimumValueTester)
|
|
244139
|
+
/* harmony export */ });
|
|
244140
|
+
/*---------------------------------------------------------------------------------------------
|
|
244141
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244142
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244143
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244144
|
+
/** @packageDocumentation
|
|
244145
|
+
* @module CartesianGeometry
|
|
244146
|
+
*/
|
|
244147
|
+
/**
|
|
244148
|
+
* Data carrier for use when repeatedly testing items (of parameterized type T) to determine the one with a minimum associated value.
|
|
244149
|
+
* * Optionally pushes to arrays of items and values when the value does not exceed a given trigger.
|
|
244150
|
+
* * * The item at minimum value is still recorded, even if the minimum value exceeds the trigger value.
|
|
244151
|
+
* * When comparing a potential minimum value to an undefined value, the number is always accepted as the new minimum.
|
|
244152
|
+
* @internal
|
|
244153
|
+
*/
|
|
244154
|
+
class MinimumValueTester {
|
|
244155
|
+
/**
|
|
244156
|
+
* Capture the given item with undefined item and value, and optional maxValueForSavingToArray.
|
|
244157
|
+
*/
|
|
244158
|
+
constructor(maxValueForSavingToArray) {
|
|
244159
|
+
this.savedItems = [];
|
|
244160
|
+
this.savedValues = [];
|
|
244161
|
+
this.resetMinValueAndItem(undefined, undefined);
|
|
244162
|
+
this.resetTriggerValueForSavingToArray(maxValueForSavingToArray, false);
|
|
244163
|
+
}
|
|
244164
|
+
/**
|
|
244165
|
+
* Static method to create a tester.
|
|
244166
|
+
* @param maxValueForSavingToArray optional numeric value limiting items to save to the optional array.
|
|
244167
|
+
* @returns new tester.
|
|
244168
|
+
*/
|
|
244169
|
+
static create(maxValueForSavingToArray) {
|
|
244170
|
+
return new MinimumValueTester(maxValueForSavingToArray);
|
|
244171
|
+
}
|
|
244172
|
+
/**
|
|
244173
|
+
* Install new minimum value and associated item, both possibly undefined.
|
|
244174
|
+
* * The existing arrays of saved items and values, and the trigger value, are unaffected.
|
|
244175
|
+
* @param item object to associate with the new minimum value
|
|
244176
|
+
* @param value new minimum value
|
|
244177
|
+
*/
|
|
244178
|
+
resetMinValueAndItem(item = undefined, value = undefined) {
|
|
244179
|
+
this.itemAtMinValue = item;
|
|
244180
|
+
this.minValue = value;
|
|
244181
|
+
}
|
|
244182
|
+
/**
|
|
244183
|
+
* Set the trigger value.
|
|
244184
|
+
* @param value new trigger value
|
|
244185
|
+
* @param reinitializeArrays whether to clear the arrays of saved items and values
|
|
244186
|
+
*/
|
|
244187
|
+
resetTriggerValueForSavingToArray(value, reinitializeArrays = false) {
|
|
244188
|
+
this.triggerForSavingToArray = value;
|
|
244189
|
+
if (reinitializeArrays) {
|
|
244190
|
+
this.savedItems = [];
|
|
244191
|
+
this.savedValues = [];
|
|
244192
|
+
}
|
|
244193
|
+
}
|
|
244194
|
+
/**
|
|
244195
|
+
* Test a new item with value.
|
|
244196
|
+
* * Push the new item and value to the saved arrays if both:
|
|
244197
|
+
* * `this.triggerForSavingToArray` is defined
|
|
244198
|
+
* * the new value is less than or equal to `this.triggerForSavingToArray`.
|
|
244199
|
+
* * Save the new item and value if either:
|
|
244200
|
+
* * `this.minValue` is undefined
|
|
244201
|
+
* * new value is less than `this.minValue`.
|
|
244202
|
+
* @param item item to be saved (captured!) if value conditions are met
|
|
244203
|
+
* @param value numeric value being minimized.
|
|
244204
|
+
* @returns true if and only if the input value is the new minimum value.
|
|
244205
|
+
*/
|
|
244206
|
+
testAndSave(item, value) {
|
|
244207
|
+
if (this.doesValueTrigger(value)) {
|
|
244208
|
+
this.savedValues.push(value);
|
|
244209
|
+
this.savedItems.push(item);
|
|
244210
|
+
}
|
|
244211
|
+
if (this.isNewMinValue(value)) {
|
|
244212
|
+
this.minValue = value;
|
|
244213
|
+
this.itemAtMinValue = item;
|
|
244214
|
+
return true;
|
|
244215
|
+
}
|
|
244216
|
+
return false;
|
|
244217
|
+
}
|
|
244218
|
+
/** Whether the input value is small enough to be saved to this instance. */
|
|
244219
|
+
doesValueTrigger(value) {
|
|
244220
|
+
return this.triggerForSavingToArray !== undefined && value <= this.triggerForSavingToArray;
|
|
244221
|
+
}
|
|
244222
|
+
/** Whether the input value is smaller than the last recorded minimum value. */
|
|
244223
|
+
isNewMinValue(value) {
|
|
244224
|
+
return this.minValue === undefined || value < this.minValue;
|
|
244225
|
+
}
|
|
244226
|
+
/** Whether the input value is small enough to be the new minimum or to be saved to this instance. */
|
|
244227
|
+
isNewMinOrTrigger(value) {
|
|
244228
|
+
return this.isNewMinValue(value) || this.doesValueTrigger(value);
|
|
244229
|
+
}
|
|
244230
|
+
}
|
|
244231
|
+
|
|
244232
|
+
|
|
244233
|
+
/***/ }),
|
|
244234
|
+
|
|
244235
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js":
|
|
244236
|
+
/*!**************************************************************************************!*\
|
|
244237
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js ***!
|
|
244238
|
+
\**************************************************************************************/
|
|
244239
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244240
|
+
|
|
244241
|
+
"use strict";
|
|
244242
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244243
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244244
|
+
/* harmony export */ "Point3dArrayRangeTreeContext": () => (/* binding */ Point3dArrayRangeTreeContext)
|
|
244245
|
+
/* harmony export */ });
|
|
244246
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
244247
|
+
/* harmony import */ var _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RangeTreeNode */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js");
|
|
244248
|
+
/* harmony import */ var _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RangeTreeSearchHandlers */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js");
|
|
244249
|
+
/*---------------------------------------------------------------------------------------------
|
|
244250
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244251
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244252
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244253
|
+
/** @packageDocumentation
|
|
244254
|
+
* @module RangeSearch
|
|
244255
|
+
*/
|
|
244256
|
+
|
|
244257
|
+
|
|
244258
|
+
|
|
244259
|
+
/**
|
|
244260
|
+
* Handler class for searching a range tree containing unordered Point3d data.
|
|
244261
|
+
* * Facilitates multiple searches for closest point and close approach calculations.
|
|
244262
|
+
* @public
|
|
244263
|
+
*/
|
|
244264
|
+
class Point3dArrayRangeTreeContext {
|
|
244265
|
+
/** Constructor: capture inputs, initialize debug counters */
|
|
244266
|
+
constructor(rangeTreeRoot, points) {
|
|
244267
|
+
this.points = points;
|
|
244268
|
+
this._rangeTreeRoot = rangeTreeRoot;
|
|
244269
|
+
this.numRangeTestTrue = 0;
|
|
244270
|
+
this.numRangeTestFalse = 0;
|
|
244271
|
+
this.numPointTest = 0;
|
|
244272
|
+
this.numSearch = 0;
|
|
244273
|
+
}
|
|
244274
|
+
/**
|
|
244275
|
+
* Create a range tree context with given points:
|
|
244276
|
+
* * initialize with single-point ranges
|
|
244277
|
+
* * appData are point indices
|
|
244278
|
+
* @param points captured
|
|
244279
|
+
* @param maxChildPerNode maximum children per range tree node (default 4)
|
|
244280
|
+
* @param maxAppDataPerLeaf maximum point indices per leaf node (default 4)
|
|
244281
|
+
*/
|
|
244282
|
+
static createCapture(points, maxChildPerNode = 4, maxAppDataPerLeaf = 4) {
|
|
244283
|
+
const rangeTreeRoot = _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.RangeTreeOps.createByIndexSplits(((index) => { return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.create(points[index]); }), ((index) => { return index; }), points.length, maxChildPerNode, maxAppDataPerLeaf);
|
|
244284
|
+
return rangeTreeRoot ? new Point3dArrayRangeTreeContext(rangeTreeRoot, points) : undefined;
|
|
244285
|
+
}
|
|
244286
|
+
/**
|
|
244287
|
+
* Search the range tree for closest point(s) to spacePoint.
|
|
244288
|
+
* @param spacePoint point to test
|
|
244289
|
+
* @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point.
|
|
244290
|
+
* @return closest point detail(s) with following fields set:
|
|
244291
|
+
* * detail.point = the closest point
|
|
244292
|
+
* * detail.fraction = the index of the closest point in the points array
|
|
244293
|
+
* * detail.a = distance from spacePoint to closest point
|
|
244294
|
+
*/
|
|
244295
|
+
searchForClosestPoint(spacePoint, maxDist) {
|
|
244296
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_2__.SingleTreeSearchHandlerForClosestPointInArray(spacePoint, this, maxDist);
|
|
244297
|
+
this.numSearch++;
|
|
244298
|
+
this._rangeTreeRoot.searchTopDown(handler);
|
|
244299
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244300
|
+
}
|
|
244301
|
+
/**
|
|
244302
|
+
* Search the range trees for closest approach(es) between the point arrays.
|
|
244303
|
+
* @param contextA first point array context
|
|
244304
|
+
* @param contextB second point array context
|
|
244305
|
+
* @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach.
|
|
244306
|
+
* @return closest approach detail pair(s), one per context, each with the following fields set:
|
|
244307
|
+
* * detail.point = the point at closest approach
|
|
244308
|
+
* * detail.fraction = the index of detail.point in the points array
|
|
244309
|
+
* * detail.a = the closest approach distance
|
|
244310
|
+
*/
|
|
244311
|
+
static searchForClosestApproach(contextA, contextB, maxDist) {
|
|
244312
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_2__.TwoTreeSearchHandlerForPoint3dArrayPoint3dArrayCloseApproach(contextA, contextB, maxDist);
|
|
244313
|
+
_RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.RangeTreeNode.searchTwoTreesTopDown(contextA._rangeTreeRoot, contextB._rangeTreeRoot, handler);
|
|
244314
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244315
|
+
}
|
|
244316
|
+
}
|
|
244317
|
+
|
|
244318
|
+
|
|
244319
|
+
/***/ }),
|
|
244320
|
+
|
|
244321
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js":
|
|
244322
|
+
/*!**********************************************************************************!*\
|
|
244323
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js ***!
|
|
244324
|
+
\**********************************************************************************/
|
|
244325
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244326
|
+
|
|
244327
|
+
"use strict";
|
|
244328
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244329
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244330
|
+
/* harmony export */ "PolyfaceRangeTreeContext": () => (/* binding */ PolyfaceRangeTreeContext)
|
|
244331
|
+
/* harmony export */ });
|
|
244332
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
244333
|
+
/* harmony import */ var _Polyface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
|
|
244334
|
+
/* harmony import */ var _PolyfaceQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../PolyfaceQuery */ "../../core/geometry/lib/esm/polyface/PolyfaceQuery.js");
|
|
244335
|
+
/* harmony import */ var _RangeTreeNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RangeTreeNode */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js");
|
|
244336
|
+
/* harmony import */ var _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RangeTreeSearchHandlers */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js");
|
|
244337
|
+
/*---------------------------------------------------------------------------------------------
|
|
244338
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244339
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244340
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244341
|
+
/** @packageDocumentation
|
|
244342
|
+
* @module RangeSearch
|
|
244343
|
+
*/
|
|
244344
|
+
|
|
244345
|
+
|
|
244346
|
+
|
|
244347
|
+
|
|
244348
|
+
|
|
244349
|
+
/**
|
|
244350
|
+
* Handler class for searching a range tree containing the facets of a polyface.
|
|
244351
|
+
* * Facilitates multiple searches for closest point and close approach calculations.
|
|
244352
|
+
* @public
|
|
244353
|
+
*/
|
|
244354
|
+
class PolyfaceRangeTreeContext {
|
|
244355
|
+
/** Constructor: capture inputs, initialize debug counters */
|
|
244356
|
+
constructor(rangeTreeRoot, visitor, convexFacets = false) {
|
|
244357
|
+
this.visitor = visitor;
|
|
244358
|
+
this.convexFacets = convexFacets;
|
|
244359
|
+
this._rangeTreeRoot = rangeTreeRoot;
|
|
244360
|
+
this.numRangeTestTrue = 0;
|
|
244361
|
+
this.numRangeTestFalse = 0;
|
|
244362
|
+
this.numFacetTest = 0;
|
|
244363
|
+
this.numSearch = 0;
|
|
244364
|
+
}
|
|
244365
|
+
/**
|
|
244366
|
+
* Create a range tree context for the Polyface facets.
|
|
244367
|
+
* * This is a very simple construction that splits "right and left parts" of the facet sequence.
|
|
244368
|
+
* * Facets with any recognizable "left to right" or "top to bottom" sequencing will have very effective search structures.
|
|
244369
|
+
* @param visitor access to facets, captured if PolyfaceVisitor
|
|
244370
|
+
* @param maxChildPerNode maximum children per range tree node (default 4)
|
|
244371
|
+
* @param maxAppDataPerLeaf maximum facet indices per leaf node (default 4)
|
|
244372
|
+
* @param convexFacets whether all facets are known to be convex (cf. [[PolyfaceQuery.areFacetsConvex]]) (default false)
|
|
244373
|
+
*/
|
|
244374
|
+
static createCapture(visitor, maxChildPerNode = 4, maxAppDataPerLeaf = 4, convexFacets = false) {
|
|
244375
|
+
if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_0__.Polyface)
|
|
244376
|
+
return this.createCapture(visitor.createVisitor(0), maxChildPerNode, maxAppDataPerLeaf, convexFacets);
|
|
244377
|
+
const numFacet = _PolyfaceQuery__WEBPACK_IMPORTED_MODULE_1__.PolyfaceQuery.visitorClientFacetCount(visitor);
|
|
244378
|
+
const rangeTreeRoot = _RangeTreeNode__WEBPACK_IMPORTED_MODULE_2__.RangeTreeOps.createByIndexSplits((index) => { visitor.moveToReadIndex(index); return visitor.range(); }, (index) => { return index; }, numFacet, maxChildPerNode, maxAppDataPerLeaf);
|
|
244379
|
+
return rangeTreeRoot ? new PolyfaceRangeTreeContext(rangeTreeRoot, visitor, convexFacets) : undefined;
|
|
244380
|
+
}
|
|
244381
|
+
/**
|
|
244382
|
+
* Search the range tree for closest facet(s) to spacePoint.
|
|
244383
|
+
* @param spacePoint point to test
|
|
244384
|
+
* @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point.
|
|
244385
|
+
* @param searchFacetInterior whether to include facet interiors in search. Default is false: just consider facet boundaries.
|
|
244386
|
+
* @return closest point detail(s) with detail.a set to the distance from spacePoint to detail.point
|
|
244387
|
+
*/
|
|
244388
|
+
searchForClosestPoint(spacePoint, maxDist, searchFacetInterior = false) {
|
|
244389
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__.SingleTreeSearchHandlerForClosestPointOnPolyface(spacePoint, this, maxDist, searchFacetInterior);
|
|
244390
|
+
this.numSearch++;
|
|
244391
|
+
const numFacet = _PolyfaceQuery__WEBPACK_IMPORTED_MODULE_1__.PolyfaceQuery.visitorClientFacetCount(this.visitor);
|
|
244392
|
+
// seed the search with a few points -- this reduces early trips deep into early ranges that are far from spacePoint.
|
|
244393
|
+
const numTest = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.clamp(Math.floor(numFacet / 20), 2, 7);
|
|
244394
|
+
const testStep = Math.floor(numFacet / numTest);
|
|
244395
|
+
handler.processAppData(0);
|
|
244396
|
+
handler.processAppData(numFacet - 1);
|
|
244397
|
+
for (let i = testStep; i + 1 < numFacet; i += testStep)
|
|
244398
|
+
handler.processAppData(i);
|
|
244399
|
+
this._rangeTreeRoot.searchTopDown(handler);
|
|
244400
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244401
|
+
}
|
|
244402
|
+
/**
|
|
244403
|
+
* Search the range trees for closest approach(es) between the polyfaces.
|
|
244404
|
+
* @param contextA first polyface context
|
|
244405
|
+
* @param contextB second polyface context
|
|
244406
|
+
* @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach.
|
|
244407
|
+
* @param searchFacetInterior whether to include facet interiors in search (`context.convexFacets` must be true for both contexts). Default is false: just consider facet boundaries.
|
|
244408
|
+
* @return closest approach detail pair(s), one per context, with detail.a set to the approach distance
|
|
244409
|
+
*/
|
|
244410
|
+
static searchForClosestApproach(contextA, contextB, maxDist, searchFacetInterior = false) {
|
|
244411
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__.TwoTreeSearchHandlerForFacetFacetCloseApproach(contextA, contextB, maxDist, searchFacetInterior);
|
|
244412
|
+
_RangeTreeNode__WEBPACK_IMPORTED_MODULE_2__.RangeTreeNode.searchTwoTreesTopDown(contextA._rangeTreeRoot, contextB._rangeTreeRoot, handler);
|
|
244413
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244414
|
+
}
|
|
244415
|
+
}
|
|
244416
|
+
|
|
244417
|
+
|
|
244418
|
+
/***/ }),
|
|
244419
|
+
|
|
244420
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js":
|
|
244421
|
+
/*!***********************************************************************!*\
|
|
244422
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js ***!
|
|
244423
|
+
\***********************************************************************/
|
|
244424
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244425
|
+
|
|
244426
|
+
"use strict";
|
|
244427
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244428
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244429
|
+
/* harmony export */ "RangeTreeNode": () => (/* binding */ RangeTreeNode),
|
|
244430
|
+
/* harmony export */ "RangeTreeOps": () => (/* binding */ RangeTreeOps),
|
|
244431
|
+
/* harmony export */ "SingleTreeSearchHandler": () => (/* binding */ SingleTreeSearchHandler),
|
|
244432
|
+
/* harmony export */ "TwoTreeDistanceMinimizationSearchHandler": () => (/* binding */ TwoTreeDistanceMinimizationSearchHandler),
|
|
244433
|
+
/* harmony export */ "TwoTreeSearchHandler": () => (/* binding */ TwoTreeSearchHandler)
|
|
244434
|
+
/* harmony export */ });
|
|
244435
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
244436
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
244437
|
+
/*---------------------------------------------------------------------------------------------
|
|
244438
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244439
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244440
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244441
|
+
/** @packageDocumentation
|
|
244442
|
+
* @module RangeSearch
|
|
244443
|
+
*/
|
|
244444
|
+
|
|
244445
|
+
|
|
244446
|
+
/**
|
|
244447
|
+
* Map an (unchecked) integer to a parameterized type T, where the data argument can be either:
|
|
244448
|
+
* * an array of type T
|
|
244449
|
+
* * a function which takes an index and returns type T
|
|
244450
|
+
* @internal
|
|
244451
|
+
*/
|
|
244452
|
+
function evaluateIndexToType(data, index) {
|
|
244453
|
+
if (Array.isArray(data))
|
|
244454
|
+
return data[index];
|
|
244455
|
+
return data(index);
|
|
244456
|
+
}
|
|
244457
|
+
/**
|
|
244458
|
+
* Get data by index from a source that may be undefined, an array of item of type T, or a singleton of the item type.
|
|
244459
|
+
* @internal
|
|
244460
|
+
*/
|
|
244461
|
+
function getByIndex(index, data) {
|
|
244462
|
+
if (data !== undefined) {
|
|
244463
|
+
if (Array.isArray(data)) {
|
|
244464
|
+
if (index < data.length)
|
|
244465
|
+
return data[index];
|
|
244466
|
+
}
|
|
244467
|
+
else {
|
|
244468
|
+
return data;
|
|
244469
|
+
}
|
|
244470
|
+
}
|
|
244471
|
+
return undefined;
|
|
244472
|
+
}
|
|
244473
|
+
/**
|
|
244474
|
+
* Return the number of items in an object that can be undefined, an array of item of type T, or a singleton of the item type.
|
|
244475
|
+
* @internal
|
|
244476
|
+
*/
|
|
244477
|
+
function getFlexDataCount(data) {
|
|
244478
|
+
if (data !== undefined) {
|
|
244479
|
+
if (Array.isArray(data)) {
|
|
244480
|
+
return data.length;
|
|
244481
|
+
}
|
|
244482
|
+
else {
|
|
244483
|
+
return 1;
|
|
244484
|
+
}
|
|
244485
|
+
}
|
|
244486
|
+
return 0;
|
|
244487
|
+
}
|
|
244488
|
+
/**
|
|
244489
|
+
* Abstract class for handler objects called during traversal of a single range tree.
|
|
244490
|
+
* @internal
|
|
244491
|
+
*/
|
|
244492
|
+
class SingleTreeSearchHandler {
|
|
244493
|
+
/**
|
|
244494
|
+
* Query to see if the active search has been aborted.
|
|
244495
|
+
* * Default implementation returns false so query runs to completion.
|
|
244496
|
+
* * Search processes check this after range tests and child processing.
|
|
244497
|
+
*/
|
|
244498
|
+
// eslint-disable-next-line @itwin/prefer-get
|
|
244499
|
+
isAborted() { return false; }
|
|
244500
|
+
}
|
|
244501
|
+
/**
|
|
244502
|
+
* Abstract class for handler objects called during traversal of two range trees.
|
|
244503
|
+
* @internal
|
|
244504
|
+
*/
|
|
244505
|
+
class TwoTreeSearchHandler {
|
|
244506
|
+
/**
|
|
244507
|
+
* Query to see if the active search has been aborted.
|
|
244508
|
+
* * Default implementation returns false so query runs to completion.
|
|
244509
|
+
* * Search processes check this after range tests and child processing.
|
|
244510
|
+
*/
|
|
244511
|
+
// eslint-disable-next-line @itwin/prefer-get
|
|
244512
|
+
isAborted() { return false; }
|
|
244513
|
+
}
|
|
244514
|
+
/**
|
|
244515
|
+
* This class refines the TwoTreeSearchHandler with an implementation of `isRangePairActive` appropriate for computing the minimum distance between trees.
|
|
244516
|
+
* * The concrete class must implement `getCurrentDistance()` method to provide the best-so-far distance.
|
|
244517
|
+
* * The implementation of `isRangePairActive` returns true if the distance between ranges is less than or equal to the `getCurrentDistance()` value.
|
|
244518
|
+
* @internal
|
|
244519
|
+
*/
|
|
244520
|
+
class TwoTreeDistanceMinimizationSearchHandler extends TwoTreeSearchHandler {
|
|
244521
|
+
/**
|
|
244522
|
+
* Method called to decide whether to process subtrees and immediate child appData items from a left tree node and right tree node.
|
|
244523
|
+
* @param leftRange range from a node in the left tree
|
|
244524
|
+
* @param rightRange range from a node in the right tree.
|
|
244525
|
+
* @returns true if the smallest distance from leftRange to rightRange is less than or equal to getCurrentDistance()
|
|
244526
|
+
*/
|
|
244527
|
+
isRangePairActive(leftRange, rightRange) {
|
|
244528
|
+
const currentDistance = this.getCurrentDistance();
|
|
244529
|
+
const distanceBetweenRanges = leftRange.distanceToRange(rightRange);
|
|
244530
|
+
if (distanceBetweenRanges <= currentDistance) {
|
|
244531
|
+
return true;
|
|
244532
|
+
}
|
|
244533
|
+
return false;
|
|
244534
|
+
}
|
|
244535
|
+
}
|
|
244536
|
+
let numNodeCreated = 0;
|
|
244537
|
+
/**
|
|
244538
|
+
* * TREE STRUCTURE
|
|
244539
|
+
* * A RangeTreeNode is part of a range tree.
|
|
244540
|
+
* * TREE is used here in a strictly _structural_ sense, which has no broad promises about data members.
|
|
244541
|
+
* * Each RangeNode points to 0, 1 or many children.
|
|
244542
|
+
* * Each child has (but does not point back to) a single parent.
|
|
244543
|
+
* * The overall tree has a single root.
|
|
244544
|
+
* * Each node is effectively the root of the tree of its children.
|
|
244545
|
+
* * NON-TREE DATA MEMBERS
|
|
244546
|
+
* * Data members in each node (in addition to children) are
|
|
244547
|
+
* * _range = the union of ranges below in the heap
|
|
244548
|
+
* * _appData = application data associated with the node.
|
|
244549
|
+
* * Construction methods may place multiple _appData items in each node.
|
|
244550
|
+
* * In common use, only the leaves will have _appData. However, the class definitions allow _appData at all nodes, and search algorithms must include them.
|
|
244551
|
+
* * CONSTRUCTION
|
|
244552
|
+
* * The RangeTreeNode.createByIndexSplits method constructs the tree with simple right-left splits within an array of input items.
|
|
244553
|
+
* * The appData is placed entirely in the leaves.
|
|
244554
|
+
* * caller can specify:
|
|
244555
|
+
* * the number of _appData items per leaf
|
|
244556
|
+
* * the number of children per node within the tree.
|
|
244557
|
+
* * "deep" trees (2 children per node and one appData per leaf) may have (compared to shallow trees with many children per node and many appData per leaf)
|
|
244558
|
+
* * faster search because lower nodes have smaller ranges that will be skipped by search algorithms.
|
|
244559
|
+
* * larger memory use because of more nodes
|
|
244560
|
+
* * For future construction methods:
|
|
244561
|
+
* * _appData "above the leaves" may allow nodes below to have smaller ranges, but add complexity to search.
|
|
244562
|
+
* @internal
|
|
244563
|
+
*/
|
|
244564
|
+
class RangeTreeNode {
|
|
244565
|
+
/**
|
|
244566
|
+
* CONSTRUCTOR
|
|
244567
|
+
* CAPTURE (not copy)
|
|
244568
|
+
* * range = range for search algorithms
|
|
244569
|
+
* * appData = application data relevant to this node.
|
|
244570
|
+
* * children = child node reference(s).
|
|
244571
|
+
*/
|
|
244572
|
+
constructor(range, appData, children) {
|
|
244573
|
+
this._range = range;
|
|
244574
|
+
this._appData = appData;
|
|
244575
|
+
this._children = children;
|
|
244576
|
+
this._id = numNodeCreated++;
|
|
244577
|
+
// const childIds: number[] = [];
|
|
244578
|
+
// if (Array.isArray(this._children))
|
|
244579
|
+
// for (const c of this._children) childIds.push(c._id);
|
|
244580
|
+
// else if (this._children instanceof RangeTreeNode)
|
|
244581
|
+
// childIds.push(this._children._id);
|
|
244582
|
+
// const numAppData = getFlexDataCount(appData);
|
|
244583
|
+
// console.log({ id: this._id, childIds, numAppData });
|
|
244584
|
+
}
|
|
244585
|
+
/** Simplest public create: capture the range, appData, and children. */
|
|
244586
|
+
static createCapture(range, appData, children) {
|
|
244587
|
+
return new RangeTreeNode(range, appData, children);
|
|
244588
|
+
}
|
|
244589
|
+
/** copy (not capture) from given data into the range in this RangeEntry */
|
|
244590
|
+
setRange(data) {
|
|
244591
|
+
this._range.setFrom(data);
|
|
244592
|
+
}
|
|
244593
|
+
/** return (a copy of) the range in this RangeEntry */
|
|
244594
|
+
getRange(data) {
|
|
244595
|
+
return this._range.clone(data);
|
|
244596
|
+
}
|
|
244597
|
+
/** return (a reference to) the range in this RangeEntry */
|
|
244598
|
+
getRangeRef() {
|
|
244599
|
+
return this._range;
|
|
244600
|
+
}
|
|
244601
|
+
/**
|
|
244602
|
+
* Access a child by index.
|
|
244603
|
+
* * If the child data is an array, this dereferences the array.
|
|
244604
|
+
* * If the child data is a singleton, treat it as index 0.
|
|
244605
|
+
* * return undefined if there are no children.
|
|
244606
|
+
* @param index index of item to access.
|
|
244607
|
+
*/
|
|
244608
|
+
getChildByIndex(index) {
|
|
244609
|
+
return getByIndex(index, this._children);
|
|
244610
|
+
}
|
|
244611
|
+
/**
|
|
244612
|
+
* * Access an appData by index.
|
|
244613
|
+
* * If the appData data is an array, this dereferences the array.
|
|
244614
|
+
* * If the appData data is a singleton, treat it as if it is at index 0 in an array
|
|
244615
|
+
* * return undefined if there are no appData or for any index out of range.
|
|
244616
|
+
* @param index index of item to access.
|
|
244617
|
+
*/
|
|
244618
|
+
getAppDataByIndex(index) {
|
|
244619
|
+
return getByIndex(index, this._appData);
|
|
244620
|
+
}
|
|
244621
|
+
/** Access the children or child (does not clone). */
|
|
244622
|
+
getAllChildren() {
|
|
244623
|
+
return this._children;
|
|
244624
|
+
}
|
|
244625
|
+
/** Access the appData array or singleton (does not clone). */
|
|
244626
|
+
getAllAppData() {
|
|
244627
|
+
return this._appData;
|
|
244628
|
+
}
|
|
244629
|
+
/**
|
|
244630
|
+
* Count the direct children in this node of the tree.
|
|
244631
|
+
* * This is not recursive. For a recursive count, use `RangeTreeOps.getRecursiveNodeCount`.
|
|
244632
|
+
*/
|
|
244633
|
+
getNumChildren() {
|
|
244634
|
+
return getFlexDataCount(this._children);
|
|
244635
|
+
}
|
|
244636
|
+
/**
|
|
244637
|
+
* Count the appData items in this node of the tree.
|
|
244638
|
+
* * This is not recursive. For a recursive count, use `RangeTreeOps.getRecursiveAppDataCount`.
|
|
244639
|
+
*/
|
|
244640
|
+
getNumAppData() {
|
|
244641
|
+
return getFlexDataCount(this._appData);
|
|
244642
|
+
}
|
|
244643
|
+
/**
|
|
244644
|
+
* Depth-first tree iteration, calling `announceNode` on each node.
|
|
244645
|
+
* @param announceNode callback that returns true to recurse into children
|
|
244646
|
+
*/
|
|
244647
|
+
recurseIntoTree(announceNode) {
|
|
244648
|
+
const doChildren = announceNode(this);
|
|
244649
|
+
if (doChildren) {
|
|
244650
|
+
if (Array.isArray(this._children)) {
|
|
244651
|
+
for (const child of this._children)
|
|
244652
|
+
child.recurseIntoTree(announceNode);
|
|
244653
|
+
}
|
|
244654
|
+
else if (this._children !== undefined) {
|
|
244655
|
+
this._children.recurseIntoTree(announceNode);
|
|
244656
|
+
}
|
|
244657
|
+
}
|
|
244658
|
+
}
|
|
244659
|
+
/**
|
|
244660
|
+
* Depth-first tree iteration via handler.
|
|
244661
|
+
* * if handler decides the instance range is active, process appData, then recurse on children
|
|
244662
|
+
* * if handler decides to abort after processing an appData, skip processing rest of appData and children
|
|
244663
|
+
*/
|
|
244664
|
+
searchTopDown(handler) {
|
|
244665
|
+
if (handler.isRangeActive(this._range)) {
|
|
244666
|
+
let itemToProcess;
|
|
244667
|
+
for (let i = 0; undefined !== (itemToProcess = this.getAppDataByIndex(i)); i++) {
|
|
244668
|
+
// console.log(itemToProcess);
|
|
244669
|
+
handler.processAppData(itemToProcess);
|
|
244670
|
+
if (handler.isAborted())
|
|
244671
|
+
return;
|
|
244672
|
+
}
|
|
244673
|
+
let child;
|
|
244674
|
+
for (let i = 0; undefined !== (child = this.getChildByIndex(i)); i++) {
|
|
244675
|
+
child.searchTopDown(handler);
|
|
244676
|
+
}
|
|
244677
|
+
}
|
|
244678
|
+
}
|
|
244679
|
+
/**
|
|
244680
|
+
* Apply the handler.processAppDataPair method to each pair of appData items from leftAppData and rightStack.
|
|
244681
|
+
* @param leftAppData singleton or array with data "from left"
|
|
244682
|
+
* @param rightStack stack of nodes to process from right path.
|
|
244683
|
+
* @param reverseArgs true if the caller is exchanging the sense of left and right and this should be undone in the actual call to handler.processAppDataPair.
|
|
244684
|
+
* @param handler search handler
|
|
244685
|
+
*/
|
|
244686
|
+
static processAppDataAndAppDataStack(leftAppData, rightStack, reverseArgs, handler) {
|
|
244687
|
+
if (leftAppData !== undefined) {
|
|
244688
|
+
let leftItem;
|
|
244689
|
+
let rightItem;
|
|
244690
|
+
// hmm.. we ASSUME that if the tip ranges passed, then all parent ranges would pass without further test.
|
|
244691
|
+
for (let rangeIndex = rightStack.length; rangeIndex-- > 0;) {
|
|
244692
|
+
const rightAppData = rightStack[rangeIndex]._appData;
|
|
244693
|
+
for (let rightIndex = 0; undefined !== (rightItem = getByIndex(rightIndex, rightAppData)); rightIndex++) {
|
|
244694
|
+
for (let leftIndex = 0; undefined !== (leftItem = getByIndex(leftIndex, leftAppData)); leftIndex++) {
|
|
244695
|
+
if (!reverseArgs)
|
|
244696
|
+
handler.processAppDataPair(leftItem, rightItem);
|
|
244697
|
+
else
|
|
244698
|
+
handler.processAppDataPair(rightItem, leftItem);
|
|
244699
|
+
if (handler.isAborted())
|
|
244700
|
+
return;
|
|
244701
|
+
}
|
|
244702
|
+
}
|
|
244703
|
+
}
|
|
244704
|
+
}
|
|
244705
|
+
}
|
|
244706
|
+
/**
|
|
244707
|
+
* Apply the handler.processAppDataPair method to each pair of appData items from leftAppData and rightAppData.
|
|
244708
|
+
* @param leftAppData singleton or array with data "from left"
|
|
244709
|
+
* @param rightAppData singleton or array with data "from right"
|
|
244710
|
+
* @param reverseArgs true if the caller is exchanging the sense of left and right and this should be undone in the actual call to handler.processAppDataPair.
|
|
244711
|
+
* @param handler search handler
|
|
244712
|
+
*/
|
|
244713
|
+
static processAppDataAndAppData(leftAppData, rightAppData, reverseArgs, handler) {
|
|
244714
|
+
if (leftAppData !== undefined && rightAppData !== undefined) {
|
|
244715
|
+
let leftItem;
|
|
244716
|
+
let rightItem;
|
|
244717
|
+
for (let rightIndex = 0; undefined !== (rightItem = getByIndex(rightIndex, rightAppData)); rightIndex++) {
|
|
244718
|
+
for (let leftIndex = 0; undefined !== (leftItem = getByIndex(leftIndex, leftAppData)); leftIndex++) {
|
|
244719
|
+
if (!reverseArgs)
|
|
244720
|
+
handler.processAppDataPair(leftItem, rightItem);
|
|
244721
|
+
else
|
|
244722
|
+
handler.processAppDataPair(rightItem, leftItem);
|
|
244723
|
+
if (handler.isAborted())
|
|
244724
|
+
return;
|
|
244725
|
+
}
|
|
244726
|
+
}
|
|
244727
|
+
}
|
|
244728
|
+
}
|
|
244729
|
+
/**
|
|
244730
|
+
* Push the tip node to stack(s).
|
|
244731
|
+
* @param tip new node (to be pushed)
|
|
244732
|
+
* @param fullPath complete path, which is always extended
|
|
244733
|
+
* @param partialPath partial path, which is only extended if the tip has _appData.
|
|
244734
|
+
*/
|
|
244735
|
+
static pushPaths(tip, fullPath, partialPath) {
|
|
244736
|
+
fullPath.push(tip);
|
|
244737
|
+
if (tip._appData !== undefined) {
|
|
244738
|
+
partialPath.push(tip);
|
|
244739
|
+
}
|
|
244740
|
+
}
|
|
244741
|
+
/**
|
|
244742
|
+
* Pop the tip node from stack(s).
|
|
244743
|
+
* @param tip should match the fullPath tip.
|
|
244744
|
+
* @param fullPath complete path, which is always popped
|
|
244745
|
+
* @param partialPath partial path, which is only popped if the tip has _appData.
|
|
244746
|
+
*/
|
|
244747
|
+
static popPaths(tip, fullPath, partialPath) {
|
|
244748
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(fullPath[fullPath.length - 1] === tip);
|
|
244749
|
+
fullPath.pop();
|
|
244750
|
+
if (tip._appData !== undefined) {
|
|
244751
|
+
partialPath.pop();
|
|
244752
|
+
}
|
|
244753
|
+
}
|
|
244754
|
+
/**
|
|
244755
|
+
* Process nodes from left and right trees of dual search.
|
|
244756
|
+
* * The separate stacks for nodes that have appData is for efficiency.
|
|
244757
|
+
* * If data is entirely in the leaves (or just in a few nodes), the stacks will all be empty (or very small) and no time will be wasted looking up the stacks for appData to process with the other tip.
|
|
244758
|
+
* @param leftTip tip node being explored on left
|
|
244759
|
+
* @param leftStack stack of prior left nodes
|
|
244760
|
+
* @param leftStackWithAppData stack of prior left nodes which have appData.
|
|
244761
|
+
* @param rightTip tip node being explored on right.
|
|
244762
|
+
* @param rightStack stack of prior right nodes.
|
|
244763
|
+
* @param rightStackWithAppData stack of prior right nodes which have appData.
|
|
244764
|
+
* @param handler search handler
|
|
244765
|
+
*/
|
|
244766
|
+
static recursivePairSearch(leftTip, leftStack, leftStackWithAppData, rightTip, rightStack, rightStackWithAppData, handler) {
|
|
244767
|
+
// console.log({ leftId: leftTip._id, rightId: rightTip._id });
|
|
244768
|
+
const leftTipHasAppData = leftTip._appData !== undefined;
|
|
244769
|
+
const rightTipHasAppData = rightTip._appData !== undefined;
|
|
244770
|
+
let leftChild;
|
|
244771
|
+
let rightChild;
|
|
244772
|
+
// process immediate appData from each tip node with the entire prior path of the other side (each stack currently lacks the tip).
|
|
244773
|
+
if (leftTipHasAppData && rightStackWithAppData.length > 0) {
|
|
244774
|
+
this.processAppDataAndAppDataStack(leftTip._appData, rightStackWithAppData, false, handler);
|
|
244775
|
+
}
|
|
244776
|
+
if (leftStackWithAppData.length > 0 && rightTipHasAppData) {
|
|
244777
|
+
this.processAppDataAndAppDataStack(rightTip._appData, leftStackWithAppData, true, handler);
|
|
244778
|
+
}
|
|
244779
|
+
if (handler.isRangePairActive(leftTip._range, rightTip._range)) {
|
|
244780
|
+
this.processAppDataAndAppData(leftTip._appData, rightTip._appData, false, handler);
|
|
244781
|
+
if (leftTip._children !== undefined && rightTip._children !== undefined) {
|
|
244782
|
+
this.pushPaths(leftTip, leftStack, leftStackWithAppData);
|
|
244783
|
+
this.pushPaths(rightTip, rightStack, rightStackWithAppData);
|
|
244784
|
+
for (let leftIndex = 0; undefined !== (leftChild = getByIndex(leftIndex, leftTip._children)); leftIndex++) {
|
|
244785
|
+
for (let rightIndex = 0; undefined !== (rightChild = getByIndex(rightIndex, rightTip._children)); rightIndex++) {
|
|
244786
|
+
this.recursivePairSearch(leftChild, leftStack, leftStackWithAppData, rightChild, rightStack, rightStackWithAppData, handler);
|
|
244787
|
+
}
|
|
244788
|
+
}
|
|
244789
|
+
this.popPaths(leftTip, leftStack, leftStackWithAppData);
|
|
244790
|
+
this.popPaths(rightTip, rightStack, rightStackWithAppData);
|
|
244791
|
+
}
|
|
244792
|
+
else if (leftTip._children !== undefined) {
|
|
244793
|
+
this.leftRecursivePairSearch(leftTip, rightTip, rightStackWithAppData, false, handler);
|
|
244794
|
+
}
|
|
244795
|
+
else if (rightTip._children !== undefined) {
|
|
244796
|
+
this.leftRecursivePairSearch(rightTip, leftTip, leftStackWithAppData, true, handler);
|
|
244797
|
+
}
|
|
244798
|
+
}
|
|
244799
|
+
}
|
|
244800
|
+
/**
|
|
244801
|
+
* Recurse below the tip of leftTip, offering each level's appData to the appData of rightTip and rightStackWithAppData.
|
|
244802
|
+
* @param leftTip tip node being explored on left. Its appData is not processed.
|
|
244803
|
+
* @param rightTip tip node being explored on right. It has no children.
|
|
244804
|
+
* @param rightStackWithAppData stack of prior right nodes which have appData.
|
|
244805
|
+
* @param reverseArgs true if the caller is exchanging the sense of left and right
|
|
244806
|
+
* @param handler search handler
|
|
244807
|
+
*/
|
|
244808
|
+
static leftRecursivePairSearch(leftTip, rightTip, rightStackWithAppData, reverseArgs, handler) {
|
|
244809
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(rightTip._children === undefined);
|
|
244810
|
+
// The (possibly deep) left children appData needs to be offered to the right path (including tip)
|
|
244811
|
+
// Note that there are no stack push/pop operations -- the right stack is already reaching to leaf level, so there are no range or appData nodes to add.
|
|
244812
|
+
let leftChild;
|
|
244813
|
+
for (let leftIndex = 0; undefined !== (leftChild = getByIndex(leftIndex, leftTip._children)); leftIndex++) {
|
|
244814
|
+
if (handler.isRangePairActive(leftChild._range, rightTip._range)) {
|
|
244815
|
+
this.processAppDataAndAppData(leftChild._appData, rightTip._appData, reverseArgs, handler);
|
|
244816
|
+
this.processAppDataAndAppDataStack(leftChild._appData, rightStackWithAppData, reverseArgs, handler);
|
|
244817
|
+
this.leftRecursivePairSearch(leftChild, rightTip, rightStackWithAppData, reverseArgs, handler);
|
|
244818
|
+
}
|
|
244819
|
+
}
|
|
244820
|
+
}
|
|
244821
|
+
/**
|
|
244822
|
+
* Recursive search down two trees, with range tests and child processing under control of a handler.
|
|
244823
|
+
* @param leftRoot root of left tree
|
|
244824
|
+
* @param rightRoot root of right tree
|
|
244825
|
+
* @param handler handler for range tests and child process
|
|
244826
|
+
*/
|
|
244827
|
+
static searchTwoTreesTopDown(leftRoot, rightRoot, handler) {
|
|
244828
|
+
this.recursivePairSearch(leftRoot, [], [], rightRoot, [], [], handler);
|
|
244829
|
+
}
|
|
244830
|
+
}
|
|
244831
|
+
/**
|
|
244832
|
+
* Utilities for various operations on RangeTree
|
|
244833
|
+
* @internal
|
|
244834
|
+
*/
|
|
244835
|
+
class RangeTreeOps {
|
|
244836
|
+
/** Count nodes in this tree. */
|
|
244837
|
+
static getRecursiveNodeCount(root) {
|
|
244838
|
+
let count = 0;
|
|
244839
|
+
root.recurseIntoTree((_node) => { count++; return true; });
|
|
244840
|
+
return count;
|
|
244841
|
+
}
|
|
244842
|
+
/** Count appData in this tree. */
|
|
244843
|
+
static getRecursiveAppDataCount(root) {
|
|
244844
|
+
let count = 0;
|
|
244845
|
+
root.recurseIntoTree((node) => { count += node.getNumAppData(); return true; });
|
|
244846
|
+
return count;
|
|
244847
|
+
}
|
|
244848
|
+
/**
|
|
244849
|
+
* Create a leaf referencing appData items indexed index0<=index<index1 and with combined range of the same indices
|
|
244850
|
+
* @param ranges access to ranges
|
|
244851
|
+
* @param appData access to AppDataType items
|
|
244852
|
+
* @param index0 first index for block of items
|
|
244853
|
+
* @param index1 upper limit index for block of items.
|
|
244854
|
+
* @param arrayLength one more than the largest range/appData index
|
|
244855
|
+
* @returns newly created node.
|
|
244856
|
+
*/
|
|
244857
|
+
static createLeafInIndexRange(ranges, appData, index0, index1, arrayLength) {
|
|
244858
|
+
const appDataBlock = [];
|
|
244859
|
+
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
|
|
244860
|
+
index1 = Math.min(index1, arrayLength);
|
|
244861
|
+
// console.log({ case: "LEAF", index0, index1 });
|
|
244862
|
+
for (let i = index0; i < index1; i++) {
|
|
244863
|
+
appDataBlock.push(evaluateIndexToType(appData, i));
|
|
244864
|
+
range.extendRange(evaluateIndexToType(ranges, i));
|
|
244865
|
+
}
|
|
244866
|
+
return RangeTreeNode.createCapture(range, appDataBlock, undefined);
|
|
244867
|
+
}
|
|
244868
|
+
/**
|
|
244869
|
+
* Split the array entries appData[index0 <= i < index1] into blocks of at most maxChildPerNode * maxAppDataPerLeaf and assemble into a tree structure.
|
|
244870
|
+
* @param ranges access to ranges
|
|
244871
|
+
* @param appData access to AppDataType items
|
|
244872
|
+
* @param index0 start index of the block to access
|
|
244873
|
+
* @param index1 terminal index for the block (one after final)
|
|
244874
|
+
* @param arrayLength one more than the largest range/appData index
|
|
244875
|
+
* @param maxChildPerNode max number of child nodes in each interior node
|
|
244876
|
+
* @param maxAppDataPerLeaf max number of appData items in each leaf.
|
|
244877
|
+
* @returns
|
|
244878
|
+
*/
|
|
244879
|
+
static createRecursiveByIndexSplits(ranges, appData, index0, index1, arrayLength, maxChildPerNode, maxAppDataPerLeaf) {
|
|
244880
|
+
if (index1 > arrayLength)
|
|
244881
|
+
index1 = arrayLength;
|
|
244882
|
+
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
|
|
244883
|
+
const children = [];
|
|
244884
|
+
const maxChildrenAppData = maxChildPerNode * maxAppDataPerLeaf;
|
|
244885
|
+
// console.log({ name: "createRecursive", index0, index1, maxChildrenAppData });
|
|
244886
|
+
if (index1 <= index0 + maxChildrenAppData) { // index range is small enough to hold the appData in leaf children
|
|
244887
|
+
// console.log({ case: "LEAF GROUP", index0, index1 });
|
|
244888
|
+
for (let indexA = index0 + maxAppDataPerLeaf; index0 < index1; index0 = indexA, indexA = Math.min(indexA + maxAppDataPerLeaf, index1)) {
|
|
244889
|
+
const leaf = RangeTreeOps.createLeafInIndexRange(ranges, appData, index0, indexA, arrayLength);
|
|
244890
|
+
if (leaf !== undefined) {
|
|
244891
|
+
range.extendRange(leaf.getRangeRef());
|
|
244892
|
+
children.push(leaf);
|
|
244893
|
+
}
|
|
244894
|
+
}
|
|
244895
|
+
}
|
|
244896
|
+
else { // split the appData among interior and leaf children
|
|
244897
|
+
// console.log({ case: "INTERIOR", index0, index1 });
|
|
244898
|
+
const numPerGulp = Math.ceil((index1 - index0) / maxChildPerNode);
|
|
244899
|
+
for (let indexA = index0 + numPerGulp; index0 < index1; index0 = indexA, indexA = Math.min(indexA + numPerGulp, index1)) {
|
|
244900
|
+
const child = this.createRecursiveByIndexSplits(ranges, appData, index0, indexA, arrayLength, maxChildPerNode, maxAppDataPerLeaf);
|
|
244901
|
+
if (child !== undefined) {
|
|
244902
|
+
range.extendRange(child.getRangeRef());
|
|
244903
|
+
children.push(child);
|
|
244904
|
+
}
|
|
244905
|
+
}
|
|
244906
|
+
}
|
|
244907
|
+
return (children.length > 0) ? RangeTreeNode.createCapture(range, undefined, children) : undefined;
|
|
244908
|
+
}
|
|
244909
|
+
/**
|
|
244910
|
+
* Create a range tree by simple left-right split of given ranges.
|
|
244911
|
+
* * Leaves carry the inputs in left-to-right order.
|
|
244912
|
+
* * Each leaf range is labeled by its corresponding object(s) in the appData array.
|
|
244913
|
+
* @param ranges access to ranges.
|
|
244914
|
+
* @param appData access to AppDataType items (for leaves).
|
|
244915
|
+
* @param arrayLength one more than the largest range/appData index
|
|
244916
|
+
* @param maxChildrenPerNode max number of child nodes allowed for each interior node.
|
|
244917
|
+
* @param maxAppDataPerLeaf max number of appData items allowed in each leaf.
|
|
244918
|
+
* @returns the root of the new tree, or undefined if array lengths differ or are zero.
|
|
244919
|
+
*/
|
|
244920
|
+
static createByIndexSplits(ranges, appData, arrayLength, maxChildrenPerNode = 2, maxAppDataPerLeaf = 2) {
|
|
244921
|
+
// console.log();
|
|
244922
|
+
// const numData = getFlexDataCount(appData);
|
|
244923
|
+
// console.log({ numData });
|
|
244924
|
+
if (arrayLength <= 0
|
|
244925
|
+
|| (Array.isArray(ranges) && ranges.length !== arrayLength)
|
|
244926
|
+
|| (Array.isArray(appData) && appData.length !== arrayLength))
|
|
244927
|
+
return undefined;
|
|
244928
|
+
if (maxChildrenPerNode < 2)
|
|
244929
|
+
maxChildrenPerNode = 2;
|
|
244930
|
+
return RangeTreeOps.createRecursiveByIndexSplits(ranges, appData, 0, arrayLength, arrayLength, maxChildrenPerNode, maxAppDataPerLeaf);
|
|
244931
|
+
}
|
|
244932
|
+
}
|
|
244933
|
+
|
|
244934
|
+
|
|
244935
|
+
/***/ }),
|
|
244936
|
+
|
|
244937
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js":
|
|
244938
|
+
/*!*********************************************************************************!*\
|
|
244939
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js ***!
|
|
244940
|
+
\*********************************************************************************/
|
|
244941
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244942
|
+
|
|
244943
|
+
"use strict";
|
|
244944
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244945
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244946
|
+
/* harmony export */ "SingleTreeSearchHandlerForClosestPointInArray": () => (/* binding */ SingleTreeSearchHandlerForClosestPointInArray),
|
|
244947
|
+
/* harmony export */ "SingleTreeSearchHandlerForClosestPointOnLineString3d": () => (/* binding */ SingleTreeSearchHandlerForClosestPointOnLineString3d),
|
|
244948
|
+
/* harmony export */ "SingleTreeSearchHandlerForClosestPointOnPolyface": () => (/* binding */ SingleTreeSearchHandlerForClosestPointOnPolyface),
|
|
244949
|
+
/* harmony export */ "TwoTreeSearchHandlerForFacetFacetCloseApproach": () => (/* binding */ TwoTreeSearchHandlerForFacetFacetCloseApproach),
|
|
244950
|
+
/* harmony export */ "TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach": () => (/* binding */ TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach),
|
|
244951
|
+
/* harmony export */ "TwoTreeSearchHandlerForPoint3dArrayPoint3dArrayCloseApproach": () => (/* binding */ TwoTreeSearchHandlerForPoint3dArrayPoint3dArrayCloseApproach)
|
|
244952
|
+
/* harmony export */ });
|
|
244953
|
+
/* harmony import */ var _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../curve/CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
244954
|
+
/* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
244955
|
+
/* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
244956
|
+
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
244957
|
+
/* harmony import */ var _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../FacetLocationDetail */ "../../core/geometry/lib/esm/polyface/FacetLocationDetail.js");
|
|
244958
|
+
/* harmony import */ var _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MinimumValueTester */ "../../core/geometry/lib/esm/polyface/RangeTree/MinimumValueTester.js");
|
|
244959
|
+
/* harmony import */ var _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RangeTreeNode */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js");
|
|
244960
|
+
/*---------------------------------------------------------------------------------------------
|
|
244961
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244962
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244963
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244964
|
+
/** @packageDocumentation
|
|
244965
|
+
* @module RangeSearch
|
|
244966
|
+
*/
|
|
244967
|
+
|
|
244968
|
+
|
|
244969
|
+
|
|
244970
|
+
|
|
244971
|
+
|
|
244972
|
+
|
|
244973
|
+
|
|
244974
|
+
/**
|
|
244975
|
+
* Helper class for searching for the closest point in a set of points.
|
|
244976
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
|
|
244977
|
+
* @internal
|
|
244978
|
+
*/
|
|
244979
|
+
class SingleTreeSearchHandlerForClosestPointInArray extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.SingleTreeSearchHandler {
|
|
244980
|
+
/**
|
|
244981
|
+
* Constructor
|
|
244982
|
+
* @param spacePoint cloned
|
|
244983
|
+
* @param context captured
|
|
244984
|
+
* @param maxDist collect points at no more than this distance from spacePoint
|
|
244985
|
+
*/
|
|
244986
|
+
constructor(spacePoint, context, maxDist) {
|
|
244987
|
+
super();
|
|
244988
|
+
this.context = context;
|
|
244989
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
244990
|
+
maxDist = undefined;
|
|
244991
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
244992
|
+
this.spacePoint = spacePoint.clone();
|
|
244993
|
+
}
|
|
244994
|
+
/** Return the current closest point */
|
|
244995
|
+
getResult() {
|
|
244996
|
+
if (this.searchState.minValue !== undefined && this.searchState.itemAtMinValue !== undefined) {
|
|
244997
|
+
const iPoint = this.searchState.itemAtMinValue;
|
|
244998
|
+
const cld = _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(undefined, iPoint, this.context.points[iPoint]);
|
|
244999
|
+
cld.a = this.searchState.minValue;
|
|
245000
|
+
return cld;
|
|
245001
|
+
}
|
|
245002
|
+
return undefined;
|
|
245003
|
+
}
|
|
245004
|
+
/** Return the collected closest points (if collecting) */
|
|
245005
|
+
getSavedItems() {
|
|
245006
|
+
if (this.searchState.savedItems.length === 0)
|
|
245007
|
+
return undefined;
|
|
245008
|
+
const cldArray = [];
|
|
245009
|
+
for (let i = 0; i < this.searchState.savedItems.length; ++i) {
|
|
245010
|
+
const iPoint = this.searchState.savedItems[i];
|
|
245011
|
+
const cld = _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(undefined, iPoint, this.context.points[iPoint]);
|
|
245012
|
+
cld.a = this.searchState.savedValues[i];
|
|
245013
|
+
cldArray.push(cld);
|
|
245014
|
+
}
|
|
245015
|
+
return cldArray;
|
|
245016
|
+
}
|
|
245017
|
+
/**
|
|
245018
|
+
* Return true if appData within the range should be offered to `processAppData`.
|
|
245019
|
+
* @param range range containing items to be tested.
|
|
245020
|
+
* @returns true if the spacePoint is within the range or close enough that a point in the range could be the closest.
|
|
245021
|
+
*/
|
|
245022
|
+
isRangeActive(range) {
|
|
245023
|
+
const dMin = range.distanceToPoint(this.spacePoint);
|
|
245024
|
+
if (this.searchState.isNewMinValue(dMin)) {
|
|
245025
|
+
this.context.numRangeTestTrue++;
|
|
245026
|
+
return true;
|
|
245027
|
+
}
|
|
245028
|
+
this.context.numRangeTestFalse++;
|
|
245029
|
+
return false;
|
|
245030
|
+
}
|
|
245031
|
+
/** Test a point indexed in the range tree as candidate for "closest" */
|
|
245032
|
+
processAppData(candidateIndex) {
|
|
245033
|
+
const d = this.spacePoint.distance(this.context.points[candidateIndex]);
|
|
245034
|
+
this.context.numPointTest++;
|
|
245035
|
+
this.searchState.testAndSave(candidateIndex, d);
|
|
245036
|
+
}
|
|
245037
|
+
}
|
|
245038
|
+
/**
|
|
245039
|
+
* Helper class for searching for the closest approach between sets of points.
|
|
245040
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
|
|
245041
|
+
* @internal
|
|
245042
|
+
*/
|
|
245043
|
+
class TwoTreeSearchHandlerForPoint3dArrayPoint3dArrayCloseApproach extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.TwoTreeDistanceMinimizationSearchHandler {
|
|
245044
|
+
/**
|
|
245045
|
+
* Constructor
|
|
245046
|
+
* @param contextA captured
|
|
245047
|
+
* @param contextB captured
|
|
245048
|
+
* @param maxDist collect points at no more than this separation distance
|
|
245049
|
+
*/
|
|
245050
|
+
constructor(contextA, contextB, maxDist) {
|
|
245051
|
+
super();
|
|
245052
|
+
this.contextA = contextA;
|
|
245053
|
+
this.contextB = contextB;
|
|
245054
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245055
|
+
maxDist = undefined;
|
|
245056
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245057
|
+
}
|
|
245058
|
+
/** Return the current closest approach */
|
|
245059
|
+
getResult() {
|
|
245060
|
+
if (this.searchState.minValue !== undefined) {
|
|
245061
|
+
return this.searchState.itemAtMinValue;
|
|
245062
|
+
}
|
|
245063
|
+
return undefined;
|
|
245064
|
+
}
|
|
245065
|
+
/** Return the collected close approaches (if collecting) */
|
|
245066
|
+
getSavedItems() {
|
|
245067
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245068
|
+
return this.searchState.savedItems;
|
|
245069
|
+
}
|
|
245070
|
+
return undefined;
|
|
245071
|
+
}
|
|
245072
|
+
/** Get current min distance */
|
|
245073
|
+
getCurrentDistance() {
|
|
245074
|
+
const d = this.searchState.minValue;
|
|
245075
|
+
return d === undefined ? Number.MAX_VALUE : d;
|
|
245076
|
+
}
|
|
245077
|
+
/** Compute and test the distance between two points, given their indices. */
|
|
245078
|
+
processAppDataPair(indexA, indexB) {
|
|
245079
|
+
this.contextA.numPointTest++;
|
|
245080
|
+
const pointA = this.contextA.points[indexA];
|
|
245081
|
+
const pointB = this.contextB.points[indexB];
|
|
245082
|
+
const d = pointA.distance(pointB);
|
|
245083
|
+
if (this.searchState.isNewMinOrTrigger(d)) {
|
|
245084
|
+
const cldPair = _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetailPair.createCapture(_curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(undefined, indexA, pointA), _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(undefined, indexB, pointB));
|
|
245085
|
+
cldPair.detailA.a = cldPair.detailB.a = d;
|
|
245086
|
+
this.searchState.testAndSave(cldPair, d);
|
|
245087
|
+
}
|
|
245088
|
+
}
|
|
245089
|
+
}
|
|
245090
|
+
/**
|
|
245091
|
+
* Helper class for searching for the closest point in a linestring.
|
|
245092
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
|
|
245093
|
+
* @internal
|
|
245094
|
+
*/
|
|
245095
|
+
class SingleTreeSearchHandlerForClosestPointOnLineString3d extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.SingleTreeSearchHandler {
|
|
245096
|
+
/**
|
|
245097
|
+
* Constructor
|
|
245098
|
+
* @param spacePoint cloned
|
|
245099
|
+
* @param context captured
|
|
245100
|
+
* @param maxDist collect points at no more than this distance from spacePoint
|
|
245101
|
+
*/
|
|
245102
|
+
constructor(spacePoint, context, maxDist) {
|
|
245103
|
+
super();
|
|
245104
|
+
this.context = context;
|
|
245105
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245106
|
+
maxDist = undefined;
|
|
245107
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245108
|
+
this.spacePoint = spacePoint.clone();
|
|
245109
|
+
}
|
|
245110
|
+
/** Return the current closest point */
|
|
245111
|
+
getResult() {
|
|
245112
|
+
if (this.searchState.minValue !== undefined && this.searchState.itemAtMinValue !== undefined) {
|
|
245113
|
+
return this.searchState.itemAtMinValue;
|
|
245114
|
+
}
|
|
245115
|
+
return undefined;
|
|
245116
|
+
}
|
|
245117
|
+
/** Return the collected closest points (if collecting) */
|
|
245118
|
+
getSavedItems() {
|
|
245119
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245120
|
+
return this.searchState.savedItems;
|
|
245121
|
+
}
|
|
245122
|
+
return undefined;
|
|
245123
|
+
}
|
|
245124
|
+
/**
|
|
245125
|
+
* Return true if appData within the range should be offered to `processAppData`.
|
|
245126
|
+
* @param range range containing items to be tested.
|
|
245127
|
+
* @returns true if the spacePoint is within the range or close enough that a point in the range could be the closest.
|
|
245128
|
+
*/
|
|
245129
|
+
isRangeActive(range) {
|
|
245130
|
+
const dMin = range.distanceToPoint(this.spacePoint);
|
|
245131
|
+
if (this.searchState.isNewMinValue(dMin)) {
|
|
245132
|
+
this.context.numRangeTestTrue++;
|
|
245133
|
+
return true;
|
|
245134
|
+
}
|
|
245135
|
+
this.context.numRangeTestFalse++;
|
|
245136
|
+
return false;
|
|
245137
|
+
}
|
|
245138
|
+
/** Test a segment indexed in the range tree as candidate for "closest" */
|
|
245139
|
+
processAppData(candidateIndex) {
|
|
245140
|
+
const segment = this._workSegment = this.context.lineString.getIndexedSegment(candidateIndex, this._workSegment);
|
|
245141
|
+
if (segment) {
|
|
245142
|
+
const cld = segment.closestPoint(this.spacePoint, false);
|
|
245143
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.convertLocalToGlobalDetail(cld, candidateIndex, this.context.lineString.numEdges(), this.context.lineString);
|
|
245144
|
+
this.context.numPointTest++;
|
|
245145
|
+
this.searchState.testAndSave(cld, cld.a);
|
|
245146
|
+
}
|
|
245147
|
+
}
|
|
245148
|
+
}
|
|
245149
|
+
/**
|
|
245150
|
+
* Helper class for searching for the closest approach between linestrings.
|
|
245151
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
|
|
245152
|
+
* @internal
|
|
245153
|
+
*/
|
|
245154
|
+
class TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.TwoTreeDistanceMinimizationSearchHandler {
|
|
245155
|
+
/**
|
|
245156
|
+
* Constructor
|
|
245157
|
+
* @param contextA captured
|
|
245158
|
+
* @param contextB captured
|
|
245159
|
+
* @param maxDist collect points at no more than this separation distance
|
|
245160
|
+
*/
|
|
245161
|
+
constructor(contextA, contextB, maxDist) {
|
|
245162
|
+
super();
|
|
245163
|
+
this.contextA = contextA;
|
|
245164
|
+
this.contextB = contextB;
|
|
245165
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245166
|
+
maxDist = undefined;
|
|
245167
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245168
|
+
}
|
|
245169
|
+
/**
|
|
245170
|
+
* Return the current closest approach.
|
|
245171
|
+
* * Details contain linestring *and* segment data, cf. [[LineString3d.convertLocalToGlobalDetail]]
|
|
245172
|
+
*/
|
|
245173
|
+
getResult() {
|
|
245174
|
+
if (this.searchState.minValue !== undefined) {
|
|
245175
|
+
return this.searchState.itemAtMinValue;
|
|
245176
|
+
}
|
|
245177
|
+
return undefined;
|
|
245178
|
+
}
|
|
245179
|
+
/** Return the collected close approaches (if collecting) */
|
|
245180
|
+
getSavedItems() {
|
|
245181
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245182
|
+
return this.searchState.savedItems;
|
|
245183
|
+
}
|
|
245184
|
+
return undefined;
|
|
245185
|
+
}
|
|
245186
|
+
/** Get current min distance */
|
|
245187
|
+
getCurrentDistance() {
|
|
245188
|
+
const d = this.searchState.minValue;
|
|
245189
|
+
return d === undefined ? Number.MAX_VALUE : d;
|
|
245190
|
+
}
|
|
245191
|
+
/** Compute and test the closest approach between two segments, given their indices. */
|
|
245192
|
+
processAppDataPair(indexA, indexB) {
|
|
245193
|
+
this.contextA.numPointTest++;
|
|
245194
|
+
const segA = TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach._workSegmentA =
|
|
245195
|
+
this.contextA.lineString.getIndexedSegment(indexA, TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach._workSegmentA);
|
|
245196
|
+
const segB = TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach._workSegmentB =
|
|
245197
|
+
this.contextB.lineString.getIndexedSegment(indexB, TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach._workSegmentB);
|
|
245198
|
+
const cldPair = _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_4__.LineSegment3d.closestApproach(segA, false, segB, false);
|
|
245199
|
+
if (cldPair && this.searchState.isNewMinOrTrigger(cldPair.detailA.a)) {
|
|
245200
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.convertLocalToGlobalDetail(cldPair.detailA, indexA, this.contextA.lineString.numEdges(), this.contextA.lineString);
|
|
245201
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.convertLocalToGlobalDetail(cldPair.detailB, indexB, this.contextB.lineString.numEdges(), this.contextB.lineString);
|
|
245202
|
+
this.searchState.testAndSave(cldPair, cldPair.detailA.a);
|
|
245203
|
+
}
|
|
245204
|
+
}
|
|
245205
|
+
}
|
|
245206
|
+
/**
|
|
245207
|
+
* Helper class for searching for the closest point in a polyface.
|
|
245208
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring FacetLocationDetail).
|
|
245209
|
+
* @internal
|
|
245210
|
+
*/
|
|
245211
|
+
class SingleTreeSearchHandlerForClosestPointOnPolyface extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.SingleTreeSearchHandler {
|
|
245212
|
+
/**
|
|
245213
|
+
* Constructor
|
|
245214
|
+
* @param spacePoint cloned
|
|
245215
|
+
* @param context captured
|
|
245216
|
+
* @param maxDist collect points at no more than this distance from spacePoint
|
|
245217
|
+
* @param searchFacetInterior true: search facet interior + boundary; false: just boundary
|
|
245218
|
+
*/
|
|
245219
|
+
constructor(spacePoint, context, maxDist, searchFacetInterior = false) {
|
|
245220
|
+
super();
|
|
245221
|
+
this.context = context;
|
|
245222
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245223
|
+
maxDist = undefined;
|
|
245224
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245225
|
+
this.spacePoint = spacePoint.clone();
|
|
245226
|
+
this.searchFacetInterior = searchFacetInterior;
|
|
245227
|
+
}
|
|
245228
|
+
/** Return the current closest point */
|
|
245229
|
+
getResult() {
|
|
245230
|
+
if (this.searchState.minValue !== undefined && this.searchState.itemAtMinValue !== undefined) {
|
|
245231
|
+
return this.searchState.itemAtMinValue;
|
|
245232
|
+
}
|
|
245233
|
+
return undefined;
|
|
245234
|
+
}
|
|
245235
|
+
/** Return the collected closest points (if collecting) */
|
|
245236
|
+
getSavedItems() {
|
|
245237
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245238
|
+
return this.searchState.savedItems;
|
|
245239
|
+
}
|
|
245240
|
+
return undefined;
|
|
245241
|
+
}
|
|
245242
|
+
/**
|
|
245243
|
+
* Return true if appData within the range should be offered to `processAppData`.
|
|
245244
|
+
* @param range range containing items to be tested.
|
|
245245
|
+
* @returns true if the spacePoint is within the range or close enough that a point in the range could be the closest.
|
|
245246
|
+
*/
|
|
245247
|
+
isRangeActive(range) {
|
|
245248
|
+
const dMin = range.distanceToPoint(this.spacePoint);
|
|
245249
|
+
if (this.searchState.isNewMinValue(dMin)) {
|
|
245250
|
+
this.context.numRangeTestTrue++;
|
|
245251
|
+
return true;
|
|
245252
|
+
}
|
|
245253
|
+
this.context.numRangeTestFalse++;
|
|
245254
|
+
return false;
|
|
245255
|
+
}
|
|
245256
|
+
/** Test a facet indexed in the range tree as candidate for "closest" */
|
|
245257
|
+
processAppData(candidateIndex) {
|
|
245258
|
+
this.context.visitor.setNumWrap(0); // so edgeCount === pointCount; closure point unnecessary for closestPoint[OnBoundary]
|
|
245259
|
+
if (this.context.visitor.moveToReadIndex(candidateIndex)) {
|
|
245260
|
+
let pld;
|
|
245261
|
+
if (this.searchFacetInterior)
|
|
245262
|
+
pld = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__.PolygonOps.closestPoint(this.context.visitor.point, this.spacePoint);
|
|
245263
|
+
else
|
|
245264
|
+
pld = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__.PolygonOps.closestPointOnBoundary(this.context.visitor.point, this.spacePoint);
|
|
245265
|
+
this.context.numFacetTest++;
|
|
245266
|
+
if (pld && this.searchState.isNewMinOrTrigger(pld.a)) {
|
|
245267
|
+
const edgeCount = this.context.visitor.pointCount;
|
|
245268
|
+
const fld = this.context.convexFacets
|
|
245269
|
+
? _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__.ConvexFacetLocationDetail.createCapture(this.context.visitor.currentReadIndex(), edgeCount, pld)
|
|
245270
|
+
: _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__.NonConvexFacetLocationDetail.createCapture(this.context.visitor.currentReadIndex(), edgeCount, pld);
|
|
245271
|
+
this.searchState.testAndSave(fld, pld.a);
|
|
245272
|
+
}
|
|
245273
|
+
}
|
|
245274
|
+
}
|
|
245275
|
+
}
|
|
245276
|
+
/**
|
|
245277
|
+
* Helper class for searching for the closest approach between polyfaces.
|
|
245278
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring FacetLocationDetail).
|
|
245279
|
+
* @internal
|
|
245280
|
+
*/
|
|
245281
|
+
class TwoTreeSearchHandlerForFacetFacetCloseApproach extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.TwoTreeDistanceMinimizationSearchHandler {
|
|
245282
|
+
/** Constructor
|
|
245283
|
+
* @param contextA captured
|
|
245284
|
+
* @param contextB captured
|
|
245285
|
+
* @param maxDist collect points at no more than this separation distance
|
|
245286
|
+
* @param searchFacetInterior true: search facet interior + boundary; false: just boundary
|
|
245287
|
+
*/
|
|
245288
|
+
constructor(contextA, contextB, maxDist, searchFacetInterior = false) {
|
|
245289
|
+
super();
|
|
245290
|
+
this.contextA = contextA;
|
|
245291
|
+
this.contextB = contextB;
|
|
245292
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245293
|
+
maxDist = undefined;
|
|
245294
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245295
|
+
this.searchFacetInterior = searchFacetInterior && contextA.convexFacets && contextB.convexFacets;
|
|
245296
|
+
}
|
|
245297
|
+
/** Return the facets with closest approach */
|
|
245298
|
+
getResult() {
|
|
245299
|
+
if (this.searchState.minValue !== undefined) {
|
|
245300
|
+
return this.searchState.itemAtMinValue;
|
|
245301
|
+
}
|
|
245302
|
+
return undefined;
|
|
245303
|
+
}
|
|
245304
|
+
/** Return the collected close approaches (if collecting) */
|
|
245305
|
+
getSavedItems() {
|
|
245306
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245307
|
+
return this.searchState.savedItems;
|
|
245308
|
+
}
|
|
245309
|
+
return undefined;
|
|
245310
|
+
}
|
|
245311
|
+
/** Get current min distance */
|
|
245312
|
+
getCurrentDistance() {
|
|
245313
|
+
const d = this.searchState.minValue;
|
|
245314
|
+
return d === undefined ? Number.MAX_VALUE : d;
|
|
245315
|
+
}
|
|
245316
|
+
/** Compute and test the closest approach between two facets, given their indices. */
|
|
245317
|
+
processAppDataPair(indexA, indexB) {
|
|
245318
|
+
this.contextA.visitor.setNumWrap(1); // closed polygons are more efficient for PolygonOps.closestApproach
|
|
245319
|
+
this.contextB.visitor.setNumWrap(1);
|
|
245320
|
+
if (this.contextA.visitor.moveToReadIndex(indexA) && this.contextB.visitor.moveToReadIndex(indexB)) {
|
|
245321
|
+
// ASSUME: not worth sending in maxDist here...
|
|
245322
|
+
const pldPair = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__.PolygonOps.closestApproach(this.contextA.visitor.point, this.contextB.visitor.point, undefined, this.searchFacetInterior);
|
|
245323
|
+
this.contextA.numFacetTest++;
|
|
245324
|
+
if (pldPair && this.searchState.isNewMinOrTrigger(pldPair.detailA.a)) {
|
|
245325
|
+
const edgeCountA = this.contextA.visitor.pointCount - 1;
|
|
245326
|
+
const edgeCountB = this.contextB.visitor.pointCount - 1;
|
|
245327
|
+
const fldPair = _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__.FacetLocationDetailPair.create(this.contextA.convexFacets ? _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__.ConvexFacetLocationDetail.createCapture(indexA, edgeCountA, pldPair.detailA) : _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__.NonConvexFacetLocationDetail.createCapture(indexA, edgeCountA, pldPair.detailA), this.contextB.convexFacets ? _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__.ConvexFacetLocationDetail.createCapture(indexB, edgeCountB, pldPair.detailB) : _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__.NonConvexFacetLocationDetail.createCapture(indexB, edgeCountB, pldPair.detailB));
|
|
245328
|
+
this.searchState.testAndSave(fldPair, fldPair.detailA.a);
|
|
245329
|
+
}
|
|
245330
|
+
}
|
|
245331
|
+
}
|
|
245332
|
+
}
|
|
245333
|
+
|
|
245334
|
+
|
|
243430
245335
|
/***/ }),
|
|
243431
245336
|
|
|
243432
245337
|
/***/ "../../core/geometry/lib/esm/polyface/TaggedNumericData.js":
|
|
@@ -253222,6 +255127,9 @@ class SteppedIndexFunctionFactory {
|
|
|
253222
255127
|
* @internal
|
|
253223
255128
|
*/
|
|
253224
255129
|
class FrankeSurface {
|
|
255130
|
+
constructor(scales) {
|
|
255131
|
+
this.scales = scales;
|
|
255132
|
+
}
|
|
253225
255133
|
exp0(u, v) {
|
|
253226
255134
|
return Math.exp(-0.25 * (u * u + v * v) + u + v - 2);
|
|
253227
255135
|
}
|
|
@@ -253239,7 +255147,21 @@ class FrankeSurface {
|
|
|
253239
255147
|
const f1 = 0.75 * this.exp1(u, v);
|
|
253240
255148
|
const f2 = 0.5 * this.exp2(u, v);
|
|
253241
255149
|
const f3 = -0.2 * this.exp3(u, v);
|
|
253242
|
-
|
|
255150
|
+
if (this.scales !== undefined) {
|
|
255151
|
+
const numScale = this.scales.length;
|
|
255152
|
+
let f = 0;
|
|
255153
|
+
if (numScale >= 1)
|
|
255154
|
+
f += this.scales[0] * f0;
|
|
255155
|
+
if (numScale >= 2)
|
|
255156
|
+
f += this.scales[1] * f1;
|
|
255157
|
+
if (numScale >= 3)
|
|
255158
|
+
f += this.scales[2] * f2;
|
|
255159
|
+
if (numScale >= 4)
|
|
255160
|
+
f += this.scales[3] * f3;
|
|
255161
|
+
return f;
|
|
255162
|
+
}
|
|
255163
|
+
else
|
|
255164
|
+
return f0 + f1 + f2 + f3;
|
|
253243
255165
|
}
|
|
253244
255166
|
du(u, v) {
|
|
253245
255167
|
const du0 = -3.375 * (u - 2) * this.exp0(u, v);
|
|
@@ -255255,6 +257177,40 @@ class Sample {
|
|
|
255255
257177
|
point0.push(point0[0].clone());
|
|
255256
257178
|
return point0;
|
|
255257
257179
|
}
|
|
257180
|
+
/**
|
|
257181
|
+
* Create a grid of lat-long points on a sphere.
|
|
257182
|
+
* * If pole latitudes appear in the evaluation, a single point (not a circle) is evaluated.
|
|
257183
|
+
* * Circles at various latitudes proceed south to north.
|
|
257184
|
+
* * If first and last angles of longitudeSweep match, that meridian is not duplicated.
|
|
257185
|
+
* * Longitudes can wrap freely.
|
|
257186
|
+
* @param transform local to world
|
|
257187
|
+
* @param numLatitudeStep number of latitude steps (poles count if they are in the sweeps)
|
|
257188
|
+
* @param numLongitudeStep number of longitude steps
|
|
257189
|
+
* @param latitudeSweep angle range for latitudes
|
|
257190
|
+
* @param longitudeSweep angle range for longitudes
|
|
257191
|
+
*/
|
|
257192
|
+
static createGridPointsOnEllipsoid(transform, numLatitudeStep, numLongitudeStep, latitudeSweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(-90, 90), longitudeSweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(0, 360)) {
|
|
257193
|
+
const points = [];
|
|
257194
|
+
const numJ = numLatitudeStep + 1;
|
|
257195
|
+
const jFractionStep = 1.0 / numJ;
|
|
257196
|
+
let numI = numLongitudeStep;
|
|
257197
|
+
const iFractionStep = 1.0 / numI;
|
|
257198
|
+
if (longitudeSweep.isFullCircle)
|
|
257199
|
+
numI--;
|
|
257200
|
+
for (let j = 0; j < numJ; j++) {
|
|
257201
|
+
const phi = latitudeSweep.fractionToRadians(jFractionStep * j);
|
|
257202
|
+
const sinPhi = Math.sin(phi);
|
|
257203
|
+
const cosPhi = Math.cos(phi);
|
|
257204
|
+
const numIThisCircle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.isAlmostEqualRadiansAllowPeriodShift(phi, -90) ? 1 : numI;
|
|
257205
|
+
for (let i = 0; i < numIThisCircle; i++) {
|
|
257206
|
+
const theta = longitudeSweep.fractionToRadians(iFractionStep * i);
|
|
257207
|
+
const cosTheta = Math.cos(theta);
|
|
257208
|
+
const sinTheta = Math.sin(theta);
|
|
257209
|
+
points.push(transform.multiplyXYZ(cosTheta * cosPhi, sinTheta * cosPhi, sinPhi));
|
|
257210
|
+
}
|
|
257211
|
+
}
|
|
257212
|
+
return points;
|
|
257213
|
+
}
|
|
255258
257214
|
/**
|
|
255259
257215
|
* Return an array of points on a circular arc.
|
|
255260
257216
|
* @param edgesPerQuadrant number of edges per 90 degrees
|
|
@@ -255362,14 +257318,36 @@ class Sample {
|
|
|
255362
257318
|
return _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_3__.Point2d.createFrom(Sample.createRosePoint3d(theta, a));
|
|
255363
257319
|
}
|
|
255364
257320
|
/**
|
|
255365
|
-
* Create a mesh surface from samples of a smooth function over [0,1]x[0,1].
|
|
257321
|
+
* Create a mesh surface from samples of a smooth real-valued function over [0,1]x[0,1] with multiple humps and dips.
|
|
257322
|
+
* * The facets are bilinear quads, so if planar facets are required, set `options.shouldTriangulate = true`.
|
|
255366
257323
|
* @param size grid size; the number of intervals on each side of the unit square domain.
|
|
257324
|
+
* @param scales = array of 4 (four) numbers to scale the corresponding Franke exponential. If undefined, all scales are 1.
|
|
255367
257325
|
*/
|
|
255368
|
-
static
|
|
257326
|
+
static createMeshFromFrankeSurface(size, options, scales) {
|
|
255369
257327
|
const builder = _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_49__.PolyfaceBuilder.create(options);
|
|
255370
|
-
builder.addUVGridBody(new FrankeSurface(), size, size);
|
|
257328
|
+
builder.addUVGridBody(new FrankeSurface(scales), size, size);
|
|
255371
257329
|
return builder.claimPolyface(true);
|
|
255372
257330
|
}
|
|
257331
|
+
/** Stroke a helix over the unit circle. Place in space via a transform.
|
|
257332
|
+
* The various columns of the transform become the critical measures for the (elliptic) helix:
|
|
257333
|
+
* The unit cylinder maps to an elliptic cylinder with x and y columns as 0 and 90 degree vectors.
|
|
257334
|
+
* the Helix pitch is equal to the length of the z axis in the transform.
|
|
257335
|
+
* The completeTurns parameter (which does NOT need to be an integer) is the local z of the last point
|
|
257336
|
+
*/
|
|
257337
|
+
static createHelixPoints(completeTurns, numPoints, placement) {
|
|
257338
|
+
const points = [];
|
|
257339
|
+
if (numPoints < 2)
|
|
257340
|
+
numPoints = 2;
|
|
257341
|
+
const dThetaRadians = completeTurns * Math.PI * 2 / (numPoints - 1);
|
|
257342
|
+
const dz = completeTurns / (numPoints - 1);
|
|
257343
|
+
for (let i = 0; i < numPoints; i++) {
|
|
257344
|
+
const thetaRadians = dThetaRadians * i;
|
|
257345
|
+
points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(Math.cos(thetaRadians), Math.sin(thetaRadians), i * dz));
|
|
257346
|
+
}
|
|
257347
|
+
if (placement)
|
|
257348
|
+
placement.multiplyPoint3dArrayInPlace(points);
|
|
257349
|
+
return points;
|
|
257350
|
+
}
|
|
255373
257351
|
}
|
|
255374
257352
|
/** Array with assorted Point2d samples */
|
|
255375
257353
|
Sample.point2d = [
|
|
@@ -258086,7 +260064,7 @@ class LinearSweep extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrim
|
|
|
258086
260064
|
}
|
|
258087
260065
|
/**
|
|
258088
260066
|
* Create a sweep of a starting contour.
|
|
258089
|
-
* @param contour contour to be swept
|
|
260067
|
+
* @param contour contour to be swept, CAPTURED
|
|
258090
260068
|
* @param direction sweep vector. The contour is swept the full length of the vector.
|
|
258091
260069
|
* @param capped true to include end caps
|
|
258092
260070
|
*/
|
|
@@ -260059,7 +262037,7 @@ class HalfEdge {
|
|
|
260059
262037
|
* * The two edges are joined as edgeMate pair.
|
|
260060
262038
|
* * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
|
|
260061
262039
|
* * Properties x,y,z,i are inserted in each half edge.
|
|
260062
|
-
* @returns the reference to the first half edge created.
|
|
262040
|
+
* @returns the reference to the first half edge created, set with "A" properties.
|
|
260063
262041
|
*/
|
|
260064
262042
|
static createHalfEdgePairWithCoordinates(xA = 0, yA = 0, zA = 0, iA = 0, xB = 0, yB = 0, zB = 0, iB = 0, heArray) {
|
|
260065
262043
|
const a = HalfEdge.createHalfEdgePair(heArray);
|
|
@@ -261097,8 +263075,9 @@ class HalfEdgeGraph {
|
|
|
261097
263075
|
* * The two half edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
|
|
261098
263076
|
* * The two half edges are added to the graph's HalfEdge set.
|
|
261099
263077
|
* * Coordinates are set to zero.
|
|
261100
|
-
*
|
|
261101
|
-
* @
|
|
263078
|
+
* @param iA `i` property of the first created HalfEdge
|
|
263079
|
+
* @param iB `i` property of the second created HalfEdge
|
|
263080
|
+
* @returns pointer to the first half edge created, with `i` property set to iA.
|
|
261102
263081
|
*/
|
|
261103
263082
|
createEdgeIdId(iA = 0, iB = 0) {
|
|
261104
263083
|
return HalfEdge.createHalfEdgePairWithCoordinates(0.0, 0.0, 0.0, iA, 0.0, 0.0, 0.0, iB, this.allHalfEdges);
|
|
@@ -261446,21 +263425,21 @@ class HalfEdgeGraphFromIndexedLoopsContext {
|
|
|
261446
263425
|
* * For an edge with index pair [indexA, indexB]:
|
|
261447
263426
|
* * if [indexB, indexA] has never appeared, a HalfEdge mated pair is created.
|
|
261448
263427
|
* * One of that mated pair becomes a HalfEdge in this loop.
|
|
261449
|
-
* * The other is "unmatched"
|
|
263428
|
+
* * The other is "unmatched" and gets the EXTERIOR mask.
|
|
261450
263429
|
* * When announceMatedHalfEdges(halfEdge) is called:
|
|
261451
263430
|
* * halfEdge and its mate are "new"
|
|
261452
263431
|
* * all coordinates are zeros.
|
|
261453
|
-
* * each contains (as its
|
|
263432
|
+
* * each contains (as its `i` property) one index of the [indexA,indexB] pair.
|
|
261454
263433
|
* * those coordinates and indices will never be referenced again by this construction sequence -- the caller is free to mutate them as needed.
|
|
261455
263434
|
* * if [indexB, indexA] appeared previously (and its outer HalfEdge was left "unmatched"),
|
|
261456
|
-
*
|
|
261457
|
-
* @param indices Array of indices around the edge. This is accessed cyclically.
|
|
263435
|
+
* the "unmatched" HalfEdge is used in the loop being constructed, and its EXTERIOR mask is cleared.
|
|
263436
|
+
* @param indices Array of indices around the edge. This is accessed cyclically, so first and last indices should be different.
|
|
261458
263437
|
* @param announceMatedHalfEdges optional function to be called as mated pairs are created. At the call,
|
|
261459
263438
|
* the given HalfEdge and its mate will have a pair of successive indices from the array.
|
|
261460
263439
|
*/
|
|
261461
263440
|
insertLoop(indices, announceMatedHalfEdges) {
|
|
261462
263441
|
const n = indices.length;
|
|
261463
|
-
if (n >
|
|
263442
|
+
if (n > 2) {
|
|
261464
263443
|
let index0 = indices[indices.length - 1];
|
|
261465
263444
|
this._halfEdgesAroundCurrentLoop.length = 0;
|
|
261466
263445
|
for (const index1 of indices) {
|
|
@@ -286236,7 +288215,7 @@ class TestContext {
|
|
|
286236
288215
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
286237
288216
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
286238
288217
|
await core_frontend_1.NoRenderApp.startup({
|
|
286239
|
-
applicationVersion: "4.4.0-dev.
|
|
288218
|
+
applicationVersion: "4.4.0-dev.24",
|
|
286240
288219
|
applicationId: this.settings.gprid,
|
|
286241
288220
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
286242
288221
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -300920,9 +302899,9 @@ const gBase64 = {
|
|
|
300920
302899
|
|
|
300921
302900
|
/***/ }),
|
|
300922
302901
|
|
|
300923
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302902
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
|
|
300924
302903
|
/*!******************************************************************************************************************************!*\
|
|
300925
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302904
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
|
|
300926
302905
|
\******************************************************************************************************************************/
|
|
300927
302906
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
300928
302907
|
|
|
@@ -300939,9 +302918,9 @@ function _arrayLikeToArray(arr, len) {
|
|
|
300939
302918
|
|
|
300940
302919
|
/***/ }),
|
|
300941
302920
|
|
|
300942
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302921
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
|
|
300943
302922
|
/*!****************************************************************************************************************************!*\
|
|
300944
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302923
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
|
|
300945
302924
|
\****************************************************************************************************************************/
|
|
300946
302925
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
300947
302926
|
|
|
@@ -300956,9 +302935,9 @@ function _arrayWithHoles(arr) {
|
|
|
300956
302935
|
|
|
300957
302936
|
/***/ }),
|
|
300958
302937
|
|
|
300959
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302938
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
|
|
300960
302939
|
/*!***********************************************************************************************************************************!*\
|
|
300961
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302940
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
|
|
300962
302941
|
\***********************************************************************************************************************************/
|
|
300963
302942
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
300964
302943
|
|
|
@@ -300976,9 +302955,9 @@ function _assertThisInitialized(self) {
|
|
|
300976
302955
|
|
|
300977
302956
|
/***/ }),
|
|
300978
302957
|
|
|
300979
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302958
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
|
|
300980
302959
|
/*!****************************************************************************************************************************!*\
|
|
300981
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302960
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
|
|
300982
302961
|
\****************************************************************************************************************************/
|
|
300983
302962
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
300984
302963
|
|
|
@@ -300995,9 +302974,9 @@ function _classCallCheck(instance, Constructor) {
|
|
|
300995
302974
|
|
|
300996
302975
|
/***/ }),
|
|
300997
302976
|
|
|
300998
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302977
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/createClass.js":
|
|
300999
302978
|
/*!*************************************************************************************************************************!*\
|
|
301000
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302979
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/createClass.js ***!
|
|
301001
302980
|
\*************************************************************************************************************************/
|
|
301002
302981
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301003
302982
|
|
|
@@ -301006,7 +302985,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301006
302985
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301007
302986
|
/* harmony export */ "default": () => (/* binding */ _createClass)
|
|
301008
302987
|
/* harmony export */ });
|
|
301009
|
-
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
302988
|
+
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
|
|
301010
302989
|
|
|
301011
302990
|
function _defineProperties(target, props) {
|
|
301012
302991
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -301028,9 +303007,9 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
301028
303007
|
|
|
301029
303008
|
/***/ }),
|
|
301030
303009
|
|
|
301031
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303010
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/defineProperty.js":
|
|
301032
303011
|
/*!****************************************************************************************************************************!*\
|
|
301033
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303012
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
|
|
301034
303013
|
\****************************************************************************************************************************/
|
|
301035
303014
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301036
303015
|
|
|
@@ -301039,7 +303018,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301039
303018
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301040
303019
|
/* harmony export */ "default": () => (/* binding */ _defineProperty)
|
|
301041
303020
|
/* harmony export */ });
|
|
301042
|
-
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303021
|
+
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
|
|
301043
303022
|
|
|
301044
303023
|
function _defineProperty(obj, key, value) {
|
|
301045
303024
|
key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key);
|
|
@@ -301058,9 +303037,9 @@ function _defineProperty(obj, key, value) {
|
|
|
301058
303037
|
|
|
301059
303038
|
/***/ }),
|
|
301060
303039
|
|
|
301061
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303040
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
|
|
301062
303041
|
/*!****************************************************************************************************************************!*\
|
|
301063
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303042
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
|
|
301064
303043
|
\****************************************************************************************************************************/
|
|
301065
303044
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301066
303045
|
|
|
@@ -301078,9 +303057,9 @@ function _getPrototypeOf(o) {
|
|
|
301078
303057
|
|
|
301079
303058
|
/***/ }),
|
|
301080
303059
|
|
|
301081
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303060
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/inherits.js":
|
|
301082
303061
|
/*!**********************************************************************************************************************!*\
|
|
301083
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303062
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/inherits.js ***!
|
|
301084
303063
|
\**********************************************************************************************************************/
|
|
301085
303064
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301086
303065
|
|
|
@@ -301089,7 +303068,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301089
303068
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301090
303069
|
/* harmony export */ "default": () => (/* binding */ _inherits)
|
|
301091
303070
|
/* harmony export */ });
|
|
301092
|
-
/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303071
|
+
/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
|
|
301093
303072
|
|
|
301094
303073
|
function _inherits(subClass, superClass) {
|
|
301095
303074
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -301110,9 +303089,9 @@ function _inherits(subClass, superClass) {
|
|
|
301110
303089
|
|
|
301111
303090
|
/***/ }),
|
|
301112
303091
|
|
|
301113
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303092
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
|
|
301114
303093
|
/*!*****************************************************************************************************************************!*\
|
|
301115
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303094
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
|
|
301116
303095
|
\*****************************************************************************************************************************/
|
|
301117
303096
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301118
303097
|
|
|
@@ -301127,9 +303106,9 @@ function _iterableToArray(iter) {
|
|
|
301127
303106
|
|
|
301128
303107
|
/***/ }),
|
|
301129
303108
|
|
|
301130
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303109
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
|
|
301131
303110
|
/*!*****************************************************************************************************************************!*\
|
|
301132
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303111
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
|
|
301133
303112
|
\*****************************************************************************************************************************/
|
|
301134
303113
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301135
303114
|
|
|
@@ -301144,9 +303123,9 @@ function _nonIterableRest() {
|
|
|
301144
303123
|
|
|
301145
303124
|
/***/ }),
|
|
301146
303125
|
|
|
301147
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303126
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
|
|
301148
303127
|
/*!***************************************************************************************************************************************!*\
|
|
301149
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303128
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
|
|
301150
303129
|
\***************************************************************************************************************************************/
|
|
301151
303130
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301152
303131
|
|
|
@@ -301155,8 +303134,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301155
303134
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301156
303135
|
/* harmony export */ "default": () => (/* binding */ _possibleConstructorReturn)
|
|
301157
303136
|
/* harmony export */ });
|
|
301158
|
-
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301159
|
-
/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303137
|
+
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
|
303138
|
+
/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
|
|
301160
303139
|
|
|
301161
303140
|
|
|
301162
303141
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -301170,9 +303149,9 @@ function _possibleConstructorReturn(self, call) {
|
|
|
301170
303149
|
|
|
301171
303150
|
/***/ }),
|
|
301172
303151
|
|
|
301173
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303152
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
|
|
301174
303153
|
/*!****************************************************************************************************************************!*\
|
|
301175
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303154
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
|
|
301176
303155
|
\****************************************************************************************************************************/
|
|
301177
303156
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301178
303157
|
|
|
@@ -301191,9 +303170,9 @@ function _setPrototypeOf(o, p) {
|
|
|
301191
303170
|
|
|
301192
303171
|
/***/ }),
|
|
301193
303172
|
|
|
301194
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303173
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toArray.js":
|
|
301195
303174
|
/*!*********************************************************************************************************************!*\
|
|
301196
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303175
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toArray.js ***!
|
|
301197
303176
|
\*********************************************************************************************************************/
|
|
301198
303177
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301199
303178
|
|
|
@@ -301202,10 +303181,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301202
303181
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301203
303182
|
/* harmony export */ "default": () => (/* binding */ _toArray)
|
|
301204
303183
|
/* harmony export */ });
|
|
301205
|
-
/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301206
|
-
/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301207
|
-
/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301208
|
-
/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303184
|
+
/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
|
|
303185
|
+
/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
|
|
303186
|
+
/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
|
|
303187
|
+
/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
|
|
301209
303188
|
|
|
301210
303189
|
|
|
301211
303190
|
|
|
@@ -301216,57 +303195,57 @@ function _toArray(arr) {
|
|
|
301216
303195
|
|
|
301217
303196
|
/***/ }),
|
|
301218
303197
|
|
|
301219
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303198
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPrimitive.js":
|
|
301220
303199
|
/*!*************************************************************************************************************************!*\
|
|
301221
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303200
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***!
|
|
301222
303201
|
\*************************************************************************************************************************/
|
|
301223
303202
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301224
303203
|
|
|
301225
303204
|
"use strict";
|
|
301226
303205
|
__webpack_require__.r(__webpack_exports__);
|
|
301227
303206
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301228
|
-
/* harmony export */ "default": () => (/* binding */
|
|
303207
|
+
/* harmony export */ "default": () => (/* binding */ toPrimitive)
|
|
301229
303208
|
/* harmony export */ });
|
|
301230
|
-
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303209
|
+
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
|
301231
303210
|
|
|
301232
|
-
function
|
|
301233
|
-
if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(
|
|
301234
|
-
var
|
|
301235
|
-
if (
|
|
301236
|
-
var
|
|
301237
|
-
if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(
|
|
303211
|
+
function toPrimitive(t, r) {
|
|
303212
|
+
if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t;
|
|
303213
|
+
var e = t[Symbol.toPrimitive];
|
|
303214
|
+
if (void 0 !== e) {
|
|
303215
|
+
var i = e.call(t, r || "default");
|
|
303216
|
+
if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i;
|
|
301238
303217
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
301239
303218
|
}
|
|
301240
|
-
return (
|
|
303219
|
+
return ("string" === r ? String : Number)(t);
|
|
301241
303220
|
}
|
|
301242
303221
|
|
|
301243
303222
|
/***/ }),
|
|
301244
303223
|
|
|
301245
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303224
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
|
|
301246
303225
|
/*!***************************************************************************************************************************!*\
|
|
301247
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303226
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***!
|
|
301248
303227
|
\***************************************************************************************************************************/
|
|
301249
303228
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301250
303229
|
|
|
301251
303230
|
"use strict";
|
|
301252
303231
|
__webpack_require__.r(__webpack_exports__);
|
|
301253
303232
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301254
|
-
/* harmony export */ "default": () => (/* binding */
|
|
303233
|
+
/* harmony export */ "default": () => (/* binding */ toPropertyKey)
|
|
301255
303234
|
/* harmony export */ });
|
|
301256
|
-
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301257
|
-
/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303235
|
+
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
|
303236
|
+
/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPrimitive.js");
|
|
301258
303237
|
|
|
301259
303238
|
|
|
301260
|
-
function
|
|
301261
|
-
var
|
|
301262
|
-
return (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(
|
|
303239
|
+
function toPropertyKey(t) {
|
|
303240
|
+
var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t, "string");
|
|
303241
|
+
return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i) ? i : String(i);
|
|
301263
303242
|
}
|
|
301264
303243
|
|
|
301265
303244
|
/***/ }),
|
|
301266
303245
|
|
|
301267
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303246
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/typeof.js":
|
|
301268
303247
|
/*!********************************************************************************************************************!*\
|
|
301269
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303248
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/typeof.js ***!
|
|
301270
303249
|
\********************************************************************************************************************/
|
|
301271
303250
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301272
303251
|
|
|
@@ -301287,9 +303266,9 @@ function _typeof(o) {
|
|
|
301287
303266
|
|
|
301288
303267
|
/***/ }),
|
|
301289
303268
|
|
|
301290
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303269
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
|
|
301291
303270
|
/*!****************************************************************************************************************************************!*\
|
|
301292
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303271
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
|
|
301293
303272
|
\****************************************************************************************************************************************/
|
|
301294
303273
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301295
303274
|
|
|
@@ -301298,7 +303277,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301298
303277
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301299
303278
|
/* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
|
|
301300
303279
|
/* harmony export */ });
|
|
301301
|
-
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303280
|
+
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
|
|
301302
303281
|
|
|
301303
303282
|
function _unsupportedIterableToArray(o, minLen) {
|
|
301304
303283
|
if (!o) return;
|
|
@@ -301796,15 +303775,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301796
303775
|
/* harmony export */ "t": () => (/* binding */ t),
|
|
301797
303776
|
/* harmony export */ "use": () => (/* binding */ use)
|
|
301798
303777
|
/* harmony export */ });
|
|
301799
|
-
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301800
|
-
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301801
|
-
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301802
|
-
/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301803
|
-
/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301804
|
-
/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301805
|
-
/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301806
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
301807
|
-
/* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303778
|
+
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
|
303779
|
+
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
|
|
303780
|
+
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/createClass.js");
|
|
303781
|
+
/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
|
|
303782
|
+
/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/inherits.js");
|
|
303783
|
+
/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
|
|
303784
|
+
/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
|
|
303785
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
303786
|
+
/* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toArray.js");
|
|
301808
303787
|
|
|
301809
303788
|
|
|
301810
303789
|
|
|
@@ -305048,7 +307027,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
305048
307027
|
/***/ ((module) => {
|
|
305049
307028
|
|
|
305050
307029
|
"use strict";
|
|
305051
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.
|
|
307030
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.24","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.4.0-dev.24","@itwin/core-bentley":"workspace:^4.4.0-dev.24","@itwin/core-common":"workspace:^4.4.0-dev.24","@itwin/core-geometry":"workspace:^4.4.0-dev.24","@itwin/core-orbitgt":"workspace:^4.4.0-dev.24","@itwin/core-quantity":"workspace:^4.4.0-dev.24"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
305052
307031
|
|
|
305053
307032
|
/***/ }),
|
|
305054
307033
|
|