@itwin/rpcinterface-full-stack-tests 5.3.0-dev.5 → 5.3.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/backend/BackendInit.js.map +1 -1
- package/lib/common/Settings.js +12 -12
- package/lib/common/Settings.js.map +1 -1
- package/lib/common/SideChannels.js.map +1 -1
- package/lib/dist/bundled-tests.js +374 -308
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/frontend/DevToolsRpc.test.js.map +1 -1
- package/lib/frontend/Elements.test.js.map +1 -1
- package/lib/frontend/IModel.test.js.map +1 -1
- package/lib/frontend/IModelConnection.test.js.map +1 -1
- package/lib/frontend/Models.test.js.map +1 -1
- package/lib/frontend/PresentationRpc.test.js.map +1 -1
- package/lib/frontend/Views.test.js.map +1 -1
- package/lib/frontend/setup/IModelSession.js.map +1 -1
- package/lib/frontend/setup/TestContext.js.map +1 -1
- package/lib/frontend/workflows/BasicScenarios.test.js.map +1 -1
- package/package.json +15 -15
|
@@ -230680,16 +230680,14 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
230680
230680
|
}
|
|
230681
230681
|
/** Return the (signed) area between (a fractional portion of) the arc and the chord between those points. */
|
|
230682
230682
|
areaToChordXY(fraction0, fraction1) {
|
|
230683
|
-
|
|
230684
|
-
// areas in arc of unit circle with radians limits
|
|
230683
|
+
const detJ = _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.crossProductXYXY(this._matrix.coffs[0], this._matrix.coffs[3], this._matrix.coffs[1], this._matrix.coffs[4]); // area scale factor from local to world
|
|
230685
230684
|
const radians0 = this._sweep.fractionToRadians(fraction0);
|
|
230686
230685
|
const radians1 = this._sweep.fractionToRadians(fraction1);
|
|
230687
|
-
|
|
230688
|
-
|
|
230689
|
-
|
|
230690
|
-
detJ = -detJ;
|
|
230686
|
+
const alpha = 0.5 * (radians1 - radians0); // signed area of local sector
|
|
230687
|
+
// Compute signed area of local triangle ("wedge") formed by origin and arc endpoints p0, p1:
|
|
230688
|
+
// (p0 x p1)/2 = (cos(r0)sin(r1)-cos(r1)sin(r0))/2 = sin(r1-r0)/2 = cos(a)sin(a)
|
|
230691
230689
|
const wedgeArea = Math.cos(alpha) * Math.sin(alpha);
|
|
230692
|
-
return (alpha - wedgeArea) * detJ;
|
|
230690
|
+
return (alpha - wedgeArea) * detJ; // to world
|
|
230693
230691
|
}
|
|
230694
230692
|
/**
|
|
230695
230693
|
* Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).
|
|
@@ -234116,8 +234114,7 @@ class CurveOps {
|
|
|
234116
234114
|
/**
|
|
234117
234115
|
* Check whether or not the curves are planar, and if so, return a localToWorld frame.
|
|
234118
234116
|
* @param curves input geometry: curves or points.
|
|
234119
|
-
* @param
|
|
234120
|
-
* @param result optional pre-allocated object to populate and return.
|
|
234117
|
+
* @param options bundle of options.
|
|
234121
234118
|
* @returns localToWorld frame `T` for coplanar curves, or undefined if they are not coplanar.
|
|
234122
234119
|
* `T` satisfies:
|
|
234123
234120
|
* * `T.origin` is in the plane.
|
|
@@ -234137,9 +234134,7 @@ class CurveOps {
|
|
|
234137
234134
|
* Check whether or not the curves lie in a straight line, and if so, return a colinear ray.
|
|
234138
234135
|
* * This test does not take curve traversal or point order into account.
|
|
234139
234136
|
* @param curves input geometry: curves or points.
|
|
234140
|
-
* @param
|
|
234141
|
-
* @param tolerance optional maximum allowable linear deviation, default [[Geometry.smallMetricDistance]].
|
|
234142
|
-
* @param result optional pre-allocated object to populate and return.
|
|
234137
|
+
* @param options bundle of options.
|
|
234143
234138
|
* @returns ray colinear with input, or undefined if input is not colinear.
|
|
234144
234139
|
*/
|
|
234145
234140
|
static isColinear(curves, options) {
|
|
@@ -238828,17 +238823,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
238828
238823
|
/* harmony export */ });
|
|
238829
238824
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
238830
238825
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
238826
|
+
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
238831
238827
|
/* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
238832
|
-
/* harmony import */ var
|
|
238828
|
+
/* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
|
|
238833
238829
|
/* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
|
|
238834
238830
|
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
238835
238831
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
238836
238832
|
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
238837
238833
|
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
238838
|
-
/* harmony import */ var
|
|
238839
|
-
/* harmony import */ var
|
|
238840
|
-
/* harmony import */ var
|
|
238841
|
-
/* harmony import */ var
|
|
238834
|
+
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
238835
|
+
/* harmony import */ var _ParityRegion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../ParityRegion */ "../../core/geometry/lib/esm/curve/ParityRegion.js");
|
|
238836
|
+
/* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
|
|
238837
|
+
/* harmony import */ var _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../RegionOpsClassificationSweeps */ "../../core/geometry/lib/esm/curve/RegionOpsClassificationSweeps.js");
|
|
238842
238838
|
/*---------------------------------------------------------------------------------------------
|
|
238843
238839
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
238844
238840
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -238856,9 +238852,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
238856
238852
|
|
|
238857
238853
|
|
|
238858
238854
|
|
|
238855
|
+
|
|
238859
238856
|
/** @packageDocumentation
|
|
238860
238857
|
* @module Curve
|
|
238861
238858
|
*/
|
|
238859
|
+
function computeSortAngle(curve, fraction, reverse) {
|
|
238860
|
+
const ray = curve.fractionToPointAndDerivative(fraction);
|
|
238861
|
+
const s = reverse ? -1.0 : 1.0;
|
|
238862
|
+
return Math.atan2(s * ray.direction.y, s * ray.direction.x);
|
|
238863
|
+
}
|
|
238864
|
+
function getFractionOnCurve(pair, curve) {
|
|
238865
|
+
if (pair.detailA.curve === curve)
|
|
238866
|
+
return pair.detailA.fraction;
|
|
238867
|
+
if (pair.detailB.curve === curve)
|
|
238868
|
+
return pair.detailB.fraction;
|
|
238869
|
+
return undefined;
|
|
238870
|
+
}
|
|
238871
|
+
function getDetailOnCurve(pair, curve) {
|
|
238872
|
+
if (pair.detailA.curve === curve)
|
|
238873
|
+
return pair.detailA;
|
|
238874
|
+
if (pair.detailB.curve === curve)
|
|
238875
|
+
return pair.detailB;
|
|
238876
|
+
return undefined;
|
|
238877
|
+
}
|
|
238862
238878
|
class MapCurvePrimitiveToCurveLocationDetailPairArray {
|
|
238863
238879
|
primitiveToPair = new Map();
|
|
238864
238880
|
// index assigned to this primitive (for debugging)
|
|
@@ -238921,8 +238937,11 @@ class MapCurvePrimitiveToCurveLocationDetailPairArray {
|
|
|
238921
238937
|
*/
|
|
238922
238938
|
class PlanarSubdivision {
|
|
238923
238939
|
/**
|
|
238924
|
-
* Create a graph from
|
|
238925
|
-
* Z-coordinates are ignored.
|
|
238940
|
+
* Create a graph from curves and precomputed intersections.
|
|
238941
|
+
* * Z-coordinates are ignored.
|
|
238942
|
+
* @param primitives input curves
|
|
238943
|
+
* @param allPairs array of curve-curve xy-intersections
|
|
238944
|
+
* @param mergeTolerance optional distance tolerance for clustering vertices. Default value is [[Geometry.smallMetricDistance]].
|
|
238926
238945
|
*/
|
|
238927
238946
|
static assembleHalfEdgeGraph(primitives, allPairs, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
238928
238947
|
// map from key CurvePrimitive to CurveLocationDetailPair
|
|
@@ -238968,31 +238987,45 @@ class PlanarSubdivision {
|
|
|
238968
238987
|
return graph;
|
|
238969
238988
|
}
|
|
238970
238989
|
/**
|
|
238971
|
-
*
|
|
238972
|
-
* *
|
|
238990
|
+
* Filter for trivial curve fragment: fast computation if line segment; otherwise clip, flatten, and measure.
|
|
238991
|
+
* * Different metrics are employed for expedience.
|
|
238992
|
+
*/
|
|
238993
|
+
static isCurveTrivialXY(p, point0, fraction0, point1, fraction1, mergeTolerance) {
|
|
238994
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSmallRelative(fraction0 - fraction1))
|
|
238995
|
+
return true;
|
|
238996
|
+
if (!(p instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_3__.LineSegment3d)) {
|
|
238997
|
+
const p0 = p.clonePartialCurve(fraction0, fraction1);
|
|
238998
|
+
if (p0?.tryTransformInPlace(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_8__.Transform.createRowValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0))) // flatten
|
|
238999
|
+
return p0.curveLength() <= mergeTolerance; // Euclidean
|
|
239000
|
+
}
|
|
239001
|
+
return point0.isAlmostEqualXY(point1, mergeTolerance); // Manhattan
|
|
239002
|
+
}
|
|
239003
|
+
/**
|
|
239004
|
+
* Create a pair of mated half edges referencing a non-trivial interval of a primitive.
|
|
238973
239005
|
* @param graph containing graph
|
|
238974
239006
|
* @param p the curve
|
|
238975
239007
|
* @param point0 start point
|
|
238976
239008
|
* @param fraction0 starting fraction
|
|
238977
239009
|
* @param point1 end point
|
|
238978
239010
|
* @param fraction1 end fraction
|
|
238979
|
-
* @
|
|
239011
|
+
* @param mergeTolerance optional maximum xy-length of a trivial edge
|
|
239012
|
+
* @returns end point and fraction
|
|
238980
239013
|
*/
|
|
238981
239014
|
static addHalfEdge(graph, p, point0, fraction0, point1, fraction1, mergeTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
238982
|
-
if (
|
|
238983
|
-
|
|
238984
|
-
|
|
238985
|
-
|
|
238986
|
-
|
|
238987
|
-
|
|
238988
|
-
|
|
238989
|
-
|
|
238990
|
-
|
|
238991
|
-
|
|
238992
|
-
|
|
238993
|
-
|
|
238994
|
-
|
|
238995
|
-
return { point: point1, fraction: fraction1 };
|
|
239015
|
+
if (!this.isCurveTrivialXY(p, point0, fraction0, point1, fraction1, mergeTolerance)) {
|
|
239016
|
+
const halfEdge = graph.createEdgeXYAndZ(point0, 0, point1, 0);
|
|
239017
|
+
if (p.parent && p.parent instanceof _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_9__.RegionGroupMember && p.parent.parentGroup.groupOpType === _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_9__.RegionGroupOpType.NonBounding)
|
|
239018
|
+
halfEdge.setMaskAroundEdge(_topology_Graph__WEBPACK_IMPORTED_MODULE_6__.HalfEdgeMask.BRIDGE_EDGE);
|
|
239019
|
+
const detail01 = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_5__.CurveLocationDetail.createCurveEvaluatedFractionFraction(p, fraction0, fraction1);
|
|
239020
|
+
const mate = halfEdge.edgeMate;
|
|
239021
|
+
halfEdge.edgeTag = detail01;
|
|
239022
|
+
halfEdge.sortData = 1.0;
|
|
239023
|
+
mate.edgeTag = detail01;
|
|
239024
|
+
mate.sortData = -1.0;
|
|
239025
|
+
halfEdge.sortAngle = computeSortAngle(p, fraction0, false);
|
|
239026
|
+
mate.sortAngle = computeSortAngle(p, fraction1, true);
|
|
239027
|
+
}
|
|
239028
|
+
return { point: point1, fraction: fraction1 }; // where the next curve fragment starts
|
|
238996
239029
|
}
|
|
238997
239030
|
/**
|
|
238998
239031
|
* Based on computed (and toleranced) area, push the loop (pointer) onto the appropriate array of positive, negative,
|
|
@@ -239002,7 +239035,7 @@ class PlanarSubdivision {
|
|
|
239002
239035
|
* @returns the area (forced to zero if within tolerance)
|
|
239003
239036
|
*/
|
|
239004
239037
|
static collectSignedLoop(loop, outLoops, zeroAreaTolerance = 1.0e-10, isSliverFace) {
|
|
239005
|
-
let area = isSliverFace ? 0.0 :
|
|
239038
|
+
let area = isSliverFace ? 0.0 : _RegionOps__WEBPACK_IMPORTED_MODULE_10__.RegionOps.computeXYArea(loop);
|
|
239006
239039
|
if (area === undefined)
|
|
239007
239040
|
area = 0;
|
|
239008
239041
|
if (Math.abs(area) < zeroAreaTolerance)
|
|
@@ -239028,32 +239061,31 @@ class PlanarSubdivision {
|
|
|
239028
239061
|
return undefined;
|
|
239029
239062
|
}
|
|
239030
239063
|
/** Create the geometry for a topological edge. */
|
|
239031
|
-
static createCurveInEdge(edge) {
|
|
239064
|
+
static createCurveInEdge(edge, z) {
|
|
239065
|
+
let result;
|
|
239032
239066
|
const info = this.extractGeometryFromEdge(edge);
|
|
239033
|
-
if (info) {
|
|
239034
|
-
|
|
239035
|
-
|
|
239036
|
-
|
|
239067
|
+
if (info && info.detail.curve && info.detail.fraction1) {
|
|
239068
|
+
const f0 = info.reversed ? info.detail.fraction1 : info.detail.fraction;
|
|
239069
|
+
const f1 = info.reversed ? info.detail.fraction : info.detail.fraction1;
|
|
239070
|
+
result = info.detail.curve.clonePartialCurve(f0, f1);
|
|
239071
|
+
if (result && z !== undefined)
|
|
239072
|
+
result.tryTransformInPlace(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_8__.Transform.createRowValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, z));
|
|
239037
239073
|
}
|
|
239038
|
-
return
|
|
239074
|
+
return result;
|
|
239039
239075
|
}
|
|
239040
239076
|
/**
|
|
239041
239077
|
* Create a [[Loop]] for the given face or super face.
|
|
239042
239078
|
* @param face a node in the face loop, or an array of HalfEdges that comprise a loop (e.g., a super face).
|
|
239043
|
-
* @param
|
|
239044
|
-
* @param compress whether to consolidate adjacent curves in the output Loop (default `false`).
|
|
239045
|
-
* If `announce` is provided, no compression is performed, as edges and curves would no longer be in 1-1 correspondence.
|
|
239046
|
-
* @param closureTol absolute xy-distance for confirming the returned Loop is closed (default [[Geometry.smallMetricDistance]]).
|
|
239079
|
+
* @param options bundle of options.
|
|
239047
239080
|
* @returns the Loop, or `undefined` if it is not closed within xy-tolerance.
|
|
239048
239081
|
*/
|
|
239049
|
-
static createLoopInFace(face,
|
|
239050
|
-
if
|
|
239051
|
-
|
|
239052
|
-
const
|
|
239053
|
-
|
|
239054
|
-
const curve = this.createCurveInEdge(he);
|
|
239082
|
+
static createLoopInFace(face, options) {
|
|
239083
|
+
const consolidate = options?.announceEdge ? false : options?.compress ?? false; // can't compress if announcing
|
|
239084
|
+
const loop = _Loop__WEBPACK_IMPORTED_MODULE_11__.Loop.create();
|
|
239085
|
+
const addEdgeCurve = (edge) => {
|
|
239086
|
+
const curve = this.createCurveInEdge(edge, options?.z);
|
|
239055
239087
|
if (curve) {
|
|
239056
|
-
|
|
239088
|
+
options?.announceEdge?.(edge, curve, loop);
|
|
239057
239089
|
loop.tryAddChild(curve);
|
|
239058
239090
|
}
|
|
239059
239091
|
};
|
|
@@ -239061,12 +239093,12 @@ class PlanarSubdivision {
|
|
|
239061
239093
|
face.forEach(addEdgeCurve);
|
|
239062
239094
|
else
|
|
239063
239095
|
face.announceEdgesInFace(addEdgeCurve);
|
|
239064
|
-
if (
|
|
239065
|
-
const
|
|
239066
|
-
|
|
239067
|
-
|
|
239096
|
+
if (consolidate) {
|
|
239097
|
+
const consolidateOptions = new _RegionOps__WEBPACK_IMPORTED_MODULE_10__.ConsolidateAdjacentCurvePrimitivesOptions();
|
|
239098
|
+
consolidateOptions.consolidateLoopSeam = true;
|
|
239099
|
+
_RegionOps__WEBPACK_IMPORTED_MODULE_10__.RegionOps.consolidateAdjacentPrimitives(loop, consolidateOptions);
|
|
239068
239100
|
}
|
|
239069
|
-
if (loop.isPhysicallyClosedCurve(closureTol, true))
|
|
239101
|
+
if (loop.isPhysicallyClosedCurve(options?.closureTol, true))
|
|
239070
239102
|
return loop;
|
|
239071
239103
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(() => false, "face is not physically closed");
|
|
239072
239104
|
return undefined;
|
|
@@ -239075,17 +239107,19 @@ class PlanarSubdivision {
|
|
|
239075
239107
|
* Create a [[Loop]] or [[ParityRegion]] for the given face.
|
|
239076
239108
|
* * A ParityRegion is created for a split-washer type face by removing bridge edges.
|
|
239077
239109
|
* @param face a node in the face loop.
|
|
239078
|
-
* @param
|
|
239079
|
-
* @
|
|
239080
|
-
* @param closureTol absolute xy-distance for confirming the returned Loop is closed (default [[Geometry.smallMetricDistance]]).
|
|
239081
|
-
* @returns the Loop or ParityRegion, or `undefined` if one could not be computed
|
|
239110
|
+
* @param options bundle of options.
|
|
239111
|
+
* @returns the Loop or ParityRegion, or `undefined` if one could not be computed.
|
|
239082
239112
|
*/
|
|
239083
|
-
static createLoopOrParityRegionInFace(face,
|
|
239113
|
+
static createLoopOrParityRegionInFace(face, options) {
|
|
239084
239114
|
let region;
|
|
239085
|
-
|
|
239115
|
+
const visitMask = options?.visitMask ?? _topology_Graph__WEBPACK_IMPORTED_MODULE_6__.HalfEdgeMask.VISITED;
|
|
239116
|
+
const bridgeMask = options?.bridgeMask ?? _topology_Graph__WEBPACK_IMPORTED_MODULE_6__.HalfEdgeMask.BRIDGE_EDGE;
|
|
239117
|
+
let startBridgeEdge;
|
|
239118
|
+
// is it a split-washer face?
|
|
239119
|
+
if (face.isSplitWasherFace(bridgeMask) && (startBridgeEdge = face.findMaskAroundFace(bridgeMask, true))) {
|
|
239086
239120
|
const loops = [];
|
|
239087
239121
|
const loopEdges = [];
|
|
239088
|
-
const bridgeStack = [
|
|
239122
|
+
const bridgeStack = [startBridgeEdge];
|
|
239089
239123
|
const announceEdge = (he) => { he.setMask(visitMask); loopEdges.push(he); };
|
|
239090
239124
|
const announceBridge = (he) => { if (!he.isMaskSet(visitMask))
|
|
239091
239125
|
bridgeStack.push(he); };
|
|
@@ -239099,7 +239133,7 @@ class PlanarSubdivision {
|
|
|
239099
239133
|
continue;
|
|
239100
239134
|
loopEdges.length = 0;
|
|
239101
239135
|
if (loopSeed.announceEdgesInSuperFace(bridgeMask, announceEdge, announceBridge)) {
|
|
239102
|
-
const loop = this.createLoopInFace(loopEdges,
|
|
239136
|
+
const loop = this.createLoopInFace(loopEdges, options);
|
|
239103
239137
|
if (loop) {
|
|
239104
239138
|
loops.push(loop);
|
|
239105
239139
|
continue;
|
|
@@ -239107,13 +239141,13 @@ class PlanarSubdivision {
|
|
|
239107
239141
|
}
|
|
239108
239142
|
}
|
|
239109
239143
|
}
|
|
239110
|
-
region =
|
|
239111
|
-
region =
|
|
239144
|
+
region = _RegionOps__WEBPACK_IMPORTED_MODULE_10__.RegionOps.sortOuterAndHoleLoopsXY(loops);
|
|
239145
|
+
region = _RegionOps__WEBPACK_IMPORTED_MODULE_10__.RegionOps.simplifyRegion(region);
|
|
239112
239146
|
}
|
|
239113
239147
|
else {
|
|
239114
|
-
region = this.createLoopInFace(face,
|
|
239148
|
+
region = this.createLoopInFace(face, options);
|
|
239115
239149
|
}
|
|
239116
|
-
return (region && (region instanceof
|
|
239150
|
+
return (region && (region instanceof _Loop__WEBPACK_IMPORTED_MODULE_11__.Loop || region instanceof _ParityRegion__WEBPACK_IMPORTED_MODULE_12__.ParityRegion)) ? region : undefined;
|
|
239117
239151
|
}
|
|
239118
239152
|
/** Return true if there are only two edges in the face loop, and their start curvatures are the same. */
|
|
239119
239153
|
static isNullFace(he) {
|
|
@@ -239140,7 +239174,7 @@ class PlanarSubdivision {
|
|
|
239140
239174
|
return e1;
|
|
239141
239175
|
}
|
|
239142
239176
|
static collectSignedLoopSetsInHalfEdgeGraph(graph, zeroAreaTolerance = 1.0e-10) {
|
|
239143
|
-
const q =
|
|
239177
|
+
const q = _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_13__.HalfEdgeGraphSearch.collectConnectedComponentsWithExteriorParityMasks(graph, undefined);
|
|
239144
239178
|
const result = [];
|
|
239145
239179
|
const edgeMap = new Map();
|
|
239146
239180
|
for (const faceSeeds of q) {
|
|
@@ -239148,24 +239182,23 @@ class PlanarSubdivision {
|
|
|
239148
239182
|
const edges = [];
|
|
239149
239183
|
for (const faceSeed of faceSeeds) {
|
|
239150
239184
|
const isNullFace = this.isNullFace(faceSeed);
|
|
239151
|
-
const
|
|
239152
|
-
|
|
239153
|
-
|
|
239154
|
-
|
|
239155
|
-
|
|
239156
|
-
|
|
239157
|
-
|
|
239158
|
-
|
|
239159
|
-
|
|
239160
|
-
|
|
239161
|
-
|
|
239162
|
-
|
|
239163
|
-
|
|
239164
|
-
edgeMap.delete(mate);
|
|
239165
|
-
}
|
|
239185
|
+
const announceEdge = isNullFace ? undefined : (he, curveC, loopC) => {
|
|
239186
|
+
const mate = this.getNonNullEdgeMate(graph, he);
|
|
239187
|
+
if (mate !== undefined) {
|
|
239188
|
+
const e = edgeMap.get(mate);
|
|
239189
|
+
if (e === undefined) {
|
|
239190
|
+
// Record this as loopA,edgeA of a shared edge to be completed later from the other side of the edge
|
|
239191
|
+
const e1 = new _Loop__WEBPACK_IMPORTED_MODULE_11__.LoopCurveLoopCurve(loopC, curveC, undefined, undefined);
|
|
239192
|
+
edgeMap.set(he, e1);
|
|
239193
|
+
}
|
|
239194
|
+
else if (e instanceof _Loop__WEBPACK_IMPORTED_MODULE_11__.LoopCurveLoopCurve) {
|
|
239195
|
+
e.setB(loopC, curveC);
|
|
239196
|
+
edges.push(e);
|
|
239197
|
+
edgeMap.delete(mate);
|
|
239166
239198
|
}
|
|
239167
239199
|
}
|
|
239168
|
-
}
|
|
239200
|
+
};
|
|
239201
|
+
const loop = this.createLoopInFace(faceSeed, { announceEdge });
|
|
239169
239202
|
if (loop)
|
|
239170
239203
|
this.collectSignedLoop(loop, componentAreas, zeroAreaTolerance, isNullFace);
|
|
239171
239204
|
}
|
|
@@ -239176,25 +239209,6 @@ class PlanarSubdivision {
|
|
|
239176
239209
|
return result;
|
|
239177
239210
|
}
|
|
239178
239211
|
}
|
|
239179
|
-
function sortAngle(curve, fraction, reverse) {
|
|
239180
|
-
const ray = curve.fractionToPointAndDerivative(fraction);
|
|
239181
|
-
const s = reverse ? -1.0 : 1.0;
|
|
239182
|
-
return Math.atan2(s * ray.direction.y, s * ray.direction.x);
|
|
239183
|
-
}
|
|
239184
|
-
function getFractionOnCurve(pair, curve) {
|
|
239185
|
-
if (pair.detailA.curve === curve)
|
|
239186
|
-
return pair.detailA.fraction;
|
|
239187
|
-
if (pair.detailB.curve === curve)
|
|
239188
|
-
return pair.detailB.fraction;
|
|
239189
|
-
return undefined;
|
|
239190
|
-
}
|
|
239191
|
-
function getDetailOnCurve(pair, curve) {
|
|
239192
|
-
if (pair.detailA.curve === curve)
|
|
239193
|
-
return pair.detailA;
|
|
239194
|
-
if (pair.detailB.curve === curve)
|
|
239195
|
-
return pair.detailB;
|
|
239196
|
-
return undefined;
|
|
239197
|
-
}
|
|
239198
239212
|
|
|
239199
239213
|
|
|
239200
239214
|
/***/ }),
|
|
@@ -240020,7 +240034,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
240020
240034
|
/* harmony export */ RegionOps: () => (/* binding */ RegionOps)
|
|
240021
240035
|
/* harmony export */ });
|
|
240022
240036
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
240023
|
-
/* harmony import */ var
|
|
240037
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
240024
240038
|
/* harmony import */ var _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
|
|
240025
240039
|
/* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
|
|
240026
240040
|
/* harmony import */ var _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry3d/IndexedXYZCollection */ "../../core/geometry/lib/esm/geometry3d/IndexedXYZCollection.js");
|
|
@@ -240032,7 +240046,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
240032
240046
|
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
240033
240047
|
/* harmony import */ var _geometry3d_SortablePolygon__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../geometry3d/SortablePolygon */ "../../core/geometry/lib/esm/geometry3d/SortablePolygon.js");
|
|
240034
240048
|
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
240035
|
-
/* harmony import */ var
|
|
240049
|
+
/* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
|
|
240036
240050
|
/* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
|
|
240037
240051
|
/* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
240038
240052
|
/* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
|
|
@@ -240057,7 +240071,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
240057
240071
|
/* harmony import */ var _Query_CurveSplitContext__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Query/CurveSplitContext */ "../../core/geometry/lib/esm/curve/Query/CurveSplitContext.js");
|
|
240058
240072
|
/* harmony import */ var _Query_InOutTests__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Query/InOutTests */ "../../core/geometry/lib/esm/curve/Query/InOutTests.js");
|
|
240059
240073
|
/* harmony import */ var _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Query/PlanarSubdivision */ "../../core/geometry/lib/esm/curve/Query/PlanarSubdivision.js");
|
|
240060
|
-
/* harmony import */ var
|
|
240074
|
+
/* harmony import */ var _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RegionMomentsXY */ "../../core/geometry/lib/esm/curve/RegionMomentsXY.js");
|
|
240061
240075
|
/* harmony import */ var _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./RegionOpsClassificationSweeps */ "../../core/geometry/lib/esm/curve/RegionOpsClassificationSweeps.js");
|
|
240062
240076
|
/* harmony import */ var _UnionRegion__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
|
|
240063
240077
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -240109,7 +240123,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
240109
240123
|
|
|
240110
240124
|
|
|
240111
240125
|
/**
|
|
240112
|
-
*
|
|
240126
|
+
* * Options to control method [[RegionOps.consolidateAdjacentPrimitives]].
|
|
240127
|
+
* @public
|
|
240128
|
+
*/
|
|
240129
|
+
class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
240130
|
+
/** True to consolidate adjacent linear geometry into a single LineString3d. */
|
|
240131
|
+
consolidateLinearGeometry = true;
|
|
240132
|
+
/** True to consolidate contiguous compatible arcs into a single Arc3d. */
|
|
240133
|
+
consolidateCompatibleArcs = true;
|
|
240134
|
+
/**
|
|
240135
|
+
* True to attempt consolidation of the first and last primitives of a [[Loop]] or physically closed linestring data,
|
|
240136
|
+
* allowing location of the seam to change.
|
|
240137
|
+
*/
|
|
240138
|
+
consolidateLoopSeam = false;
|
|
240139
|
+
/** Disable LineSegment3d and LineString3d point compression. */
|
|
240140
|
+
disableLinearCompression = false;
|
|
240141
|
+
/** Tolerance for detecting identical points. */
|
|
240142
|
+
duplicatePointTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance;
|
|
240143
|
+
/** Tolerance for removing interior colinear points (if `!disableLinearCompression`). */
|
|
240144
|
+
colinearPointTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance;
|
|
240145
|
+
}
|
|
240146
|
+
/**
|
|
240147
|
+
* Enumeration of the binary operation types for Boolean operations.
|
|
240148
|
+
* @see [[RegionOps.regionBooleanXY]], [[RegionOps.polygonBooleanXYToLoops]], [[RegionOps.polygonBooleanXYToPolyface]].
|
|
240113
240149
|
* @public
|
|
240114
240150
|
*/
|
|
240115
240151
|
var RegionBinaryOpType;
|
|
@@ -240143,9 +240179,9 @@ class RegionOps {
|
|
|
240143
240179
|
* @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
|
|
240144
240180
|
*/
|
|
240145
240181
|
static computeXYAreaMoments(region) {
|
|
240146
|
-
const handler = new
|
|
240182
|
+
const handler = new _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_2__.RegionMomentsXY();
|
|
240147
240183
|
const result = region.dispatchToGeometryHandler(handler);
|
|
240148
|
-
if (result instanceof
|
|
240184
|
+
if (result instanceof _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData) {
|
|
240149
240185
|
result.shiftOriginAndSumsToCentroidOfSums();
|
|
240150
240186
|
return result;
|
|
240151
240187
|
}
|
|
@@ -240156,9 +240192,13 @@ class RegionOps {
|
|
|
240156
240192
|
* @param range range of planar region to tolerance.
|
|
240157
240193
|
* @param distanceTolerance optional absolute distance tolerance.
|
|
240158
240194
|
*/
|
|
240159
|
-
static computeXYAreaTolerance(range, distanceTolerance =
|
|
240160
|
-
//
|
|
240161
|
-
|
|
240195
|
+
static computeXYAreaTolerance(range, distanceTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
240196
|
+
// ensure the result is nonzero: we never want to report a zero-area loop as a signed-area loop
|
|
240197
|
+
if (distanceTolerance === 0)
|
|
240198
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallFloatingPoint * 10; // observed area 2e-15 computed for a zero-area loop
|
|
240199
|
+
// If A = bh and e is distance tolerance, let A' be the region with b and h extended by half the tolerance.
|
|
240200
|
+
// Then A' := (b+e/2)(h+e/2) = A + e/2(b+h+e/2), which motivates our area tol = A'-A = e/2(b+h+e/2).
|
|
240201
|
+
const halfDistTol = 0.5 * Math.abs(distanceTolerance);
|
|
240162
240202
|
return halfDistTol * (range.xLength() + range.yLength() + halfDistTol);
|
|
240163
240203
|
}
|
|
240164
240204
|
/**
|
|
@@ -240169,9 +240209,9 @@ class RegionOps {
|
|
|
240169
240209
|
* @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
|
|
240170
240210
|
*/
|
|
240171
240211
|
static computeXYArea(region) {
|
|
240172
|
-
const handler = new
|
|
240212
|
+
const handler = new _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_2__.RegionMomentsXY();
|
|
240173
240213
|
const result = region.dispatchToGeometryHandler(handler);
|
|
240174
|
-
if (result instanceof
|
|
240214
|
+
if (result instanceof _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_3__.MomentData) {
|
|
240175
240215
|
return result.quantitySum;
|
|
240176
240216
|
}
|
|
240177
240217
|
return undefined;
|
|
@@ -240373,7 +240413,7 @@ class RegionOps {
|
|
|
240373
240413
|
* * Regions without children are removed.
|
|
240374
240414
|
* * No Boolean operations are performed.
|
|
240375
240415
|
* @param region region to simplify in place
|
|
240376
|
-
* @returns reference to the updated input region
|
|
240416
|
+
* @returns reference to the updated input region, or `undefined` if no children.
|
|
240377
240417
|
* @see [[simplifyRegionType]]
|
|
240378
240418
|
*/
|
|
240379
240419
|
static simplifyRegion(region) {
|
|
@@ -240398,6 +240438,14 @@ class RegionOps {
|
|
|
240398
240438
|
return region.children.splice(0, 1)[0];
|
|
240399
240439
|
return region;
|
|
240400
240440
|
}
|
|
240441
|
+
/**
|
|
240442
|
+
* Helper method to sample a z-coordinate from the input region(s).
|
|
240443
|
+
* * The assumption is that the input is horizontal.
|
|
240444
|
+
*/
|
|
240445
|
+
static getZCoordinate(xyRegion) {
|
|
240446
|
+
const localToWorld = _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_5__.FrameBuilder.createRightHandedFrame(undefined, xyRegion);
|
|
240447
|
+
return localToWorld ? localToWorld.origin.z : 0;
|
|
240448
|
+
}
|
|
240401
240449
|
/**
|
|
240402
240450
|
* Return areas defined by a boolean operation.
|
|
240403
240451
|
* @note For best results, input regions should have correctly oriented loops. See [[sortOuterAndHoleLoopsXY]].
|
|
@@ -240408,18 +240456,30 @@ class RegionOps {
|
|
|
240408
240456
|
* @param loopsA first set of loops (treated as a union)
|
|
240409
240457
|
* @param loopsB second set of loops (treated as a union)
|
|
240410
240458
|
* @param operation indicates Union, Intersection, Parity, AMinusB, or BMinusA
|
|
240411
|
-
* @param
|
|
240459
|
+
* @param mergeToleranceOrOptions absolute distance tolerance for merging loops, or multiple options settings. Default value is [[Geometry.smallMetricDistance]].
|
|
240412
240460
|
* @returns a region resulting from merging input loops and the boolean operation.
|
|
240413
240461
|
*/
|
|
240414
|
-
static regionBooleanXY(loopsA, loopsB, operation,
|
|
240415
|
-
|
|
240462
|
+
static regionBooleanXY(loopsA, loopsB, operation, mergeToleranceOrOptions = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
240463
|
+
let mergeTolerance;
|
|
240464
|
+
let simplifyUnion;
|
|
240465
|
+
if (typeof mergeToleranceOrOptions === "number") {
|
|
240466
|
+
mergeTolerance = mergeToleranceOrOptions;
|
|
240467
|
+
simplifyUnion = false;
|
|
240468
|
+
}
|
|
240469
|
+
else {
|
|
240470
|
+
mergeTolerance = mergeToleranceOrOptions.mergeTolerance ?? _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance;
|
|
240471
|
+
simplifyUnion = mergeToleranceOrOptions.simplifyUnion ?? false;
|
|
240472
|
+
}
|
|
240473
|
+
let result = _UnionRegion__WEBPACK_IMPORTED_MODULE_14__.UnionRegion.create();
|
|
240416
240474
|
const context = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_13__.RegionBooleanContext.create(_RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_13__.RegionGroupOpType.Union, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_13__.RegionGroupOpType.Union);
|
|
240417
240475
|
context.addMembers(loopsA, loopsB);
|
|
240418
240476
|
context.annotateAndMergeCurvesInGraph(mergeTolerance);
|
|
240477
|
+
const bridgeMask = _topology_Graph__WEBPACK_IMPORTED_MODULE_15__.HalfEdgeMask.BRIDGE_EDGE;
|
|
240419
240478
|
const visitMask = context.graph.grabMask(false);
|
|
240420
240479
|
const range = context.groupA.range().union(context.groupB.range());
|
|
240421
240480
|
const areaTol = this.computeXYAreaTolerance(range, mergeTolerance);
|
|
240422
|
-
const
|
|
240481
|
+
const z = RegionOps.getZCoordinate(operation === RegionBinaryOpType.BMinusA ? loopsB : loopsA);
|
|
240482
|
+
const options = { compress: true, closureTol: mergeTolerance, bridgeMask, visitMask, z };
|
|
240423
240483
|
context.runClassificationSweep(operation, (_graph, face, faceType, area) => {
|
|
240424
240484
|
// ignore danglers and null faces, but not 2-edge "banana" faces with nonzero area
|
|
240425
240485
|
if (face.countEdgesAroundFace() < 2)
|
|
@@ -240427,12 +240487,20 @@ class RegionOps {
|
|
|
240427
240487
|
if (Math.abs(area) < areaTol)
|
|
240428
240488
|
return;
|
|
240429
240489
|
if (faceType === 1) {
|
|
240430
|
-
const loopOrParityRegion = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__.PlanarSubdivision.createLoopOrParityRegionInFace(face,
|
|
240490
|
+
const loopOrParityRegion = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__.PlanarSubdivision.createLoopOrParityRegionInFace(face, options);
|
|
240431
240491
|
if (loopOrParityRegion)
|
|
240432
240492
|
result.tryAddChild(loopOrParityRegion);
|
|
240433
240493
|
}
|
|
240434
240494
|
});
|
|
240435
240495
|
context.graph.dropMask(visitMask);
|
|
240496
|
+
if (simplifyUnion && operation === RegionBinaryOpType.Union) {
|
|
240497
|
+
const signedLoops = RegionOps.constructAllXYRegionLoops(result);
|
|
240498
|
+
if (signedLoops) {
|
|
240499
|
+
const outerLoops = signedLoops.map((component) => component.negativeAreaLoops).flat();
|
|
240500
|
+
if (outerLoops.length > 0)
|
|
240501
|
+
result = _UnionRegion__WEBPACK_IMPORTED_MODULE_14__.UnionRegion.create(...outerLoops);
|
|
240502
|
+
}
|
|
240503
|
+
}
|
|
240436
240504
|
return this.simplifyRegion(result);
|
|
240437
240505
|
}
|
|
240438
240506
|
/**
|
|
@@ -240534,11 +240602,11 @@ class RegionOps {
|
|
|
240534
240602
|
let maxGap = 0.0;
|
|
240535
240603
|
let isPath = false;
|
|
240536
240604
|
if (wrap)
|
|
240537
|
-
maxGap =
|
|
240605
|
+
maxGap = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.maxXY(maxGap, curves[0].startPoint().distance(curves[n - 1].endPoint()));
|
|
240538
240606
|
for (let i = 0; i + 1 < n; i++)
|
|
240539
|
-
maxGap =
|
|
240607
|
+
maxGap = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.maxXY(maxGap, curves[i].endPoint().distance(curves[i + 1].startPoint()));
|
|
240540
240608
|
let collection;
|
|
240541
|
-
if (
|
|
240609
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSmallMetricDistance(maxGap)) {
|
|
240542
240610
|
collection = wrap ? _Loop__WEBPACK_IMPORTED_MODULE_8__.Loop.create() : _Path__WEBPACK_IMPORTED_MODULE_24__.Path.create();
|
|
240543
240611
|
isPath = true;
|
|
240544
240612
|
}
|
|
@@ -240608,7 +240676,7 @@ class RegionOps {
|
|
|
240608
240676
|
* @param gapTolerance distance to be treated as "effectively zero" when assembling fragments head-to-tail
|
|
240609
240677
|
* @returns chains, possibly wrapped in a [[BagOfCurves]].
|
|
240610
240678
|
*/
|
|
240611
|
-
static collectChains(fragments, gapTolerance =
|
|
240679
|
+
static collectChains(fragments, gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
240612
240680
|
return _CurveOps__WEBPACK_IMPORTED_MODULE_22__.CurveOps.collectChains(fragments, gapTolerance);
|
|
240613
240681
|
}
|
|
240614
240682
|
/**
|
|
@@ -240661,7 +240729,7 @@ class RegionOps {
|
|
|
240661
240729
|
else if (data instanceof _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_10__.IndexedXYZCollection) {
|
|
240662
240730
|
let dataToUse;
|
|
240663
240731
|
if (requireClosurePoint && data.length === 5) {
|
|
240664
|
-
if (!
|
|
240732
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSmallMetricDistance(data.distanceIndexIndex(0, 4)))
|
|
240665
240733
|
return undefined;
|
|
240666
240734
|
dataToUse = data;
|
|
240667
240735
|
}
|
|
@@ -240673,7 +240741,7 @@ class RegionOps {
|
|
|
240673
240741
|
}
|
|
240674
240742
|
else {
|
|
240675
240743
|
dataToUse = _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_18__.GrowableXYZArray.create(data);
|
|
240676
|
-
_geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_29__.PolylineCompressionContext.compressInPlaceByShortEdgeLength(dataToUse,
|
|
240744
|
+
_geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_29__.PolylineCompressionContext.compressInPlaceByShortEdgeLength(dataToUse, _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance);
|
|
240677
240745
|
if (dataToUse.length < (requireClosurePoint ? 5 : 4))
|
|
240678
240746
|
return undefined;
|
|
240679
240747
|
}
|
|
@@ -240753,7 +240821,7 @@ class RegionOps {
|
|
|
240753
240821
|
* * Physically closed input curves are each returned wrapped in a Loop to facilitate xy-algorithms,
|
|
240754
240822
|
* but outside this limited context, these Loops only makes sense if they are planar.
|
|
240755
240823
|
*/
|
|
240756
|
-
static collectRegionsAndClosedPrimitives(curves, tolerance =
|
|
240824
|
+
static collectRegionsAndClosedPrimitives(curves, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
240757
240825
|
const regions = [];
|
|
240758
240826
|
if (!Array.isArray(curves))
|
|
240759
240827
|
curves = [curves];
|
|
@@ -240794,7 +240862,7 @@ class RegionOps {
|
|
|
240794
240862
|
* * `edges` contains a [[LoopCurveLoopCurve]] object for each component edge, collecting both loops adjacent
|
|
240795
240863
|
* to the edge and a constituent curve in each.
|
|
240796
240864
|
*/
|
|
240797
|
-
static constructAllXYRegionLoops(curvesAndRegions, tolerance =
|
|
240865
|
+
static constructAllXYRegionLoops(curvesAndRegions, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance, addBridges = true) {
|
|
240798
240866
|
let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
|
|
240799
240867
|
primitives = _internalContexts_TransferWithSplitArcs__WEBPACK_IMPORTED_MODULE_34__.TransferWithSplitArcs.clone(_CurveCollection__WEBPACK_IMPORTED_MODULE_25__.BagOfCurves.create(...primitives)).children;
|
|
240800
240868
|
const range = this.curveArrayRange(primitives);
|
|
@@ -240802,13 +240870,15 @@ class RegionOps {
|
|
|
240802
240870
|
if (addBridges) { // generate a temp graph to extract its bridge edges
|
|
240803
240871
|
const context = _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_13__.RegionBooleanContext.create(_RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_13__.RegionGroupOpType.Union, _RegionOpsClassificationSweeps__WEBPACK_IMPORTED_MODULE_13__.RegionGroupOpType.Union);
|
|
240804
240872
|
const regions = this.collectRegionsAndClosedPrimitives(curvesAndRegions, tolerance);
|
|
240805
|
-
|
|
240806
|
-
|
|
240807
|
-
|
|
240808
|
-
|
|
240809
|
-
|
|
240810
|
-
|
|
240811
|
-
|
|
240873
|
+
if (regions.length > 0) {
|
|
240874
|
+
context.addMembers(regions, undefined);
|
|
240875
|
+
context.annotateAndMergeCurvesInGraph(tolerance);
|
|
240876
|
+
context.graph.announceEdges((_graph, edge) => {
|
|
240877
|
+
if (edge.isMaskSet(_topology_Graph__WEBPACK_IMPORTED_MODULE_15__.HalfEdgeMask.BRIDGE_EDGE))
|
|
240878
|
+
primitives.push(_LineSegment3d__WEBPACK_IMPORTED_MODULE_35__.LineSegment3d.create(edge.getPoint3d(), edge.faceSuccessor.getPoint3d()));
|
|
240879
|
+
return true;
|
|
240880
|
+
});
|
|
240881
|
+
}
|
|
240812
240882
|
}
|
|
240813
240883
|
const intersections = _CurveCurve__WEBPACK_IMPORTED_MODULE_36__.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
|
|
240814
240884
|
const graph = _Query_PlanarSubdivision__WEBPACK_IMPORTED_MODULE_16__.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
|
|
@@ -241025,27 +241095,6 @@ function pushToInOnOutArrays(curve, select, arrayNegative, array0, arrayPositive
|
|
|
241025
241095
|
else
|
|
241026
241096
|
array0.push(curve);
|
|
241027
241097
|
}
|
|
241028
|
-
/**
|
|
241029
|
-
* * Options to control method `RegionOps.consolidateAdjacentPrimitives`.
|
|
241030
|
-
* @public
|
|
241031
|
-
*/
|
|
241032
|
-
class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
241033
|
-
/** True to consolidate adjacent linear geometry into a single LineString3d. */
|
|
241034
|
-
consolidateLinearGeometry = true;
|
|
241035
|
-
/** True to consolidate contiguous compatible arcs into a single Arc3d. */
|
|
241036
|
-
consolidateCompatibleArcs = true;
|
|
241037
|
-
/**
|
|
241038
|
-
* True to attempt consolidation of the first and last primitives of a [[Loop]] or physically closed linestring data,
|
|
241039
|
-
* allowing location of the seam to change.
|
|
241040
|
-
*/
|
|
241041
|
-
consolidateLoopSeam = false;
|
|
241042
|
-
/** Disable LineSegment3d and LineString3d point compression. */
|
|
241043
|
-
disableLinearCompression = false;
|
|
241044
|
-
/** Tolerance for detecting identical points. */
|
|
241045
|
-
duplicatePointTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance;
|
|
241046
|
-
/** Tolerance for removing interior colinear points (if `!disableLinearCompression`). */
|
|
241047
|
-
colinearPointTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance;
|
|
241048
|
-
}
|
|
241049
241098
|
|
|
241050
241099
|
|
|
241051
241100
|
/***/ }),
|
|
@@ -241722,13 +241771,11 @@ class RegionBooleanContext {
|
|
|
241722
241771
|
const nodeHasBeenVisitedMask = this.graph.grabMask();
|
|
241723
241772
|
const componentArray = GraphComponentArray.create(this.graph);
|
|
241724
241773
|
for (const component of componentArray.components) {
|
|
241725
|
-
const exteriorHalfEdge =
|
|
241726
|
-
|
|
241727
|
-
|
|
241728
|
-
|
|
241729
|
-
|
|
241730
|
-
RegionOpsFaceToFaceSearch.faceToFaceSearchFromOuterLoop(this.graph, exteriorHalfEdge, faceHasBeenVisitedMask, nodeHasBeenVisitedMask, this);
|
|
241731
|
-
}
|
|
241774
|
+
const exteriorHalfEdge = component.faces[component.faceAreas.indexOf(Math.min(...component.faceAreas))];
|
|
241775
|
+
const exteriorMask = _topology_Graph__WEBPACK_IMPORTED_MODULE_0__.HalfEdgeMask.EXTERIOR;
|
|
241776
|
+
const allMasksToClear = exteriorMask | faceHasBeenVisitedMask | nodeHasBeenVisitedMask;
|
|
241777
|
+
this.graph.clearMask(allMasksToClear);
|
|
241778
|
+
RegionOpsFaceToFaceSearch.faceToFaceSearchFromOuterLoop(this.graph, exteriorHalfEdge, faceHasBeenVisitedMask, nodeHasBeenVisitedMask, this);
|
|
241732
241779
|
}
|
|
241733
241780
|
this.graph.dropMask(faceHasBeenVisitedMask);
|
|
241734
241781
|
this.graph.dropMask(nodeHasBeenVisitedMask);
|
|
@@ -241901,8 +241948,10 @@ class GraphComponent {
|
|
|
241901
241948
|
f.sumAroundFace(vertexFunction);
|
|
241902
241949
|
}
|
|
241903
241950
|
this.faceAreas.length = 0;
|
|
241951
|
+
if (faceAreaFunction === faceAreaFromCurvedEdgeData && !this.faces.every((he) => he.edgeTag instanceof _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_16__.CurveLocationDetail))
|
|
241952
|
+
faceAreaFunction = undefined; // prerequisite CurveLocationDetails are absent, fall through to default
|
|
241904
241953
|
if (!faceAreaFunction)
|
|
241905
|
-
faceAreaFunction = (node) => _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_4__.HalfEdgeGraphSearch.signedFaceArea(node);
|
|
241954
|
+
faceAreaFunction = (node) => _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_4__.HalfEdgeGraphSearch.signedFaceArea(node); // polygon area
|
|
241906
241955
|
for (const f of this.faces) {
|
|
241907
241956
|
this.faceAreas.push(faceAreaFunction(f));
|
|
241908
241957
|
}
|
|
@@ -244401,7 +244450,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
244401
244450
|
// The fraction and extend parameters allow all combinations to be passed in.
|
|
244402
244451
|
dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
|
|
244403
244452
|
const tol2 = this._coincidentGeometryContext.tolerance * this._coincidentGeometryContext.tolerance;
|
|
244404
|
-
|
|
244453
|
+
const cosines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
|
|
244454
|
+
const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
|
|
244455
|
+
const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_9__.GrowableFloat64Array(2);
|
|
244405
244456
|
// Arc: X = C + cU + sV
|
|
244406
244457
|
// Line: contains points A0,A1
|
|
244407
244458
|
// Arc point colinear with line if det (A0, A1, X) = 0
|
|
@@ -244421,27 +244472,30 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
244421
244472
|
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.center);
|
|
244422
244473
|
const beta = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.vector0);
|
|
244423
244474
|
const gamma = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductPoint4dXYW(pointA0H, pointA1H, data.vector90);
|
|
244424
|
-
|
|
244425
|
-
const
|
|
244426
|
-
|
|
244427
|
-
|
|
244428
|
-
|
|
244429
|
-
|
|
244475
|
+
let numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
244476
|
+
const closeApproach = (0 === numRoots);
|
|
244477
|
+
if (closeApproach)
|
|
244478
|
+
numRoots = 1; // we returned the arc's closest approach as the first "root"; if within tolerance and at endpoints, we record it
|
|
244479
|
+
const acceptSolution = (iRoot, checkOnlyEndPointDistance = false) => {
|
|
244480
|
+
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(iRoot), data.vector90, sines.atUncheckedIndex(iRoot));
|
|
244481
|
+
let fArc = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(iRoot), extendB0);
|
|
244482
|
+
let fLine = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, arcPoint);
|
|
244483
|
+
if (fLine === undefined)
|
|
244484
|
+
return undefined;
|
|
244485
|
+
if (!checkOnlyEndPointDistance && this.acceptFraction(extendA0, fLine, extendA1) && this.acceptFraction(extendB0, fArc, extendB1))
|
|
244486
|
+
return { fLine, fArc };
|
|
244487
|
+
// check for an endpoint intersection that is beyond parametric tolerance but within point tolerance
|
|
244488
|
+
fLine = fLine < 0.5 ? 0 : 1;
|
|
244489
|
+
fArc = data.sweep.fractionToSignedPeriodicFraction(fArc) < 0.5 ? 0 : 1;
|
|
244490
|
+
const pointAH = fLine ? pointA1H : pointA0H;
|
|
244491
|
+
const pointBH = fArc ? pointB1H : pointB0H;
|
|
244492
|
+
const dist2 = pointAH.realDistanceSquaredXY(pointBH);
|
|
244493
|
+
return (dist2 !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2, tol2)) ? { fLine, fArc } : undefined;
|
|
244494
|
+
};
|
|
244430
244495
|
for (let i = 0; i < numRoots; i++) {
|
|
244431
|
-
const
|
|
244432
|
-
|
|
244433
|
-
|
|
244434
|
-
if (lineFraction !== undefined) {
|
|
244435
|
-
if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB0, arcFraction, extendB1)) {
|
|
244436
|
-
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
|
|
244437
|
-
}
|
|
244438
|
-
else { // check for endpoint intersections beyond parametric tolerance but within point tolerance
|
|
244439
|
-
const pointAH = lineFraction < 0.5 ? pointA0H : pointA1H;
|
|
244440
|
-
const pointBH = (arcFraction = data.sweep.fractionToSignedPeriodicFraction(arcFraction)) < 0.5 ? pointB0H : pointB1H;
|
|
244441
|
-
if ((dist2 = pointAH.realDistanceSquaredXY(pointBH)) !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2, tol2))
|
|
244442
|
-
this.recordPointWithLocalFractions(lineFraction < 0.5 ? 0 : 1, cpA, fractionA0, fractionA1, arcFraction < 0.5 ? 0 : 1, arc, 0, 1, reversed);
|
|
244443
|
-
}
|
|
244444
|
-
}
|
|
244496
|
+
const result = acceptSolution(i, closeApproach);
|
|
244497
|
+
if (result)
|
|
244498
|
+
this.recordPointWithLocalFractions(result.fLine, cpA, fractionA0, fractionA1, result.fArc, arc, 0, 1, reversed);
|
|
244445
244499
|
}
|
|
244446
244500
|
}
|
|
244447
244501
|
else {
|
|
@@ -244459,27 +244513,30 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
244459
244513
|
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.center, 1);
|
|
244460
244514
|
const beta = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector0, 0);
|
|
244461
244515
|
const gamma = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector90, 0);
|
|
244462
|
-
|
|
244463
|
-
const
|
|
244464
|
-
|
|
244465
|
-
|
|
244466
|
-
|
|
244467
|
-
|
|
244516
|
+
let numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_10__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
244517
|
+
const closeApproach = (0 === numRoots);
|
|
244518
|
+
if (closeApproach)
|
|
244519
|
+
numRoots = 1; // we returned the arc's closest approach as the first "root"; if within tolerance and at endpoints, we record it
|
|
244520
|
+
const acceptSolution = (iRoot, checkOnlyEndPointDistance = false) => {
|
|
244521
|
+
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(iRoot), data.vector90, sines.atUncheckedIndex(iRoot));
|
|
244522
|
+
let fArc = data.sweep.radiansToSignedFraction(radians.atUncheckedIndex(iRoot), extendB0);
|
|
244523
|
+
let fLine = _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_8__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
244524
|
+
if (fLine === undefined)
|
|
244525
|
+
return undefined;
|
|
244526
|
+
if (!checkOnlyEndPointDistance && this.acceptFraction(extendA0, fLine, extendA1) && this.acceptFraction(extendB0, fArc, extendB1))
|
|
244527
|
+
return { fLine, fArc };
|
|
244528
|
+
// check for an endpoint intersection that is beyond parametric tolerance but within point tolerance
|
|
244529
|
+
fLine = fLine < 0.5 ? 0 : 1;
|
|
244530
|
+
fArc = data.sweep.fractionToSignedPeriodicFraction(fArc) < 0.5 ? 0 : 1;
|
|
244531
|
+
const pointALocal = fLine ? pointA1Local : pointA0Local;
|
|
244532
|
+
const pointBLocal = fArc ? pointB1Local : pointB0Local;
|
|
244533
|
+
const dist2 = pointALocal.distanceSquaredXY(pointBLocal);
|
|
244534
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2, tol2) ? { fLine, fArc } : undefined;
|
|
244535
|
+
};
|
|
244468
244536
|
for (let i = 0; i < numRoots; i++) {
|
|
244469
|
-
const
|
|
244470
|
-
|
|
244471
|
-
|
|
244472
|
-
if (lineFraction !== undefined) {
|
|
244473
|
-
if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB0, arcFraction, extendB1)) {
|
|
244474
|
-
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
|
|
244475
|
-
}
|
|
244476
|
-
else { // check for endpoint intersections beyond parametric tolerance but within point tolerance
|
|
244477
|
-
const pointALocal = lineFraction < 0.5 ? pointA0Local : pointA1Local;
|
|
244478
|
-
const pointBLocal = (arcFraction = data.sweep.fractionToSignedPeriodicFraction(arcFraction)) < 0.5 ? pointB0Local : pointB1Local;
|
|
244479
|
-
if ((dist2 = pointALocal.distanceSquaredXY(pointBLocal)) !== undefined && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2, tol2))
|
|
244480
|
-
this.recordPointWithLocalFractions(lineFraction < 0.5 ? 0 : 1, cpA, fractionA0, fractionA1, arcFraction < 0.5 ? 0 : 1, arc, 0, 1, reversed);
|
|
244481
|
-
}
|
|
244482
|
-
}
|
|
244537
|
+
const result = acceptSolution(i, closeApproach);
|
|
244538
|
+
if (result)
|
|
244539
|
+
this.recordPointWithLocalFractions(result.fLine, cpA, fractionA0, fractionA1, result.fArc, arc, 0, 1, reversed);
|
|
244483
244540
|
}
|
|
244484
244541
|
}
|
|
244485
244542
|
}
|
|
@@ -244502,12 +244559,23 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
244502
244559
|
localB.coffs[0], localB.coffs[3], localB.coffs[6], // vector0 xyw
|
|
244503
244560
|
localB.coffs[1], localB.coffs[4], localB.coffs[7], // vector90 xyw
|
|
244504
244561
|
ellipseRadians, circleRadians);
|
|
244562
|
+
const tol2 = this._coincidentGeometryContext.tolerance * this._coincidentGeometryContext.tolerance;
|
|
244505
244563
|
// the intersections are transform-invariant, so the solution angles apply directly to the input arcs
|
|
244506
244564
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
244507
|
-
|
|
244508
|
-
|
|
244509
|
-
if (this.acceptFraction(extendA0, fractionA, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1))
|
|
244565
|
+
let fractionA = cpA.sweep.radiansToSignedFraction(circleRadians[i], extendA0);
|
|
244566
|
+
let fractionB = cpB.sweep.radiansToSignedFraction(ellipseRadians[i], extendB0);
|
|
244567
|
+
if (this.acceptFraction(extendA0, fractionA, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1)) {
|
|
244510
244568
|
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
244569
|
+
}
|
|
244570
|
+
else { // check for endpoint intersection beyond angular tolerance but within point tolerance
|
|
244571
|
+
fractionA = cpA.sweep.fractionToSignedPeriodicFraction(fractionA) < 0.5 ? 0 : 1;
|
|
244572
|
+
fractionB = cpB.sweep.fractionToSignedPeriodicFraction(fractionB) < 0.5 ? 0 : 1;
|
|
244573
|
+
const endPointA = cpA.fractionToPoint(fractionA, CurveCurveIntersectXY._workPointAA0);
|
|
244574
|
+
const endPointB = cpB.fractionToPoint(fractionB, CurveCurveIntersectXY._workPointBB0);
|
|
244575
|
+
const dist2 = endPointA.distanceSquaredXY(endPointB);
|
|
244576
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isDistanceWithinTol(dist2, tol2))
|
|
244577
|
+
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
244578
|
+
}
|
|
244511
244579
|
}
|
|
244512
244580
|
}
|
|
244513
244581
|
}
|
|
@@ -244520,6 +244588,15 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
244520
244588
|
* 5- Convert intersection angles to fractions and record intersections.
|
|
244521
244589
|
*/
|
|
244522
244590
|
dispatchArcArc(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
244591
|
+
// overlap handling. perspective is not handled.
|
|
244592
|
+
if (this._coincidentGeometryContext && !this._worldToLocalPerspective && !this._worldToLocalAffine) {
|
|
244593
|
+
const pairs = this._coincidentGeometryContext.coincidentArcIntersectionXY(cpA, cpB, true);
|
|
244594
|
+
if (pairs) {
|
|
244595
|
+
this.recordPairs(cpA, cpB, pairs, reversed);
|
|
244596
|
+
return;
|
|
244597
|
+
}
|
|
244598
|
+
}
|
|
244599
|
+
// look for isolated intersections
|
|
244523
244600
|
let matrixA;
|
|
244524
244601
|
let matrixB;
|
|
244525
244602
|
if (this._worldToLocalPerspective) {
|
|
@@ -244536,27 +244613,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
244536
244613
|
}
|
|
244537
244614
|
const conditionA = matrixA.conditionNumber();
|
|
244538
244615
|
const conditionB = matrixB.conditionNumber();
|
|
244539
|
-
//
|
|
244616
|
+
// order the arcs so that the first one we pass in is closer to circular
|
|
244540
244617
|
if (conditionA > conditionB)
|
|
244541
244618
|
this.dispatchArcArcThisOrder(cpA, matrixA, extendA0, extendA1, cpB, matrixB, extendB0, extendB1, reversed);
|
|
244542
244619
|
else
|
|
244543
244620
|
this.dispatchArcArcThisOrder(cpB, matrixB, extendB0, extendB1, cpA, matrixA, extendA0, extendA1, !reversed);
|
|
244544
|
-
// overlap handling. perspective is not handled.
|
|
244545
|
-
if (!this._coincidentGeometryContext) {
|
|
244546
|
-
// do nothing
|
|
244547
|
-
}
|
|
244548
|
-
else if (this._worldToLocalPerspective) {
|
|
244549
|
-
// do nothing
|
|
244550
|
-
}
|
|
244551
|
-
else if (this._worldToLocalAffine) {
|
|
244552
|
-
// do nothing
|
|
244553
|
-
}
|
|
244554
|
-
else {
|
|
244555
|
-
const pairs = this._coincidentGeometryContext.coincidentArcIntersectionXY(cpA, cpB, true);
|
|
244556
|
-
if (pairs !== undefined)
|
|
244557
|
-
this.recordPairs(cpA, cpB, pairs, reversed);
|
|
244558
|
-
}
|
|
244559
244621
|
}
|
|
244622
|
+
/** Compute the intersection of an arc and a B-spline curve. */
|
|
244560
244623
|
dispatchArcBsplineCurve3d(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
244561
244624
|
// Arc: X = C + cU + sV
|
|
244562
244625
|
// implicitize the arc as viewed. This "3d" matrix is homogeneous "XYW" not "xyz"
|
|
@@ -244571,8 +244634,6 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
244571
244634
|
}
|
|
244572
244635
|
// The worldToLocal has moved the arc vectors into local space.
|
|
244573
244636
|
// matrixA captures the xyw parts (ignoring z)
|
|
244574
|
-
// for any point in world space,
|
|
244575
|
-
// THIS CODE ONLY WORKS FOR
|
|
244576
244637
|
const matrixAInverse = matrixA.inverse();
|
|
244577
244638
|
if (matrixAInverse) {
|
|
244578
244639
|
const orderF = cpB.order; // order of the beziers for simple coordinates
|
|
@@ -244591,36 +244652,34 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
244591
244652
|
const awy = matrixAInverse.at(2, 1);
|
|
244592
244653
|
const awz = 0.0;
|
|
244593
244654
|
const aww = matrixAInverse.at(2, 2);
|
|
244594
|
-
|
|
244595
|
-
|
|
244596
|
-
|
|
244597
|
-
|
|
244598
|
-
|
|
244599
|
-
|
|
244600
|
-
|
|
244601
|
-
|
|
244602
|
-
|
|
244603
|
-
|
|
244604
|
-
|
|
244605
|
-
|
|
244606
|
-
|
|
244607
|
-
|
|
244608
|
-
|
|
244609
|
-
|
|
244610
|
-
|
|
244611
|
-
|
|
244612
|
-
|
|
244613
|
-
|
|
244614
|
-
|
|
244615
|
-
|
|
244616
|
-
|
|
244617
|
-
|
|
244618
|
-
|
|
244619
|
-
|
|
244620
|
-
|
|
244621
|
-
|
|
244622
|
-
this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
244623
|
-
}
|
|
244655
|
+
let bezier;
|
|
244656
|
+
for (let spanIndex = 0;; spanIndex++) {
|
|
244657
|
+
bezier = cpB.getSaturatedBezierSpan3dH(spanIndex, bezier);
|
|
244658
|
+
if (!bezier)
|
|
244659
|
+
break;
|
|
244660
|
+
if (this._worldToLocalPerspective)
|
|
244661
|
+
bezier.tryMultiplyMatrix4dInPlace(this._worldToLocalPerspective);
|
|
244662
|
+
else if (this._worldToLocalAffine)
|
|
244663
|
+
bezier.tryTransformInPlace(this._worldToLocalAffine);
|
|
244664
|
+
univariateBezierG.zero();
|
|
244665
|
+
bezier.poleProductsXYZW(coffF, axx, axy, axz, axw);
|
|
244666
|
+
univariateBezierG.addSquaredSquaredBezier(coffF, 1.0);
|
|
244667
|
+
bezier.poleProductsXYZW(coffF, ayx, ayy, ayz, ayw);
|
|
244668
|
+
univariateBezierG.addSquaredSquaredBezier(coffF, 1.0);
|
|
244669
|
+
bezier.poleProductsXYZW(coffF, awx, awy, awz, aww);
|
|
244670
|
+
univariateBezierG.addSquaredSquaredBezier(coffF, -1.0);
|
|
244671
|
+
const roots = univariateBezierG.roots(0.0, true);
|
|
244672
|
+
if (roots) {
|
|
244673
|
+
for (const root of roots) {
|
|
244674
|
+
const fractionB = bezier.fractionToParentFraction(root);
|
|
244675
|
+
// The univariate bezier (which has been transformed by the view transform) evaluates into xyw space
|
|
244676
|
+
const bcurvePoint4d = bezier.fractionToPoint4d(root);
|
|
244677
|
+
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
244678
|
+
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
244679
|
+
const arcFraction = cpA.sweep.radiansToSignedFraction(Math.atan2(s, c), extendA0);
|
|
244680
|
+
if (this.acceptFraction(extendA0, arcFraction, extendA1) &&
|
|
244681
|
+
this.acceptFraction(extendB0, fractionB, extendB1)) {
|
|
244682
|
+
this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
244624
244683
|
}
|
|
244625
244684
|
}
|
|
244626
244685
|
}
|
|
@@ -256224,7 +256283,8 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
256224
256283
|
newPoints._xyInUse = this.length;
|
|
256225
256284
|
return newPoints;
|
|
256226
256285
|
}
|
|
256227
|
-
/**
|
|
256286
|
+
/**
|
|
256287
|
+
* Create an array by copying data from various point formats.
|
|
256228
256288
|
* Valid inputs are:
|
|
256229
256289
|
* * Point2d
|
|
256230
256290
|
* * Point3d
|
|
@@ -257002,7 +257062,8 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
|
|
|
257002
257062
|
compressInPlace(tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
257003
257063
|
return GrowableXYZArray.createCompressed(this, tolerance, this);
|
|
257004
257064
|
}
|
|
257005
|
-
/**
|
|
257065
|
+
/**
|
|
257066
|
+
* Create an array by copying data from various point formats.
|
|
257006
257067
|
* Valid inputs are:
|
|
257007
257068
|
* * Point2d
|
|
257008
257069
|
* * Point3d
|
|
@@ -258100,8 +258161,8 @@ class PointsIterator {
|
|
|
258100
258161
|
[Symbol.iterator]() { return this; }
|
|
258101
258162
|
}
|
|
258102
258163
|
/**
|
|
258103
|
-
*
|
|
258104
|
-
* * This allows algorithms to work with Point3d[] or
|
|
258164
|
+
* Abstract base class for read-only access to XYZ data with indexed reference.
|
|
258165
|
+
* * This allows algorithms to work with Point3d[] or [[GrowableXYZArray]].
|
|
258105
258166
|
* * GrowableXYZArray implements these for its data.
|
|
258106
258167
|
* * Point3dArrayCarrier carries a (reference to) a Point3d[] and implements the methods with calls on that array reference.
|
|
258107
258168
|
* * In addition to "point by point" accessors, other abstract members compute commonly useful vector data "between points".
|
|
@@ -258319,7 +258380,7 @@ class IndexedXYZCollection {
|
|
|
258319
258380
|
}
|
|
258320
258381
|
}
|
|
258321
258382
|
/**
|
|
258322
|
-
*
|
|
258383
|
+
* Abstract base class extends [[IndexedXYZCollection]] with methods that modify the collection.
|
|
258323
258384
|
* @public
|
|
258324
258385
|
*/
|
|
258325
258386
|
class IndexedReadWriteXYZCollection extends IndexedXYZCollection {
|
|
@@ -269013,8 +269074,8 @@ class PolylineOps {
|
|
|
269013
269074
|
* Checks if all points are colinear.
|
|
269014
269075
|
* * This test does not take point order into account.
|
|
269015
269076
|
* @param points array of points to check.
|
|
269016
|
-
* @param distanceTol
|
|
269017
|
-
* @param xyOnly
|
|
269077
|
+
* @param distanceTol maximum allowable distance that geometry can deviate from colinearity.Default is [[Geometry.smallMetricDistance]].
|
|
269078
|
+
* @param xyOnly whether to ignore z-coordinates in the colinearity test.
|
|
269018
269079
|
*/
|
|
269019
269080
|
static isColinear(points, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance, xyOnly = false) {
|
|
269020
269081
|
if (points.length < 3)
|
|
@@ -277100,9 +277161,9 @@ class ClusterableArray extends _geometry3d_GrowableBlockedArray__WEBPACK_IMPORTE
|
|
|
277100
277161
|
candidateBlockIndex = firstSort[j];
|
|
277101
277162
|
if (candidateBlockIndex === ClusterableArray.clusterTerminator)
|
|
277102
277163
|
continue; // nearby in sort direction but already in a cluster.
|
|
277103
|
-
if (this.component(candidateBlockIndex, 0)
|
|
277164
|
+
if (this.component(candidateBlockIndex, 0) > barrierU)
|
|
277104
277165
|
break;
|
|
277105
|
-
if (this.distanceBetweenSubBlocks(clusterStartBlockIndex, candidateBlockIndex, k0, k1)
|
|
277166
|
+
if (this.distanceBetweenSubBlocks(clusterStartBlockIndex, candidateBlockIndex, k0, k1) <= clusterTolerance) {
|
|
277106
277167
|
clusterIndices[m++] = candidateBlockIndex; // The candidate is in the block
|
|
277107
277168
|
firstSort[j] = ClusterableArray.clusterTerminator; // and it will not be reused as future block base
|
|
277108
277169
|
}
|
|
@@ -312887,13 +312948,21 @@ class HalfEdgeGraphMerge {
|
|
|
312887
312948
|
static isNullFace(node) {
|
|
312888
312949
|
return node.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_3__.HalfEdgeMask.NULL_FACE) && node.faceSuccessor.isMaskSet(_Graph__WEBPACK_IMPORTED_MODULE_3__.HalfEdgeMask.NULL_FACE) && node === node.faceSuccessor.faceSuccessor;
|
|
312889
312950
|
}
|
|
312890
|
-
/**
|
|
312891
|
-
*
|
|
312892
|
-
* *
|
|
312893
|
-
* *
|
|
312894
|
-
* * This
|
|
312895
|
-
*
|
|
312896
|
-
*
|
|
312951
|
+
/**
|
|
312952
|
+
* Cluster the HalfEdges so that xy-coordinates within `mergeTolerance` are equated.
|
|
312953
|
+
* * Note that any additional data (e.g., edgeTag, faceTag) on the HalfEdges are ignored. In particular,
|
|
312954
|
+
* [[CurveLocationDetail]]s attached to clustered HalfEdges do *not* get their points adjusted.
|
|
312955
|
+
* * This is a simple merge algorithm:
|
|
312956
|
+
* * untwist all edges from the vertex loops
|
|
312957
|
+
* * collect array of (x,y,theta) at all nodes
|
|
312958
|
+
* * lexical sort of the array
|
|
312959
|
+
* * twist all edges together in sort order around each vertex
|
|
312960
|
+
* * This effectively creates valid face loops for a planar subdivision if there are no edge crossings.
|
|
312961
|
+
* * If there are edge crossings, the graph can be a (highly complicated) Klein bottle topology.
|
|
312962
|
+
* * [[HalfEdgeMask.NULL_FACE]] is cleared throughout and applied within null faces.
|
|
312963
|
+
* @param graph input graph
|
|
312964
|
+
* @param outboundRadiansFunction optional function to compute the sort angle of an edge at its start vertex
|
|
312965
|
+
* @param clusterTol optional distance tolerance for clustering vertices. Default value is [[Geometry.smallMetricDistance]].
|
|
312897
312966
|
*/
|
|
312898
312967
|
static clusterAndMergeXYTheta(graph, outboundRadiansFunction, clusterTol = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
312899
312968
|
const allNodes = graph.allHalfEdges;
|
|
@@ -312951,14 +313020,11 @@ class HalfEdgeGraphMerge {
|
|
|
312951
313020
|
const unmatchedNullFaceNodes = [];
|
|
312952
313021
|
k0 = 0;
|
|
312953
313022
|
let thetaA, thetaB;
|
|
312954
|
-
// GeometryCoreTestIO.consoleLog("START VERTEX LINKS");
|
|
312955
313023
|
// now pinch each neighboring pair together
|
|
312956
313024
|
for (let k1 = 0; k1 < numK; k1++) {
|
|
312957
313025
|
if (order[k1] === _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_5__.ClusterableArray.clusterTerminator) {
|
|
312958
313026
|
// nodes identified in order[k0]..order[k1-1] are properly sorted around a vertex.
|
|
312959
313027
|
if (k1 > k0) {
|
|
312960
|
-
// const xy = clusters.getPoint2d(order[k0]);
|
|
312961
|
-
// GeometryCoreTestIO.consoleLog({ k0, k1, x: xy.x, y: xy.y });
|
|
312962
313028
|
if (k1 > k0 + 1)
|
|
312963
313029
|
this.secondarySortAroundVertex(clusters, order, allNodes, k0, k1);
|
|
312964
313030
|
this.doAnnounceVertexNeighborhood(clusters, order, allNodes, k0, k1);
|
|
@@ -337481,18 +337547,18 @@ class Settings {
|
|
|
337481
337547
|
}
|
|
337482
337548
|
}
|
|
337483
337549
|
toString() {
|
|
337484
|
-
return `Configurations:
|
|
337485
|
-
backend location: ${this.Backend.location},
|
|
337486
|
-
backend name: ${this.Backend.name},
|
|
337487
|
-
backend version: ${this.Backend.version},
|
|
337488
|
-
oidc client id: ${this.oidcClientId},
|
|
337489
|
-
oidc scopes: ${this.oidcScopes},
|
|
337490
|
-
applicationId: ${this.gprid},
|
|
337491
|
-
log level: ${this.logLevel},
|
|
337492
|
-
testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
|
|
337493
|
-
testing PresentationRpcTest: ${this.runPresentationRpcTests},
|
|
337494
|
-
testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
|
|
337495
|
-
testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
|
|
337550
|
+
return `Configurations:
|
|
337551
|
+
backend location: ${this.Backend.location},
|
|
337552
|
+
backend name: ${this.Backend.name},
|
|
337553
|
+
backend version: ${this.Backend.version},
|
|
337554
|
+
oidc client id: ${this.oidcClientId},
|
|
337555
|
+
oidc scopes: ${this.oidcScopes},
|
|
337556
|
+
applicationId: ${this.gprid},
|
|
337557
|
+
log level: ${this.logLevel},
|
|
337558
|
+
testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
|
|
337559
|
+
testing PresentationRpcTest: ${this.runPresentationRpcTests},
|
|
337560
|
+
testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
|
|
337561
|
+
testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
|
|
337496
337562
|
testing iModelWriteRpcTests: ${this.runiModelWriteRpcTests}`;
|
|
337497
337563
|
}
|
|
337498
337564
|
}
|
|
@@ -337706,7 +337772,7 @@ class TestContext {
|
|
|
337706
337772
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
337707
337773
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
337708
337774
|
await core_frontend_1.NoRenderApp.startup({
|
|
337709
|
-
applicationVersion: "5.3.0-dev.
|
|
337775
|
+
applicationVersion: "5.3.0-dev.7",
|
|
337710
337776
|
applicationId: this.settings.gprid,
|
|
337711
337777
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
337712
337778
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -343916,7 +343982,7 @@ var Key;
|
|
|
343916
343982
|
/**
|
|
343917
343983
|
* Check if the supplied key is a `NodeKey`
|
|
343918
343984
|
*
|
|
343919
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
343985
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
343920
343986
|
* package for creating hierarchies.
|
|
343921
343987
|
*/
|
|
343922
343988
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -343999,7 +344065,7 @@ class KeySet {
|
|
|
343999
344065
|
*
|
|
344000
344066
|
* **Warning**: getting node keys might be expensive for large KeySets.
|
|
344001
344067
|
*
|
|
344002
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
344068
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
344003
344069
|
* package for creating hierarchies.
|
|
344004
344070
|
*/
|
|
344005
344071
|
get nodeKeys() {
|
|
@@ -344013,7 +344079,7 @@ class KeySet {
|
|
|
344013
344079
|
/**
|
|
344014
344080
|
* Get node keys count
|
|
344015
344081
|
*
|
|
344016
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
344082
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
344017
344083
|
* package for creating hierarchies.
|
|
344018
344084
|
*/
|
|
344019
344085
|
get nodeKeysCount() {
|
|
@@ -347871,7 +347937,7 @@ const EC_js_1 = __webpack_require__(/*! ../EC.js */ "../../presentation/common/l
|
|
|
347871
347937
|
/**
|
|
347872
347938
|
* Standard node types
|
|
347873
347939
|
* @public
|
|
347874
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
347940
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
347875
347941
|
* package for creating hierarchies.
|
|
347876
347942
|
*/
|
|
347877
347943
|
var StandardNodeTypes;
|
|
@@ -347883,7 +347949,7 @@ var StandardNodeTypes;
|
|
|
347883
347949
|
})(StandardNodeTypes || (exports.StandardNodeTypes = StandardNodeTypes = {}));
|
|
347884
347950
|
/**
|
|
347885
347951
|
* @public
|
|
347886
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
347952
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
347887
347953
|
* package for creating hierarchies.
|
|
347888
347954
|
*/
|
|
347889
347955
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
@@ -348569,7 +348635,7 @@ exports.SameLabelInstanceGroupApplicationStage = exports.GroupingSpecificationTy
|
|
|
348569
348635
|
/**
|
|
348570
348636
|
* Available types of [[GroupingSpecification]].
|
|
348571
348637
|
* @public
|
|
348572
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
348638
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
348573
348639
|
* package for creating hierarchies.
|
|
348574
348640
|
*/
|
|
348575
348641
|
var GroupingSpecificationTypes;
|
|
@@ -348581,7 +348647,7 @@ var GroupingSpecificationTypes;
|
|
|
348581
348647
|
/**
|
|
348582
348648
|
* Specifies hierarchy creation stages used to apply [[SameLabelInstanceGroup]] grouping.
|
|
348583
348649
|
* @public
|
|
348584
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
348650
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
348585
348651
|
* package for creating hierarchies.
|
|
348586
348652
|
*/
|
|
348587
348653
|
var SameLabelInstanceGroupApplicationStage;
|
|
@@ -348699,7 +348765,7 @@ exports.ChildNodeSpecificationTypes = void 0;
|
|
|
348699
348765
|
/**
|
|
348700
348766
|
* Used for serializing array of [[ChildNodeSpecification]]
|
|
348701
348767
|
* @public
|
|
348702
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
348768
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
348703
348769
|
* package for creating hierarchies.
|
|
348704
348770
|
*/
|
|
348705
348771
|
var ChildNodeSpecificationTypes;
|
|
@@ -348755,7 +348821,7 @@ exports.QuerySpecificationTypes = void 0;
|
|
|
348755
348821
|
/**
|
|
348756
348822
|
* Used for serializing array of [[QuerySpecification]] to JSON.
|
|
348757
348823
|
* @public
|
|
348758
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
348824
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
348759
348825
|
* package for creating hierarchies.
|
|
348760
348826
|
*/
|
|
348761
348827
|
var QuerySpecificationTypes;
|
|
@@ -349512,7 +349578,7 @@ class PresentationManager {
|
|
|
349512
349578
|
/**
|
|
349513
349579
|
* An event raised when hierarchies created using specific ruleset change.
|
|
349514
349580
|
*
|
|
349515
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349581
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349516
349582
|
* package for creating hierarchies.
|
|
349517
349583
|
*/
|
|
349518
349584
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -349681,7 +349747,7 @@ class PresentationManager {
|
|
|
349681
349747
|
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
349682
349748
|
/**
|
|
349683
349749
|
* Returns an iterator that polls nodes asynchronously.
|
|
349684
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349750
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349685
349751
|
* package for creating hierarchies.
|
|
349686
349752
|
*/
|
|
349687
349753
|
async getNodesIterator(requestOptions) {
|
|
@@ -349710,7 +349776,7 @@ class PresentationManager {
|
|
|
349710
349776
|
}
|
|
349711
349777
|
/**
|
|
349712
349778
|
* Retrieves nodes count.
|
|
349713
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349779
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349714
349780
|
* package for creating hierarchies.
|
|
349715
349781
|
*/
|
|
349716
349782
|
async getNodesCount(requestOptions) {
|
|
@@ -349733,7 +349799,7 @@ class PresentationManager {
|
|
|
349733
349799
|
/**
|
|
349734
349800
|
* Retrieves hierarchy level descriptor.
|
|
349735
349801
|
* @public
|
|
349736
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349802
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349737
349803
|
* package for creating hierarchies.
|
|
349738
349804
|
*/
|
|
349739
349805
|
async getNodesDescriptor(requestOptions) {
|
|
@@ -349751,7 +349817,7 @@ class PresentationManager {
|
|
|
349751
349817
|
}
|
|
349752
349818
|
/**
|
|
349753
349819
|
* Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged.
|
|
349754
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349820
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349755
349821
|
* package for creating hierarchies.
|
|
349756
349822
|
*/
|
|
349757
349823
|
async getNodePaths(requestOptions) {
|
|
@@ -349763,7 +349829,7 @@ class PresentationManager {
|
|
|
349763
349829
|
}
|
|
349764
349830
|
/**
|
|
349765
349831
|
* Retrieves paths from root nodes to nodes containing filter text in their label.
|
|
349766
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349832
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
349767
349833
|
* package for creating hierarchies.
|
|
349768
349834
|
*/
|
|
349769
349835
|
async getFilteredNodePaths(requestOptions) {
|
|
@@ -362973,7 +363039,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
362973
363039
|
/***/ ((module) => {
|
|
362974
363040
|
|
|
362975
363041
|
"use strict";
|
|
362976
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.3.0-dev.
|
|
363042
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.3.0-dev.7","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers && npm run -s copy:draco","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.2.2-dev.2","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.3.4","@loaders.gl/draco":"^4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
362977
363043
|
|
|
362978
363044
|
/***/ }),
|
|
362979
363045
|
|