@itwin/rpcinterface-full-stack-tests 4.4.0-dev.21 → 4.4.0-dev.25
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.
|
@@ -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
|
}
|
|
@@ -144231,6 +144332,17 @@ function colorFromMaterial(material, isTransparent) {
|
|
|
144231
144332
|
color = color.withTransparency(0);
|
|
144232
144333
|
return color;
|
|
144233
144334
|
}
|
|
144335
|
+
function trsMatrix(translation, rotation, scale, result) {
|
|
144336
|
+
// SPEC: To compose the local transformation matrix, TRS properties MUST be converted to matrices and postmultiplied in the T * R * S order;
|
|
144337
|
+
// first the scale is applied to the vertices, then the rotation, and then the translation.
|
|
144338
|
+
const scaleTf = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createRefs(undefined, scale ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createScale(scale[0], scale[1], scale[2]) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
|
|
144339
|
+
const rotTf = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createRefs(undefined, rotation ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createFromQuaternion(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point4d.create(rotation[0], rotation[1], rotation[2], rotation[3])) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
|
|
144340
|
+
rotTf.matrix.transposeInPlace(); // See comment on Matrix3d.createFromQuaternion
|
|
144341
|
+
const transTf = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslation(translation ? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(translation[0], translation[1], translation[2]) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero());
|
|
144342
|
+
const tf = scaleTf.multiplyTransformTransform(rotTf, result);
|
|
144343
|
+
transTf.multiplyTransformTransform(tf, tf);
|
|
144344
|
+
return tf;
|
|
144345
|
+
}
|
|
144234
144346
|
class TransformStack {
|
|
144235
144347
|
constructor(transform) {
|
|
144236
144348
|
this._stack = [];
|
|
@@ -144251,14 +144363,7 @@ class TransformStack {
|
|
|
144251
144363
|
nodeTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createOriginAndMatrix(origin, matrix);
|
|
144252
144364
|
}
|
|
144253
144365
|
else if (node.rotation || node.scale || node.translation) {
|
|
144254
|
-
|
|
144255
|
-
// first the scale is applied to the vertices, then the rotation, and then the translation.
|
|
144256
|
-
const scale = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createRefs(undefined, node.scale ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createScale(node.scale[0], node.scale[1], node.scale[2]) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
|
|
144257
|
-
const rot = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createRefs(undefined, node.rotation ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createFromQuaternion(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point4d.create(node.rotation[0], node.rotation[1], node.rotation[2], node.rotation[3])) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
|
|
144258
|
-
rot.matrix.transposeInPlace(); // See comment on Matrix3d.createFromQuaternion
|
|
144259
|
-
const trans = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslation(node.translation ? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(node.translation[0], node.translation[1], node.translation[2]) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero());
|
|
144260
|
-
nodeTransform = scale.multiplyTransformTransform(rot);
|
|
144261
|
-
trans.multiplyTransformTransform(nodeTransform, nodeTransform);
|
|
144366
|
+
nodeTransform = trsMatrix(node.translation, node.rotation, node.scale);
|
|
144262
144367
|
}
|
|
144263
144368
|
const top = this.transform;
|
|
144264
144369
|
if (!top)
|
|
@@ -144311,6 +144416,9 @@ class GltfReader {
|
|
|
144311
144416
|
traverseScene() {
|
|
144312
144417
|
return this.traverseNodes(this._sceneNodes);
|
|
144313
144418
|
}
|
|
144419
|
+
get viewFlagOverrides() {
|
|
144420
|
+
return undefined;
|
|
144421
|
+
}
|
|
144314
144422
|
getTileTransform(transformToRoot, pseudoRtcBias) {
|
|
144315
144423
|
let transform;
|
|
144316
144424
|
if (this._returnToCenter || pseudoRtcBias || this._yAxisUp || transformToRoot) {
|
|
@@ -144354,18 +144462,19 @@ class GltfReader {
|
|
|
144354
144462
|
renderGraphic = renderGraphicList[0];
|
|
144355
144463
|
else
|
|
144356
144464
|
renderGraphic = this._system.createGraphicList(renderGraphicList);
|
|
144357
|
-
const transform = this.getTileTransform(transformToRoot, pseudoRtcBias);
|
|
144358
|
-
let range = contentRange;
|
|
144359
|
-
const invTransform = transform?.inverse();
|
|
144360
|
-
if (invTransform)
|
|
144361
|
-
range = invTransform.multiplyRange(contentRange);
|
|
144362
144465
|
if (featureTable)
|
|
144363
|
-
renderGraphic = this._system.createBatch(renderGraphic, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.PackedFeatureTable.pack(featureTable),
|
|
144364
|
-
|
|
144466
|
+
renderGraphic = this._system.createBatch(renderGraphic, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.PackedFeatureTable.pack(featureTable), contentRange);
|
|
144467
|
+
const transform = this.getTileTransform(transformToRoot, pseudoRtcBias);
|
|
144468
|
+
const viewFlagOverrides = this.viewFlagOverrides;
|
|
144469
|
+
if (transform || viewFlagOverrides) {
|
|
144365
144470
|
const branch = new _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_4__.GraphicBranch(true);
|
|
144471
|
+
if (viewFlagOverrides)
|
|
144472
|
+
branch.setViewFlagOverrides(viewFlagOverrides);
|
|
144366
144473
|
branch.add(renderGraphic);
|
|
144367
|
-
renderGraphic = this._system.createBranch(branch, transform);
|
|
144474
|
+
renderGraphic = this._system.createBranch(branch, transform ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity());
|
|
144368
144475
|
}
|
|
144476
|
+
const invTransform = transform?.inverse();
|
|
144477
|
+
const range = invTransform ? invTransform.multiplyRange(contentRange) : contentRange;
|
|
144369
144478
|
return {
|
|
144370
144479
|
readStatus,
|
|
144371
144480
|
isLeaf,
|
|
@@ -144412,12 +144521,76 @@ class GltfReader {
|
|
|
144412
144521
|
mesh.normals.push(new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.OctEncodedNormal(normal));
|
|
144413
144522
|
return mesh.getGraphics(this._system, instances);
|
|
144414
144523
|
}
|
|
144415
|
-
|
|
144524
|
+
readInstanceAttributes(node, featureTable) {
|
|
144525
|
+
const ext = node.extensions?.EXT_mesh_gpu_instancing;
|
|
144526
|
+
if (!ext || !ext.attributes) {
|
|
144527
|
+
return undefined;
|
|
144528
|
+
}
|
|
144529
|
+
const translationsView = this.getBufferView(ext.attributes, "TRANSLATION");
|
|
144530
|
+
const translations = translationsView?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
|
|
144531
|
+
const rotations = this.getBufferView(ext.attributes, "ROTATION")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
|
|
144532
|
+
const scales = this.getBufferView(ext.attributes, "SCALE")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
|
|
144533
|
+
// All attributes must specify the same count, count must be greater than zero, and at least one attribute must be specified.
|
|
144534
|
+
const count = translations?.count ?? rotations?.count ?? scales?.count;
|
|
144535
|
+
if (!count || (rotations && rotations.count !== count) || (scales && scales.count !== count)) {
|
|
144536
|
+
return undefined;
|
|
144537
|
+
}
|
|
144538
|
+
const transformCenter = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d();
|
|
144539
|
+
const trMin = translationsView?.accessor.min;
|
|
144540
|
+
const trMax = translationsView?.accessor.max;
|
|
144541
|
+
if (trMin && trMax) {
|
|
144542
|
+
const half = (idx) => trMin[idx] + (trMax[idx] - trMin[idx]) / 2;
|
|
144543
|
+
transformCenter.set(half(0), half(1), half(2));
|
|
144544
|
+
}
|
|
144545
|
+
const getTranslation = (index) => {
|
|
144546
|
+
if (!translations) {
|
|
144547
|
+
return undefined;
|
|
144548
|
+
}
|
|
144549
|
+
index *= 3;
|
|
144550
|
+
return [
|
|
144551
|
+
translations.buffer[index + 0] - transformCenter.x,
|
|
144552
|
+
translations.buffer[index + 1] - transformCenter.y,
|
|
144553
|
+
translations.buffer[index + 2] - transformCenter.z,
|
|
144554
|
+
];
|
|
144555
|
+
};
|
|
144556
|
+
const getRotation = (index) => {
|
|
144557
|
+
index *= 4;
|
|
144558
|
+
return rotations ? [rotations.buffer[index], rotations.buffer[index + 1], rotations.buffer[index + 2], rotations.buffer[index + 3]] : undefined;
|
|
144559
|
+
};
|
|
144560
|
+
const getScale = (index) => {
|
|
144561
|
+
index *= 3;
|
|
144562
|
+
return scales ? [scales.buffer[index], scales.buffer[index + 1], scales.buffer[index + 2]] : undefined;
|
|
144563
|
+
};
|
|
144564
|
+
const transforms = new Float32Array(3 * 4 * count);
|
|
144565
|
+
const transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
144566
|
+
for (let i = 0; i < count; i++) {
|
|
144567
|
+
const tf = trsMatrix(getTranslation(i), getRotation(i), getScale(i), transform);
|
|
144568
|
+
const idx = i * 3 * 4;
|
|
144569
|
+
transforms[idx + 0] = tf.matrix.coffs[0];
|
|
144570
|
+
transforms[idx + 1] = tf.matrix.coffs[1];
|
|
144571
|
+
transforms[idx + 2] = tf.matrix.coffs[2];
|
|
144572
|
+
transforms[idx + 3] = tf.origin.x;
|
|
144573
|
+
transforms[idx + 4] = tf.matrix.coffs[3];
|
|
144574
|
+
transforms[idx + 5] = tf.matrix.coffs[4];
|
|
144575
|
+
transforms[idx + 6] = tf.matrix.coffs[5];
|
|
144576
|
+
transforms[idx + 7] = tf.origin.y;
|
|
144577
|
+
transforms[idx + 8] = tf.matrix.coffs[6];
|
|
144578
|
+
transforms[idx + 9] = tf.matrix.coffs[7];
|
|
144579
|
+
transforms[idx + 10] = tf.matrix.coffs[8];
|
|
144580
|
+
transforms[idx + 11] = tf.origin.z;
|
|
144581
|
+
}
|
|
144582
|
+
// ###TODO? The extension currently provides no way of specifying per-instance feature Ids.
|
|
144583
|
+
// For now, assume that if the feature table contains exactly one feature, all the instances belong to that feature.
|
|
144584
|
+
const featureIds = featureTable && featureTable.isUniform ? new Uint8Array(3 * count) : undefined;
|
|
144585
|
+
return { count, transforms, transformCenter, featureIds };
|
|
144586
|
+
}
|
|
144587
|
+
readNodeAndCreateGraphics(renderGraphicList, node, featureTable, transformStack, batchInstances, pseudoRtcBias) {
|
|
144416
144588
|
if (undefined === node)
|
|
144417
144589
|
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TileReadStatus.InvalidTileData;
|
|
144418
144590
|
// IMPORTANT: Do not return without popping this node from the stack.
|
|
144419
144591
|
transformStack.push(node);
|
|
144420
144592
|
const thisTransform = transformStack.transform;
|
|
144593
|
+
const nodeInstances = !batchInstances && undefined !== node.mesh ? this.readInstanceAttributes(node, featureTable) : undefined;
|
|
144421
144594
|
/**
|
|
144422
144595
|
* This is a workaround for tiles generated by
|
|
144423
144596
|
* context capture which have a large offset from the tileset origin that exceeds the
|
|
@@ -144432,16 +144605,16 @@ class GltfReader {
|
|
|
144432
144605
|
for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.getGltfNodeMeshIds)(node)) {
|
|
144433
144606
|
const nodeMesh = this._meshes[meshKey];
|
|
144434
144607
|
if (nodeMesh?.primitives) {
|
|
144435
|
-
const meshes = this.readMeshPrimitives(node, featureTable, thisTransform, thisBias);
|
|
144608
|
+
const meshes = this.readMeshPrimitives(node, featureTable, thisTransform, thisBias, nodeInstances);
|
|
144436
144609
|
let renderGraphic;
|
|
144437
144610
|
if (0 !== meshes.length) {
|
|
144438
144611
|
if (1 === meshes.length) {
|
|
144439
|
-
renderGraphic = this.graphicFromMeshData(meshes[0],
|
|
144612
|
+
renderGraphic = this.graphicFromMeshData(meshes[0], batchInstances ?? nodeInstances);
|
|
144440
144613
|
}
|
|
144441
144614
|
else {
|
|
144442
144615
|
const thisList = [];
|
|
144443
144616
|
for (const mesh of meshes) {
|
|
144444
|
-
renderGraphic = this.graphicFromMeshData(mesh,
|
|
144617
|
+
renderGraphic = this.graphicFromMeshData(mesh, batchInstances ?? nodeInstances);
|
|
144445
144618
|
if (undefined !== renderGraphic)
|
|
144446
144619
|
thisList.push(renderGraphic);
|
|
144447
144620
|
}
|
|
@@ -144463,7 +144636,7 @@ class GltfReader {
|
|
|
144463
144636
|
for (const childId of node.children) {
|
|
144464
144637
|
const child = this._nodes[childId];
|
|
144465
144638
|
if (child)
|
|
144466
|
-
this.readNodeAndCreateGraphics(renderGraphicList, child, featureTable, transformStack,
|
|
144639
|
+
this.readNodeAndCreateGraphics(renderGraphicList, child, featureTable, transformStack, batchInstances ?? nodeInstances);
|
|
144467
144640
|
}
|
|
144468
144641
|
}
|
|
144469
144642
|
transformStack.pop();
|
|
@@ -144692,9 +144865,9 @@ class GltfReader {
|
|
|
144692
144865
|
// DisplayParams doesn't want a separate texture mapping if the material already has one.
|
|
144693
144866
|
textureMapping = undefined;
|
|
144694
144867
|
}
|
|
144695
|
-
return new _common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams(_common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams.Type.Mesh, color, color, 1, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Solid, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FillFlags.
|
|
144868
|
+
return new _common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams(_common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams.Type.Mesh, color, color, 1, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Solid, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FillFlags.None, renderMaterial, undefined, hasBakedLighting, textureMapping);
|
|
144696
144869
|
}
|
|
144697
|
-
readMeshPrimitives(node, featureTable, thisTransform, thisBias) {
|
|
144870
|
+
readMeshPrimitives(node, featureTable, thisTransform, thisBias, instances) {
|
|
144698
144871
|
const meshes = [];
|
|
144699
144872
|
for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.getGltfNodeMeshIds)(node)) {
|
|
144700
144873
|
const nodeMesh = this._meshes[meshKey];
|
|
@@ -144704,9 +144877,30 @@ class GltfReader {
|
|
|
144704
144877
|
if (mesh) {
|
|
144705
144878
|
meshes.push(mesh);
|
|
144706
144879
|
if (this._computedContentRange && mesh.pointRange) {
|
|
144707
|
-
const
|
|
144708
|
-
|
|
144709
|
-
|
|
144880
|
+
const meshRange = thisTransform ? thisTransform.multiplyRange(mesh.pointRange) : mesh.pointRange;
|
|
144881
|
+
if (!instances) {
|
|
144882
|
+
this._computedContentRange.extendRange(meshRange);
|
|
144883
|
+
}
|
|
144884
|
+
else {
|
|
144885
|
+
const tfs = instances.transforms;
|
|
144886
|
+
const nodeRange = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
|
|
144887
|
+
const extendTransformedRange = (i, x, y, z) => {
|
|
144888
|
+
nodeRange.extendXYZ(tfs[i + 3] + tfs[i + 0] * x + tfs[i + 1] * y + tfs[i + 2] * z, tfs[i + 7] + tfs[i + 4] * x + tfs[i + 5] * y + tfs[i + 6] * z, tfs[i + 11] + tfs[i + 8] * x + tfs[i + 9] * y + tfs[i + 10] * z);
|
|
144889
|
+
};
|
|
144890
|
+
for (let i = 0; i < tfs.length; i += 3 * 4) {
|
|
144891
|
+
extendTransformedRange(i, meshRange.low.x, meshRange.low.y, meshRange.low.z);
|
|
144892
|
+
extendTransformedRange(i, meshRange.low.x, meshRange.low.y, meshRange.high.z);
|
|
144893
|
+
extendTransformedRange(i, meshRange.low.x, meshRange.high.y, meshRange.low.z);
|
|
144894
|
+
extendTransformedRange(i, meshRange.low.x, meshRange.high.y, meshRange.high.z);
|
|
144895
|
+
extendTransformedRange(i, meshRange.high.x, meshRange.low.y, meshRange.low.z);
|
|
144896
|
+
extendTransformedRange(i, meshRange.high.x, meshRange.low.y, meshRange.high.z);
|
|
144897
|
+
extendTransformedRange(i, meshRange.high.x, meshRange.high.y, meshRange.low.z);
|
|
144898
|
+
extendTransformedRange(i, meshRange.high.x, meshRange.high.y, meshRange.high.z);
|
|
144899
|
+
}
|
|
144900
|
+
nodeRange.low.addInPlace(instances.transformCenter);
|
|
144901
|
+
nodeRange.high.addInPlace(instances.transformCenter);
|
|
144902
|
+
this._computedContentRange.extendRange(nodeRange);
|
|
144903
|
+
}
|
|
144710
144904
|
}
|
|
144711
144905
|
}
|
|
144712
144906
|
}
|
|
@@ -145441,6 +145635,12 @@ class GltfGraphicsReader extends GltfReader {
|
|
|
145441
145635
|
this._featureTable.insert(new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Feature(pickableId));
|
|
145442
145636
|
}
|
|
145443
145637
|
}
|
|
145638
|
+
get viewFlagOverrides() {
|
|
145639
|
+
return {
|
|
145640
|
+
whiteOnWhiteReversal: false,
|
|
145641
|
+
renderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderMode.SmoothShade,
|
|
145642
|
+
};
|
|
145643
|
+
}
|
|
145444
145644
|
async read() {
|
|
145445
145645
|
await this.resolveResources();
|
|
145446
145646
|
return this.readGltfAndCreateGraphics(this._isLeaf, this._featureTable, this._contentRange, this._transform);
|
|
@@ -146819,12 +147019,39 @@ function createPatternGraphic(params, options) {
|
|
|
146819
147019
|
return branch.isEmpty ? undefined : options.system.createGraphicBranch(branch, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(), { clipVolume });
|
|
146820
147020
|
}
|
|
146821
147021
|
function createNodeGraphics(node, options) {
|
|
147022
|
+
if (undefined === node.groupId)
|
|
147023
|
+
return createPrimitivesNodeGraphics(node, options);
|
|
146822
147024
|
const graphics = [];
|
|
147025
|
+
for (const child of node.nodes) {
|
|
147026
|
+
graphics.push(...createPrimitivesNodeGraphics(child, options));
|
|
147027
|
+
}
|
|
147028
|
+
if (graphics.length === 0)
|
|
147029
|
+
return graphics;
|
|
147030
|
+
const branch = new _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_7__.GraphicBranch(true);
|
|
147031
|
+
branch.groupNodeId = node.groupId;
|
|
147032
|
+
branch.entries.push(...graphics);
|
|
147033
|
+
return [options.system.createBranch(branch, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity())];
|
|
147034
|
+
}
|
|
147035
|
+
function createPrimitivesNodeGraphics(node, options) {
|
|
147036
|
+
let graphics = [];
|
|
146823
147037
|
for (const primitive of node.primitives) {
|
|
146824
147038
|
const graphic = primitive.type === "pattern" ? createPatternGraphic(primitive.params, options) : createPrimitiveGraphic(primitive, options);
|
|
146825
147039
|
if (graphic)
|
|
146826
147040
|
graphics.push(graphic);
|
|
146827
147041
|
}
|
|
147042
|
+
if (!graphics.length)
|
|
147043
|
+
return graphics;
|
|
147044
|
+
if (undefined !== node.layerId) {
|
|
147045
|
+
const layerGraphic = 1 === graphics.length ? graphics[0] : options.system.createGraphicList(graphics);
|
|
147046
|
+
graphics = [options.system.createGraphicLayer(layerGraphic, node.layerId)];
|
|
147047
|
+
}
|
|
147048
|
+
else if (undefined !== node.animationNodeId) {
|
|
147049
|
+
const branch = new _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_7__.GraphicBranch(true);
|
|
147050
|
+
branch.animationId = node.animationId;
|
|
147051
|
+
branch.animationNodeId = node.animationNodeId;
|
|
147052
|
+
branch.entries.push(...graphics);
|
|
147053
|
+
graphics = [options.system.createBranch(branch, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity())];
|
|
147054
|
+
}
|
|
146828
147055
|
return graphics;
|
|
146829
147056
|
}
|
|
146830
147057
|
/** @internal */
|
|
@@ -146839,23 +147066,7 @@ async function decodeImdlGraphics(options) {
|
|
|
146839
147066
|
const system = options.system;
|
|
146840
147067
|
const graphics = [];
|
|
146841
147068
|
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
|
-
}
|
|
147069
|
+
graphics.push(...createNodeGraphics(node, graphicsOptions));
|
|
146859
147070
|
}
|
|
146860
147071
|
switch (graphics.length) {
|
|
146861
147072
|
case 0: return undefined;
|
|
@@ -147034,6 +147245,7 @@ async function readImdlContent(args) {
|
|
|
147034
147245
|
maxVertexTableSize: _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.renderSystem.maxTextureSize,
|
|
147035
147246
|
omitEdges: false === args.loadEdges,
|
|
147036
147247
|
createUntransformedRootNode: args.containsTransformNodes,
|
|
147248
|
+
modelGroups: args.modelGroups,
|
|
147037
147249
|
};
|
|
147038
147250
|
const document = args.parseDocument ? (await args.parseDocument(parseOpts)) : (0,_common_imdl_ParseImdlDocument__WEBPACK_IMPORTED_MODULE_5__.parseImdlDocument)({ ...parseOpts, timeline: args.timeline });
|
|
147039
147251
|
if (isCanceled())
|
|
@@ -152492,6 +152704,7 @@ class TileDrawArgs {
|
|
|
152492
152704
|
this._appearanceProvider = params.appearanceProvider;
|
|
152493
152705
|
this.hiddenLineSettings = params.hiddenLineSettings;
|
|
152494
152706
|
this.animationTransformNodeId = params.animationTransformNodeId;
|
|
152707
|
+
this.groupNodeId = params.groupNodeId;
|
|
152495
152708
|
this.boundingRange = params.boundingRange;
|
|
152496
152709
|
this.maximumScreenSpaceError = params.maximumScreenSpaceError ?? 16; // 16 is Cesium's default.
|
|
152497
152710
|
// Do not cull tiles based on clip volume if tiles outside clip are supposed to be drawn but in a different color.
|
|
@@ -152570,6 +152783,12 @@ class TileDrawArgs {
|
|
|
152570
152783
|
let graphic = this.context.createGraphicBranch(graphics, this.location, opts);
|
|
152571
152784
|
if (undefined !== this.animationTransformNodeId)
|
|
152572
152785
|
graphic = this.context.renderSystem.createAnimationTransformNode(graphic, this.animationTransformNodeId);
|
|
152786
|
+
if (undefined !== this.groupNodeId) {
|
|
152787
|
+
const branch = new _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_2__.GraphicBranch();
|
|
152788
|
+
branch.add(graphic);
|
|
152789
|
+
branch.groupNodeId = this.groupNodeId;
|
|
152790
|
+
graphic = this.context.createGraphicBranch(branch, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.identity);
|
|
152791
|
+
}
|
|
152573
152792
|
return graphic;
|
|
152574
152793
|
}
|
|
152575
152794
|
/** Output graphics for all accumulated tiles. */
|
|
@@ -153794,12 +154013,17 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
|
|
|
153794
154013
|
appearanceProvider: this.getAppearanceProvider(tree),
|
|
153795
154014
|
hiddenLineSettings: this.getHiddenLineSettings(tree),
|
|
153796
154015
|
animationTransformNodeId: this.getAnimationTransformNodeId(tree),
|
|
154016
|
+
groupNodeId: this.getGroupNodeId(tree),
|
|
153797
154017
|
});
|
|
153798
154018
|
}
|
|
153799
154019
|
/** @internal */
|
|
153800
154020
|
getAnimationTransformNodeId(_tree) {
|
|
153801
154021
|
return undefined;
|
|
153802
154022
|
}
|
|
154023
|
+
/** @internal */
|
|
154024
|
+
getGroupNodeId(_tree) {
|
|
154025
|
+
return undefined;
|
|
154026
|
+
}
|
|
153803
154027
|
/** Supply transform from this tile tree reference's location to iModel coordinate space.
|
|
153804
154028
|
* @returns undefined if the TileTree is not yet loaded.
|
|
153805
154029
|
*/
|
|
@@ -177399,7 +177623,9 @@ class Geometry {
|
|
|
177399
177623
|
/**
|
|
177400
177624
|
* Clone an array whose members have type `T`, which implements the clone method.
|
|
177401
177625
|
* * If the clone method returns `undefined`, then `undefined` is forced into the cloned array.
|
|
177626
|
+
* @deprecated in 4.x. Use cloneArray.
|
|
177402
177627
|
*/
|
|
177628
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
177403
177629
|
static cloneMembers(array) {
|
|
177404
177630
|
if (array === undefined)
|
|
177405
177631
|
return undefined;
|
|
@@ -177409,6 +177635,18 @@ class Geometry {
|
|
|
177409
177635
|
}
|
|
177410
177636
|
return clonedArray;
|
|
177411
177637
|
}
|
|
177638
|
+
/**
|
|
177639
|
+
* Clone an array whose members have the cloneable type `T`.
|
|
177640
|
+
*/
|
|
177641
|
+
static cloneArray(array) {
|
|
177642
|
+
if (array === undefined)
|
|
177643
|
+
return undefined;
|
|
177644
|
+
const clonedArray = [];
|
|
177645
|
+
for (const element of array) {
|
|
177646
|
+
clonedArray.push(element.clone());
|
|
177647
|
+
}
|
|
177648
|
+
return clonedArray;
|
|
177649
|
+
}
|
|
177412
177650
|
}
|
|
177413
177651
|
/** Tolerance for small distances in metric coordinates. */
|
|
177414
177652
|
Geometry.smallMetricDistance = 1.0e-6;
|
|
@@ -188332,7 +188570,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188332
188570
|
/* harmony export */ "BSplineWrapMode": () => (/* reexport safe */ _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_108__.BSplineWrapMode),
|
|
188333
188571
|
/* harmony export */ "BagOfCurves": () => (/* reexport safe */ _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_64__.BagOfCurves),
|
|
188334
188572
|
/* harmony export */ "BarycentricTriangle": () => (/* reexport safe */ _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_3__.BarycentricTriangle),
|
|
188335
|
-
/* harmony export */ "BentleyGeometryFlatBuffer": () => (/* reexport safe */
|
|
188573
|
+
/* harmony export */ "BentleyGeometryFlatBuffer": () => (/* reexport safe */ _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_129__.BentleyGeometryFlatBuffer),
|
|
188336
188574
|
/* harmony export */ "Bezier1dNd": () => (/* reexport safe */ _bspline_Bezier1dNd__WEBPACK_IMPORTED_MODULE_98__.Bezier1dNd),
|
|
188337
188575
|
/* harmony export */ "BezierCoffs": () => (/* reexport safe */ _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_51__.BezierCoffs),
|
|
188338
188576
|
/* harmony export */ "BezierCurve3d": () => (/* reexport safe */ _bspline_BezierCurve3d__WEBPACK_IMPORTED_MODULE_100__.BezierCurve3d),
|
|
@@ -188381,7 +188619,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188381
188619
|
/* harmony export */ "CurveSearchStatus": () => (/* reexport safe */ _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_66__.CurveSearchStatus),
|
|
188382
188620
|
/* harmony export */ "CutLoop": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.CutLoop),
|
|
188383
188621
|
/* harmony export */ "CutLoopMergeContext": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.CutLoopMergeContext),
|
|
188384
|
-
/* harmony export */ "DeepCompare": () => (/* reexport safe */
|
|
188622
|
+
/* harmony export */ "DeepCompare": () => (/* reexport safe */ _serialization_DeepCompare__WEBPACK_IMPORTED_MODULE_127__.DeepCompare),
|
|
188385
188623
|
/* harmony export */ "Degree2PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.Degree2PowerPolynomial),
|
|
188386
188624
|
/* harmony export */ "Degree3PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.Degree3PowerPolynomial),
|
|
188387
188625
|
/* harmony export */ "Degree4PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.Degree4PowerPolynomial),
|
|
@@ -188391,6 +188629,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188391
188629
|
/* harmony export */ "EllipsoidPatch": () => (/* reexport safe */ _geometry3d_Ellipsoid__WEBPACK_IMPORTED_MODULE_5__.EllipsoidPatch),
|
|
188392
188630
|
/* harmony export */ "FacetFaceData": () => (/* reexport safe */ _polyface_FacetFaceData__WEBPACK_IMPORTED_MODULE_111__.FacetFaceData),
|
|
188393
188631
|
/* harmony export */ "FacetIntersectOptions": () => (/* reexport safe */ _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__.FacetIntersectOptions),
|
|
188632
|
+
/* harmony export */ "FacetLocationDetailPair": () => (/* reexport safe */ _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__.FacetLocationDetailPair),
|
|
188394
188633
|
/* harmony export */ "FrameBuilder": () => (/* reexport safe */ _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_6__.FrameBuilder),
|
|
188395
188634
|
/* harmony export */ "GaussMapper": () => (/* reexport safe */ _numerics_Quadrature__WEBPACK_IMPORTED_MODULE_56__.GaussMapper),
|
|
188396
188635
|
/* harmony export */ "GeodesicPathPoint": () => (/* reexport safe */ _geometry3d_Ellipsoid__WEBPACK_IMPORTED_MODULE_5__.GeodesicPathPoint),
|
|
@@ -188404,10 +188643,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188404
188643
|
/* harmony export */ "GrowableFloat64Array": () => (/* reexport safe */ _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_10__.GrowableFloat64Array),
|
|
188405
188644
|
/* harmony export */ "GrowableXYArray": () => (/* reexport safe */ _geometry3d_GrowableXYArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYArray),
|
|
188406
188645
|
/* 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),
|
|
188646
|
+
/* harmony export */ "IModelJson": () => (/* reexport safe */ _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_126__.IModelJson),
|
|
188411
188647
|
/* harmony export */ "ImplicitLineXY": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.ImplicitLineXY),
|
|
188412
188648
|
/* harmony export */ "IndexedCollectionInterval": () => (/* reexport safe */ _geometry3d_IndexedCollectionInterval__WEBPACK_IMPORTED_MODULE_13__.IndexedCollectionInterval),
|
|
188413
188649
|
/* harmony export */ "IndexedPolyface": () => (/* reexport safe */ _polyface_Polyface__WEBPACK_IMPORTED_MODULE_112__.IndexedPolyface),
|
|
@@ -188426,6 +188662,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188426
188662
|
/* harmony export */ "KnotVector": () => (/* reexport safe */ _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_108__.KnotVector),
|
|
188427
188663
|
/* harmony export */ "LineSegment3d": () => (/* reexport safe */ _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_72__.LineSegment3d),
|
|
188428
188664
|
/* harmony export */ "LineString3d": () => (/* reexport safe */ _curve_LineString3d__WEBPACK_IMPORTED_MODULE_73__.LineString3d),
|
|
188665
|
+
/* harmony export */ "LineString3dRangeTreeContext": () => (/* reexport safe */ _polyface_RangeTree_LineString3dRangeTreeContext__WEBPACK_IMPORTED_MODULE_122__.LineString3dRangeTreeContext),
|
|
188429
188666
|
/* harmony export */ "LinearSweep": () => (/* reexport safe */ _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_90__.LinearSweep),
|
|
188430
188667
|
/* harmony export */ "LongitudeLatitudeNumber": () => (/* reexport safe */ _geometry3d_LongitudeLatitudeAltitude__WEBPACK_IMPORTED_MODULE_2__.LongitudeLatitudeNumber),
|
|
188431
188668
|
/* harmony export */ "Loop": () => (/* reexport safe */ _curve_Loop__WEBPACK_IMPORTED_MODULE_74__.Loop),
|
|
@@ -188461,6 +188698,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188461
188698
|
/* harmony export */ "Point3dArray": () => (/* reexport safe */ _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_24__.Point3dArray),
|
|
188462
188699
|
/* harmony export */ "Point3dArrayCarrier": () => (/* reexport safe */ _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_25__.Point3dArrayCarrier),
|
|
188463
188700
|
/* harmony export */ "Point3dArrayPolygonOps": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.Point3dArrayPolygonOps),
|
|
188701
|
+
/* harmony export */ "Point3dArrayRangeTreeContext": () => (/* reexport safe */ _polyface_RangeTree_Point3dArrayRangeTreeContext__WEBPACK_IMPORTED_MODULE_121__.Point3dArrayRangeTreeContext),
|
|
188464
188702
|
/* harmony export */ "Point4d": () => (/* reexport safe */ _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_47__.Point4d),
|
|
188465
188703
|
/* harmony export */ "Point4dArray": () => (/* reexport safe */ _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_24__.Point4dArray),
|
|
188466
188704
|
/* harmony export */ "PointString3d": () => (/* reexport safe */ _curve_PointString3d__WEBPACK_IMPORTED_MODULE_80__.PointString3d),
|
|
@@ -188470,8 +188708,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188470
188708
|
/* harmony export */ "PolyfaceClip": () => (/* reexport safe */ _polyface_PolyfaceClip__WEBPACK_IMPORTED_MODULE_120__.PolyfaceClip),
|
|
188471
188709
|
/* harmony export */ "PolyfaceData": () => (/* reexport safe */ _polyface_PolyfaceData__WEBPACK_IMPORTED_MODULE_118__.PolyfaceData),
|
|
188472
188710
|
/* harmony export */ "PolyfaceQuery": () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_119__.PolyfaceQuery),
|
|
188711
|
+
/* harmony export */ "PolyfaceRangeTreeContext": () => (/* reexport safe */ _polyface_RangeTree_PolyfaceRangeTreeContext__WEBPACK_IMPORTED_MODULE_123__.PolyfaceRangeTreeContext),
|
|
188473
188712
|
/* harmony export */ "PolygonLocation": () => (/* reexport safe */ _Geometry__WEBPACK_IMPORTED_MODULE_36__.PolygonLocation),
|
|
188474
188713
|
/* harmony export */ "PolygonLocationDetail": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonLocationDetail),
|
|
188714
|
+
/* harmony export */ "PolygonLocationDetailPair": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonLocationDetailPair),
|
|
188475
188715
|
/* harmony export */ "PolygonOps": () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonOps),
|
|
188476
188716
|
/* harmony export */ "PolylineOps": () => (/* reexport safe */ _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_26__.PolylineOps),
|
|
188477
188717
|
/* harmony export */ "PowerPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.PowerPolynomial),
|
|
@@ -188492,24 +188732,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188492
188732
|
/* harmony export */ "RegionOps": () => (/* reexport safe */ _curve_RegionOps__WEBPACK_IMPORTED_MODULE_79__.RegionOps),
|
|
188493
188733
|
/* harmony export */ "RotationalSweep": () => (/* reexport safe */ _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_91__.RotationalSweep),
|
|
188494
188734
|
/* harmony export */ "RuledSweep": () => (/* reexport safe */ _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_92__.RuledSweep),
|
|
188495
|
-
/* harmony export */ "Sample": () => (/* reexport safe */
|
|
188735
|
+
/* harmony export */ "Sample": () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__.Sample),
|
|
188496
188736
|
/* harmony export */ "Segment1d": () => (/* reexport safe */ _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_31__.Segment1d),
|
|
188497
188737
|
/* harmony export */ "SineCosinePolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SineCosinePolynomial),
|
|
188498
188738
|
/* harmony export */ "SmallSystem": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SmallSystem),
|
|
188499
188739
|
/* harmony export */ "SmoothTransformBetweenFrusta": () => (/* reexport safe */ _geometry3d_FrustumAnimation__WEBPACK_IMPORTED_MODULE_7__.SmoothTransformBetweenFrusta),
|
|
188500
188740
|
/* harmony export */ "SolidPrimitive": () => (/* reexport safe */ _solid_SolidPrimitive__WEBPACK_IMPORTED_MODULE_93__.SolidPrimitive),
|
|
188501
|
-
/* harmony export */ "SpacePolygonTriangulation": () => (/* reexport safe */
|
|
188741
|
+
/* harmony export */ "SpacePolygonTriangulation": () => (/* reexport safe */ _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_125__.SpacePolygonTriangulation),
|
|
188502
188742
|
/* harmony export */ "Sphere": () => (/* reexport safe */ _solid_Sphere__WEBPACK_IMPORTED_MODULE_94__.Sphere),
|
|
188503
188743
|
/* harmony export */ "SphereImplicit": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SphereImplicit),
|
|
188504
188744
|
/* harmony export */ "StandardViewIndex": () => (/* reexport safe */ _Geometry__WEBPACK_IMPORTED_MODULE_36__.StandardViewIndex),
|
|
188505
|
-
/* harmony export */ "SteppedIndexFunctionFactory": () => (/* reexport safe */
|
|
188745
|
+
/* harmony export */ "SteppedIndexFunctionFactory": () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__.SteppedIndexFunctionFactory),
|
|
188506
188746
|
/* harmony export */ "StringifiedClipVector": () => (/* reexport safe */ _clipping_ClipVector__WEBPACK_IMPORTED_MODULE_43__.StringifiedClipVector),
|
|
188507
188747
|
/* harmony export */ "StrokeCountMap": () => (/* reexport safe */ _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_87__.StrokeCountMap),
|
|
188508
188748
|
/* harmony export */ "StrokeOptions": () => (/* reexport safe */ _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_82__.StrokeOptions),
|
|
188509
188749
|
/* harmony export */ "SweepContour": () => (/* reexport safe */ _solid_SweepContour__WEBPACK_IMPORTED_MODULE_95__.SweepContour),
|
|
188510
188750
|
/* harmony export */ "SweepLineStringToFacetsOptions": () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_119__.SweepLineStringToFacetsOptions),
|
|
188511
|
-
/* harmony export */ "TaggedNumericConstants": () => (/* reexport safe */
|
|
188512
|
-
/* harmony export */ "TaggedNumericData": () => (/* reexport safe */
|
|
188751
|
+
/* harmony export */ "TaggedNumericConstants": () => (/* reexport safe */ _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_124__.TaggedNumericConstants),
|
|
188752
|
+
/* harmony export */ "TaggedNumericData": () => (/* reexport safe */ _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_124__.TaggedNumericData),
|
|
188513
188753
|
/* harmony export */ "TorusImplicit": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.TorusImplicit),
|
|
188514
188754
|
/* harmony export */ "TorusPipe": () => (/* reexport safe */ _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_96__.TorusPipe),
|
|
188515
188755
|
/* harmony export */ "Transform": () => (/* reexport safe */ _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_32__.Transform),
|
|
@@ -188517,7 +188757,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188517
188757
|
/* harmony export */ "TriDiagonalSystem": () => (/* reexport safe */ _numerics_TriDiagonalSystem__WEBPACK_IMPORTED_MODULE_58__.TriDiagonalSystem),
|
|
188518
188758
|
/* harmony export */ "TriangleLocationDetail": () => (/* reexport safe */ _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_3__.TriangleLocationDetail),
|
|
188519
188759
|
/* 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
188760
|
/* harmony export */ "TrigPolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.TrigPolynomial),
|
|
188522
188761
|
/* harmony export */ "UVSelect": () => (/* reexport safe */ _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_106__.UVSelect),
|
|
188523
188762
|
/* harmony export */ "UVSurfaceOps": () => (/* reexport safe */ _geometry3d_UVSurfaceOps__WEBPACK_IMPORTED_MODULE_33__.UVSurfaceOps),
|
|
@@ -188656,14 +188895,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188656
188895
|
/* harmony import */ var _polyface_PolyfaceData__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./polyface/PolyfaceData */ "../../core/geometry/lib/esm/polyface/PolyfaceData.js");
|
|
188657
188896
|
/* harmony import */ var _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./polyface/PolyfaceQuery */ "../../core/geometry/lib/esm/polyface/PolyfaceQuery.js");
|
|
188658
188897
|
/* 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
|
|
188898
|
+
/* harmony import */ var _polyface_RangeTree_Point3dArrayRangeTreeContext__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./polyface/RangeTree/Point3dArrayRangeTreeContext */ "../../core/geometry/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js");
|
|
188899
|
+
/* harmony import */ var _polyface_RangeTree_LineString3dRangeTreeContext__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! ./polyface/RangeTree/LineString3dRangeTreeContext */ "../../core/geometry/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js");
|
|
188900
|
+
/* harmony import */ var _polyface_RangeTree_PolyfaceRangeTreeContext__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! ./polyface/RangeTree/PolyfaceRangeTreeContext */ "../../core/geometry/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js");
|
|
188901
|
+
/* harmony import */ var _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(/*! ./polyface/TaggedNumericData */ "../../core/geometry/lib/esm/polyface/TaggedNumericData.js");
|
|
188902
|
+
/* harmony import */ var _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(/*! ./topology/SpaceTriangulation */ "../../core/geometry/lib/esm/topology/SpaceTriangulation.js");
|
|
188903
|
+
/* harmony import */ var _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(/*! ./serialization/IModelJsonSchema */ "../../core/geometry/lib/esm/serialization/IModelJsonSchema.js");
|
|
188904
|
+
/* harmony import */ var _serialization_DeepCompare__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(/*! ./serialization/DeepCompare */ "../../core/geometry/lib/esm/serialization/DeepCompare.js");
|
|
188905
|
+
/* harmony import */ var _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(/*! ./serialization/GeometrySamples */ "../../core/geometry/lib/esm/serialization/GeometrySamples.js");
|
|
188906
|
+
/* harmony import */ var _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./serialization/BentleyGeometryFlatBuffer */ "../../core/geometry/lib/esm/serialization/BentleyGeometryFlatBuffer.js");
|
|
188667
188907
|
/*---------------------------------------------------------------------------------------------
|
|
188668
188908
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
188669
188909
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -188914,6 +189154,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188914
189154
|
|
|
188915
189155
|
|
|
188916
189156
|
|
|
189157
|
+
|
|
188917
189158
|
|
|
188918
189159
|
|
|
188919
189160
|
/***/ }),
|
|
@@ -190797,7 +191038,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
190797
191038
|
const distanceA = startFraction * this._totalLength;
|
|
190798
191039
|
const distanceB = distanceA + signedDistance;
|
|
190799
191040
|
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
|
|
191041
|
+
const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result?.childDetail); // local detail related to the child curve
|
|
190801
191042
|
const endFraction = startFraction + (signedDistance / this._totalLength);
|
|
190802
191043
|
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__.CurveLocationDetail.createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result); // global detail related to the curve chain
|
|
190803
191044
|
chainDetail.childDetail = childDetail;
|
|
@@ -190908,8 +191149,8 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
190908
191149
|
}
|
|
190909
191150
|
/**
|
|
190910
191151
|
* Compute the global chain detail corresponding to a local child detail.
|
|
190911
|
-
* @param childDetail the local detail,
|
|
190912
|
-
* @returns
|
|
191152
|
+
* @param childDetail the local (fragment) detail, captured.
|
|
191153
|
+
* @returns newly allocated global (chain) detail with `childDetail` field pointing to the input, and `a` field copied from the input
|
|
190913
191154
|
*/
|
|
190914
191155
|
computeChainDetail(childDetail) {
|
|
190915
191156
|
if (!childDetail.curve)
|
|
@@ -191555,8 +191796,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
191555
191796
|
* @module Curve
|
|
191556
191797
|
*/
|
|
191557
191798
|
|
|
191558
|
-
/**
|
|
191559
|
-
/** enumeration of condition for extending a curve beyond start or end point.
|
|
191799
|
+
/** Enumeration of condition for extending a curve beyond start or end point.
|
|
191560
191800
|
* * Not all CurvePrimitives support these modes.
|
|
191561
191801
|
* @public
|
|
191562
191802
|
*/
|
|
@@ -191573,10 +191813,12 @@ var CurveExtendMode;
|
|
|
191573
191813
|
* @public
|
|
191574
191814
|
*/
|
|
191575
191815
|
class CurveExtendOptions {
|
|
191576
|
-
/**
|
|
191577
|
-
*
|
|
191578
|
-
* *
|
|
191579
|
-
* * Return
|
|
191816
|
+
/**
|
|
191817
|
+
* Given an VariantCurveExtendParameter, isolate the particular CurveExtendMode in effect at an end.
|
|
191818
|
+
* * Return `CurveExtendMode.None` if `param === false`.
|
|
191819
|
+
* * Return `CurveExtendMode.OnCurve` if `param === true`.
|
|
191820
|
+
* * Return the param if it is a single CurveExtendMode.
|
|
191821
|
+
* * Return dereferenced array at entry `endIndex` if the param is an array of CurveExtendMode.
|
|
191580
191822
|
*/
|
|
191581
191823
|
static resolveVariantCurveExtendParameterToCurveExtendMode(param, endIndex) {
|
|
191582
191824
|
if (param === false)
|
|
@@ -192343,17 +192585,14 @@ var CurveSearchStatus;
|
|
|
192343
192585
|
CurveSearchStatus[CurveSearchStatus["stoppedAtBoundary"] = 2] = "stoppedAtBoundary";
|
|
192344
192586
|
})(CurveSearchStatus || (CurveSearchStatus = {}));
|
|
192345
192587
|
/**
|
|
192346
|
-
* Use to update a
|
|
192588
|
+
* Use to update a cloneable object when source and/or prior result are possibly undefined.
|
|
192347
192589
|
* * Any undefined source returns undefined.
|
|
192348
192590
|
* * For defined source, reuse optional result if available.
|
|
192349
192591
|
* @param source optional source
|
|
192350
192592
|
* @param result optional result
|
|
192351
192593
|
*/
|
|
192352
|
-
function
|
|
192353
|
-
|
|
192354
|
-
return source.clone(result);
|
|
192355
|
-
}
|
|
192356
|
-
return undefined;
|
|
192594
|
+
function optionalUpdate(source, result) {
|
|
192595
|
+
return source ? source.clone(result) : undefined;
|
|
192357
192596
|
}
|
|
192358
192597
|
/**
|
|
192359
192598
|
* CurveLocationDetail carries point and parameter data about a point evaluated on a curve.
|
|
@@ -192420,10 +192659,11 @@ class CurveLocationDetail {
|
|
|
192420
192659
|
result.curve = this.curve;
|
|
192421
192660
|
result.fraction = this.fraction;
|
|
192422
192661
|
result.fraction1 = this.fraction1;
|
|
192423
|
-
result.point1 = this.point1;
|
|
192662
|
+
result.point1 = optionalUpdate(this.point1, result.point1);
|
|
192424
192663
|
result.point.setFromPoint3d(this.point);
|
|
192425
|
-
result.vectorInCurveLocationDetail =
|
|
192664
|
+
result.vectorInCurveLocationDetail = optionalUpdate(this.vectorInCurveLocationDetail, result.vectorInCurveLocationDetail);
|
|
192426
192665
|
result.a = this.a;
|
|
192666
|
+
result.childDetail = optionalUpdate(this.childDetail, result.childDetail);
|
|
192427
192667
|
result.curveSearchStatus = this.curveSearchStatus;
|
|
192428
192668
|
return result;
|
|
192429
192669
|
}
|
|
@@ -192438,8 +192678,8 @@ class CurveLocationDetail {
|
|
|
192438
192678
|
*/
|
|
192439
192679
|
setFP(fraction, point, vector, a = 0.0) {
|
|
192440
192680
|
this.fraction = fraction;
|
|
192441
|
-
this.point.
|
|
192442
|
-
this.vectorInCurveLocationDetail =
|
|
192681
|
+
this.point.setFromPoint3d(point);
|
|
192682
|
+
this.vectorInCurveLocationDetail = optionalUpdate(vector, this.vectorInCurveLocationDetail);
|
|
192443
192683
|
this.a = a;
|
|
192444
192684
|
}
|
|
192445
192685
|
/**
|
|
@@ -192475,6 +192715,7 @@ class CurveLocationDetail {
|
|
|
192475
192715
|
result.point.setFromPoint3d(point);
|
|
192476
192716
|
result.vectorInCurveLocationDetail = undefined;
|
|
192477
192717
|
result.a = 0.0;
|
|
192718
|
+
result.childDetail = undefined;
|
|
192478
192719
|
result.curveSearchStatus = undefined;
|
|
192479
192720
|
return result;
|
|
192480
192721
|
}
|
|
@@ -192494,6 +192735,7 @@ class CurveLocationDetail {
|
|
|
192494
192735
|
result.point.setFromPoint3d(point);
|
|
192495
192736
|
result.vectorInCurveLocationDetail = undefined;
|
|
192496
192737
|
result.a = distance;
|
|
192738
|
+
result.childDetail = undefined;
|
|
192497
192739
|
result.curveSearchStatus = status;
|
|
192498
192740
|
return result;
|
|
192499
192741
|
}
|
|
@@ -192517,9 +192759,10 @@ class CurveLocationDetail {
|
|
|
192517
192759
|
result = result ? result : new CurveLocationDetail();
|
|
192518
192760
|
result.curve = curve;
|
|
192519
192761
|
result.fraction = endFraction;
|
|
192520
|
-
|
|
192762
|
+
curve.fractionToPoint(endFraction, result.point);
|
|
192521
192763
|
result.vectorInCurveLocationDetail = undefined;
|
|
192522
192764
|
result.a = a;
|
|
192765
|
+
result.childDetail = undefined;
|
|
192523
192766
|
result.curveSearchStatus = status;
|
|
192524
192767
|
return result;
|
|
192525
192768
|
}
|
|
@@ -192528,10 +192771,11 @@ class CurveLocationDetail {
|
|
|
192528
192771
|
result = result ? result : new CurveLocationDetail();
|
|
192529
192772
|
result.curve = curve;
|
|
192530
192773
|
result.fraction = fraction;
|
|
192531
|
-
|
|
192774
|
+
curve.fractionToPoint(fraction, result.point);
|
|
192532
192775
|
result.vectorInCurveLocationDetail = undefined;
|
|
192533
|
-
result.curveSearchStatus = undefined;
|
|
192534
192776
|
result.a = 0.0;
|
|
192777
|
+
result.childDetail = undefined;
|
|
192778
|
+
result.curveSearchStatus = undefined;
|
|
192535
192779
|
return result;
|
|
192536
192780
|
}
|
|
192537
192781
|
/** Create with CurvePrimitive pointer and fraction for evaluation. */
|
|
@@ -192540,10 +192784,11 @@ class CurveLocationDetail {
|
|
|
192540
192784
|
result.curve = curve;
|
|
192541
192785
|
result.fraction = fraction;
|
|
192542
192786
|
const ray = curve.fractionToPointAndDerivative(fraction);
|
|
192543
|
-
result.point
|
|
192787
|
+
result.point.setFromPoint3d(ray.origin);
|
|
192544
192788
|
result.vectorInCurveLocationDetail = ray.direction;
|
|
192545
|
-
result.curveSearchStatus = undefined;
|
|
192546
192789
|
result.a = 0.0;
|
|
192790
|
+
result.childDetail = undefined;
|
|
192791
|
+
result.curveSearchStatus = undefined;
|
|
192547
192792
|
return result;
|
|
192548
192793
|
}
|
|
192549
192794
|
/** Create with CurvePrimitive pointer and 2 fractions for evaluation. */
|
|
@@ -192551,12 +192796,13 @@ class CurveLocationDetail {
|
|
|
192551
192796
|
result = result ? result : new CurveLocationDetail();
|
|
192552
192797
|
result.curve = curve;
|
|
192553
192798
|
result.fraction = fraction0;
|
|
192554
|
-
|
|
192799
|
+
curve.fractionToPoint(fraction0, result.point);
|
|
192555
192800
|
result.fraction1 = fraction1;
|
|
192556
|
-
result.point1 = curve.fractionToPoint(fraction1);
|
|
192801
|
+
result.point1 = curve.fractionToPoint(fraction1, result.point1);
|
|
192557
192802
|
result.vectorInCurveLocationDetail = undefined;
|
|
192558
|
-
result.curveSearchStatus = undefined;
|
|
192559
192803
|
result.a = 0.0;
|
|
192804
|
+
result.childDetail = undefined;
|
|
192805
|
+
result.curveSearchStatus = undefined;
|
|
192560
192806
|
return result;
|
|
192561
192807
|
}
|
|
192562
192808
|
/** Create with CurvePrimitive pointer, fraction, and point coordinates. */
|
|
@@ -192567,6 +192813,7 @@ class CurveLocationDetail {
|
|
|
192567
192813
|
result.point.setFromPoint3d(point);
|
|
192568
192814
|
result.vectorInCurveLocationDetail = undefined;
|
|
192569
192815
|
result.a = a;
|
|
192816
|
+
result.childDetail = undefined;
|
|
192570
192817
|
result.curveSearchStatus = undefined;
|
|
192571
192818
|
return result;
|
|
192572
192819
|
}
|
|
@@ -193869,21 +194116,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193869
194116
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
193870
194117
|
/* harmony export */ "LineSegment3d": () => (/* binding */ LineSegment3d)
|
|
193871
194118
|
/* 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
|
|
194119
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
194120
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
194121
|
+
/* harmony import */ var _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndVectors */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndVectors.js");
|
|
194122
|
+
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
194123
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
194124
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
194125
|
+
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
194126
|
+
/* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
|
|
194127
|
+
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
194128
|
+
/* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
194129
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
194130
|
+
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
194131
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
194132
|
+
/* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
|
|
193883
194133
|
/*---------------------------------------------------------------------------------------------
|
|
193884
194134
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
193885
194135
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
193886
194136
|
*--------------------------------------------------------------------------------------------*/
|
|
194137
|
+
/** @packageDocumentation
|
|
194138
|
+
* @module Curve
|
|
194139
|
+
*/
|
|
194140
|
+
|
|
194141
|
+
|
|
194142
|
+
|
|
193887
194143
|
|
|
193888
194144
|
|
|
193889
194145
|
|
|
@@ -193910,7 +194166,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193910
194166
|
* ```
|
|
193911
194167
|
* @public
|
|
193912
194168
|
*/
|
|
193913
|
-
class LineSegment3d extends
|
|
194169
|
+
class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive {
|
|
193914
194170
|
/** Test if `other` is of class `LineSegment3d` */
|
|
193915
194171
|
isSameGeometryClass(other) {
|
|
193916
194172
|
return other instanceof LineSegment3d;
|
|
@@ -193978,7 +194234,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
193978
194234
|
}
|
|
193979
194235
|
/** Return the point and derivative vector at fractional position along the line segment. */
|
|
193980
194236
|
fractionToPointAndDerivative(fraction, result) {
|
|
193981
|
-
result = result ? result :
|
|
194237
|
+
result = result ? result : _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_2__.Ray3d.createZero();
|
|
193982
194238
|
result.direction.setStartEnd(this._point0, this._point1);
|
|
193983
194239
|
this._point0.interpolate(fraction, this._point1, result.origin);
|
|
193984
194240
|
return result;
|
|
@@ -193990,7 +194246,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
193990
194246
|
* * y axis is the second derivative, i.e. 000
|
|
193991
194247
|
*/
|
|
193992
194248
|
fractionToPointAnd2Derivatives(fraction, result) {
|
|
193993
|
-
result = result ? result :
|
|
194249
|
+
result = result ? result : _geometry3d_Plane3dByOriginAndVectors__WEBPACK_IMPORTED_MODULE_3__.Plane3dByOriginAndVectors.createXYPlane();
|
|
193994
194250
|
result.vectorU.setStartEnd(this._point0, this._point1);
|
|
193995
194251
|
result.vectorV.set(0, 0, 0);
|
|
193996
194252
|
this._point0.interpolate(fraction, this._point1, result.origin);
|
|
@@ -194033,7 +194289,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194033
194289
|
result._point1.set(x1, y1, z);
|
|
194034
194290
|
return result;
|
|
194035
194291
|
}
|
|
194036
|
-
return new LineSegment3d(
|
|
194292
|
+
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
194293
|
}
|
|
194038
194294
|
/**
|
|
194039
194295
|
* Create a LineSegment3d from xy coordinates of start and end, with common z.
|
|
@@ -194050,7 +194306,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194050
194306
|
result._point1.set(x1, y1, z1);
|
|
194051
194307
|
return result;
|
|
194052
194308
|
}
|
|
194053
|
-
return new LineSegment3d(
|
|
194309
|
+
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
194310
|
}
|
|
194055
194311
|
/** Return the point at fractional position along the line segment. */
|
|
194056
194312
|
fractionToPoint(fraction, result) {
|
|
@@ -194073,19 +194329,118 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194073
194329
|
* @param spacePoint point in space
|
|
194074
194330
|
* @param extend if false, only return points within the bounded line segment. If true, allow the point to be on
|
|
194075
194331
|
* the unbounded line that contains the bounded segment.
|
|
194332
|
+
* @param result optional pre-allocated object to populate and return
|
|
194333
|
+
* @returns detail, with `a` field set to the distance from `spacePoint` to the closest point
|
|
194076
194334
|
*/
|
|
194077
194335
|
closestPoint(spacePoint, extend, result) {
|
|
194078
194336
|
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.
|
|
194337
|
+
fraction = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__.CurveExtendOptions.correctFraction(extend, fraction);
|
|
194338
|
+
result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.create(this, result);
|
|
194083
194339
|
result.fraction = fraction;
|
|
194084
194340
|
this._point0.interpolate(fraction, this._point1, result.point);
|
|
194085
194341
|
result.vectorInCurveLocationDetail = undefined;
|
|
194086
194342
|
result.a = result.point.distance(spacePoint);
|
|
194087
194343
|
return result;
|
|
194088
194344
|
}
|
|
194345
|
+
/**
|
|
194346
|
+
* Compute the closest approach between a pair of line segments.
|
|
194347
|
+
* * The approach distance is returned in the `a` fields of the details.
|
|
194348
|
+
* @param segmentA first line segment
|
|
194349
|
+
* @param extendA how to extend segmentA forward/backward
|
|
194350
|
+
* @param segmentB second line segment
|
|
194351
|
+
* @param extendB how to extend segmentB forward/backward
|
|
194352
|
+
* @param result optional pre-allocated object to populate and return
|
|
194353
|
+
* @returns pair of details, one per segment, each with `a` field set to the closest approach distance
|
|
194354
|
+
*/
|
|
194355
|
+
static closestApproach(segmentA, extendA, segmentB, extendB, result) {
|
|
194356
|
+
const unboundedFractions = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_7__.Vector2d.create();
|
|
194357
|
+
if (result === undefined)
|
|
194358
|
+
result = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetailPair.createCapture(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.create(), _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.create());
|
|
194359
|
+
if (_numerics_Polynomials__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dClosestApproachUnbounded(segmentA._point0, segmentA._point1, segmentB._point0, segmentB._point1, unboundedFractions)) {
|
|
194360
|
+
// There is a simple approach between the unbounded segments. Maybe its a really easy case ...
|
|
194361
|
+
const fractionA = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__.CurveExtendOptions.correctFraction(extendA, unboundedFractions.x);
|
|
194362
|
+
const fractionB = _CurveExtendMode__WEBPACK_IMPORTED_MODULE_5__.CurveExtendOptions.correctFraction(extendB, unboundedFractions.y);
|
|
194363
|
+
// if neither fraction was corrected, just accept !!!
|
|
194364
|
+
if (fractionA === unboundedFractions.x && fractionB === unboundedFractions.y) {
|
|
194365
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentA, fractionA, result.detailA);
|
|
194366
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentB, fractionB, result.detailB);
|
|
194367
|
+
result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);
|
|
194368
|
+
return result;
|
|
194369
|
+
}
|
|
194370
|
+
// One or both of the fractions were clamped back to an endpoint.
|
|
194371
|
+
// Claim: (????!!!????) The only proximity candidates that matter are from clamped point onto the other.
|
|
194372
|
+
if (fractionA !== unboundedFractions.x && fractionB !== unboundedFractions.y) {
|
|
194373
|
+
// Fill in (in the result) both individual details with "projected" points and distance.
|
|
194374
|
+
// The "loser" will have its contents replaced.
|
|
194375
|
+
const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;
|
|
194376
|
+
const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;
|
|
194377
|
+
segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);
|
|
194378
|
+
segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);
|
|
194379
|
+
if (result.detailA.a <= result.detailB.a) {
|
|
194380
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveFractionPoint(segmentB, fractionB, clampedPointOnB, result.detailB);
|
|
194381
|
+
}
|
|
194382
|
+
else {
|
|
194383
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveFractionPoint(segmentA, fractionA, clampedPointOnA, result.detailA);
|
|
194384
|
+
}
|
|
194385
|
+
}
|
|
194386
|
+
else if (fractionB !== unboundedFractions.y) {
|
|
194387
|
+
// B (only) was clamped.
|
|
194388
|
+
const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;
|
|
194389
|
+
segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);
|
|
194390
|
+
result.detailB.setCurve(segmentB);
|
|
194391
|
+
result.detailB.point.setFrom(clampedPointOnB);
|
|
194392
|
+
result.detailB.fraction = fractionB;
|
|
194393
|
+
}
|
|
194394
|
+
else {
|
|
194395
|
+
// fractionA was clamped.
|
|
194396
|
+
const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;
|
|
194397
|
+
segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);
|
|
194398
|
+
result.detailA.setCurve(segmentA);
|
|
194399
|
+
result.detailA.point.setFrom(clampedPointOnA);
|
|
194400
|
+
result.detailA.fraction = fractionA;
|
|
194401
|
+
}
|
|
194402
|
+
result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);
|
|
194403
|
+
return result;
|
|
194404
|
+
}
|
|
194405
|
+
// (probably? certainly?) parallel (possibly coincident) lines.
|
|
194406
|
+
// run all 4 endpoint-to-other cases . . . reassemble carefully ...
|
|
194407
|
+
const resultSet = [
|
|
194408
|
+
segmentA.closestPoint(segmentB._point0, extendA),
|
|
194409
|
+
segmentA.closestPoint(segmentB._point1, extendA),
|
|
194410
|
+
segmentB.closestPoint(segmentA._point0, extendB),
|
|
194411
|
+
segmentB.closestPoint(segmentA._point1, extendB),
|
|
194412
|
+
];
|
|
194413
|
+
let dMin = resultSet[0].a;
|
|
194414
|
+
let iMin = 0;
|
|
194415
|
+
for (let i = 1; i < 4; i++) {
|
|
194416
|
+
if (resultSet[i].a < dMin) {
|
|
194417
|
+
iMin = i;
|
|
194418
|
+
dMin = resultSet[i].a;
|
|
194419
|
+
}
|
|
194420
|
+
}
|
|
194421
|
+
if (iMin === 0) {
|
|
194422
|
+
resultSet[0].clone(result.detailA);
|
|
194423
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 0.0, result.detailB);
|
|
194424
|
+
result.detailB.a = result.detailA.a;
|
|
194425
|
+
}
|
|
194426
|
+
else if (iMin === 1) {
|
|
194427
|
+
resultSet[1].clone(result.detailA);
|
|
194428
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 1.0, result.detailB);
|
|
194429
|
+
result.detailB.a = result.detailA.a;
|
|
194430
|
+
}
|
|
194431
|
+
else if (iMin === 2) {
|
|
194432
|
+
resultSet[2].clone(result.detailB);
|
|
194433
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 0.0, result.detailA);
|
|
194434
|
+
result.detailA.a = result.detailB.a;
|
|
194435
|
+
}
|
|
194436
|
+
else {
|
|
194437
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(iMin === 3);
|
|
194438
|
+
resultSet[3].clone(result.detailB);
|
|
194439
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 1.0, result.detailA);
|
|
194440
|
+
result.detailA.a = result.detailB.a;
|
|
194441
|
+
}
|
|
194442
|
+
return result;
|
|
194443
|
+
}
|
|
194089
194444
|
/** Swap the endpoint references. */
|
|
194090
194445
|
reverseInPlace() {
|
|
194091
194446
|
const a = this._point0;
|
|
@@ -194100,8 +194455,8 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194100
194455
|
}
|
|
194101
194456
|
/** Test if both endpoints are in a plane (within tolerance) */
|
|
194102
194457
|
isInPlane(plane) {
|
|
194103
|
-
return
|
|
194104
|
-
&&
|
|
194458
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_9__.Geometry.isSmallMetricDistance(plane.altitude(this._point0))
|
|
194459
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_9__.Geometry.isSmallMetricDistance(plane.altitude(this._point1));
|
|
194105
194460
|
}
|
|
194106
194461
|
/**
|
|
194107
194462
|
* Compute points of simple (transverse) with a plane.
|
|
@@ -194110,12 +194465,12 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194110
194465
|
appendPlaneIntersectionPoints(plane, result) {
|
|
194111
194466
|
const h0 = plane.altitude(this._point0);
|
|
194112
194467
|
const h1 = plane.altitude(this._point1);
|
|
194113
|
-
const fraction =
|
|
194468
|
+
const fraction = _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_10__.Order2Bezier.solveCoffs(h0, h1);
|
|
194114
194469
|
let numIntersection = 0;
|
|
194115
194470
|
if (fraction !== undefined) {
|
|
194116
194471
|
numIntersection++;
|
|
194117
|
-
const detail =
|
|
194118
|
-
detail.intervalRole =
|
|
194472
|
+
const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));
|
|
194473
|
+
detail.intervalRole = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_6__.CurveIntervalRole.isolated;
|
|
194119
194474
|
result.push(detail);
|
|
194120
194475
|
}
|
|
194121
194476
|
return numIntersection;
|
|
@@ -194174,7 +194529,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194174
194529
|
}
|
|
194175
194530
|
/** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */
|
|
194176
194531
|
static fromJSON(json) {
|
|
194177
|
-
const result = new LineSegment3d(
|
|
194532
|
+
const result = new LineSegment3d(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.createZero(), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Point3d.create());
|
|
194178
194533
|
result.setFromJSON(json);
|
|
194179
194534
|
return result;
|
|
194180
194535
|
}
|
|
@@ -194238,7 +194593,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194238
194593
|
rangeBetweenFractions(fraction0, fraction1, transform) {
|
|
194239
194594
|
// (This is cheap -- don't bother testing for fraction0===fraction1)
|
|
194240
194595
|
if (!transform) {
|
|
194241
|
-
const range =
|
|
194596
|
+
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_11__.Range3d.create();
|
|
194242
194597
|
range.extendInterpolated(this._point0, fraction0, this._point1);
|
|
194243
194598
|
range.extendInterpolated(this._point0, fraction1, this._point1);
|
|
194244
194599
|
return range;
|
|
@@ -194249,17 +194604,17 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194249
194604
|
transform.multiplyPoint3d(point0, point0);
|
|
194250
194605
|
transform.multiplyPoint3d(point1, point1);
|
|
194251
194606
|
}
|
|
194252
|
-
return
|
|
194607
|
+
return _geometry3d_Range__WEBPACK_IMPORTED_MODULE_11__.Range3d.create(point0, point1);
|
|
194253
194608
|
}
|
|
194254
194609
|
/**
|
|
194255
194610
|
* Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).
|
|
194256
194611
|
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
|
|
194257
194612
|
*/
|
|
194258
194613
|
constructOffsetXY(offsetDistanceOrOptions) {
|
|
194259
|
-
const offsetVec =
|
|
194614
|
+
const offsetVec = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__.Vector3d.createStartEnd(this._point0, this._point1);
|
|
194260
194615
|
if (offsetVec.normalizeInPlace()) {
|
|
194261
194616
|
offsetVec.rotate90CCWXY(offsetVec);
|
|
194262
|
-
const offsetDist =
|
|
194617
|
+
const offsetDist = _OffsetOptions__WEBPACK_IMPORTED_MODULE_12__.OffsetOptions.getOffsetDistance(offsetDistanceOrOptions);
|
|
194263
194618
|
return LineSegment3d.create(this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist));
|
|
194264
194619
|
}
|
|
194265
194620
|
return undefined;
|
|
@@ -194273,7 +194628,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
194273
194628
|
* end of the ray.
|
|
194274
194629
|
*/
|
|
194275
194630
|
projectedParameterRange(ray, lowHigh) {
|
|
194276
|
-
return
|
|
194631
|
+
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_13__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
194277
194632
|
}
|
|
194278
194633
|
}
|
|
194279
194634
|
|
|
@@ -194330,7 +194685,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
194330
194685
|
|
|
194331
194686
|
|
|
194332
194687
|
|
|
194333
|
-
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
194334
194688
|
/**
|
|
194335
194689
|
* Starting with baseIndex and moving index by stepDirection:
|
|
194336
194690
|
* If the vector from baseIndex to baseIndex +1 crossed with vectorA can be normalized, accumulate it (scaled) to normal.
|
|
@@ -194449,10 +194803,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194449
194803
|
result.addPoints(points);
|
|
194450
194804
|
return result;
|
|
194451
194805
|
}
|
|
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
|
-
*/
|
|
194806
|
+
/** Create a linestring, capturing the given GrowableXYZArray as the points. */
|
|
194456
194807
|
static createCapture(points) {
|
|
194457
194808
|
return new LineString3d(points);
|
|
194458
194809
|
}
|
|
@@ -194476,7 +194827,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194476
194827
|
return result;
|
|
194477
194828
|
}
|
|
194478
194829
|
/**
|
|
194479
|
-
* Add points to the linestring.
|
|
194830
|
+
* Add copies of points to the linestring.
|
|
194480
194831
|
* Valid inputs are:
|
|
194481
194832
|
* * a Point2d
|
|
194482
194833
|
* * a point3d
|
|
@@ -194862,24 +195213,33 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194862
195213
|
return result;
|
|
194863
195214
|
}
|
|
194864
195215
|
/**
|
|
194865
|
-
* Convert a segment index and local fraction to a global fraction.
|
|
195216
|
+
* Convert a segment index and local fraction to a global linestring fraction.
|
|
194866
195217
|
* @param index index of segment being evaluated
|
|
194867
195218
|
* @param localFraction local fraction in [0,1] within the segment
|
|
195219
|
+
* @param numSegment number N of segments in the linestring
|
|
194868
195220
|
* @return global fraction f in [0,1] such that the segment is parameterized by index/N <= f <= (index+1)/N.
|
|
194869
195221
|
*/
|
|
194870
|
-
|
|
194871
|
-
const numSegment = this._points.length - 1;
|
|
195222
|
+
static mapLocalToGlobalFraction(index, localFraction, numSegment) {
|
|
194872
195223
|
if (numSegment < 1)
|
|
194873
195224
|
return 0.0;
|
|
194874
195225
|
return (index + localFraction) / numSegment;
|
|
194875
195226
|
}
|
|
195227
|
+
/**
|
|
195228
|
+
* Convert a segment index and local fraction to a global linestring fraction.
|
|
195229
|
+
* @param index index of segment being evaluated
|
|
195230
|
+
* @param localFraction local fraction in [0,1] within the segment
|
|
195231
|
+
* @return global fraction f in [0,1] such that the segment is parameterized by index/N <= f <= (index+1)/N.
|
|
195232
|
+
*/
|
|
195233
|
+
segmentIndexAndLocalFractionToGlobalFraction(index, localFraction) {
|
|
195234
|
+
return LineString3d.mapLocalToGlobalFraction(index, localFraction, this._points.length - 1);
|
|
195235
|
+
}
|
|
194876
195236
|
/**
|
|
194877
195237
|
* Convert a global fraction to a segment index and local fraction.
|
|
194878
195238
|
* @param globalFraction a fraction f in [0,1] in the linestring parameterization, where the i_th segment
|
|
194879
195239
|
* (0 <= i < N) is parameterized by i/N <= f <= (i+1)/N.
|
|
195240
|
+
* @returns segment index and local fraction
|
|
194880
195241
|
*/
|
|
194881
|
-
|
|
194882
|
-
const numSegment = this._points.length - 1;
|
|
195242
|
+
static mapGlobalToLocalFraction(globalFraction, numSegment) {
|
|
194883
195243
|
if (numSegment < 1)
|
|
194884
195244
|
return { index: 0, fraction: 0.0 };
|
|
194885
195245
|
const scaledGlobalFraction = globalFraction * numSegment;
|
|
@@ -194890,8 +195250,17 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194890
195250
|
segmentIndex = numSegment - 1;
|
|
194891
195251
|
else // globalFraction in [0,1]
|
|
194892
195252
|
segmentIndex = Math.floor(scaledGlobalFraction);
|
|
194893
|
-
|
|
194894
|
-
|
|
195253
|
+
return { index: segmentIndex, fraction: scaledGlobalFraction - segmentIndex };
|
|
195254
|
+
}
|
|
195255
|
+
/**
|
|
195256
|
+
* Convert a global linestring fraction to a segment index and local fraction.
|
|
195257
|
+
* @param globalFraction a fraction f in [0,1] in the linestring parameterization, where the i_th segment
|
|
195258
|
+
* (0 <= i < N) is parameterized by i/N <= f <= (i+1)/N.
|
|
195259
|
+
* @param numSegment number N of segments in the linestring
|
|
195260
|
+
* @returns segment index and local fraction
|
|
195261
|
+
*/
|
|
195262
|
+
globalFractionToSegmentIndexAndLocalFraction(globalFraction) {
|
|
195263
|
+
return LineString3d.mapGlobalToLocalFraction(globalFraction, this._points.length - 1);
|
|
194895
195264
|
}
|
|
194896
195265
|
/** Return a frenet frame, using nearby points to estimate a plane. */
|
|
194897
195266
|
fractionToFrenetFrame(fraction, result) {
|
|
@@ -194972,6 +195341,10 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
194972
195341
|
numPoints() {
|
|
194973
195342
|
return this._points.length;
|
|
194974
195343
|
}
|
|
195344
|
+
/** Return the number of edges in this linestring. */
|
|
195345
|
+
numEdges() {
|
|
195346
|
+
return this._points.length > 0 ? this._points.length - 1 : 0;
|
|
195347
|
+
}
|
|
194975
195348
|
/** Evaluate the end point of the linestring. */
|
|
194976
195349
|
endPoint() {
|
|
194977
195350
|
if (this._points.length === 0)
|
|
@@ -195557,9 +195930,9 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
195557
195930
|
return result;
|
|
195558
195931
|
}
|
|
195559
195932
|
/** Return (if possible) a specific segment of the linestring */
|
|
195560
|
-
getIndexedSegment(index) {
|
|
195933
|
+
getIndexedSegment(index, result) {
|
|
195561
195934
|
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));
|
|
195935
|
+
return _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d.create(this._points.getPoint3dAtCheckedPointIndex(index), this._points.getPoint3dAtCheckedPointIndex(index + 1), result);
|
|
195563
195936
|
return undefined;
|
|
195564
195937
|
}
|
|
195565
195938
|
/** Returns true if first and last points are within metric tolerance. */
|
|
@@ -195669,6 +196042,26 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
195669
196042
|
projectedParameterRange(ray, lowHigh) {
|
|
195670
196043
|
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_18__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
195671
196044
|
}
|
|
196045
|
+
/**
|
|
196046
|
+
* Convert the segment detail to a linestring detail:
|
|
196047
|
+
* * `detail.childDetail` is set to a clone of the input segment detail (optionally populating pre-allocated `child` object).
|
|
196048
|
+
* * `childDetail.a` is set to `segmentIndex`.
|
|
196049
|
+
* * `detail.fraction` is set to the global linestring parameter.
|
|
196050
|
+
* * `detail.curve` is set to the parent linestring.
|
|
196051
|
+
* @param detail segment location detail, converted in place
|
|
196052
|
+
* @param segmentIndex index of segment in the linestring
|
|
196053
|
+
* @param numSegment linestring segment count
|
|
196054
|
+
* @param parent optional linestring primitive
|
|
196055
|
+
* @param child optional pre-allocated detail to use to clone the child data
|
|
196056
|
+
* @returns reference to input detail, with both linestring and segment data
|
|
196057
|
+
*/
|
|
196058
|
+
static convertLocalToGlobalDetail(detail, segmentIndex, numSegment, parent, child) {
|
|
196059
|
+
detail.childDetail = detail.clone(child);
|
|
196060
|
+
detail.childDetail.a = segmentIndex;
|
|
196061
|
+
detail.fraction = this.mapLocalToGlobalFraction(segmentIndex, detail.fraction, numSegment);
|
|
196062
|
+
detail.curve = parent;
|
|
196063
|
+
return detail;
|
|
196064
|
+
}
|
|
195672
196065
|
}
|
|
195673
196066
|
LineString3d._workPointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create();
|
|
195674
196067
|
LineString3d._workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create();
|
|
@@ -197263,10 +197656,10 @@ class PlanarSubdivision {
|
|
|
197263
197656
|
* * no action if start and end points are identical.
|
|
197264
197657
|
* @param graph containing graph.
|
|
197265
197658
|
* @param p the curve
|
|
197266
|
-
* @param fraction0 starting fraction
|
|
197267
197659
|
* @param point0 start point
|
|
197268
|
-
* @param
|
|
197660
|
+
* @param fraction0 starting fraction
|
|
197269
197661
|
* @param point1 end point
|
|
197662
|
+
* @param fraction1 end fraction
|
|
197270
197663
|
* @returns end point and fraction, or start point and fraction if no action
|
|
197271
197664
|
*/
|
|
197272
197665
|
static addHalfEdge(graph, p, point0, fraction0, point1, fraction1, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
|
|
@@ -199098,25 +199491,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
199098
199491
|
/* harmony export */ "RegionGroupOpType": () => (/* binding */ RegionGroupOpType),
|
|
199099
199492
|
/* harmony export */ "RegionOpsFaceToFaceSearch": () => (/* binding */ RegionOpsFaceToFaceSearch)
|
|
199100
199493
|
/* harmony export */ });
|
|
199494
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
199495
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
199496
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
199497
|
+
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
199101
199498
|
/* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
199102
199499
|
/* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
|
|
199103
199500
|
/* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
|
|
199104
199501
|
/* 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");
|
|
199502
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
199108
199503
|
/* 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
199504
|
/* 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
199505
|
/* harmony import */ var _GeometryQuery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GeometryQuery */ "../../core/geometry/lib/esm/curve/GeometryQuery.js");
|
|
199119
|
-
/* harmony import */ var
|
|
199506
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
199507
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
199508
|
+
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
199509
|
+
/* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
|
|
199510
|
+
/* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
|
|
199511
|
+
/* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
|
|
199512
|
+
/* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
|
|
199120
199513
|
/*---------------------------------------------------------------------------------------------
|
|
199121
199514
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
199122
199515
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -212174,7 +212567,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
212174
212567
|
this.pushXY(p.x, p.y);
|
|
212175
212568
|
}
|
|
212176
212569
|
}
|
|
212177
|
-
/** Push points from variant sources.
|
|
212570
|
+
/** Push copies of points from variant sources.
|
|
212178
212571
|
* Valid inputs are:
|
|
212179
212572
|
* * Point2d
|
|
212180
212573
|
* * Point3d
|
|
@@ -212883,7 +213276,7 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
|
|
|
212883
213276
|
for (const p of points)
|
|
212884
213277
|
this.push(p);
|
|
212885
213278
|
}
|
|
212886
|
-
/** Push points from variant sources.
|
|
213279
|
+
/** Push copies of points from variant sources.
|
|
212887
213280
|
* Valid inputs are:
|
|
212888
213281
|
* * Point2d
|
|
212889
213282
|
* * Point3d
|
|
@@ -214087,6 +214480,19 @@ class IndexedXYZCollection {
|
|
|
214087
214480
|
return undefined;
|
|
214088
214481
|
return this.getPoint3dAtUncheckedPointIndex(this.length - 1, result);
|
|
214089
214482
|
}
|
|
214483
|
+
/**
|
|
214484
|
+
* Test whether the indexed points are equal within tolerance.
|
|
214485
|
+
* @param index0 index of first point
|
|
214486
|
+
* @param index1 index of second point
|
|
214487
|
+
* @param tolerance max coordinate difference to be considered equal. For exact test, pass 0. Defaults to `Geometry.smallMetricDistance`.
|
|
214488
|
+
*/
|
|
214489
|
+
almostEqualIndexIndex(index0, index1, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
214490
|
+
if (index0 < 0 || index0 >= this.length || index1 < 0 || index1 >= this.length)
|
|
214491
|
+
return undefined;
|
|
214492
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.getXAtUncheckedPointIndex(index0), this.getXAtUncheckedPointIndex(index1), tolerance)
|
|
214493
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.getYAtUncheckedPointIndex(index0), this.getYAtUncheckedPointIndex(index1), tolerance)
|
|
214494
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.getZAtUncheckedPointIndex(index0), this.getZAtUncheckedPointIndex(index1), tolerance);
|
|
214495
|
+
}
|
|
214090
214496
|
}
|
|
214091
214497
|
/**
|
|
214092
214498
|
* abstract base class extends IndexedXYZCollection, adding methods to push, peek, and pop, and rewrite.
|
|
@@ -221873,9 +222279,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
221873
222279
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
221874
222280
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
221875
222281
|
*--------------------------------------------------------------------------------------------*/
|
|
222282
|
+
/** @packageDocumentation
|
|
222283
|
+
* @module CartesianGeometry
|
|
222284
|
+
*/
|
|
221876
222285
|
|
|
221877
222286
|
|
|
221878
|
-
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
221879
222287
|
|
|
221880
222288
|
|
|
221881
222289
|
//
|
|
@@ -222067,12 +222475,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
222067
222475
|
/* harmony export */ "IndexedXYZCollectionPolygonOps": () => (/* binding */ IndexedXYZCollectionPolygonOps),
|
|
222068
222476
|
/* harmony export */ "Point3dArrayPolygonOps": () => (/* binding */ Point3dArrayPolygonOps),
|
|
222069
222477
|
/* harmony export */ "PolygonLocationDetail": () => (/* binding */ PolygonLocationDetail),
|
|
222478
|
+
/* harmony export */ "PolygonLocationDetailPair": () => (/* binding */ PolygonLocationDetailPair),
|
|
222070
222479
|
/* harmony export */ "PolygonOps": () => (/* binding */ PolygonOps)
|
|
222071
222480
|
/* harmony export */ });
|
|
222072
222481
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
222073
222482
|
/* 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
|
|
222483
|
+
/* harmony import */ var _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry4d/Matrix4d */ "../../core/geometry/lib/esm/geometry4d/Matrix4d.js");
|
|
222484
|
+
/* harmony import */ var _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry4d/Point4d */ "../../core/geometry/lib/esm/geometry4d/Point4d.js");
|
|
222076
222485
|
/* harmony import */ var _topology_XYParitySearchContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../topology/XYParitySearchContext */ "../../core/geometry/lib/esm/topology/XYParitySearchContext.js");
|
|
222077
222486
|
/* harmony import */ var _FrameBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
|
|
222078
222487
|
/* harmony import */ var _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
|
|
@@ -222082,6 +222491,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
222082
222491
|
/* harmony import */ var _Point2dVector2d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
222083
222492
|
/* harmony import */ var _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
|
|
222084
222493
|
/* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
222494
|
+
/* harmony import */ var _PolylineOps__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./PolylineOps */ "../../core/geometry/lib/esm/geometry3d/PolylineOps.js");
|
|
222085
222495
|
/* harmony import */ var _Ray3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
222086
222496
|
/* harmony import */ var _SortablePolygon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
|
|
222087
222497
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -222106,6 +222516,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
222106
222516
|
|
|
222107
222517
|
|
|
222108
222518
|
|
|
222519
|
+
|
|
222109
222520
|
/**
|
|
222110
222521
|
* Carries data about a point in the plane of a polygon.
|
|
222111
222522
|
* @public
|
|
@@ -222159,6 +222570,51 @@ class PolygonLocationDetail {
|
|
|
222159
222570
|
this.code === _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonVertex || this.code === _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonEdgeInterior ||
|
|
222160
222571
|
this.code === _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.InsidePolygonProjectsToVertex || this.code === _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.InsidePolygonProjectsToEdgeInterior;
|
|
222161
222572
|
}
|
|
222573
|
+
/**
|
|
222574
|
+
* Set point, index, and fraction for an "at vertex" or "along edge" PolygonLocationDetail.
|
|
222575
|
+
* * Point is not captured; its coordinates are copied.
|
|
222576
|
+
*/
|
|
222577
|
+
static createAtVertexOrEdge(point, index, fraction = 0) {
|
|
222578
|
+
const detail = new PolygonLocationDetail();
|
|
222579
|
+
detail.point.setFrom(point);
|
|
222580
|
+
detail.closestEdgeIndex = index;
|
|
222581
|
+
detail.closestEdgeParam = fraction;
|
|
222582
|
+
fraction = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.clamp(fraction, 0, 1);
|
|
222583
|
+
detail.code = (fraction > 0 && fraction < 1) ? _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonEdgeInterior : _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonVertex;
|
|
222584
|
+
return detail;
|
|
222585
|
+
}
|
|
222586
|
+
}
|
|
222587
|
+
/**
|
|
222588
|
+
* A pair of PolygonLocationDetail.
|
|
222589
|
+
* @public
|
|
222590
|
+
*/
|
|
222591
|
+
class PolygonLocationDetailPair {
|
|
222592
|
+
/** Constructor, captures inputs */
|
|
222593
|
+
constructor(detailA, detailB) {
|
|
222594
|
+
this.detailA = detailA ? detailA : PolygonLocationDetail.create();
|
|
222595
|
+
this.detailB = detailB ? detailB : PolygonLocationDetail.create();
|
|
222596
|
+
}
|
|
222597
|
+
/** Create an instance by capturing inputs */
|
|
222598
|
+
static create(detailA, detailB, result) {
|
|
222599
|
+
if (!result)
|
|
222600
|
+
return new PolygonLocationDetailPair(detailA, detailB);
|
|
222601
|
+
result.detailA = detailA;
|
|
222602
|
+
result.detailB = detailB;
|
|
222603
|
+
return result;
|
|
222604
|
+
}
|
|
222605
|
+
/** Make a deep copy of this PolygonLocationDetailPair */
|
|
222606
|
+
clone(result) {
|
|
222607
|
+
result = result ? result : new PolygonLocationDetailPair();
|
|
222608
|
+
result.detailA.copyContentsFrom(this.detailA);
|
|
222609
|
+
result.detailB.copyContentsFrom(this.detailB);
|
|
222610
|
+
return result;
|
|
222611
|
+
}
|
|
222612
|
+
/** Swap the details of A, B */
|
|
222613
|
+
swapDetails() {
|
|
222614
|
+
const q = this.detailA;
|
|
222615
|
+
this.detailA = this.detailB;
|
|
222616
|
+
this.detailB = q;
|
|
222617
|
+
}
|
|
222162
222618
|
}
|
|
222163
222619
|
/**
|
|
222164
222620
|
* Carrier for a loop extracted from clip operation, annotated for sorting
|
|
@@ -222880,13 +223336,14 @@ class PolygonOps {
|
|
|
222880
223336
|
return sortedLoopsArray;
|
|
222881
223337
|
}
|
|
222882
223338
|
/** Compute the closest point on the polygon boundary to the given point.
|
|
223339
|
+
* * Compare to [[closestPoint]].
|
|
222883
223340
|
* @param polygon points of the polygon, closure point optional
|
|
222884
223341
|
* @param testPoint point p to project onto the polygon edges. Works best when p is in the plane of the polygon.
|
|
222885
223342
|
* @param tolerance optional distance tolerance to determine point-vertex and point-edge coincidence.
|
|
222886
223343
|
* @param result optional pre-allocated object to fill and return
|
|
222887
223344
|
* @returns details d of the closest point `d.point`:
|
|
222888
223345
|
* * `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
|
|
223346
|
+
* * `d.edgeIndex` and `d.edgeParam` specify the location of the closest point.
|
|
222890
223347
|
* * `d.code` classifies the closest point as a vertex (`PolygonLocation.OnPolygonVertex`) or as a point on an edge (`PolygonLocation.OnPolygonEdgeInterior`).
|
|
222891
223348
|
* * `d.a` is the distance from testPoint to the closest point.
|
|
222892
223349
|
* * `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 +223396,7 @@ class PolygonOps {
|
|
|
222939
223396
|
}
|
|
222940
223397
|
if (distToStart2 < minDist2) {
|
|
222941
223398
|
if (polygon.dotProductIndexIndexXYAndZ(iBase, iPrev, testPoint) <= 0.0) {
|
|
222942
|
-
// update candidate (to edge start) only if previous edge
|
|
223399
|
+
// update candidate (to edge start) only if testPoint projected beyond previous edge end
|
|
222943
223400
|
polygon.getPoint3dAtUncheckedPointIndex(iBase, result.point);
|
|
222944
223401
|
result.a = Math.sqrt(distToStart2);
|
|
222945
223402
|
polygon.crossProductIndexIndexIndex(iBase, iPrev, iNext, result.v);
|
|
@@ -223003,6 +223460,41 @@ class PolygonOps {
|
|
|
223003
223460
|
}
|
|
223004
223461
|
return result;
|
|
223005
223462
|
}
|
|
223463
|
+
/**
|
|
223464
|
+
* Compute the closest point on the polygon boundary or its interior to the given point.
|
|
223465
|
+
* * Compare to [[closestPointOnBoundary]].
|
|
223466
|
+
* @param polygon points of the polygon, closure point optional
|
|
223467
|
+
* @param testPoint point p to project onto the polygon edges. Works best when p is in the plane of the polygon.
|
|
223468
|
+
* @param tolerance optional distance tolerance for distinguishing boundary versus interior closest point.
|
|
223469
|
+
* @param result optional pre-allocated object to fill and return
|
|
223470
|
+
* @returns details d of the closest point `d.point`:
|
|
223471
|
+
* * `d.isValid()` returns true if and only if the polygon is nontrivial.
|
|
223472
|
+
* * `d.edgeIndex` and `d.edgeParam` specify the location of the (nearest) boundary point.
|
|
223473
|
+
* * `d.code` classifies the closest point: `PolygonLocation.OnPolygonVertex`, `PolygonLocation.OnPolygonEdgeInterior`, `PolygonLocation.InsidePolygonProjectsToVertex`, or `PolygonLocation.InsidePolygonProjectsToEdgeInterior`.
|
|
223474
|
+
* * `d.a` is the distance from testPoint to the closest point.
|
|
223475
|
+
*/
|
|
223476
|
+
static closestPoint(polygon, testPoint, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance, result) {
|
|
223477
|
+
if (!(polygon instanceof _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_5__.IndexedXYZCollection))
|
|
223478
|
+
return this.closestPoint(new _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_4__.Point3dArrayCarrier(polygon), testPoint, tolerance, result);
|
|
223479
|
+
if (!this.unitNormal(polygon, this._normal))
|
|
223480
|
+
return PolygonLocationDetail.create(result); // invalid
|
|
223481
|
+
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);
|
|
223482
|
+
const planePoint = this._workXYZ = polygonPlane.projectPointToPlane(testPoint, this._workXYZ);
|
|
223483
|
+
result = this.closestPointOnBoundary(polygon, planePoint, tolerance, result);
|
|
223484
|
+
if (result.isValid) {
|
|
223485
|
+
const dot = result.v.dotProduct(this._normal);
|
|
223486
|
+
if (dot > 0.0) { // planePoint is inside, so return it instead of the closest boundary point
|
|
223487
|
+
result.point.setFrom(planePoint);
|
|
223488
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonVertex === result.code)
|
|
223489
|
+
result.code = _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.InsidePolygonProjectsToVertex;
|
|
223490
|
+
else if (_Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.OnPolygonEdgeInterior === result.code)
|
|
223491
|
+
result.code = _Geometry__WEBPACK_IMPORTED_MODULE_2__.PolygonLocation.InsidePolygonProjectsToEdgeInterior;
|
|
223492
|
+
}
|
|
223493
|
+
result.a = testPoint.distance(result.point);
|
|
223494
|
+
result.v.setZero(); // not relevant
|
|
223495
|
+
}
|
|
223496
|
+
return result;
|
|
223497
|
+
}
|
|
223006
223498
|
/** Compute the intersection of a line (parameterized as a ray) with the plane of this polygon.
|
|
223007
223499
|
* @param polygon points of the polygon, closure point optional
|
|
223008
223500
|
* @param ray infinite line to intersect, as a ray
|
|
@@ -223020,7 +223512,7 @@ class PolygonOps {
|
|
|
223020
223512
|
if (!this.unitNormal(polygon, this._normal))
|
|
223021
223513
|
return PolygonLocationDetail.create(result); // invalid
|
|
223022
223514
|
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);
|
|
223515
|
+
const intersectionPoint = this._workXYZ = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero(this._workXYZ);
|
|
223024
223516
|
const rayParam = ray.intersectionWithPlane(this._workPlane, intersectionPoint);
|
|
223025
223517
|
if (undefined === rayParam)
|
|
223026
223518
|
return PolygonLocationDetail.create(result);
|
|
@@ -223193,15 +223685,80 @@ class PolygonOps {
|
|
|
223193
223685
|
coords[i] *= scale; // normalized
|
|
223194
223686
|
return coords;
|
|
223195
223687
|
}
|
|
223688
|
+
/**
|
|
223689
|
+
* Force the polygon to be closed.
|
|
223690
|
+
* * If first and last points are not within tolerance, push copy of first point
|
|
223691
|
+
* * If first and last points are within tolerance, set last point equal to first
|
|
223692
|
+
* @param polygon input polygon
|
|
223693
|
+
* @param tolerance closure distance tolerance
|
|
223694
|
+
*/
|
|
223695
|
+
static forceClosure(polygon, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
223696
|
+
if (polygon.length >= 2) {
|
|
223697
|
+
if (polygon instanceof _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_10__.GrowableXYZArray) {
|
|
223698
|
+
polygon.forceClosure(tolerance);
|
|
223699
|
+
}
|
|
223700
|
+
else if (polygon[0].distance(polygon[polygon.length - 1]) > tolerance) {
|
|
223701
|
+
polygon.push(polygon[0].clone());
|
|
223702
|
+
}
|
|
223703
|
+
else {
|
|
223704
|
+
polygon[polygon.length - 1].setFromPoint3d(polygon[0]);
|
|
223705
|
+
}
|
|
223706
|
+
}
|
|
223707
|
+
}
|
|
223708
|
+
/**
|
|
223709
|
+
* Return a closed polygon, cloning only if necessary.
|
|
223710
|
+
* * If the first and last points are not identical, call [[forceClosure]] on a clone of the polygon and return it.
|
|
223711
|
+
* * If the first and last points are already identical, just return the input.
|
|
223712
|
+
* @param polygon input polygon
|
|
223713
|
+
* @param tolerance closure distance tolerance
|
|
223714
|
+
*/
|
|
223715
|
+
static ensureClosed(polygon, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
223716
|
+
if (polygon.length >= 2) {
|
|
223717
|
+
let forceClosure = false;
|
|
223718
|
+
if (polygon instanceof _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_5__.IndexedXYZCollection)
|
|
223719
|
+
forceClosure = !polygon.almostEqualIndexIndex(0, polygon.length - 1, 0.0);
|
|
223720
|
+
else
|
|
223721
|
+
forceClosure = !polygon[0].isExactEqual(polygon[polygon.length - 1]);
|
|
223722
|
+
if (forceClosure) {
|
|
223723
|
+
const cloned = _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_10__.GrowableXYZArray.create(polygon);
|
|
223724
|
+
this.forceClosure(cloned, tolerance);
|
|
223725
|
+
polygon = cloned;
|
|
223726
|
+
}
|
|
223727
|
+
}
|
|
223728
|
+
return polygon;
|
|
223729
|
+
}
|
|
223730
|
+
/**
|
|
223731
|
+
* Find smallest distance between polygons.
|
|
223732
|
+
* * For efficiency, input polygons should include closure edge.
|
|
223733
|
+
* * If searching interiors for close approaches, the polygons are assumed to be convex.
|
|
223734
|
+
* @param polygonA first polygon
|
|
223735
|
+
* @param polygonB second polygon
|
|
223736
|
+
* @param dMax optional largest approach distance to consider
|
|
223737
|
+
* @param _searchInterior If true, include (convex) polygon interiors in computations (currently unimplemented).
|
|
223738
|
+
* If false (default): return closest approach between polygon boundaries only, using [[PolylineOps.closestApproach]].
|
|
223739
|
+
* @return pair of details, one per polygon. The `a` field of each detail stores the closest approach distance.
|
|
223740
|
+
*/
|
|
223741
|
+
static closestApproach(polygonA, polygonB, dMax = Number.MAX_VALUE, _searchInterior = false) {
|
|
223742
|
+
// TODO: handle interior close approaches as well...
|
|
223743
|
+
let result;
|
|
223744
|
+
const polyA = this.ensureClosed(polygonA);
|
|
223745
|
+
const polyB = this.ensureClosed(polygonB);
|
|
223746
|
+
const cld = this._workCLDPair = _PolylineOps__WEBPACK_IMPORTED_MODULE_13__.PolylineOps.closestApproach(polyA, false, polyB, false, dMax, this._workCLDPair);
|
|
223747
|
+
if (cld && cld.detailA.childDetail && cld.detailB.childDetail) {
|
|
223748
|
+
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));
|
|
223749
|
+
result.detailA.a = result.detailB.a = cld.detailA.a;
|
|
223750
|
+
}
|
|
223751
|
+
return result;
|
|
223752
|
+
}
|
|
223196
223753
|
}
|
|
223197
223754
|
/** These values are the integrated area moment products [xx,xy,xz, x]
|
|
223198
223755
|
* for a right triangle in the first quadrant at the origin -- (0,0),(1,0),(0,1)
|
|
223199
223756
|
*/
|
|
223200
|
-
PolygonOps._triangleMomentWeights =
|
|
223757
|
+
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
223758
|
/** 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
223759
|
* for a tetrahedron in the first quadrant at the origin -- (0,00),(1,0,0),(0,1,0),(0,0,1)
|
|
223203
223760
|
*/
|
|
223204
|
-
PolygonOps._tetrahedralMomentWeights =
|
|
223761
|
+
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
223762
|
// statics for shared reuse.
|
|
223206
223763
|
// many methods use these.
|
|
223207
223764
|
// only use them in "leaf" methods that are certain not to call other users . . .
|
|
@@ -223210,9 +223767,9 @@ PolygonOps._vector1 = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.cre
|
|
|
223210
223767
|
PolygonOps._vector2 = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
223211
223768
|
PolygonOps._vectorOrigin = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
223212
223769
|
PolygonOps._normal = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
223213
|
-
PolygonOps._matrixA =
|
|
223214
|
-
PolygonOps._matrixB =
|
|
223215
|
-
PolygonOps._matrixC =
|
|
223770
|
+
PolygonOps._matrixA = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__.Matrix4d.createIdentity();
|
|
223771
|
+
PolygonOps._matrixB = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__.Matrix4d.createIdentity();
|
|
223772
|
+
PolygonOps._matrixC = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_14__.Matrix4d.createIdentity();
|
|
223216
223773
|
|
|
223217
223774
|
/**
|
|
223218
223775
|
* `IndexedXYZCollectionPolygonOps` class contains _static_ methods for typical operations on polygons carried as `IndexedXYZCollection`
|
|
@@ -223447,7 +224004,7 @@ class IndexedXYZCollectionPolygonOps {
|
|
|
223447
224004
|
if (range.isNull)
|
|
223448
224005
|
return undefined;
|
|
223449
224006
|
const work = new _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_10__.GrowableXYZArray();
|
|
223450
|
-
const plane =
|
|
224007
|
+
const plane = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_15__.Point4d.create();
|
|
223451
224008
|
plane.set(0, 0, -1, range.high.z);
|
|
223452
224009
|
this.clipConvexPolygonInPlace(plane, xyz, work, true);
|
|
223453
224010
|
if (xyz.length === 0)
|
|
@@ -223866,9 +224423,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223866
224423
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
223867
224424
|
/* harmony export */ "PolylineOps": () => (/* binding */ PolylineOps)
|
|
223868
224425
|
/* harmony export */ });
|
|
224426
|
+
/* harmony import */ var _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
224427
|
+
/* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
224428
|
+
/* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
223869
224429
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
223870
224430
|
/* harmony import */ var _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
|
|
223871
224431
|
/* harmony import */ var _Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
|
|
224432
|
+
/* harmony import */ var _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
|
|
223872
224433
|
/* harmony import */ var _Point3dVector3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
223873
224434
|
/* harmony import */ var _PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
|
|
223874
224435
|
/* harmony import */ var _Range__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
@@ -223885,6 +224446,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223885
224446
|
|
|
223886
224447
|
|
|
223887
224448
|
|
|
224449
|
+
|
|
224450
|
+
|
|
224451
|
+
|
|
224452
|
+
|
|
223888
224453
|
// cspell:word Puecker
|
|
223889
224454
|
/**
|
|
223890
224455
|
* PolylineOps is a collection of static methods operating on polylines.
|
|
@@ -224067,7 +224632,7 @@ class PolylineOps {
|
|
|
224067
224632
|
}
|
|
224068
224633
|
}
|
|
224069
224634
|
/**
|
|
224070
|
-
* Remove closure points a polyline or array of polylines
|
|
224635
|
+
* Remove closure points of a polyline or array of polylines
|
|
224071
224636
|
* @param data points.
|
|
224072
224637
|
*/
|
|
224073
224638
|
static removeClosurePoint(data) {
|
|
@@ -224138,6 +224703,74 @@ class PolylineOps {
|
|
|
224138
224703
|
}
|
|
224139
224704
|
return bisectorPlanes.length > 1 ? bisectorPlanes : undefined;
|
|
224140
224705
|
}
|
|
224706
|
+
/**
|
|
224707
|
+
* Find smallest distance between polylines.
|
|
224708
|
+
* * For polylines with many points, it is more efficient to use [[LineString3dRangeTreeContext.searchForClosestApproach]].
|
|
224709
|
+
* @param pointsA first polyline
|
|
224710
|
+
* @param extendA how to extend polylineA forward/backward
|
|
224711
|
+
* @param pointsB second polyline
|
|
224712
|
+
* @param extendB how to extend polylineB forward/backward
|
|
224713
|
+
* @param dMax largest approach distance to consider
|
|
224714
|
+
* @param result optional pre-allocated object to populate and return
|
|
224715
|
+
* @returns pair of details, one for each polyline, with field values:
|
|
224716
|
+
* * `a` is the closest approach distance
|
|
224717
|
+
* * `point` is the point of closest approach
|
|
224718
|
+
* * `fraction` is the global polyline fraction
|
|
224719
|
+
* * `childDetail.a` is the segment index
|
|
224720
|
+
* * `childDetail.fraction` is the local segment fraction
|
|
224721
|
+
*/
|
|
224722
|
+
static closestApproach(pointsA, extendA, pointsB, extendB, dMax = Number.MAX_VALUE, result) {
|
|
224723
|
+
if (Array.isArray(pointsA))
|
|
224724
|
+
pointsA = new _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_6__.Point3dArrayCarrier(pointsA);
|
|
224725
|
+
if (Array.isArray(pointsB))
|
|
224726
|
+
pointsB = new _Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_6__.Point3dArrayCarrier(pointsB);
|
|
224727
|
+
let dMin = dMax;
|
|
224728
|
+
let foundMin = false;
|
|
224729
|
+
const numSegmentA = pointsA.length - 1;
|
|
224730
|
+
const numSegmentB = pointsB.length - 1;
|
|
224731
|
+
const extendSegA = [_curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None, _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None];
|
|
224732
|
+
const extendSegB = [_curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None, _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None];
|
|
224733
|
+
// lambda to set extension for first and last segment of a polyline
|
|
224734
|
+
const convertExtend = (extendOut, extendIn, segmentIndex, numSegments) => {
|
|
224735
|
+
extendOut[0] = extendOut[1] = _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendMode.None;
|
|
224736
|
+
if (segmentIndex === 0)
|
|
224737
|
+
extendOut[0] = _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extendIn, 0);
|
|
224738
|
+
else if (segmentIndex === numSegments - 1)
|
|
224739
|
+
extendOut[1] = _curve_CurveExtendMode__WEBPACK_IMPORTED_MODULE_7__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extendIn, 1);
|
|
224740
|
+
};
|
|
224741
|
+
// lambda to extract LineSegment3d from polyline
|
|
224742
|
+
const fillSegment = (points, index, segment) => {
|
|
224743
|
+
if (segment === undefined)
|
|
224744
|
+
return _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_8__.LineSegment3d.createCapture(points.getPoint3dAtUncheckedPointIndex(index), points.getPoint3dAtUncheckedPointIndex(index + 1));
|
|
224745
|
+
points.getPoint3dAtUncheckedPointIndex(index, segment.point0Ref);
|
|
224746
|
+
points.getPoint3dAtUncheckedPointIndex(index + 1, segment.point1Ref);
|
|
224747
|
+
return segment;
|
|
224748
|
+
};
|
|
224749
|
+
// just test the segments
|
|
224750
|
+
for (let indexA = 0; indexA < numSegmentA; indexA++) {
|
|
224751
|
+
this._workSegmentA = fillSegment(pointsA, indexA, this._workSegmentA);
|
|
224752
|
+
convertExtend(extendSegA, extendA, indexA, numSegmentA);
|
|
224753
|
+
for (let indexB = 0; indexB < numSegmentB; indexB++) {
|
|
224754
|
+
this._workSegmentB = fillSegment(pointsB, indexB, this._workSegmentB);
|
|
224755
|
+
convertExtend(extendSegB, extendB, indexB, numSegmentB);
|
|
224756
|
+
if (undefined !== (this._workLocalDetailPair = _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_8__.LineSegment3d.closestApproach(this._workSegmentA, extendSegA, this._workSegmentB, extendSegB, this._workLocalDetailPair))) {
|
|
224757
|
+
const d = this._workLocalDetailPair.detailA.a;
|
|
224758
|
+
if (d < dMin) {
|
|
224759
|
+
const childDetailA = result?.detailA.childDetail; // save and reuse
|
|
224760
|
+
const childDetailB = result?.detailB.childDetail;
|
|
224761
|
+
result = this._workLocalDetailPair.clone(result); // overwrite previous result
|
|
224762
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.convertLocalToGlobalDetail(result.detailA, indexA, numSegmentA, undefined, childDetailA);
|
|
224763
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_9__.LineString3d.convertLocalToGlobalDetail(result.detailB, indexB, numSegmentB, undefined, childDetailB);
|
|
224764
|
+
if (result.detailA.childDetail && result.detailB.childDetail)
|
|
224765
|
+
result.detailA.childDetail.curve = result.detailB.childDetail.curve = undefined; // no CurvePrimitives survive in output
|
|
224766
|
+
dMin = d;
|
|
224767
|
+
foundMin = true;
|
|
224768
|
+
}
|
|
224769
|
+
}
|
|
224770
|
+
}
|
|
224771
|
+
}
|
|
224772
|
+
return foundMin ? result : undefined;
|
|
224773
|
+
}
|
|
224141
224774
|
}
|
|
224142
224775
|
|
|
224143
224776
|
|
|
@@ -227199,7 +227832,7 @@ class Transform {
|
|
|
227199
227832
|
* @param other Transform to compare to.
|
|
227200
227833
|
*/
|
|
227201
227834
|
isAlmostEqual(other) {
|
|
227202
|
-
return this.origin.isAlmostEqual(other.origin) && this.matrix.isAlmostEqual(other.matrix);
|
|
227835
|
+
return this === other || this.origin.isAlmostEqual(other.origin) && this.matrix.isAlmostEqual(other.matrix);
|
|
227203
227836
|
}
|
|
227204
227837
|
/**
|
|
227205
227838
|
* Test for near equality with `other` Transform. Comparison uses the `isAlmostEqual` methods on the `origin` part
|
|
@@ -234714,8 +235347,20 @@ class SmallSystem {
|
|
|
234714
235347
|
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
235348
|
}
|
|
234716
235349
|
/**
|
|
234717
|
-
* Return true if
|
|
235350
|
+
* Return true if the given rays have closest approach (go by each other) in 3d
|
|
234718
235351
|
* Return the fractional (not xy) coordinates as x and y parts of a Point2d.
|
|
235352
|
+
* @param ax x-coordinate of the origin of the first ray
|
|
235353
|
+
* @param ay y-coordinate of the origin of the first ray
|
|
235354
|
+
* @param az z-coordinate of the origin of the first ray
|
|
235355
|
+
* @param au x-coordinate of the direction vector of the first ray
|
|
235356
|
+
* @param av y-coordinate of the direction vector of the first ray
|
|
235357
|
+
* @param aw z-coordinate of the direction vector of the first ray
|
|
235358
|
+
* @param bx x-coordinate of the origin of the second ray
|
|
235359
|
+
* @param by y-coordinate of the origin of the second ray
|
|
235360
|
+
* @param bz z-coordinate of the origin of the second ray
|
|
235361
|
+
* @param bu x-coordinate of the direction vector of the second ray
|
|
235362
|
+
* @param bv y-coordinate of the direction vector of the second ray
|
|
235363
|
+
* @param bw z-coordinate of the direction vector of the second ray
|
|
234719
235364
|
* @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
|
|
234720
235365
|
*/
|
|
234721
235366
|
static ray3dXYZUVWClosestApproachUnbounded(ax, ay, az, au, av, aw, bx, by, bz, bu, bv, bw, result) {
|
|
@@ -236687,6 +237332,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
236687
237332
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
236688
237333
|
/* harmony export */ "ConvexFacetLocationDetail": () => (/* binding */ ConvexFacetLocationDetail),
|
|
236689
237334
|
/* harmony export */ "FacetIntersectOptions": () => (/* binding */ FacetIntersectOptions),
|
|
237335
|
+
/* harmony export */ "FacetLocationDetailPair": () => (/* binding */ FacetLocationDetailPair),
|
|
236690
237336
|
/* harmony export */ "NonConvexFacetLocationDetail": () => (/* binding */ NonConvexFacetLocationDetail),
|
|
236691
237337
|
/* harmony export */ "TriangularFacetLocationDetail": () => (/* binding */ TriangularFacetLocationDetail)
|
|
236692
237338
|
/* harmony export */ });
|
|
@@ -236720,6 +237366,21 @@ class FacetIntersectOptions {
|
|
|
236720
237366
|
this.parameterTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallFraction;
|
|
236721
237367
|
}
|
|
236722
237368
|
}
|
|
237369
|
+
/**
|
|
237370
|
+
* A pair of FacetLocationDetail.
|
|
237371
|
+
* @public
|
|
237372
|
+
*/
|
|
237373
|
+
class FacetLocationDetailPair {
|
|
237374
|
+
/** Constructor, captures inputs */
|
|
237375
|
+
constructor(detailA, detailB) {
|
|
237376
|
+
this.detailA = detailA;
|
|
237377
|
+
this.detailB = detailB;
|
|
237378
|
+
}
|
|
237379
|
+
/** Create a facet detail pair, capturing inputs. */
|
|
237380
|
+
static create(detailA, detailB) {
|
|
237381
|
+
return new FacetLocationDetailPair(detailA, detailB);
|
|
237382
|
+
}
|
|
237383
|
+
}
|
|
236723
237384
|
/**
|
|
236724
237385
|
* Implementation of `FacetLocationDetail` for a triangular facet.
|
|
236725
237386
|
* @public
|
|
@@ -236740,17 +237401,23 @@ class TriangularFacetLocationDetail {
|
|
|
236740
237401
|
this._color = undefined;
|
|
236741
237402
|
}
|
|
236742
237403
|
/** Create a detail.
|
|
237404
|
+
* @param detail optional, copied if given
|
|
236743
237405
|
* @param result optional pre-allocated object to fill and return
|
|
236744
237406
|
*/
|
|
236745
|
-
static create(facetIndex, detail, result) {
|
|
236746
|
-
if (
|
|
236747
|
-
|
|
236748
|
-
|
|
237407
|
+
static create(facetIndex = -1, detail, result) {
|
|
237408
|
+
if (!result)
|
|
237409
|
+
result = new TriangularFacetLocationDetail();
|
|
237410
|
+
else
|
|
237411
|
+
result.invalidate(false); // shallow: detail might be owned by result!
|
|
236749
237412
|
result._facetIndex = facetIndex;
|
|
236750
|
-
if (undefined !== detail)
|
|
237413
|
+
if (undefined !== detail && result._detail !== detail)
|
|
236751
237414
|
result._detail.copyContentsFrom(detail);
|
|
236752
237415
|
return result;
|
|
236753
237416
|
}
|
|
237417
|
+
/** Create a detail, capturing inputs. */
|
|
237418
|
+
static createCapture(facetIndex, detail) {
|
|
237419
|
+
return new TriangularFacetLocationDetail(facetIndex, detail);
|
|
237420
|
+
}
|
|
236754
237421
|
/** Get the facet index. */
|
|
236755
237422
|
get facetIndex() {
|
|
236756
237423
|
return this._facetIndex;
|
|
@@ -236851,7 +237518,7 @@ class TriangularFacetLocationDetail {
|
|
|
236851
237518
|
}
|
|
236852
237519
|
}
|
|
236853
237520
|
/**
|
|
236854
|
-
* Implementation of `FacetLocationDetail` for a
|
|
237521
|
+
* Implementation of `FacetLocationDetail` for a general facet, which may or may not be convex.
|
|
236855
237522
|
* * Facet vertex data interpolation is not available.
|
|
236856
237523
|
* @public
|
|
236857
237524
|
*/
|
|
@@ -236870,18 +237537,24 @@ class NonConvexFacetLocationDetail {
|
|
|
236870
237537
|
this._detail.invalidate();
|
|
236871
237538
|
}
|
|
236872
237539
|
/** Create a detail.
|
|
237540
|
+
* @param detail optional, copied if given
|
|
236873
237541
|
* @param result optional pre-allocated object to fill and return
|
|
236874
237542
|
*/
|
|
236875
|
-
static create(facetIndex, edgeCount, detail, result) {
|
|
236876
|
-
if (
|
|
236877
|
-
|
|
236878
|
-
|
|
237543
|
+
static create(facetIndex = -1, edgeCount = 0, detail, result) {
|
|
237544
|
+
if (!result)
|
|
237545
|
+
result = new NonConvexFacetLocationDetail();
|
|
237546
|
+
else
|
|
237547
|
+
result.invalidate(false); // shallow: detail might be owned by result!
|
|
236879
237548
|
result._facetIndex = facetIndex;
|
|
236880
237549
|
result._edgeCount = edgeCount;
|
|
236881
237550
|
if (undefined !== detail && result._detail !== detail)
|
|
236882
237551
|
result._detail.copyContentsFrom(detail);
|
|
236883
237552
|
return result;
|
|
236884
237553
|
}
|
|
237554
|
+
/** Create a detail, capturing inputs. */
|
|
237555
|
+
static createCapture(facetIndex, edgeCount, detail) {
|
|
237556
|
+
return new NonConvexFacetLocationDetail(facetIndex, edgeCount, detail);
|
|
237557
|
+
}
|
|
236885
237558
|
/** Get the facet index. */
|
|
236886
237559
|
get facetIndex() {
|
|
236887
237560
|
return this._facetIndex;
|
|
@@ -236910,7 +237583,7 @@ class NonConvexFacetLocationDetail {
|
|
|
236910
237583
|
get isValid() {
|
|
236911
237584
|
return this._isValid && this._detail.isValid;
|
|
236912
237585
|
}
|
|
236913
|
-
/** Whether the facet is convex. */
|
|
237586
|
+
/** Whether the facet is convex. Always returns false, as convexity is unknown to this detail. */
|
|
236914
237587
|
get isConvex() {
|
|
236915
237588
|
return false;
|
|
236916
237589
|
}
|
|
@@ -236980,13 +237653,20 @@ class ConvexFacetLocationDetail extends NonConvexFacetLocationDetail {
|
|
|
236980
237653
|
this._barycentricCoordinates = undefined;
|
|
236981
237654
|
}
|
|
236982
237655
|
/** Create a detail.
|
|
237656
|
+
* @param detail optional, copied if given
|
|
236983
237657
|
* @param result optional pre-allocated object to fill and return
|
|
236984
237658
|
*/
|
|
236985
|
-
static create(facetIndex, edgeCount, detail, result) {
|
|
236986
|
-
if (
|
|
236987
|
-
|
|
237659
|
+
static create(facetIndex = -1, edgeCount = 0, detail, result) {
|
|
237660
|
+
if (!result)
|
|
237661
|
+
result = new ConvexFacetLocationDetail();
|
|
237662
|
+
else
|
|
237663
|
+
result.invalidate(false); // shallow: detail might be owned by result!
|
|
236988
237664
|
return super.create(facetIndex, edgeCount, detail, result);
|
|
236989
237665
|
}
|
|
237666
|
+
/** Create a detail, capturing inputs. */
|
|
237667
|
+
static createCapture(facetIndex, edgeCount, detail) {
|
|
237668
|
+
return new ConvexFacetLocationDetail(facetIndex, edgeCount, detail);
|
|
237669
|
+
}
|
|
236990
237670
|
/** Whether the facet is convex. */
|
|
236991
237671
|
get isConvex() {
|
|
236992
237672
|
return true;
|
|
@@ -242029,6 +242709,22 @@ class PolyfaceQuery {
|
|
|
242029
242709
|
const inertiaProducts = PolyfaceQuery.sumFacetSecondVolumeMomentProducts(source, origin);
|
|
242030
242710
|
return _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_8__.MomentData.inertiaProductsToPrincipalAxes(origin, inertiaProducts);
|
|
242031
242711
|
}
|
|
242712
|
+
/** Determine whether all facets are convex.
|
|
242713
|
+
* @param source mesh to examine
|
|
242714
|
+
*/
|
|
242715
|
+
static areFacetsConvex(source) {
|
|
242716
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
|
|
242717
|
+
return this.areFacetsConvex(source.createVisitor(0));
|
|
242718
|
+
source.setNumWrap(0);
|
|
242719
|
+
source.reset();
|
|
242720
|
+
while (source.moveToNextFacet()) {
|
|
242721
|
+
if (source.pointCount > 3) {
|
|
242722
|
+
if (!_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__.PolygonOps.isConvex(source.point))
|
|
242723
|
+
return false;
|
|
242724
|
+
}
|
|
242725
|
+
}
|
|
242726
|
+
return true;
|
|
242727
|
+
}
|
|
242032
242728
|
/**
|
|
242033
242729
|
* Test for convex volume by dihedral angle tests on all edges.
|
|
242034
242730
|
* * This tests if all dihedral angles are positive.
|
|
@@ -242636,6 +243332,8 @@ class PolyfaceQuery {
|
|
|
242636
243332
|
* If not a polyface, visit all facets to find the largest index.
|
|
242637
243333
|
*/
|
|
242638
243334
|
static visitorClientPointCount(visitor) {
|
|
243335
|
+
if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface)
|
|
243336
|
+
return visitor.data.point.length;
|
|
242639
243337
|
const polyface = visitor.clientPolyface();
|
|
242640
243338
|
if (polyface !== undefined)
|
|
242641
243339
|
return polyface.data.point.length;
|
|
@@ -242652,6 +243350,11 @@ class PolyfaceQuery {
|
|
|
242652
243350
|
* If not a polyface, visit all facets to accumulate a count.
|
|
242653
243351
|
*/
|
|
242654
243352
|
static visitorClientFacetCount(visitor) {
|
|
243353
|
+
if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_6__.Polyface) {
|
|
243354
|
+
if (visitor.facetCount !== undefined)
|
|
243355
|
+
return visitor.facetCount;
|
|
243356
|
+
visitor = visitor.createVisitor(0);
|
|
243357
|
+
}
|
|
242655
243358
|
const polyface = visitor.clientPolyface();
|
|
242656
243359
|
if (polyface !== undefined && polyface.facetCount !== undefined)
|
|
242657
243360
|
return polyface.facetCount;
|
|
@@ -243427,6 +244130,1307 @@ class RangeLengthData {
|
|
|
243427
244130
|
}
|
|
243428
244131
|
|
|
243429
244132
|
|
|
244133
|
+
/***/ }),
|
|
244134
|
+
|
|
244135
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js":
|
|
244136
|
+
/*!**************************************************************************************!*\
|
|
244137
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js ***!
|
|
244138
|
+
\**************************************************************************************/
|
|
244139
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244140
|
+
|
|
244141
|
+
"use strict";
|
|
244142
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244143
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244144
|
+
/* harmony export */ "LineString3dRangeTreeContext": () => (/* binding */ LineString3dRangeTreeContext)
|
|
244145
|
+
/* harmony export */ });
|
|
244146
|
+
/* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
244147
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
244148
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
244149
|
+
/* harmony import */ var _RangeTreeNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RangeTreeNode */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js");
|
|
244150
|
+
/* harmony import */ var _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RangeTreeSearchHandlers */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js");
|
|
244151
|
+
/*---------------------------------------------------------------------------------------------
|
|
244152
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244153
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244154
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244155
|
+
/** @packageDocumentation
|
|
244156
|
+
* @module RangeSearch
|
|
244157
|
+
*/
|
|
244158
|
+
|
|
244159
|
+
|
|
244160
|
+
|
|
244161
|
+
|
|
244162
|
+
|
|
244163
|
+
/**
|
|
244164
|
+
* Handler class for searching a range tree containing the segments of a linestring.
|
|
244165
|
+
* * Facilitates multiple searches for closest point and close approach calculations.
|
|
244166
|
+
* @public
|
|
244167
|
+
*/
|
|
244168
|
+
class LineString3dRangeTreeContext {
|
|
244169
|
+
/** Constructor: capture inputs, initialize debug counters */
|
|
244170
|
+
constructor(rangeTreeRoot, points) {
|
|
244171
|
+
this.lineString = points;
|
|
244172
|
+
this._rangeTreeRoot = rangeTreeRoot;
|
|
244173
|
+
this.numRangeTestTrue = 0;
|
|
244174
|
+
this.numRangeTestFalse = 0;
|
|
244175
|
+
this.numPointTest = 0;
|
|
244176
|
+
this.numSearch = 0;
|
|
244177
|
+
}
|
|
244178
|
+
/**
|
|
244179
|
+
* Create a range tree context for the polyline points:
|
|
244180
|
+
* * initialize with segment ranges
|
|
244181
|
+
* * appData are segment indices
|
|
244182
|
+
* @param linestring captured if LineString3d, otherwise copied
|
|
244183
|
+
* @param maxChildPerNode maximum children per range tree node (default 4)
|
|
244184
|
+
* @param maxAppDataPerLeaf maximum segment indices per leaf node (default 4)
|
|
244185
|
+
*/
|
|
244186
|
+
static createCapture(points, maxChildPerNode = 4, maxAppDataPerLeaf = 4) {
|
|
244187
|
+
const linestring = points instanceof _curve_LineString3d__WEBPACK_IMPORTED_MODULE_0__.LineString3d ? points : _curve_LineString3d__WEBPACK_IMPORTED_MODULE_0__.LineString3d.createPoints(points);
|
|
244188
|
+
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
|
|
244189
|
+
maxChildPerNode, maxAppDataPerLeaf);
|
|
244190
|
+
return rangeTreeRoot ? new LineString3dRangeTreeContext(rangeTreeRoot, linestring) : undefined;
|
|
244191
|
+
}
|
|
244192
|
+
/**
|
|
244193
|
+
* Search the range tree for closest point(s) to spacePoint.
|
|
244194
|
+
* @param spacePoint point to test
|
|
244195
|
+
* @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point.
|
|
244196
|
+
* @return closest point detail(s) with detail.a set to the distance from spacePoint to detail.point
|
|
244197
|
+
*/
|
|
244198
|
+
searchForClosestPoint(spacePoint, maxDist) {
|
|
244199
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__.SingleTreeSearchHandlerForClosestPointOnLineString3d(spacePoint, this, maxDist);
|
|
244200
|
+
this.numSearch++;
|
|
244201
|
+
// seed the search with a few segments -- this reduces early trips deep into ranges that are far from spacePoint.
|
|
244202
|
+
const numTest = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.clamp(Math.floor(this.lineString.numPoints() / 20), 2, 7);
|
|
244203
|
+
const testStep = Math.floor(this.lineString.numPoints() / numTest);
|
|
244204
|
+
handler.processAppData(0);
|
|
244205
|
+
handler.processAppData(this.lineString.numPoints() - 2);
|
|
244206
|
+
for (let i = testStep; i + 1 < this.lineString.numPoints(); i += testStep)
|
|
244207
|
+
handler.processAppData(i);
|
|
244208
|
+
this._rangeTreeRoot.searchTopDown(handler);
|
|
244209
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244210
|
+
}
|
|
244211
|
+
/**
|
|
244212
|
+
* Search the range trees for closest approach(es) between the polylines.
|
|
244213
|
+
* @param contextA first polyline context
|
|
244214
|
+
* @param contextB second polyline context
|
|
244215
|
+
* @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach.
|
|
244216
|
+
* @return closest approach detail pair(s), one per context, with detail.a set to the approach distance
|
|
244217
|
+
*/
|
|
244218
|
+
static searchForClosestApproach(contextA, contextB, maxDist) {
|
|
244219
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__.TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach(contextA, contextB, maxDist);
|
|
244220
|
+
_RangeTreeNode__WEBPACK_IMPORTED_MODULE_1__.RangeTreeNode.searchTwoTreesTopDown(contextA._rangeTreeRoot, contextB._rangeTreeRoot, handler);
|
|
244221
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244222
|
+
}
|
|
244223
|
+
}
|
|
244224
|
+
|
|
244225
|
+
|
|
244226
|
+
/***/ }),
|
|
244227
|
+
|
|
244228
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/MinimumValueTester.js":
|
|
244229
|
+
/*!****************************************************************************!*\
|
|
244230
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/MinimumValueTester.js ***!
|
|
244231
|
+
\****************************************************************************/
|
|
244232
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244233
|
+
|
|
244234
|
+
"use strict";
|
|
244235
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244236
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244237
|
+
/* harmony export */ "MinimumValueTester": () => (/* binding */ MinimumValueTester)
|
|
244238
|
+
/* harmony export */ });
|
|
244239
|
+
/*---------------------------------------------------------------------------------------------
|
|
244240
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244241
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244242
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244243
|
+
/** @packageDocumentation
|
|
244244
|
+
* @module CartesianGeometry
|
|
244245
|
+
*/
|
|
244246
|
+
/**
|
|
244247
|
+
* Data carrier for use when repeatedly testing items (of parameterized type T) to determine the one with a minimum associated value.
|
|
244248
|
+
* * Optionally pushes to arrays of items and values when the value does not exceed a given trigger.
|
|
244249
|
+
* * * The item at minimum value is still recorded, even if the minimum value exceeds the trigger value.
|
|
244250
|
+
* * When comparing a potential minimum value to an undefined value, the number is always accepted as the new minimum.
|
|
244251
|
+
* @internal
|
|
244252
|
+
*/
|
|
244253
|
+
class MinimumValueTester {
|
|
244254
|
+
/**
|
|
244255
|
+
* Capture the given item with undefined item and value, and optional maxValueForSavingToArray.
|
|
244256
|
+
*/
|
|
244257
|
+
constructor(maxValueForSavingToArray) {
|
|
244258
|
+
this.savedItems = [];
|
|
244259
|
+
this.savedValues = [];
|
|
244260
|
+
this.resetMinValueAndItem(undefined, undefined);
|
|
244261
|
+
this.resetTriggerValueForSavingToArray(maxValueForSavingToArray, false);
|
|
244262
|
+
}
|
|
244263
|
+
/**
|
|
244264
|
+
* Static method to create a tester.
|
|
244265
|
+
* @param maxValueForSavingToArray optional numeric value limiting items to save to the optional array.
|
|
244266
|
+
* @returns new tester.
|
|
244267
|
+
*/
|
|
244268
|
+
static create(maxValueForSavingToArray) {
|
|
244269
|
+
return new MinimumValueTester(maxValueForSavingToArray);
|
|
244270
|
+
}
|
|
244271
|
+
/**
|
|
244272
|
+
* Install new minimum value and associated item, both possibly undefined.
|
|
244273
|
+
* * The existing arrays of saved items and values, and the trigger value, are unaffected.
|
|
244274
|
+
* @param item object to associate with the new minimum value
|
|
244275
|
+
* @param value new minimum value
|
|
244276
|
+
*/
|
|
244277
|
+
resetMinValueAndItem(item = undefined, value = undefined) {
|
|
244278
|
+
this.itemAtMinValue = item;
|
|
244279
|
+
this.minValue = value;
|
|
244280
|
+
}
|
|
244281
|
+
/**
|
|
244282
|
+
* Set the trigger value.
|
|
244283
|
+
* @param value new trigger value
|
|
244284
|
+
* @param reinitializeArrays whether to clear the arrays of saved items and values
|
|
244285
|
+
*/
|
|
244286
|
+
resetTriggerValueForSavingToArray(value, reinitializeArrays = false) {
|
|
244287
|
+
this.triggerForSavingToArray = value;
|
|
244288
|
+
if (reinitializeArrays) {
|
|
244289
|
+
this.savedItems = [];
|
|
244290
|
+
this.savedValues = [];
|
|
244291
|
+
}
|
|
244292
|
+
}
|
|
244293
|
+
/**
|
|
244294
|
+
* Test a new item with value.
|
|
244295
|
+
* * Push the new item and value to the saved arrays if both:
|
|
244296
|
+
* * `this.triggerForSavingToArray` is defined
|
|
244297
|
+
* * the new value is less than or equal to `this.triggerForSavingToArray`.
|
|
244298
|
+
* * Save the new item and value if either:
|
|
244299
|
+
* * `this.minValue` is undefined
|
|
244300
|
+
* * new value is less than `this.minValue`.
|
|
244301
|
+
* @param item item to be saved (captured!) if value conditions are met
|
|
244302
|
+
* @param value numeric value being minimized.
|
|
244303
|
+
* @returns true if and only if the input value is the new minimum value.
|
|
244304
|
+
*/
|
|
244305
|
+
testAndSave(item, value) {
|
|
244306
|
+
if (this.doesValueTrigger(value)) {
|
|
244307
|
+
this.savedValues.push(value);
|
|
244308
|
+
this.savedItems.push(item);
|
|
244309
|
+
}
|
|
244310
|
+
if (this.isNewMinValue(value)) {
|
|
244311
|
+
this.minValue = value;
|
|
244312
|
+
this.itemAtMinValue = item;
|
|
244313
|
+
return true;
|
|
244314
|
+
}
|
|
244315
|
+
return false;
|
|
244316
|
+
}
|
|
244317
|
+
/** Whether the input value is small enough to be saved to this instance. */
|
|
244318
|
+
doesValueTrigger(value) {
|
|
244319
|
+
return this.triggerForSavingToArray !== undefined && value <= this.triggerForSavingToArray;
|
|
244320
|
+
}
|
|
244321
|
+
/** Whether the input value is smaller than the last recorded minimum value. */
|
|
244322
|
+
isNewMinValue(value) {
|
|
244323
|
+
return this.minValue === undefined || value < this.minValue;
|
|
244324
|
+
}
|
|
244325
|
+
/** Whether the input value is small enough to be the new minimum or to be saved to this instance. */
|
|
244326
|
+
isNewMinOrTrigger(value) {
|
|
244327
|
+
return this.isNewMinValue(value) || this.doesValueTrigger(value);
|
|
244328
|
+
}
|
|
244329
|
+
}
|
|
244330
|
+
|
|
244331
|
+
|
|
244332
|
+
/***/ }),
|
|
244333
|
+
|
|
244334
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js":
|
|
244335
|
+
/*!**************************************************************************************!*\
|
|
244336
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js ***!
|
|
244337
|
+
\**************************************************************************************/
|
|
244338
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244339
|
+
|
|
244340
|
+
"use strict";
|
|
244341
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244342
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244343
|
+
/* harmony export */ "Point3dArrayRangeTreeContext": () => (/* binding */ Point3dArrayRangeTreeContext)
|
|
244344
|
+
/* harmony export */ });
|
|
244345
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
244346
|
+
/* harmony import */ var _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RangeTreeNode */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js");
|
|
244347
|
+
/* harmony import */ var _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RangeTreeSearchHandlers */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js");
|
|
244348
|
+
/*---------------------------------------------------------------------------------------------
|
|
244349
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244350
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244351
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244352
|
+
/** @packageDocumentation
|
|
244353
|
+
* @module RangeSearch
|
|
244354
|
+
*/
|
|
244355
|
+
|
|
244356
|
+
|
|
244357
|
+
|
|
244358
|
+
/**
|
|
244359
|
+
* Handler class for searching a range tree containing unordered Point3d data.
|
|
244360
|
+
* * Facilitates multiple searches for closest point and close approach calculations.
|
|
244361
|
+
* @public
|
|
244362
|
+
*/
|
|
244363
|
+
class Point3dArrayRangeTreeContext {
|
|
244364
|
+
/** Constructor: capture inputs, initialize debug counters */
|
|
244365
|
+
constructor(rangeTreeRoot, points) {
|
|
244366
|
+
this.points = points;
|
|
244367
|
+
this._rangeTreeRoot = rangeTreeRoot;
|
|
244368
|
+
this.numRangeTestTrue = 0;
|
|
244369
|
+
this.numRangeTestFalse = 0;
|
|
244370
|
+
this.numPointTest = 0;
|
|
244371
|
+
this.numSearch = 0;
|
|
244372
|
+
}
|
|
244373
|
+
/**
|
|
244374
|
+
* Create a range tree context with given points:
|
|
244375
|
+
* * initialize with single-point ranges
|
|
244376
|
+
* * appData are point indices
|
|
244377
|
+
* @param points captured
|
|
244378
|
+
* @param maxChildPerNode maximum children per range tree node (default 4)
|
|
244379
|
+
* @param maxAppDataPerLeaf maximum point indices per leaf node (default 4)
|
|
244380
|
+
*/
|
|
244381
|
+
static createCapture(points, maxChildPerNode = 4, maxAppDataPerLeaf = 4) {
|
|
244382
|
+
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);
|
|
244383
|
+
return rangeTreeRoot ? new Point3dArrayRangeTreeContext(rangeTreeRoot, points) : undefined;
|
|
244384
|
+
}
|
|
244385
|
+
/**
|
|
244386
|
+
* Search the range tree for closest point(s) to spacePoint.
|
|
244387
|
+
* @param spacePoint point to test
|
|
244388
|
+
* @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point.
|
|
244389
|
+
* @return closest point detail(s) with following fields set:
|
|
244390
|
+
* * detail.point = the closest point
|
|
244391
|
+
* * detail.fraction = the index of the closest point in the points array
|
|
244392
|
+
* * detail.a = distance from spacePoint to closest point
|
|
244393
|
+
*/
|
|
244394
|
+
searchForClosestPoint(spacePoint, maxDist) {
|
|
244395
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_2__.SingleTreeSearchHandlerForClosestPointInArray(spacePoint, this, maxDist);
|
|
244396
|
+
this.numSearch++;
|
|
244397
|
+
this._rangeTreeRoot.searchTopDown(handler);
|
|
244398
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244399
|
+
}
|
|
244400
|
+
/**
|
|
244401
|
+
* Search the range trees for closest approach(es) between the point arrays.
|
|
244402
|
+
* @param contextA first point array context
|
|
244403
|
+
* @param contextB second point array context
|
|
244404
|
+
* @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach.
|
|
244405
|
+
* @return closest approach detail pair(s), one per context, each with the following fields set:
|
|
244406
|
+
* * detail.point = the point at closest approach
|
|
244407
|
+
* * detail.fraction = the index of detail.point in the points array
|
|
244408
|
+
* * detail.a = the closest approach distance
|
|
244409
|
+
*/
|
|
244410
|
+
static searchForClosestApproach(contextA, contextB, maxDist) {
|
|
244411
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_2__.TwoTreeSearchHandlerForPoint3dArrayPoint3dArrayCloseApproach(contextA, contextB, maxDist);
|
|
244412
|
+
_RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.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/PolyfaceRangeTreeContext.js":
|
|
244421
|
+
/*!**********************************************************************************!*\
|
|
244422
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.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 */ "PolyfaceRangeTreeContext": () => (/* binding */ PolyfaceRangeTreeContext)
|
|
244430
|
+
/* harmony export */ });
|
|
244431
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
244432
|
+
/* harmony import */ var _Polyface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
|
|
244433
|
+
/* harmony import */ var _PolyfaceQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../PolyfaceQuery */ "../../core/geometry/lib/esm/polyface/PolyfaceQuery.js");
|
|
244434
|
+
/* harmony import */ var _RangeTreeNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RangeTreeNode */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js");
|
|
244435
|
+
/* harmony import */ var _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RangeTreeSearchHandlers */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js");
|
|
244436
|
+
/*---------------------------------------------------------------------------------------------
|
|
244437
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244438
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244439
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244440
|
+
/** @packageDocumentation
|
|
244441
|
+
* @module RangeSearch
|
|
244442
|
+
*/
|
|
244443
|
+
|
|
244444
|
+
|
|
244445
|
+
|
|
244446
|
+
|
|
244447
|
+
|
|
244448
|
+
/**
|
|
244449
|
+
* Handler class for searching a range tree containing the facets of a polyface.
|
|
244450
|
+
* * Facilitates multiple searches for closest point and close approach calculations.
|
|
244451
|
+
* @public
|
|
244452
|
+
*/
|
|
244453
|
+
class PolyfaceRangeTreeContext {
|
|
244454
|
+
/** Constructor: capture inputs, initialize debug counters */
|
|
244455
|
+
constructor(rangeTreeRoot, visitor, convexFacets = false) {
|
|
244456
|
+
this.visitor = visitor;
|
|
244457
|
+
this.convexFacets = convexFacets;
|
|
244458
|
+
this._rangeTreeRoot = rangeTreeRoot;
|
|
244459
|
+
this.numRangeTestTrue = 0;
|
|
244460
|
+
this.numRangeTestFalse = 0;
|
|
244461
|
+
this.numFacetTest = 0;
|
|
244462
|
+
this.numSearch = 0;
|
|
244463
|
+
}
|
|
244464
|
+
/**
|
|
244465
|
+
* Create a range tree context for the Polyface facets.
|
|
244466
|
+
* * This is a very simple construction that splits "right and left parts" of the facet sequence.
|
|
244467
|
+
* * Facets with any recognizable "left to right" or "top to bottom" sequencing will have very effective search structures.
|
|
244468
|
+
* @param visitor access to facets, captured if PolyfaceVisitor
|
|
244469
|
+
* @param maxChildPerNode maximum children per range tree node (default 4)
|
|
244470
|
+
* @param maxAppDataPerLeaf maximum facet indices per leaf node (default 4)
|
|
244471
|
+
* @param convexFacets whether all facets are known to be convex (cf. [[PolyfaceQuery.areFacetsConvex]]) (default false)
|
|
244472
|
+
*/
|
|
244473
|
+
static createCapture(visitor, maxChildPerNode = 4, maxAppDataPerLeaf = 4, convexFacets = false) {
|
|
244474
|
+
if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_0__.Polyface)
|
|
244475
|
+
return this.createCapture(visitor.createVisitor(0), maxChildPerNode, maxAppDataPerLeaf, convexFacets);
|
|
244476
|
+
const numFacet = _PolyfaceQuery__WEBPACK_IMPORTED_MODULE_1__.PolyfaceQuery.visitorClientFacetCount(visitor);
|
|
244477
|
+
const rangeTreeRoot = _RangeTreeNode__WEBPACK_IMPORTED_MODULE_2__.RangeTreeOps.createByIndexSplits((index) => { visitor.moveToReadIndex(index); return visitor.range(); }, (index) => { return index; }, numFacet, maxChildPerNode, maxAppDataPerLeaf);
|
|
244478
|
+
return rangeTreeRoot ? new PolyfaceRangeTreeContext(rangeTreeRoot, visitor, convexFacets) : undefined;
|
|
244479
|
+
}
|
|
244480
|
+
/**
|
|
244481
|
+
* Search the range tree for closest facet(s) to spacePoint.
|
|
244482
|
+
* @param spacePoint point to test
|
|
244483
|
+
* @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point.
|
|
244484
|
+
* @param searchFacetInterior whether to include facet interiors in search. Default is false: just consider facet boundaries.
|
|
244485
|
+
* @return closest point detail(s) with detail.a set to the distance from spacePoint to detail.point
|
|
244486
|
+
*/
|
|
244487
|
+
searchForClosestPoint(spacePoint, maxDist, searchFacetInterior = false) {
|
|
244488
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__.SingleTreeSearchHandlerForClosestPointOnPolyface(spacePoint, this, maxDist, searchFacetInterior);
|
|
244489
|
+
this.numSearch++;
|
|
244490
|
+
const numFacet = _PolyfaceQuery__WEBPACK_IMPORTED_MODULE_1__.PolyfaceQuery.visitorClientFacetCount(this.visitor);
|
|
244491
|
+
// seed the search with a few points -- this reduces early trips deep into early ranges that are far from spacePoint.
|
|
244492
|
+
const numTest = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.clamp(Math.floor(numFacet / 20), 2, 7);
|
|
244493
|
+
const testStep = Math.floor(numFacet / numTest);
|
|
244494
|
+
handler.processAppData(0);
|
|
244495
|
+
handler.processAppData(numFacet - 1);
|
|
244496
|
+
for (let i = testStep; i + 1 < numFacet; i += testStep)
|
|
244497
|
+
handler.processAppData(i);
|
|
244498
|
+
this._rangeTreeRoot.searchTopDown(handler);
|
|
244499
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244500
|
+
}
|
|
244501
|
+
/**
|
|
244502
|
+
* Search the range trees for closest approach(es) between the polyfaces.
|
|
244503
|
+
* @param contextA first polyface context
|
|
244504
|
+
* @param contextB second polyface context
|
|
244505
|
+
* @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach.
|
|
244506
|
+
* @param searchFacetInterior whether to include facet interiors in search (`context.convexFacets` must be true for both contexts). Default is false: just consider facet boundaries.
|
|
244507
|
+
* @return closest approach detail pair(s), one per context, with detail.a set to the approach distance
|
|
244508
|
+
*/
|
|
244509
|
+
static searchForClosestApproach(contextA, contextB, maxDist, searchFacetInterior = false) {
|
|
244510
|
+
const handler = new _RangeTreeSearchHandlers__WEBPACK_IMPORTED_MODULE_3__.TwoTreeSearchHandlerForFacetFacetCloseApproach(contextA, contextB, maxDist, searchFacetInterior);
|
|
244511
|
+
_RangeTreeNode__WEBPACK_IMPORTED_MODULE_2__.RangeTreeNode.searchTwoTreesTopDown(contextA._rangeTreeRoot, contextB._rangeTreeRoot, handler);
|
|
244512
|
+
return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
|
|
244513
|
+
}
|
|
244514
|
+
}
|
|
244515
|
+
|
|
244516
|
+
|
|
244517
|
+
/***/ }),
|
|
244518
|
+
|
|
244519
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js":
|
|
244520
|
+
/*!***********************************************************************!*\
|
|
244521
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js ***!
|
|
244522
|
+
\***********************************************************************/
|
|
244523
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
244524
|
+
|
|
244525
|
+
"use strict";
|
|
244526
|
+
__webpack_require__.r(__webpack_exports__);
|
|
244527
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
244528
|
+
/* harmony export */ "RangeTreeNode": () => (/* binding */ RangeTreeNode),
|
|
244529
|
+
/* harmony export */ "RangeTreeOps": () => (/* binding */ RangeTreeOps),
|
|
244530
|
+
/* harmony export */ "SingleTreeSearchHandler": () => (/* binding */ SingleTreeSearchHandler),
|
|
244531
|
+
/* harmony export */ "TwoTreeDistanceMinimizationSearchHandler": () => (/* binding */ TwoTreeDistanceMinimizationSearchHandler),
|
|
244532
|
+
/* harmony export */ "TwoTreeSearchHandler": () => (/* binding */ TwoTreeSearchHandler)
|
|
244533
|
+
/* harmony export */ });
|
|
244534
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
244535
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
244536
|
+
/*---------------------------------------------------------------------------------------------
|
|
244537
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
244538
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
244539
|
+
*--------------------------------------------------------------------------------------------*/
|
|
244540
|
+
/** @packageDocumentation
|
|
244541
|
+
* @module RangeSearch
|
|
244542
|
+
*/
|
|
244543
|
+
|
|
244544
|
+
|
|
244545
|
+
/**
|
|
244546
|
+
* Map an (unchecked) integer to a parameterized type T, where the data argument can be either:
|
|
244547
|
+
* * an array of type T
|
|
244548
|
+
* * a function which takes an index and returns type T
|
|
244549
|
+
* @internal
|
|
244550
|
+
*/
|
|
244551
|
+
function evaluateIndexToType(data, index) {
|
|
244552
|
+
if (Array.isArray(data))
|
|
244553
|
+
return data[index];
|
|
244554
|
+
return data(index);
|
|
244555
|
+
}
|
|
244556
|
+
/**
|
|
244557
|
+
* 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.
|
|
244558
|
+
* @internal
|
|
244559
|
+
*/
|
|
244560
|
+
function getByIndex(index, data) {
|
|
244561
|
+
if (data !== undefined) {
|
|
244562
|
+
if (Array.isArray(data)) {
|
|
244563
|
+
if (index < data.length)
|
|
244564
|
+
return data[index];
|
|
244565
|
+
}
|
|
244566
|
+
else {
|
|
244567
|
+
return data;
|
|
244568
|
+
}
|
|
244569
|
+
}
|
|
244570
|
+
return undefined;
|
|
244571
|
+
}
|
|
244572
|
+
/**
|
|
244573
|
+
* 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.
|
|
244574
|
+
* @internal
|
|
244575
|
+
*/
|
|
244576
|
+
function getFlexDataCount(data) {
|
|
244577
|
+
if (data !== undefined) {
|
|
244578
|
+
if (Array.isArray(data)) {
|
|
244579
|
+
return data.length;
|
|
244580
|
+
}
|
|
244581
|
+
else {
|
|
244582
|
+
return 1;
|
|
244583
|
+
}
|
|
244584
|
+
}
|
|
244585
|
+
return 0;
|
|
244586
|
+
}
|
|
244587
|
+
/**
|
|
244588
|
+
* Abstract class for handler objects called during traversal of a single range tree.
|
|
244589
|
+
* @internal
|
|
244590
|
+
*/
|
|
244591
|
+
class SingleTreeSearchHandler {
|
|
244592
|
+
/**
|
|
244593
|
+
* Query to see if the active search has been aborted.
|
|
244594
|
+
* * Default implementation returns false so query runs to completion.
|
|
244595
|
+
* * Search processes check this after range tests and child processing.
|
|
244596
|
+
*/
|
|
244597
|
+
// eslint-disable-next-line @itwin/prefer-get
|
|
244598
|
+
isAborted() { return false; }
|
|
244599
|
+
}
|
|
244600
|
+
/**
|
|
244601
|
+
* Abstract class for handler objects called during traversal of two range trees.
|
|
244602
|
+
* @internal
|
|
244603
|
+
*/
|
|
244604
|
+
class TwoTreeSearchHandler {
|
|
244605
|
+
/**
|
|
244606
|
+
* Query to see if the active search has been aborted.
|
|
244607
|
+
* * Default implementation returns false so query runs to completion.
|
|
244608
|
+
* * Search processes check this after range tests and child processing.
|
|
244609
|
+
*/
|
|
244610
|
+
// eslint-disable-next-line @itwin/prefer-get
|
|
244611
|
+
isAborted() { return false; }
|
|
244612
|
+
}
|
|
244613
|
+
/**
|
|
244614
|
+
* This class refines the TwoTreeSearchHandler with an implementation of `isRangePairActive` appropriate for computing the minimum distance between trees.
|
|
244615
|
+
* * The concrete class must implement `getCurrentDistance()` method to provide the best-so-far distance.
|
|
244616
|
+
* * The implementation of `isRangePairActive` returns true if the distance between ranges is less than or equal to the `getCurrentDistance()` value.
|
|
244617
|
+
* @internal
|
|
244618
|
+
*/
|
|
244619
|
+
class TwoTreeDistanceMinimizationSearchHandler extends TwoTreeSearchHandler {
|
|
244620
|
+
/**
|
|
244621
|
+
* Method called to decide whether to process subtrees and immediate child appData items from a left tree node and right tree node.
|
|
244622
|
+
* @param leftRange range from a node in the left tree
|
|
244623
|
+
* @param rightRange range from a node in the right tree.
|
|
244624
|
+
* @returns true if the smallest distance from leftRange to rightRange is less than or equal to getCurrentDistance()
|
|
244625
|
+
*/
|
|
244626
|
+
isRangePairActive(leftRange, rightRange) {
|
|
244627
|
+
const currentDistance = this.getCurrentDistance();
|
|
244628
|
+
const distanceBetweenRanges = leftRange.distanceToRange(rightRange);
|
|
244629
|
+
if (distanceBetweenRanges <= currentDistance) {
|
|
244630
|
+
return true;
|
|
244631
|
+
}
|
|
244632
|
+
return false;
|
|
244633
|
+
}
|
|
244634
|
+
}
|
|
244635
|
+
let numNodeCreated = 0;
|
|
244636
|
+
/**
|
|
244637
|
+
* * TREE STRUCTURE
|
|
244638
|
+
* * A RangeTreeNode is part of a range tree.
|
|
244639
|
+
* * TREE is used here in a strictly _structural_ sense, which has no broad promises about data members.
|
|
244640
|
+
* * Each RangeNode points to 0, 1 or many children.
|
|
244641
|
+
* * Each child has (but does not point back to) a single parent.
|
|
244642
|
+
* * The overall tree has a single root.
|
|
244643
|
+
* * Each node is effectively the root of the tree of its children.
|
|
244644
|
+
* * NON-TREE DATA MEMBERS
|
|
244645
|
+
* * Data members in each node (in addition to children) are
|
|
244646
|
+
* * _range = the union of ranges below in the heap
|
|
244647
|
+
* * _appData = application data associated with the node.
|
|
244648
|
+
* * Construction methods may place multiple _appData items in each node.
|
|
244649
|
+
* * In common use, only the leaves will have _appData. However, the class definitions allow _appData at all nodes, and search algorithms must include them.
|
|
244650
|
+
* * CONSTRUCTION
|
|
244651
|
+
* * The RangeTreeNode.createByIndexSplits method constructs the tree with simple right-left splits within an array of input items.
|
|
244652
|
+
* * The appData is placed entirely in the leaves.
|
|
244653
|
+
* * caller can specify:
|
|
244654
|
+
* * the number of _appData items per leaf
|
|
244655
|
+
* * the number of children per node within the tree.
|
|
244656
|
+
* * "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)
|
|
244657
|
+
* * faster search because lower nodes have smaller ranges that will be skipped by search algorithms.
|
|
244658
|
+
* * larger memory use because of more nodes
|
|
244659
|
+
* * For future construction methods:
|
|
244660
|
+
* * _appData "above the leaves" may allow nodes below to have smaller ranges, but add complexity to search.
|
|
244661
|
+
* @internal
|
|
244662
|
+
*/
|
|
244663
|
+
class RangeTreeNode {
|
|
244664
|
+
/**
|
|
244665
|
+
* CONSTRUCTOR
|
|
244666
|
+
* CAPTURE (not copy)
|
|
244667
|
+
* * range = range for search algorithms
|
|
244668
|
+
* * appData = application data relevant to this node.
|
|
244669
|
+
* * children = child node reference(s).
|
|
244670
|
+
*/
|
|
244671
|
+
constructor(range, appData, children) {
|
|
244672
|
+
this._range = range;
|
|
244673
|
+
this._appData = appData;
|
|
244674
|
+
this._children = children;
|
|
244675
|
+
this._id = numNodeCreated++;
|
|
244676
|
+
// const childIds: number[] = [];
|
|
244677
|
+
// if (Array.isArray(this._children))
|
|
244678
|
+
// for (const c of this._children) childIds.push(c._id);
|
|
244679
|
+
// else if (this._children instanceof RangeTreeNode)
|
|
244680
|
+
// childIds.push(this._children._id);
|
|
244681
|
+
// const numAppData = getFlexDataCount(appData);
|
|
244682
|
+
// console.log({ id: this._id, childIds, numAppData });
|
|
244683
|
+
}
|
|
244684
|
+
/** Simplest public create: capture the range, appData, and children. */
|
|
244685
|
+
static createCapture(range, appData, children) {
|
|
244686
|
+
return new RangeTreeNode(range, appData, children);
|
|
244687
|
+
}
|
|
244688
|
+
/** copy (not capture) from given data into the range in this RangeEntry */
|
|
244689
|
+
setRange(data) {
|
|
244690
|
+
this._range.setFrom(data);
|
|
244691
|
+
}
|
|
244692
|
+
/** return (a copy of) the range in this RangeEntry */
|
|
244693
|
+
getRange(data) {
|
|
244694
|
+
return this._range.clone(data);
|
|
244695
|
+
}
|
|
244696
|
+
/** return (a reference to) the range in this RangeEntry */
|
|
244697
|
+
getRangeRef() {
|
|
244698
|
+
return this._range;
|
|
244699
|
+
}
|
|
244700
|
+
/**
|
|
244701
|
+
* Access a child by index.
|
|
244702
|
+
* * If the child data is an array, this dereferences the array.
|
|
244703
|
+
* * If the child data is a singleton, treat it as index 0.
|
|
244704
|
+
* * return undefined if there are no children.
|
|
244705
|
+
* @param index index of item to access.
|
|
244706
|
+
*/
|
|
244707
|
+
getChildByIndex(index) {
|
|
244708
|
+
return getByIndex(index, this._children);
|
|
244709
|
+
}
|
|
244710
|
+
/**
|
|
244711
|
+
* * Access an appData by index.
|
|
244712
|
+
* * If the appData data is an array, this dereferences the array.
|
|
244713
|
+
* * If the appData data is a singleton, treat it as if it is at index 0 in an array
|
|
244714
|
+
* * return undefined if there are no appData or for any index out of range.
|
|
244715
|
+
* @param index index of item to access.
|
|
244716
|
+
*/
|
|
244717
|
+
getAppDataByIndex(index) {
|
|
244718
|
+
return getByIndex(index, this._appData);
|
|
244719
|
+
}
|
|
244720
|
+
/** Access the children or child (does not clone). */
|
|
244721
|
+
getAllChildren() {
|
|
244722
|
+
return this._children;
|
|
244723
|
+
}
|
|
244724
|
+
/** Access the appData array or singleton (does not clone). */
|
|
244725
|
+
getAllAppData() {
|
|
244726
|
+
return this._appData;
|
|
244727
|
+
}
|
|
244728
|
+
/**
|
|
244729
|
+
* Count the direct children in this node of the tree.
|
|
244730
|
+
* * This is not recursive. For a recursive count, use `RangeTreeOps.getRecursiveNodeCount`.
|
|
244731
|
+
*/
|
|
244732
|
+
getNumChildren() {
|
|
244733
|
+
return getFlexDataCount(this._children);
|
|
244734
|
+
}
|
|
244735
|
+
/**
|
|
244736
|
+
* Count the appData items in this node of the tree.
|
|
244737
|
+
* * This is not recursive. For a recursive count, use `RangeTreeOps.getRecursiveAppDataCount`.
|
|
244738
|
+
*/
|
|
244739
|
+
getNumAppData() {
|
|
244740
|
+
return getFlexDataCount(this._appData);
|
|
244741
|
+
}
|
|
244742
|
+
/**
|
|
244743
|
+
* Depth-first tree iteration, calling `announceNode` on each node.
|
|
244744
|
+
* @param announceNode callback that returns true to recurse into children
|
|
244745
|
+
*/
|
|
244746
|
+
recurseIntoTree(announceNode) {
|
|
244747
|
+
const doChildren = announceNode(this);
|
|
244748
|
+
if (doChildren) {
|
|
244749
|
+
if (Array.isArray(this._children)) {
|
|
244750
|
+
for (const child of this._children)
|
|
244751
|
+
child.recurseIntoTree(announceNode);
|
|
244752
|
+
}
|
|
244753
|
+
else if (this._children !== undefined) {
|
|
244754
|
+
this._children.recurseIntoTree(announceNode);
|
|
244755
|
+
}
|
|
244756
|
+
}
|
|
244757
|
+
}
|
|
244758
|
+
/**
|
|
244759
|
+
* Depth-first tree iteration via handler.
|
|
244760
|
+
* * if handler decides the instance range is active, process appData, then recurse on children
|
|
244761
|
+
* * if handler decides to abort after processing an appData, skip processing rest of appData and children
|
|
244762
|
+
*/
|
|
244763
|
+
searchTopDown(handler) {
|
|
244764
|
+
if (handler.isRangeActive(this._range)) {
|
|
244765
|
+
let itemToProcess;
|
|
244766
|
+
for (let i = 0; undefined !== (itemToProcess = this.getAppDataByIndex(i)); i++) {
|
|
244767
|
+
// console.log(itemToProcess);
|
|
244768
|
+
handler.processAppData(itemToProcess);
|
|
244769
|
+
if (handler.isAborted())
|
|
244770
|
+
return;
|
|
244771
|
+
}
|
|
244772
|
+
let child;
|
|
244773
|
+
for (let i = 0; undefined !== (child = this.getChildByIndex(i)); i++) {
|
|
244774
|
+
child.searchTopDown(handler);
|
|
244775
|
+
}
|
|
244776
|
+
}
|
|
244777
|
+
}
|
|
244778
|
+
/**
|
|
244779
|
+
* Apply the handler.processAppDataPair method to each pair of appData items from leftAppData and rightStack.
|
|
244780
|
+
* @param leftAppData singleton or array with data "from left"
|
|
244781
|
+
* @param rightStack stack of nodes to process from right path.
|
|
244782
|
+
* @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.
|
|
244783
|
+
* @param handler search handler
|
|
244784
|
+
*/
|
|
244785
|
+
static processAppDataAndAppDataStack(leftAppData, rightStack, reverseArgs, handler) {
|
|
244786
|
+
if (leftAppData !== undefined) {
|
|
244787
|
+
let leftItem;
|
|
244788
|
+
let rightItem;
|
|
244789
|
+
// hmm.. we ASSUME that if the tip ranges passed, then all parent ranges would pass without further test.
|
|
244790
|
+
for (let rangeIndex = rightStack.length; rangeIndex-- > 0;) {
|
|
244791
|
+
const rightAppData = rightStack[rangeIndex]._appData;
|
|
244792
|
+
for (let rightIndex = 0; undefined !== (rightItem = getByIndex(rightIndex, rightAppData)); rightIndex++) {
|
|
244793
|
+
for (let leftIndex = 0; undefined !== (leftItem = getByIndex(leftIndex, leftAppData)); leftIndex++) {
|
|
244794
|
+
if (!reverseArgs)
|
|
244795
|
+
handler.processAppDataPair(leftItem, rightItem);
|
|
244796
|
+
else
|
|
244797
|
+
handler.processAppDataPair(rightItem, leftItem);
|
|
244798
|
+
if (handler.isAborted())
|
|
244799
|
+
return;
|
|
244800
|
+
}
|
|
244801
|
+
}
|
|
244802
|
+
}
|
|
244803
|
+
}
|
|
244804
|
+
}
|
|
244805
|
+
/**
|
|
244806
|
+
* Apply the handler.processAppDataPair method to each pair of appData items from leftAppData and rightAppData.
|
|
244807
|
+
* @param leftAppData singleton or array with data "from left"
|
|
244808
|
+
* @param rightAppData singleton or array with data "from right"
|
|
244809
|
+
* @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.
|
|
244810
|
+
* @param handler search handler
|
|
244811
|
+
*/
|
|
244812
|
+
static processAppDataAndAppData(leftAppData, rightAppData, reverseArgs, handler) {
|
|
244813
|
+
if (leftAppData !== undefined && rightAppData !== undefined) {
|
|
244814
|
+
let leftItem;
|
|
244815
|
+
let rightItem;
|
|
244816
|
+
for (let rightIndex = 0; undefined !== (rightItem = getByIndex(rightIndex, rightAppData)); rightIndex++) {
|
|
244817
|
+
for (let leftIndex = 0; undefined !== (leftItem = getByIndex(leftIndex, leftAppData)); leftIndex++) {
|
|
244818
|
+
if (!reverseArgs)
|
|
244819
|
+
handler.processAppDataPair(leftItem, rightItem);
|
|
244820
|
+
else
|
|
244821
|
+
handler.processAppDataPair(rightItem, leftItem);
|
|
244822
|
+
if (handler.isAborted())
|
|
244823
|
+
return;
|
|
244824
|
+
}
|
|
244825
|
+
}
|
|
244826
|
+
}
|
|
244827
|
+
}
|
|
244828
|
+
/**
|
|
244829
|
+
* Push the tip node to stack(s).
|
|
244830
|
+
* @param tip new node (to be pushed)
|
|
244831
|
+
* @param fullPath complete path, which is always extended
|
|
244832
|
+
* @param partialPath partial path, which is only extended if the tip has _appData.
|
|
244833
|
+
*/
|
|
244834
|
+
static pushPaths(tip, fullPath, partialPath) {
|
|
244835
|
+
fullPath.push(tip);
|
|
244836
|
+
if (tip._appData !== undefined) {
|
|
244837
|
+
partialPath.push(tip);
|
|
244838
|
+
}
|
|
244839
|
+
}
|
|
244840
|
+
/**
|
|
244841
|
+
* Pop the tip node from stack(s).
|
|
244842
|
+
* @param tip should match the fullPath tip.
|
|
244843
|
+
* @param fullPath complete path, which is always popped
|
|
244844
|
+
* @param partialPath partial path, which is only popped if the tip has _appData.
|
|
244845
|
+
*/
|
|
244846
|
+
static popPaths(tip, fullPath, partialPath) {
|
|
244847
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(fullPath[fullPath.length - 1] === tip);
|
|
244848
|
+
fullPath.pop();
|
|
244849
|
+
if (tip._appData !== undefined) {
|
|
244850
|
+
partialPath.pop();
|
|
244851
|
+
}
|
|
244852
|
+
}
|
|
244853
|
+
/**
|
|
244854
|
+
* Process nodes from left and right trees of dual search.
|
|
244855
|
+
* * The separate stacks for nodes that have appData is for efficiency.
|
|
244856
|
+
* * 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.
|
|
244857
|
+
* @param leftTip tip node being explored on left
|
|
244858
|
+
* @param leftStack stack of prior left nodes
|
|
244859
|
+
* @param leftStackWithAppData stack of prior left nodes which have appData.
|
|
244860
|
+
* @param rightTip tip node being explored on right.
|
|
244861
|
+
* @param rightStack stack of prior right nodes.
|
|
244862
|
+
* @param rightStackWithAppData stack of prior right nodes which have appData.
|
|
244863
|
+
* @param handler search handler
|
|
244864
|
+
*/
|
|
244865
|
+
static recursivePairSearch(leftTip, leftStack, leftStackWithAppData, rightTip, rightStack, rightStackWithAppData, handler) {
|
|
244866
|
+
// console.log({ leftId: leftTip._id, rightId: rightTip._id });
|
|
244867
|
+
const leftTipHasAppData = leftTip._appData !== undefined;
|
|
244868
|
+
const rightTipHasAppData = rightTip._appData !== undefined;
|
|
244869
|
+
let leftChild;
|
|
244870
|
+
let rightChild;
|
|
244871
|
+
// process immediate appData from each tip node with the entire prior path of the other side (each stack currently lacks the tip).
|
|
244872
|
+
if (leftTipHasAppData && rightStackWithAppData.length > 0) {
|
|
244873
|
+
this.processAppDataAndAppDataStack(leftTip._appData, rightStackWithAppData, false, handler);
|
|
244874
|
+
}
|
|
244875
|
+
if (leftStackWithAppData.length > 0 && rightTipHasAppData) {
|
|
244876
|
+
this.processAppDataAndAppDataStack(rightTip._appData, leftStackWithAppData, true, handler);
|
|
244877
|
+
}
|
|
244878
|
+
if (handler.isRangePairActive(leftTip._range, rightTip._range)) {
|
|
244879
|
+
this.processAppDataAndAppData(leftTip._appData, rightTip._appData, false, handler);
|
|
244880
|
+
if (leftTip._children !== undefined && rightTip._children !== undefined) {
|
|
244881
|
+
this.pushPaths(leftTip, leftStack, leftStackWithAppData);
|
|
244882
|
+
this.pushPaths(rightTip, rightStack, rightStackWithAppData);
|
|
244883
|
+
for (let leftIndex = 0; undefined !== (leftChild = getByIndex(leftIndex, leftTip._children)); leftIndex++) {
|
|
244884
|
+
for (let rightIndex = 0; undefined !== (rightChild = getByIndex(rightIndex, rightTip._children)); rightIndex++) {
|
|
244885
|
+
this.recursivePairSearch(leftChild, leftStack, leftStackWithAppData, rightChild, rightStack, rightStackWithAppData, handler);
|
|
244886
|
+
}
|
|
244887
|
+
}
|
|
244888
|
+
this.popPaths(leftTip, leftStack, leftStackWithAppData);
|
|
244889
|
+
this.popPaths(rightTip, rightStack, rightStackWithAppData);
|
|
244890
|
+
}
|
|
244891
|
+
else if (leftTip._children !== undefined) {
|
|
244892
|
+
this.leftRecursivePairSearch(leftTip, rightTip, rightStackWithAppData, false, handler);
|
|
244893
|
+
}
|
|
244894
|
+
else if (rightTip._children !== undefined) {
|
|
244895
|
+
this.leftRecursivePairSearch(rightTip, leftTip, leftStackWithAppData, true, handler);
|
|
244896
|
+
}
|
|
244897
|
+
}
|
|
244898
|
+
}
|
|
244899
|
+
/**
|
|
244900
|
+
* Recurse below the tip of leftTip, offering each level's appData to the appData of rightTip and rightStackWithAppData.
|
|
244901
|
+
* @param leftTip tip node being explored on left. Its appData is not processed.
|
|
244902
|
+
* @param rightTip tip node being explored on right. It has no children.
|
|
244903
|
+
* @param rightStackWithAppData stack of prior right nodes which have appData.
|
|
244904
|
+
* @param reverseArgs true if the caller is exchanging the sense of left and right
|
|
244905
|
+
* @param handler search handler
|
|
244906
|
+
*/
|
|
244907
|
+
static leftRecursivePairSearch(leftTip, rightTip, rightStackWithAppData, reverseArgs, handler) {
|
|
244908
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(rightTip._children === undefined);
|
|
244909
|
+
// The (possibly deep) left children appData needs to be offered to the right path (including tip)
|
|
244910
|
+
// 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.
|
|
244911
|
+
let leftChild;
|
|
244912
|
+
for (let leftIndex = 0; undefined !== (leftChild = getByIndex(leftIndex, leftTip._children)); leftIndex++) {
|
|
244913
|
+
if (handler.isRangePairActive(leftChild._range, rightTip._range)) {
|
|
244914
|
+
this.processAppDataAndAppData(leftChild._appData, rightTip._appData, reverseArgs, handler);
|
|
244915
|
+
this.processAppDataAndAppDataStack(leftChild._appData, rightStackWithAppData, reverseArgs, handler);
|
|
244916
|
+
this.leftRecursivePairSearch(leftChild, rightTip, rightStackWithAppData, reverseArgs, handler);
|
|
244917
|
+
}
|
|
244918
|
+
}
|
|
244919
|
+
}
|
|
244920
|
+
/**
|
|
244921
|
+
* Recursive search down two trees, with range tests and child processing under control of a handler.
|
|
244922
|
+
* @param leftRoot root of left tree
|
|
244923
|
+
* @param rightRoot root of right tree
|
|
244924
|
+
* @param handler handler for range tests and child process
|
|
244925
|
+
*/
|
|
244926
|
+
static searchTwoTreesTopDown(leftRoot, rightRoot, handler) {
|
|
244927
|
+
this.recursivePairSearch(leftRoot, [], [], rightRoot, [], [], handler);
|
|
244928
|
+
}
|
|
244929
|
+
}
|
|
244930
|
+
/**
|
|
244931
|
+
* Utilities for various operations on RangeTree
|
|
244932
|
+
* @internal
|
|
244933
|
+
*/
|
|
244934
|
+
class RangeTreeOps {
|
|
244935
|
+
/** Count nodes in this tree. */
|
|
244936
|
+
static getRecursiveNodeCount(root) {
|
|
244937
|
+
let count = 0;
|
|
244938
|
+
root.recurseIntoTree((_node) => { count++; return true; });
|
|
244939
|
+
return count;
|
|
244940
|
+
}
|
|
244941
|
+
/** Count appData in this tree. */
|
|
244942
|
+
static getRecursiveAppDataCount(root) {
|
|
244943
|
+
let count = 0;
|
|
244944
|
+
root.recurseIntoTree((node) => { count += node.getNumAppData(); return true; });
|
|
244945
|
+
return count;
|
|
244946
|
+
}
|
|
244947
|
+
/**
|
|
244948
|
+
* Create a leaf referencing appData items indexed index0<=index<index1 and with combined range of the same indices
|
|
244949
|
+
* @param ranges access to ranges
|
|
244950
|
+
* @param appData access to AppDataType items
|
|
244951
|
+
* @param index0 first index for block of items
|
|
244952
|
+
* @param index1 upper limit index for block of items.
|
|
244953
|
+
* @param arrayLength one more than the largest range/appData index
|
|
244954
|
+
* @returns newly created node.
|
|
244955
|
+
*/
|
|
244956
|
+
static createLeafInIndexRange(ranges, appData, index0, index1, arrayLength) {
|
|
244957
|
+
const appDataBlock = [];
|
|
244958
|
+
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
|
|
244959
|
+
index1 = Math.min(index1, arrayLength);
|
|
244960
|
+
// console.log({ case: "LEAF", index0, index1 });
|
|
244961
|
+
for (let i = index0; i < index1; i++) {
|
|
244962
|
+
appDataBlock.push(evaluateIndexToType(appData, i));
|
|
244963
|
+
range.extendRange(evaluateIndexToType(ranges, i));
|
|
244964
|
+
}
|
|
244965
|
+
return RangeTreeNode.createCapture(range, appDataBlock, undefined);
|
|
244966
|
+
}
|
|
244967
|
+
/**
|
|
244968
|
+
* Split the array entries appData[index0 <= i < index1] into blocks of at most maxChildPerNode * maxAppDataPerLeaf and assemble into a tree structure.
|
|
244969
|
+
* @param ranges access to ranges
|
|
244970
|
+
* @param appData access to AppDataType items
|
|
244971
|
+
* @param index0 start index of the block to access
|
|
244972
|
+
* @param index1 terminal index for the block (one after final)
|
|
244973
|
+
* @param arrayLength one more than the largest range/appData index
|
|
244974
|
+
* @param maxChildPerNode max number of child nodes in each interior node
|
|
244975
|
+
* @param maxAppDataPerLeaf max number of appData items in each leaf.
|
|
244976
|
+
* @returns
|
|
244977
|
+
*/
|
|
244978
|
+
static createRecursiveByIndexSplits(ranges, appData, index0, index1, arrayLength, maxChildPerNode, maxAppDataPerLeaf) {
|
|
244979
|
+
if (index1 > arrayLength)
|
|
244980
|
+
index1 = arrayLength;
|
|
244981
|
+
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
|
|
244982
|
+
const children = [];
|
|
244983
|
+
const maxChildrenAppData = maxChildPerNode * maxAppDataPerLeaf;
|
|
244984
|
+
// console.log({ name: "createRecursive", index0, index1, maxChildrenAppData });
|
|
244985
|
+
if (index1 <= index0 + maxChildrenAppData) { // index range is small enough to hold the appData in leaf children
|
|
244986
|
+
// console.log({ case: "LEAF GROUP", index0, index1 });
|
|
244987
|
+
for (let indexA = index0 + maxAppDataPerLeaf; index0 < index1; index0 = indexA, indexA = Math.min(indexA + maxAppDataPerLeaf, index1)) {
|
|
244988
|
+
const leaf = RangeTreeOps.createLeafInIndexRange(ranges, appData, index0, indexA, arrayLength);
|
|
244989
|
+
if (leaf !== undefined) {
|
|
244990
|
+
range.extendRange(leaf.getRangeRef());
|
|
244991
|
+
children.push(leaf);
|
|
244992
|
+
}
|
|
244993
|
+
}
|
|
244994
|
+
}
|
|
244995
|
+
else { // split the appData among interior and leaf children
|
|
244996
|
+
// console.log({ case: "INTERIOR", index0, index1 });
|
|
244997
|
+
const numPerGulp = Math.ceil((index1 - index0) / maxChildPerNode);
|
|
244998
|
+
for (let indexA = index0 + numPerGulp; index0 < index1; index0 = indexA, indexA = Math.min(indexA + numPerGulp, index1)) {
|
|
244999
|
+
const child = this.createRecursiveByIndexSplits(ranges, appData, index0, indexA, arrayLength, maxChildPerNode, maxAppDataPerLeaf);
|
|
245000
|
+
if (child !== undefined) {
|
|
245001
|
+
range.extendRange(child.getRangeRef());
|
|
245002
|
+
children.push(child);
|
|
245003
|
+
}
|
|
245004
|
+
}
|
|
245005
|
+
}
|
|
245006
|
+
return (children.length > 0) ? RangeTreeNode.createCapture(range, undefined, children) : undefined;
|
|
245007
|
+
}
|
|
245008
|
+
/**
|
|
245009
|
+
* Create a range tree by simple left-right split of given ranges.
|
|
245010
|
+
* * Leaves carry the inputs in left-to-right order.
|
|
245011
|
+
* * Each leaf range is labeled by its corresponding object(s) in the appData array.
|
|
245012
|
+
* @param ranges access to ranges.
|
|
245013
|
+
* @param appData access to AppDataType items (for leaves).
|
|
245014
|
+
* @param arrayLength one more than the largest range/appData index
|
|
245015
|
+
* @param maxChildrenPerNode max number of child nodes allowed for each interior node.
|
|
245016
|
+
* @param maxAppDataPerLeaf max number of appData items allowed in each leaf.
|
|
245017
|
+
* @returns the root of the new tree, or undefined if array lengths differ or are zero.
|
|
245018
|
+
*/
|
|
245019
|
+
static createByIndexSplits(ranges, appData, arrayLength, maxChildrenPerNode = 2, maxAppDataPerLeaf = 2) {
|
|
245020
|
+
// console.log();
|
|
245021
|
+
// const numData = getFlexDataCount(appData);
|
|
245022
|
+
// console.log({ numData });
|
|
245023
|
+
if (arrayLength <= 0
|
|
245024
|
+
|| (Array.isArray(ranges) && ranges.length !== arrayLength)
|
|
245025
|
+
|| (Array.isArray(appData) && appData.length !== arrayLength))
|
|
245026
|
+
return undefined;
|
|
245027
|
+
if (maxChildrenPerNode < 2)
|
|
245028
|
+
maxChildrenPerNode = 2;
|
|
245029
|
+
return RangeTreeOps.createRecursiveByIndexSplits(ranges, appData, 0, arrayLength, arrayLength, maxChildrenPerNode, maxAppDataPerLeaf);
|
|
245030
|
+
}
|
|
245031
|
+
}
|
|
245032
|
+
|
|
245033
|
+
|
|
245034
|
+
/***/ }),
|
|
245035
|
+
|
|
245036
|
+
/***/ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js":
|
|
245037
|
+
/*!*********************************************************************************!*\
|
|
245038
|
+
!*** ../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js ***!
|
|
245039
|
+
\*********************************************************************************/
|
|
245040
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
245041
|
+
|
|
245042
|
+
"use strict";
|
|
245043
|
+
__webpack_require__.r(__webpack_exports__);
|
|
245044
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
245045
|
+
/* harmony export */ "SingleTreeSearchHandlerForClosestPointInArray": () => (/* binding */ SingleTreeSearchHandlerForClosestPointInArray),
|
|
245046
|
+
/* harmony export */ "SingleTreeSearchHandlerForClosestPointOnLineString3d": () => (/* binding */ SingleTreeSearchHandlerForClosestPointOnLineString3d),
|
|
245047
|
+
/* harmony export */ "SingleTreeSearchHandlerForClosestPointOnPolyface": () => (/* binding */ SingleTreeSearchHandlerForClosestPointOnPolyface),
|
|
245048
|
+
/* harmony export */ "TwoTreeSearchHandlerForFacetFacetCloseApproach": () => (/* binding */ TwoTreeSearchHandlerForFacetFacetCloseApproach),
|
|
245049
|
+
/* harmony export */ "TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach": () => (/* binding */ TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach),
|
|
245050
|
+
/* harmony export */ "TwoTreeSearchHandlerForPoint3dArrayPoint3dArrayCloseApproach": () => (/* binding */ TwoTreeSearchHandlerForPoint3dArrayPoint3dArrayCloseApproach)
|
|
245051
|
+
/* harmony export */ });
|
|
245052
|
+
/* harmony import */ var _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../curve/CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
245053
|
+
/* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
245054
|
+
/* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
245055
|
+
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
245056
|
+
/* harmony import */ var _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../FacetLocationDetail */ "../../core/geometry/lib/esm/polyface/FacetLocationDetail.js");
|
|
245057
|
+
/* harmony import */ var _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MinimumValueTester */ "../../core/geometry/lib/esm/polyface/RangeTree/MinimumValueTester.js");
|
|
245058
|
+
/* harmony import */ var _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RangeTreeNode */ "../../core/geometry/lib/esm/polyface/RangeTree/RangeTreeNode.js");
|
|
245059
|
+
/*---------------------------------------------------------------------------------------------
|
|
245060
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
245061
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
245062
|
+
*--------------------------------------------------------------------------------------------*/
|
|
245063
|
+
/** @packageDocumentation
|
|
245064
|
+
* @module RangeSearch
|
|
245065
|
+
*/
|
|
245066
|
+
|
|
245067
|
+
|
|
245068
|
+
|
|
245069
|
+
|
|
245070
|
+
|
|
245071
|
+
|
|
245072
|
+
|
|
245073
|
+
/**
|
|
245074
|
+
* Helper class for searching for the closest point in a set of points.
|
|
245075
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
|
|
245076
|
+
* @internal
|
|
245077
|
+
*/
|
|
245078
|
+
class SingleTreeSearchHandlerForClosestPointInArray extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.SingleTreeSearchHandler {
|
|
245079
|
+
/**
|
|
245080
|
+
* Constructor
|
|
245081
|
+
* @param spacePoint cloned
|
|
245082
|
+
* @param context captured
|
|
245083
|
+
* @param maxDist collect points at no more than this distance from spacePoint
|
|
245084
|
+
*/
|
|
245085
|
+
constructor(spacePoint, context, maxDist) {
|
|
245086
|
+
super();
|
|
245087
|
+
this.context = context;
|
|
245088
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245089
|
+
maxDist = undefined;
|
|
245090
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245091
|
+
this.spacePoint = spacePoint.clone();
|
|
245092
|
+
}
|
|
245093
|
+
/** Return the current closest point */
|
|
245094
|
+
getResult() {
|
|
245095
|
+
if (this.searchState.minValue !== undefined && this.searchState.itemAtMinValue !== undefined) {
|
|
245096
|
+
const iPoint = this.searchState.itemAtMinValue;
|
|
245097
|
+
const cld = _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(undefined, iPoint, this.context.points[iPoint]);
|
|
245098
|
+
cld.a = this.searchState.minValue;
|
|
245099
|
+
return cld;
|
|
245100
|
+
}
|
|
245101
|
+
return undefined;
|
|
245102
|
+
}
|
|
245103
|
+
/** Return the collected closest points (if collecting) */
|
|
245104
|
+
getSavedItems() {
|
|
245105
|
+
if (this.searchState.savedItems.length === 0)
|
|
245106
|
+
return undefined;
|
|
245107
|
+
const cldArray = [];
|
|
245108
|
+
for (let i = 0; i < this.searchState.savedItems.length; ++i) {
|
|
245109
|
+
const iPoint = this.searchState.savedItems[i];
|
|
245110
|
+
const cld = _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(undefined, iPoint, this.context.points[iPoint]);
|
|
245111
|
+
cld.a = this.searchState.savedValues[i];
|
|
245112
|
+
cldArray.push(cld);
|
|
245113
|
+
}
|
|
245114
|
+
return cldArray;
|
|
245115
|
+
}
|
|
245116
|
+
/**
|
|
245117
|
+
* Return true if appData within the range should be offered to `processAppData`.
|
|
245118
|
+
* @param range range containing items to be tested.
|
|
245119
|
+
* @returns true if the spacePoint is within the range or close enough that a point in the range could be the closest.
|
|
245120
|
+
*/
|
|
245121
|
+
isRangeActive(range) {
|
|
245122
|
+
const dMin = range.distanceToPoint(this.spacePoint);
|
|
245123
|
+
if (this.searchState.isNewMinValue(dMin)) {
|
|
245124
|
+
this.context.numRangeTestTrue++;
|
|
245125
|
+
return true;
|
|
245126
|
+
}
|
|
245127
|
+
this.context.numRangeTestFalse++;
|
|
245128
|
+
return false;
|
|
245129
|
+
}
|
|
245130
|
+
/** Test a point indexed in the range tree as candidate for "closest" */
|
|
245131
|
+
processAppData(candidateIndex) {
|
|
245132
|
+
const d = this.spacePoint.distance(this.context.points[candidateIndex]);
|
|
245133
|
+
this.context.numPointTest++;
|
|
245134
|
+
this.searchState.testAndSave(candidateIndex, d);
|
|
245135
|
+
}
|
|
245136
|
+
}
|
|
245137
|
+
/**
|
|
245138
|
+
* Helper class for searching for the closest approach between sets of points.
|
|
245139
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
|
|
245140
|
+
* @internal
|
|
245141
|
+
*/
|
|
245142
|
+
class TwoTreeSearchHandlerForPoint3dArrayPoint3dArrayCloseApproach extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.TwoTreeDistanceMinimizationSearchHandler {
|
|
245143
|
+
/**
|
|
245144
|
+
* Constructor
|
|
245145
|
+
* @param contextA captured
|
|
245146
|
+
* @param contextB captured
|
|
245147
|
+
* @param maxDist collect points at no more than this separation distance
|
|
245148
|
+
*/
|
|
245149
|
+
constructor(contextA, contextB, maxDist) {
|
|
245150
|
+
super();
|
|
245151
|
+
this.contextA = contextA;
|
|
245152
|
+
this.contextB = contextB;
|
|
245153
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245154
|
+
maxDist = undefined;
|
|
245155
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245156
|
+
}
|
|
245157
|
+
/** Return the current closest approach */
|
|
245158
|
+
getResult() {
|
|
245159
|
+
if (this.searchState.minValue !== undefined) {
|
|
245160
|
+
return this.searchState.itemAtMinValue;
|
|
245161
|
+
}
|
|
245162
|
+
return undefined;
|
|
245163
|
+
}
|
|
245164
|
+
/** Return the collected close approaches (if collecting) */
|
|
245165
|
+
getSavedItems() {
|
|
245166
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245167
|
+
return this.searchState.savedItems;
|
|
245168
|
+
}
|
|
245169
|
+
return undefined;
|
|
245170
|
+
}
|
|
245171
|
+
/** Get current min distance */
|
|
245172
|
+
getCurrentDistance() {
|
|
245173
|
+
const d = this.searchState.minValue;
|
|
245174
|
+
return d === undefined ? Number.MAX_VALUE : d;
|
|
245175
|
+
}
|
|
245176
|
+
/** Compute and test the distance between two points, given their indices. */
|
|
245177
|
+
processAppDataPair(indexA, indexB) {
|
|
245178
|
+
this.contextA.numPointTest++;
|
|
245179
|
+
const pointA = this.contextA.points[indexA];
|
|
245180
|
+
const pointB = this.contextB.points[indexB];
|
|
245181
|
+
const d = pointA.distance(pointB);
|
|
245182
|
+
if (this.searchState.isNewMinOrTrigger(d)) {
|
|
245183
|
+
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));
|
|
245184
|
+
cldPair.detailA.a = cldPair.detailB.a = d;
|
|
245185
|
+
this.searchState.testAndSave(cldPair, d);
|
|
245186
|
+
}
|
|
245187
|
+
}
|
|
245188
|
+
}
|
|
245189
|
+
/**
|
|
245190
|
+
* Helper class for searching for the closest point in a linestring.
|
|
245191
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
|
|
245192
|
+
* @internal
|
|
245193
|
+
*/
|
|
245194
|
+
class SingleTreeSearchHandlerForClosestPointOnLineString3d extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.SingleTreeSearchHandler {
|
|
245195
|
+
/**
|
|
245196
|
+
* Constructor
|
|
245197
|
+
* @param spacePoint cloned
|
|
245198
|
+
* @param context captured
|
|
245199
|
+
* @param maxDist collect points at no more than this distance from spacePoint
|
|
245200
|
+
*/
|
|
245201
|
+
constructor(spacePoint, context, maxDist) {
|
|
245202
|
+
super();
|
|
245203
|
+
this.context = context;
|
|
245204
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245205
|
+
maxDist = undefined;
|
|
245206
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245207
|
+
this.spacePoint = spacePoint.clone();
|
|
245208
|
+
}
|
|
245209
|
+
/** Return the current closest point */
|
|
245210
|
+
getResult() {
|
|
245211
|
+
if (this.searchState.minValue !== undefined && this.searchState.itemAtMinValue !== undefined) {
|
|
245212
|
+
return this.searchState.itemAtMinValue;
|
|
245213
|
+
}
|
|
245214
|
+
return undefined;
|
|
245215
|
+
}
|
|
245216
|
+
/** Return the collected closest points (if collecting) */
|
|
245217
|
+
getSavedItems() {
|
|
245218
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245219
|
+
return this.searchState.savedItems;
|
|
245220
|
+
}
|
|
245221
|
+
return undefined;
|
|
245222
|
+
}
|
|
245223
|
+
/**
|
|
245224
|
+
* Return true if appData within the range should be offered to `processAppData`.
|
|
245225
|
+
* @param range range containing items to be tested.
|
|
245226
|
+
* @returns true if the spacePoint is within the range or close enough that a point in the range could be the closest.
|
|
245227
|
+
*/
|
|
245228
|
+
isRangeActive(range) {
|
|
245229
|
+
const dMin = range.distanceToPoint(this.spacePoint);
|
|
245230
|
+
if (this.searchState.isNewMinValue(dMin)) {
|
|
245231
|
+
this.context.numRangeTestTrue++;
|
|
245232
|
+
return true;
|
|
245233
|
+
}
|
|
245234
|
+
this.context.numRangeTestFalse++;
|
|
245235
|
+
return false;
|
|
245236
|
+
}
|
|
245237
|
+
/** Test a segment indexed in the range tree as candidate for "closest" */
|
|
245238
|
+
processAppData(candidateIndex) {
|
|
245239
|
+
const segment = this._workSegment = this.context.lineString.getIndexedSegment(candidateIndex, this._workSegment);
|
|
245240
|
+
if (segment) {
|
|
245241
|
+
const cld = segment.closestPoint(this.spacePoint, false);
|
|
245242
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.convertLocalToGlobalDetail(cld, candidateIndex, this.context.lineString.numEdges(), this.context.lineString);
|
|
245243
|
+
this.context.numPointTest++;
|
|
245244
|
+
this.searchState.testAndSave(cld, cld.a);
|
|
245245
|
+
}
|
|
245246
|
+
}
|
|
245247
|
+
}
|
|
245248
|
+
/**
|
|
245249
|
+
* Helper class for searching for the closest approach between linestrings.
|
|
245250
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
|
|
245251
|
+
* @internal
|
|
245252
|
+
*/
|
|
245253
|
+
class TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.TwoTreeDistanceMinimizationSearchHandler {
|
|
245254
|
+
/**
|
|
245255
|
+
* Constructor
|
|
245256
|
+
* @param contextA captured
|
|
245257
|
+
* @param contextB captured
|
|
245258
|
+
* @param maxDist collect points at no more than this separation distance
|
|
245259
|
+
*/
|
|
245260
|
+
constructor(contextA, contextB, maxDist) {
|
|
245261
|
+
super();
|
|
245262
|
+
this.contextA = contextA;
|
|
245263
|
+
this.contextB = contextB;
|
|
245264
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245265
|
+
maxDist = undefined;
|
|
245266
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245267
|
+
}
|
|
245268
|
+
/**
|
|
245269
|
+
* Return the current closest approach.
|
|
245270
|
+
* * Details contain linestring *and* segment data, cf. [[LineString3d.convertLocalToGlobalDetail]]
|
|
245271
|
+
*/
|
|
245272
|
+
getResult() {
|
|
245273
|
+
if (this.searchState.minValue !== undefined) {
|
|
245274
|
+
return this.searchState.itemAtMinValue;
|
|
245275
|
+
}
|
|
245276
|
+
return undefined;
|
|
245277
|
+
}
|
|
245278
|
+
/** Return the collected close approaches (if collecting) */
|
|
245279
|
+
getSavedItems() {
|
|
245280
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245281
|
+
return this.searchState.savedItems;
|
|
245282
|
+
}
|
|
245283
|
+
return undefined;
|
|
245284
|
+
}
|
|
245285
|
+
/** Get current min distance */
|
|
245286
|
+
getCurrentDistance() {
|
|
245287
|
+
const d = this.searchState.minValue;
|
|
245288
|
+
return d === undefined ? Number.MAX_VALUE : d;
|
|
245289
|
+
}
|
|
245290
|
+
/** Compute and test the closest approach between two segments, given their indices. */
|
|
245291
|
+
processAppDataPair(indexA, indexB) {
|
|
245292
|
+
this.contextA.numPointTest++;
|
|
245293
|
+
const segA = TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach._workSegmentA =
|
|
245294
|
+
this.contextA.lineString.getIndexedSegment(indexA, TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach._workSegmentA);
|
|
245295
|
+
const segB = TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach._workSegmentB =
|
|
245296
|
+
this.contextB.lineString.getIndexedSegment(indexB, TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach._workSegmentB);
|
|
245297
|
+
const cldPair = _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_4__.LineSegment3d.closestApproach(segA, false, segB, false);
|
|
245298
|
+
if (cldPair && this.searchState.isNewMinOrTrigger(cldPair.detailA.a)) {
|
|
245299
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.convertLocalToGlobalDetail(cldPair.detailA, indexA, this.contextA.lineString.numEdges(), this.contextA.lineString);
|
|
245300
|
+
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.convertLocalToGlobalDetail(cldPair.detailB, indexB, this.contextB.lineString.numEdges(), this.contextB.lineString);
|
|
245301
|
+
this.searchState.testAndSave(cldPair, cldPair.detailA.a);
|
|
245302
|
+
}
|
|
245303
|
+
}
|
|
245304
|
+
}
|
|
245305
|
+
/**
|
|
245306
|
+
* Helper class for searching for the closest point in a polyface.
|
|
245307
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring FacetLocationDetail).
|
|
245308
|
+
* @internal
|
|
245309
|
+
*/
|
|
245310
|
+
class SingleTreeSearchHandlerForClosestPointOnPolyface extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.SingleTreeSearchHandler {
|
|
245311
|
+
/**
|
|
245312
|
+
* Constructor
|
|
245313
|
+
* @param spacePoint cloned
|
|
245314
|
+
* @param context captured
|
|
245315
|
+
* @param maxDist collect points at no more than this distance from spacePoint
|
|
245316
|
+
* @param searchFacetInterior true: search facet interior + boundary; false: just boundary
|
|
245317
|
+
*/
|
|
245318
|
+
constructor(spacePoint, context, maxDist, searchFacetInterior = false) {
|
|
245319
|
+
super();
|
|
245320
|
+
this.context = context;
|
|
245321
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245322
|
+
maxDist = undefined;
|
|
245323
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245324
|
+
this.spacePoint = spacePoint.clone();
|
|
245325
|
+
this.searchFacetInterior = searchFacetInterior;
|
|
245326
|
+
}
|
|
245327
|
+
/** Return the current closest point */
|
|
245328
|
+
getResult() {
|
|
245329
|
+
if (this.searchState.minValue !== undefined && this.searchState.itemAtMinValue !== undefined) {
|
|
245330
|
+
return this.searchState.itemAtMinValue;
|
|
245331
|
+
}
|
|
245332
|
+
return undefined;
|
|
245333
|
+
}
|
|
245334
|
+
/** Return the collected closest points (if collecting) */
|
|
245335
|
+
getSavedItems() {
|
|
245336
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245337
|
+
return this.searchState.savedItems;
|
|
245338
|
+
}
|
|
245339
|
+
return undefined;
|
|
245340
|
+
}
|
|
245341
|
+
/**
|
|
245342
|
+
* Return true if appData within the range should be offered to `processAppData`.
|
|
245343
|
+
* @param range range containing items to be tested.
|
|
245344
|
+
* @returns true if the spacePoint is within the range or close enough that a point in the range could be the closest.
|
|
245345
|
+
*/
|
|
245346
|
+
isRangeActive(range) {
|
|
245347
|
+
const dMin = range.distanceToPoint(this.spacePoint);
|
|
245348
|
+
if (this.searchState.isNewMinValue(dMin)) {
|
|
245349
|
+
this.context.numRangeTestTrue++;
|
|
245350
|
+
return true;
|
|
245351
|
+
}
|
|
245352
|
+
this.context.numRangeTestFalse++;
|
|
245353
|
+
return false;
|
|
245354
|
+
}
|
|
245355
|
+
/** Test a facet indexed in the range tree as candidate for "closest" */
|
|
245356
|
+
processAppData(candidateIndex) {
|
|
245357
|
+
this.context.visitor.setNumWrap(0); // so edgeCount === pointCount; closure point unnecessary for closestPoint[OnBoundary]
|
|
245358
|
+
if (this.context.visitor.moveToReadIndex(candidateIndex)) {
|
|
245359
|
+
let pld;
|
|
245360
|
+
if (this.searchFacetInterior)
|
|
245361
|
+
pld = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__.PolygonOps.closestPoint(this.context.visitor.point, this.spacePoint);
|
|
245362
|
+
else
|
|
245363
|
+
pld = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__.PolygonOps.closestPointOnBoundary(this.context.visitor.point, this.spacePoint);
|
|
245364
|
+
this.context.numFacetTest++;
|
|
245365
|
+
if (pld && this.searchState.isNewMinOrTrigger(pld.a)) {
|
|
245366
|
+
const edgeCount = this.context.visitor.pointCount;
|
|
245367
|
+
const fld = this.context.convexFacets
|
|
245368
|
+
? _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__.ConvexFacetLocationDetail.createCapture(this.context.visitor.currentReadIndex(), edgeCount, pld)
|
|
245369
|
+
: _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_6__.NonConvexFacetLocationDetail.createCapture(this.context.visitor.currentReadIndex(), edgeCount, pld);
|
|
245370
|
+
this.searchState.testAndSave(fld, pld.a);
|
|
245371
|
+
}
|
|
245372
|
+
}
|
|
245373
|
+
}
|
|
245374
|
+
}
|
|
245375
|
+
/**
|
|
245376
|
+
* Helper class for searching for the closest approach between polyfaces.
|
|
245377
|
+
* * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring FacetLocationDetail).
|
|
245378
|
+
* @internal
|
|
245379
|
+
*/
|
|
245380
|
+
class TwoTreeSearchHandlerForFacetFacetCloseApproach extends _RangeTreeNode__WEBPACK_IMPORTED_MODULE_0__.TwoTreeDistanceMinimizationSearchHandler {
|
|
245381
|
+
/** Constructor
|
|
245382
|
+
* @param contextA captured
|
|
245383
|
+
* @param contextB captured
|
|
245384
|
+
* @param maxDist collect points at no more than this separation distance
|
|
245385
|
+
* @param searchFacetInterior true: search facet interior + boundary; false: just boundary
|
|
245386
|
+
*/
|
|
245387
|
+
constructor(contextA, contextB, maxDist, searchFacetInterior = false) {
|
|
245388
|
+
super();
|
|
245389
|
+
this.contextA = contextA;
|
|
245390
|
+
this.contextB = contextB;
|
|
245391
|
+
if (maxDist !== undefined && maxDist < 0)
|
|
245392
|
+
maxDist = undefined;
|
|
245393
|
+
this.searchState = _MinimumValueTester__WEBPACK_IMPORTED_MODULE_1__.MinimumValueTester.create(maxDist);
|
|
245394
|
+
this.searchFacetInterior = searchFacetInterior && contextA.convexFacets && contextB.convexFacets;
|
|
245395
|
+
}
|
|
245396
|
+
/** Return the facets with closest approach */
|
|
245397
|
+
getResult() {
|
|
245398
|
+
if (this.searchState.minValue !== undefined) {
|
|
245399
|
+
return this.searchState.itemAtMinValue;
|
|
245400
|
+
}
|
|
245401
|
+
return undefined;
|
|
245402
|
+
}
|
|
245403
|
+
/** Return the collected close approaches (if collecting) */
|
|
245404
|
+
getSavedItems() {
|
|
245405
|
+
if (this.searchState.savedItems.length > 0) {
|
|
245406
|
+
return this.searchState.savedItems;
|
|
245407
|
+
}
|
|
245408
|
+
return undefined;
|
|
245409
|
+
}
|
|
245410
|
+
/** Get current min distance */
|
|
245411
|
+
getCurrentDistance() {
|
|
245412
|
+
const d = this.searchState.minValue;
|
|
245413
|
+
return d === undefined ? Number.MAX_VALUE : d;
|
|
245414
|
+
}
|
|
245415
|
+
/** Compute and test the closest approach between two facets, given their indices. */
|
|
245416
|
+
processAppDataPair(indexA, indexB) {
|
|
245417
|
+
this.contextA.visitor.setNumWrap(1); // closed polygons are more efficient for PolygonOps.closestApproach
|
|
245418
|
+
this.contextB.visitor.setNumWrap(1);
|
|
245419
|
+
if (this.contextA.visitor.moveToReadIndex(indexA) && this.contextB.visitor.moveToReadIndex(indexB)) {
|
|
245420
|
+
// ASSUME: not worth sending in maxDist here...
|
|
245421
|
+
const pldPair = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_5__.PolygonOps.closestApproach(this.contextA.visitor.point, this.contextB.visitor.point, undefined, this.searchFacetInterior);
|
|
245422
|
+
this.contextA.numFacetTest++;
|
|
245423
|
+
if (pldPair && this.searchState.isNewMinOrTrigger(pldPair.detailA.a)) {
|
|
245424
|
+
const edgeCountA = this.contextA.visitor.pointCount - 1;
|
|
245425
|
+
const edgeCountB = this.contextB.visitor.pointCount - 1;
|
|
245426
|
+
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));
|
|
245427
|
+
this.searchState.testAndSave(fldPair, fldPair.detailA.a);
|
|
245428
|
+
}
|
|
245429
|
+
}
|
|
245430
|
+
}
|
|
245431
|
+
}
|
|
245432
|
+
|
|
245433
|
+
|
|
243430
245434
|
/***/ }),
|
|
243431
245435
|
|
|
243432
245436
|
/***/ "../../core/geometry/lib/esm/polyface/TaggedNumericData.js":
|
|
@@ -253222,6 +255226,9 @@ class SteppedIndexFunctionFactory {
|
|
|
253222
255226
|
* @internal
|
|
253223
255227
|
*/
|
|
253224
255228
|
class FrankeSurface {
|
|
255229
|
+
constructor(scales) {
|
|
255230
|
+
this.scales = scales;
|
|
255231
|
+
}
|
|
253225
255232
|
exp0(u, v) {
|
|
253226
255233
|
return Math.exp(-0.25 * (u * u + v * v) + u + v - 2);
|
|
253227
255234
|
}
|
|
@@ -253239,7 +255246,21 @@ class FrankeSurface {
|
|
|
253239
255246
|
const f1 = 0.75 * this.exp1(u, v);
|
|
253240
255247
|
const f2 = 0.5 * this.exp2(u, v);
|
|
253241
255248
|
const f3 = -0.2 * this.exp3(u, v);
|
|
253242
|
-
|
|
255249
|
+
if (this.scales !== undefined) {
|
|
255250
|
+
const numScale = this.scales.length;
|
|
255251
|
+
let f = 0;
|
|
255252
|
+
if (numScale >= 1)
|
|
255253
|
+
f += this.scales[0] * f0;
|
|
255254
|
+
if (numScale >= 2)
|
|
255255
|
+
f += this.scales[1] * f1;
|
|
255256
|
+
if (numScale >= 3)
|
|
255257
|
+
f += this.scales[2] * f2;
|
|
255258
|
+
if (numScale >= 4)
|
|
255259
|
+
f += this.scales[3] * f3;
|
|
255260
|
+
return f;
|
|
255261
|
+
}
|
|
255262
|
+
else
|
|
255263
|
+
return f0 + f1 + f2 + f3;
|
|
253243
255264
|
}
|
|
253244
255265
|
du(u, v) {
|
|
253245
255266
|
const du0 = -3.375 * (u - 2) * this.exp0(u, v);
|
|
@@ -255255,6 +257276,40 @@ class Sample {
|
|
|
255255
257276
|
point0.push(point0[0].clone());
|
|
255256
257277
|
return point0;
|
|
255257
257278
|
}
|
|
257279
|
+
/**
|
|
257280
|
+
* Create a grid of lat-long points on a sphere.
|
|
257281
|
+
* * If pole latitudes appear in the evaluation, a single point (not a circle) is evaluated.
|
|
257282
|
+
* * Circles at various latitudes proceed south to north.
|
|
257283
|
+
* * If first and last angles of longitudeSweep match, that meridian is not duplicated.
|
|
257284
|
+
* * Longitudes can wrap freely.
|
|
257285
|
+
* @param transform local to world
|
|
257286
|
+
* @param numLatitudeStep number of latitude steps (poles count if they are in the sweeps)
|
|
257287
|
+
* @param numLongitudeStep number of longitude steps
|
|
257288
|
+
* @param latitudeSweep angle range for latitudes
|
|
257289
|
+
* @param longitudeSweep angle range for longitudes
|
|
257290
|
+
*/
|
|
257291
|
+
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)) {
|
|
257292
|
+
const points = [];
|
|
257293
|
+
const numJ = numLatitudeStep + 1;
|
|
257294
|
+
const jFractionStep = 1.0 / numJ;
|
|
257295
|
+
let numI = numLongitudeStep;
|
|
257296
|
+
const iFractionStep = 1.0 / numI;
|
|
257297
|
+
if (longitudeSweep.isFullCircle)
|
|
257298
|
+
numI--;
|
|
257299
|
+
for (let j = 0; j < numJ; j++) {
|
|
257300
|
+
const phi = latitudeSweep.fractionToRadians(jFractionStep * j);
|
|
257301
|
+
const sinPhi = Math.sin(phi);
|
|
257302
|
+
const cosPhi = Math.cos(phi);
|
|
257303
|
+
const numIThisCircle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_4__.Angle.isAlmostEqualRadiansAllowPeriodShift(phi, -90) ? 1 : numI;
|
|
257304
|
+
for (let i = 0; i < numIThisCircle; i++) {
|
|
257305
|
+
const theta = longitudeSweep.fractionToRadians(iFractionStep * i);
|
|
257306
|
+
const cosTheta = Math.cos(theta);
|
|
257307
|
+
const sinTheta = Math.sin(theta);
|
|
257308
|
+
points.push(transform.multiplyXYZ(cosTheta * cosPhi, sinTheta * cosPhi, sinPhi));
|
|
257309
|
+
}
|
|
257310
|
+
}
|
|
257311
|
+
return points;
|
|
257312
|
+
}
|
|
255258
257313
|
/**
|
|
255259
257314
|
* Return an array of points on a circular arc.
|
|
255260
257315
|
* @param edgesPerQuadrant number of edges per 90 degrees
|
|
@@ -255362,14 +257417,36 @@ class Sample {
|
|
|
255362
257417
|
return _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_3__.Point2d.createFrom(Sample.createRosePoint3d(theta, a));
|
|
255363
257418
|
}
|
|
255364
257419
|
/**
|
|
255365
|
-
* Create a mesh surface from samples of a smooth function over [0,1]x[0,1].
|
|
257420
|
+
* Create a mesh surface from samples of a smooth real-valued function over [0,1]x[0,1] with multiple humps and dips.
|
|
257421
|
+
* * The facets are bilinear quads, so if planar facets are required, set `options.shouldTriangulate = true`.
|
|
255366
257422
|
* @param size grid size; the number of intervals on each side of the unit square domain.
|
|
257423
|
+
* @param scales = array of 4 (four) numbers to scale the corresponding Franke exponential. If undefined, all scales are 1.
|
|
255367
257424
|
*/
|
|
255368
|
-
static
|
|
257425
|
+
static createMeshFromFrankeSurface(size, options, scales) {
|
|
255369
257426
|
const builder = _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_49__.PolyfaceBuilder.create(options);
|
|
255370
|
-
builder.addUVGridBody(new FrankeSurface(), size, size);
|
|
257427
|
+
builder.addUVGridBody(new FrankeSurface(scales), size, size);
|
|
255371
257428
|
return builder.claimPolyface(true);
|
|
255372
257429
|
}
|
|
257430
|
+
/** Stroke a helix over the unit circle. Place in space via a transform.
|
|
257431
|
+
* The various columns of the transform become the critical measures for the (elliptic) helix:
|
|
257432
|
+
* The unit cylinder maps to an elliptic cylinder with x and y columns as 0 and 90 degree vectors.
|
|
257433
|
+
* the Helix pitch is equal to the length of the z axis in the transform.
|
|
257434
|
+
* The completeTurns parameter (which does NOT need to be an integer) is the local z of the last point
|
|
257435
|
+
*/
|
|
257436
|
+
static createHelixPoints(completeTurns, numPoints, placement) {
|
|
257437
|
+
const points = [];
|
|
257438
|
+
if (numPoints < 2)
|
|
257439
|
+
numPoints = 2;
|
|
257440
|
+
const dThetaRadians = completeTurns * Math.PI * 2 / (numPoints - 1);
|
|
257441
|
+
const dz = completeTurns / (numPoints - 1);
|
|
257442
|
+
for (let i = 0; i < numPoints; i++) {
|
|
257443
|
+
const thetaRadians = dThetaRadians * i;
|
|
257444
|
+
points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(Math.cos(thetaRadians), Math.sin(thetaRadians), i * dz));
|
|
257445
|
+
}
|
|
257446
|
+
if (placement)
|
|
257447
|
+
placement.multiplyPoint3dArrayInPlace(points);
|
|
257448
|
+
return points;
|
|
257449
|
+
}
|
|
255373
257450
|
}
|
|
255374
257451
|
/** Array with assorted Point2d samples */
|
|
255375
257452
|
Sample.point2d = [
|
|
@@ -258086,7 +260163,7 @@ class LinearSweep extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrim
|
|
|
258086
260163
|
}
|
|
258087
260164
|
/**
|
|
258088
260165
|
* Create a sweep of a starting contour.
|
|
258089
|
-
* @param contour contour to be swept
|
|
260166
|
+
* @param contour contour to be swept, CAPTURED
|
|
258090
260167
|
* @param direction sweep vector. The contour is swept the full length of the vector.
|
|
258091
260168
|
* @param capped true to include end caps
|
|
258092
260169
|
*/
|
|
@@ -260059,7 +262136,7 @@ class HalfEdge {
|
|
|
260059
262136
|
* * The two edges are joined as edgeMate pair.
|
|
260060
262137
|
* * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
|
|
260061
262138
|
* * Properties x,y,z,i are inserted in each half edge.
|
|
260062
|
-
* @returns the reference to the first half edge created.
|
|
262139
|
+
* @returns the reference to the first half edge created, set with "A" properties.
|
|
260063
262140
|
*/
|
|
260064
262141
|
static createHalfEdgePairWithCoordinates(xA = 0, yA = 0, zA = 0, iA = 0, xB = 0, yB = 0, zB = 0, iB = 0, heArray) {
|
|
260065
262142
|
const a = HalfEdge.createHalfEdgePair(heArray);
|
|
@@ -261097,8 +263174,9 @@ class HalfEdgeGraph {
|
|
|
261097
263174
|
* * The two half edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
|
|
261098
263175
|
* * The two half edges are added to the graph's HalfEdge set.
|
|
261099
263176
|
* * Coordinates are set to zero.
|
|
261100
|
-
*
|
|
261101
|
-
* @
|
|
263177
|
+
* @param iA `i` property of the first created HalfEdge
|
|
263178
|
+
* @param iB `i` property of the second created HalfEdge
|
|
263179
|
+
* @returns pointer to the first half edge created, with `i` property set to iA.
|
|
261102
263180
|
*/
|
|
261103
263181
|
createEdgeIdId(iA = 0, iB = 0) {
|
|
261104
263182
|
return HalfEdge.createHalfEdgePairWithCoordinates(0.0, 0.0, 0.0, iA, 0.0, 0.0, 0.0, iB, this.allHalfEdges);
|
|
@@ -261446,21 +263524,21 @@ class HalfEdgeGraphFromIndexedLoopsContext {
|
|
|
261446
263524
|
* * For an edge with index pair [indexA, indexB]:
|
|
261447
263525
|
* * if [indexB, indexA] has never appeared, a HalfEdge mated pair is created.
|
|
261448
263526
|
* * One of that mated pair becomes a HalfEdge in this loop.
|
|
261449
|
-
* * The other is "unmatched"
|
|
263527
|
+
* * The other is "unmatched" and gets the EXTERIOR mask.
|
|
261450
263528
|
* * When announceMatedHalfEdges(halfEdge) is called:
|
|
261451
263529
|
* * halfEdge and its mate are "new"
|
|
261452
263530
|
* * all coordinates are zeros.
|
|
261453
|
-
* * each contains (as its
|
|
263531
|
+
* * each contains (as its `i` property) one index of the [indexA,indexB] pair.
|
|
261454
263532
|
* * those coordinates and indices will never be referenced again by this construction sequence -- the caller is free to mutate them as needed.
|
|
261455
263533
|
* * 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.
|
|
263534
|
+
* the "unmatched" HalfEdge is used in the loop being constructed, and its EXTERIOR mask is cleared.
|
|
263535
|
+
* @param indices Array of indices around the edge. This is accessed cyclically, so first and last indices should be different.
|
|
261458
263536
|
* @param announceMatedHalfEdges optional function to be called as mated pairs are created. At the call,
|
|
261459
263537
|
* the given HalfEdge and its mate will have a pair of successive indices from the array.
|
|
261460
263538
|
*/
|
|
261461
263539
|
insertLoop(indices, announceMatedHalfEdges) {
|
|
261462
263540
|
const n = indices.length;
|
|
261463
|
-
if (n >
|
|
263541
|
+
if (n > 2) {
|
|
261464
263542
|
let index0 = indices[indices.length - 1];
|
|
261465
263543
|
this._halfEdgesAroundCurrentLoop.length = 0;
|
|
261466
263544
|
for (const index1 of indices) {
|
|
@@ -286236,7 +288314,7 @@ class TestContext {
|
|
|
286236
288314
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
286237
288315
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
286238
288316
|
await core_frontend_1.NoRenderApp.startup({
|
|
286239
|
-
applicationVersion: "4.4.0-dev.
|
|
288317
|
+
applicationVersion: "4.4.0-dev.25",
|
|
286240
288318
|
applicationId: this.settings.gprid,
|
|
286241
288319
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
286242
288320
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -300920,9 +302998,9 @@ const gBase64 = {
|
|
|
300920
302998
|
|
|
300921
302999
|
/***/ }),
|
|
300922
303000
|
|
|
300923
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303001
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
|
|
300924
303002
|
/*!******************************************************************************************************************************!*\
|
|
300925
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303003
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
|
|
300926
303004
|
\******************************************************************************************************************************/
|
|
300927
303005
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
300928
303006
|
|
|
@@ -300939,9 +303017,9 @@ function _arrayLikeToArray(arr, len) {
|
|
|
300939
303017
|
|
|
300940
303018
|
/***/ }),
|
|
300941
303019
|
|
|
300942
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303020
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
|
|
300943
303021
|
/*!****************************************************************************************************************************!*\
|
|
300944
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303022
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
|
|
300945
303023
|
\****************************************************************************************************************************/
|
|
300946
303024
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
300947
303025
|
|
|
@@ -300956,9 +303034,9 @@ function _arrayWithHoles(arr) {
|
|
|
300956
303034
|
|
|
300957
303035
|
/***/ }),
|
|
300958
303036
|
|
|
300959
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303037
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
|
|
300960
303038
|
/*!***********************************************************************************************************************************!*\
|
|
300961
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303039
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
|
|
300962
303040
|
\***********************************************************************************************************************************/
|
|
300963
303041
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
300964
303042
|
|
|
@@ -300976,9 +303054,9 @@ function _assertThisInitialized(self) {
|
|
|
300976
303054
|
|
|
300977
303055
|
/***/ }),
|
|
300978
303056
|
|
|
300979
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303057
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
|
|
300980
303058
|
/*!****************************************************************************************************************************!*\
|
|
300981
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303059
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
|
|
300982
303060
|
\****************************************************************************************************************************/
|
|
300983
303061
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
300984
303062
|
|
|
@@ -300995,9 +303073,9 @@ function _classCallCheck(instance, Constructor) {
|
|
|
300995
303073
|
|
|
300996
303074
|
/***/ }),
|
|
300997
303075
|
|
|
300998
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303076
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/createClass.js":
|
|
300999
303077
|
/*!*************************************************************************************************************************!*\
|
|
301000
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303078
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/createClass.js ***!
|
|
301001
303079
|
\*************************************************************************************************************************/
|
|
301002
303080
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301003
303081
|
|
|
@@ -301006,7 +303084,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301006
303084
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301007
303085
|
/* harmony export */ "default": () => (/* binding */ _createClass)
|
|
301008
303086
|
/* 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.
|
|
303087
|
+
/* 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
303088
|
|
|
301011
303089
|
function _defineProperties(target, props) {
|
|
301012
303090
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -301028,9 +303106,9 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
301028
303106
|
|
|
301029
303107
|
/***/ }),
|
|
301030
303108
|
|
|
301031
|
-
/***/ "../../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/defineProperty.js":
|
|
301032
303110
|
/*!****************************************************************************************************************************!*\
|
|
301033
|
-
!*** ../../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/defineProperty.js ***!
|
|
301034
303112
|
\****************************************************************************************************************************/
|
|
301035
303113
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301036
303114
|
|
|
@@ -301039,7 +303117,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301039
303117
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301040
303118
|
/* harmony export */ "default": () => (/* binding */ _defineProperty)
|
|
301041
303119
|
/* 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.
|
|
303120
|
+
/* 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
303121
|
|
|
301044
303122
|
function _defineProperty(obj, key, value) {
|
|
301045
303123
|
key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key);
|
|
@@ -301058,9 +303136,9 @@ function _defineProperty(obj, key, value) {
|
|
|
301058
303136
|
|
|
301059
303137
|
/***/ }),
|
|
301060
303138
|
|
|
301061
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303139
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
|
|
301062
303140
|
/*!****************************************************************************************************************************!*\
|
|
301063
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303141
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
|
|
301064
303142
|
\****************************************************************************************************************************/
|
|
301065
303143
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301066
303144
|
|
|
@@ -301078,9 +303156,9 @@ function _getPrototypeOf(o) {
|
|
|
301078
303156
|
|
|
301079
303157
|
/***/ }),
|
|
301080
303158
|
|
|
301081
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303159
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/inherits.js":
|
|
301082
303160
|
/*!**********************************************************************************************************************!*\
|
|
301083
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303161
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/inherits.js ***!
|
|
301084
303162
|
\**********************************************************************************************************************/
|
|
301085
303163
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301086
303164
|
|
|
@@ -301089,7 +303167,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301089
303167
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301090
303168
|
/* harmony export */ "default": () => (/* binding */ _inherits)
|
|
301091
303169
|
/* 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.
|
|
303170
|
+
/* 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
303171
|
|
|
301094
303172
|
function _inherits(subClass, superClass) {
|
|
301095
303173
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -301110,9 +303188,9 @@ function _inherits(subClass, superClass) {
|
|
|
301110
303188
|
|
|
301111
303189
|
/***/ }),
|
|
301112
303190
|
|
|
301113
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303191
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
|
|
301114
303192
|
/*!*****************************************************************************************************************************!*\
|
|
301115
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303193
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
|
|
301116
303194
|
\*****************************************************************************************************************************/
|
|
301117
303195
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301118
303196
|
|
|
@@ -301127,9 +303205,9 @@ function _iterableToArray(iter) {
|
|
|
301127
303205
|
|
|
301128
303206
|
/***/ }),
|
|
301129
303207
|
|
|
301130
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303208
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
|
|
301131
303209
|
/*!*****************************************************************************************************************************!*\
|
|
301132
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303210
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
|
|
301133
303211
|
\*****************************************************************************************************************************/
|
|
301134
303212
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301135
303213
|
|
|
@@ -301144,9 +303222,9 @@ function _nonIterableRest() {
|
|
|
301144
303222
|
|
|
301145
303223
|
/***/ }),
|
|
301146
303224
|
|
|
301147
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303225
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
|
|
301148
303226
|
/*!***************************************************************************************************************************************!*\
|
|
301149
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303227
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
|
|
301150
303228
|
\***************************************************************************************************************************************/
|
|
301151
303229
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301152
303230
|
|
|
@@ -301155,8 +303233,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301155
303233
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301156
303234
|
/* harmony export */ "default": () => (/* binding */ _possibleConstructorReturn)
|
|
301157
303235
|
/* 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.
|
|
303236
|
+
/* 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");
|
|
303237
|
+
/* 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
303238
|
|
|
301161
303239
|
|
|
301162
303240
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -301170,9 +303248,9 @@ function _possibleConstructorReturn(self, call) {
|
|
|
301170
303248
|
|
|
301171
303249
|
/***/ }),
|
|
301172
303250
|
|
|
301173
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303251
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
|
|
301174
303252
|
/*!****************************************************************************************************************************!*\
|
|
301175
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303253
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
|
|
301176
303254
|
\****************************************************************************************************************************/
|
|
301177
303255
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301178
303256
|
|
|
@@ -301191,9 +303269,9 @@ function _setPrototypeOf(o, p) {
|
|
|
301191
303269
|
|
|
301192
303270
|
/***/ }),
|
|
301193
303271
|
|
|
301194
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303272
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toArray.js":
|
|
301195
303273
|
/*!*********************************************************************************************************************!*\
|
|
301196
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303274
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toArray.js ***!
|
|
301197
303275
|
\*********************************************************************************************************************/
|
|
301198
303276
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301199
303277
|
|
|
@@ -301202,10 +303280,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301202
303280
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301203
303281
|
/* harmony export */ "default": () => (/* binding */ _toArray)
|
|
301204
303282
|
/* 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.
|
|
303283
|
+
/* 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");
|
|
303284
|
+
/* 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");
|
|
303285
|
+
/* 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");
|
|
303286
|
+
/* 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
303287
|
|
|
301210
303288
|
|
|
301211
303289
|
|
|
@@ -301216,57 +303294,57 @@ function _toArray(arr) {
|
|
|
301216
303294
|
|
|
301217
303295
|
/***/ }),
|
|
301218
303296
|
|
|
301219
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303297
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPrimitive.js":
|
|
301220
303298
|
/*!*************************************************************************************************************************!*\
|
|
301221
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303299
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***!
|
|
301222
303300
|
\*************************************************************************************************************************/
|
|
301223
303301
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301224
303302
|
|
|
301225
303303
|
"use strict";
|
|
301226
303304
|
__webpack_require__.r(__webpack_exports__);
|
|
301227
303305
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301228
|
-
/* harmony export */ "default": () => (/* binding */
|
|
303306
|
+
/* harmony export */ "default": () => (/* binding */ toPrimitive)
|
|
301229
303307
|
/* 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.
|
|
303308
|
+
/* 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
303309
|
|
|
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"])(
|
|
303310
|
+
function toPrimitive(t, r) {
|
|
303311
|
+
if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t;
|
|
303312
|
+
var e = t[Symbol.toPrimitive];
|
|
303313
|
+
if (void 0 !== e) {
|
|
303314
|
+
var i = e.call(t, r || "default");
|
|
303315
|
+
if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i;
|
|
301238
303316
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
301239
303317
|
}
|
|
301240
|
-
return (
|
|
303318
|
+
return ("string" === r ? String : Number)(t);
|
|
301241
303319
|
}
|
|
301242
303320
|
|
|
301243
303321
|
/***/ }),
|
|
301244
303322
|
|
|
301245
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303323
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
|
|
301246
303324
|
/*!***************************************************************************************************************************!*\
|
|
301247
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303325
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***!
|
|
301248
303326
|
\***************************************************************************************************************************/
|
|
301249
303327
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301250
303328
|
|
|
301251
303329
|
"use strict";
|
|
301252
303330
|
__webpack_require__.r(__webpack_exports__);
|
|
301253
303331
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301254
|
-
/* harmony export */ "default": () => (/* binding */
|
|
303332
|
+
/* harmony export */ "default": () => (/* binding */ toPropertyKey)
|
|
301255
303333
|
/* 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.
|
|
303334
|
+
/* 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");
|
|
303335
|
+
/* 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
303336
|
|
|
301259
303337
|
|
|
301260
|
-
function
|
|
301261
|
-
var
|
|
301262
|
-
return (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(
|
|
303338
|
+
function toPropertyKey(t) {
|
|
303339
|
+
var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t, "string");
|
|
303340
|
+
return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i) ? i : String(i);
|
|
301263
303341
|
}
|
|
301264
303342
|
|
|
301265
303343
|
/***/ }),
|
|
301266
303344
|
|
|
301267
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303345
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/typeof.js":
|
|
301268
303346
|
/*!********************************************************************************************************************!*\
|
|
301269
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303347
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/typeof.js ***!
|
|
301270
303348
|
\********************************************************************************************************************/
|
|
301271
303349
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301272
303350
|
|
|
@@ -301287,9 +303365,9 @@ function _typeof(o) {
|
|
|
301287
303365
|
|
|
301288
303366
|
/***/ }),
|
|
301289
303367
|
|
|
301290
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303368
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
|
|
301291
303369
|
/*!****************************************************************************************************************************************!*\
|
|
301292
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
303370
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
|
|
301293
303371
|
\****************************************************************************************************************************************/
|
|
301294
303372
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
301295
303373
|
|
|
@@ -301298,7 +303376,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301298
303376
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301299
303377
|
/* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
|
|
301300
303378
|
/* 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.
|
|
303379
|
+
/* 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
303380
|
|
|
301303
303381
|
function _unsupportedIterableToArray(o, minLen) {
|
|
301304
303382
|
if (!o) return;
|
|
@@ -301796,15 +303874,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301796
303874
|
/* harmony export */ "t": () => (/* binding */ t),
|
|
301797
303875
|
/* harmony export */ "use": () => (/* binding */ use)
|
|
301798
303876
|
/* 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.
|
|
303877
|
+
/* 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");
|
|
303878
|
+
/* 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");
|
|
303879
|
+
/* 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");
|
|
303880
|
+
/* 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");
|
|
303881
|
+
/* 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");
|
|
303882
|
+
/* 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");
|
|
303883
|
+
/* 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");
|
|
303884
|
+
/* 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");
|
|
303885
|
+
/* 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
303886
|
|
|
301809
303887
|
|
|
301810
303888
|
|
|
@@ -305048,7 +307126,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
305048
307126
|
/***/ ((module) => {
|
|
305049
307127
|
|
|
305050
307128
|
"use strict";
|
|
305051
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.
|
|
307129
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.25","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.25","@itwin/core-bentley":"workspace:^4.4.0-dev.25","@itwin/core-common":"workspace:^4.4.0-dev.25","@itwin/core-geometry":"workspace:^4.4.0-dev.25","@itwin/core-orbitgt":"workspace:^4.4.0-dev.25","@itwin/core-quantity":"workspace:^4.4.0-dev.25"},"//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
307130
|
|
|
305053
307131
|
/***/ }),
|
|
305054
307132
|
|