@itwin/rpcinterface-full-stack-tests 4.9.0-dev.17 → 4.9.0-dev.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +256 -181
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61.bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -193762,16 +193762,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193762
193762
|
/* harmony export */ });
|
|
193763
193763
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
193764
193764
|
/* harmony import */ var _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../curve/CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
193765
|
-
/* harmony import */ var
|
|
193765
|
+
/* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
|
|
193766
193766
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
193767
|
-
/* harmony import */ var
|
|
193767
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
193768
193768
|
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
193769
|
-
/* harmony import */ var
|
|
193770
|
-
/* harmony import */ var
|
|
193771
|
-
/* harmony import */ var
|
|
193772
|
-
/* harmony import */ var
|
|
193773
|
-
/* harmony import */ var
|
|
193774
|
-
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
193769
|
+
/* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
193770
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
193771
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
193772
|
+
/* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
|
|
193773
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
193775
193774
|
/*---------------------------------------------------------------------------------------------
|
|
193776
193775
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
193777
193776
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -193790,7 +193789,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193790
193789
|
|
|
193791
193790
|
|
|
193792
193791
|
|
|
193793
|
-
|
|
193794
193792
|
/**
|
|
193795
193793
|
* Annotation of a fragment, i.e. an interval of a curve.
|
|
193796
193794
|
* * The interval is marked with two pairs of numbers:
|
|
@@ -193951,11 +193949,14 @@ class DistanceIndexConstructionContext {
|
|
|
193951
193949
|
}
|
|
193952
193950
|
}
|
|
193953
193951
|
/**
|
|
193954
|
-
* `CurveChainWithDistanceIndex` is a CurvePrimitive whose fractional parameterization is proportional to true
|
|
193955
|
-
* distance along a
|
|
193952
|
+
* `CurveChainWithDistanceIndex` is a [[CurvePrimitive]] whose fractional parameterization is proportional to true
|
|
193953
|
+
* distance along a path.
|
|
193956
193954
|
* * For example if the total length of the chain is `L`, then the distance along the chain from parameters `t0`
|
|
193957
193955
|
* to `t1` is easily computed as `L*(t1-t0)`.
|
|
193958
|
-
* *
|
|
193956
|
+
* * In this way the `CurveChainWithDistanceIndex` provides a global arc length parameterization for a [[CurveChain]].
|
|
193957
|
+
* * A `CurveChainWithDistanceIndex` can be created from any [[CurveChain]], but a [[Path]] is stored internally.
|
|
193958
|
+
* * Adding a `CurveChainWithDistanceIndex` to a `CurveChain` does not preserve the distance index; instead the
|
|
193959
|
+
* internal path children are added directly to the `CurveChain`.
|
|
193959
193960
|
* @public
|
|
193960
193961
|
*/
|
|
193961
193962
|
class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__.CurvePrimitive {
|
|
@@ -193968,7 +193969,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
193968
193969
|
super();
|
|
193969
193970
|
/** String name for schema properties */
|
|
193970
193971
|
this.curvePrimitiveType = "curveChainWithDistanceIndex";
|
|
193971
|
-
this._path = path;
|
|
193972
|
+
this._path = path instanceof _Path__WEBPACK_IMPORTED_MODULE_4__.Path ? path : _Path__WEBPACK_IMPORTED_MODULE_4__.Path.create(...path.children);
|
|
193972
193973
|
this._fragments = fragments;
|
|
193973
193974
|
this._totalLength = fragments.length > 0 ? fragments[fragments.length - 1].chainDistance1 : 0;
|
|
193974
193975
|
}
|
|
@@ -193978,7 +193979,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
193978
193979
|
*/
|
|
193979
193980
|
cloneTransformed(transform) {
|
|
193980
193981
|
const c = this._path.clone();
|
|
193981
|
-
if (c
|
|
193982
|
+
if (c.tryTransformInPlace(transform))
|
|
193982
193983
|
return CurveChainWithDistanceIndex.createCapture(c);
|
|
193983
193984
|
return undefined;
|
|
193984
193985
|
}
|
|
@@ -194029,7 +194030,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194029
194030
|
const childFractionA = fragmentA.chainDistanceToAccurateChildFraction(chainDistanceA, true);
|
|
194030
194031
|
const childFractionB = fragmentB.chainDistanceToAccurateChildFraction(chainDistanceB, true);
|
|
194031
194032
|
// add a (possibly reversed) partial clone to newPath
|
|
194032
|
-
const newPath =
|
|
194033
|
+
const newPath = _Path__WEBPACK_IMPORTED_MODULE_4__.Path.create();
|
|
194033
194034
|
const addPartialChild = (childCurve, childFraction0, childFraction1, reversedClone) => {
|
|
194034
194035
|
if (childFraction0 === childFraction1)
|
|
194035
194036
|
return false;
|
|
@@ -194083,14 +194084,14 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194083
194084
|
const c = this._path.cyclicCurvePrimitive(0);
|
|
194084
194085
|
if (c)
|
|
194085
194086
|
return c.startPoint(result);
|
|
194086
|
-
return
|
|
194087
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.createZero(result);
|
|
194087
194088
|
}
|
|
194088
194089
|
/** Return the end point of of `this` curve. */
|
|
194089
194090
|
endPoint(result) {
|
|
194090
194091
|
const c = this._path.cyclicCurvePrimitive(-1);
|
|
194091
194092
|
if (c)
|
|
194092
194093
|
return c.endPoint(result);
|
|
194093
|
-
return
|
|
194094
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.createZero(result);
|
|
194094
194095
|
}
|
|
194095
194096
|
/** Add strokes to caller-supplied linestring */
|
|
194096
194097
|
emitStrokes(dest, options) {
|
|
@@ -194141,7 +194142,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194141
194142
|
* @param parentStrokeMap evolving parent map.
|
|
194142
194143
|
*/
|
|
194143
194144
|
computeAndAttachRecursiveStrokeCounts(options, parentStrokeMap) {
|
|
194144
|
-
const myMap =
|
|
194145
|
+
const myMap = _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_6__.StrokeCountMap.createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap);
|
|
194145
194146
|
for (const c of this._path.children) {
|
|
194146
194147
|
c.computeAndAttachRecursiveStrokeCounts(options, myMap);
|
|
194147
194148
|
}
|
|
@@ -194179,14 +194180,14 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194179
194180
|
return flatChain;
|
|
194180
194181
|
}
|
|
194181
194182
|
/**
|
|
194182
|
-
* Capture (not clone) a path into a new `CurveChainWithDistanceIndex
|
|
194183
|
-
* @param path
|
|
194183
|
+
* Capture (not clone) a path into a new `CurveChainWithDistanceIndex`.
|
|
194184
|
+
* @param path chain to be CAPTURED (not cloned)
|
|
194185
|
+
* @param options how finely to stroke the path to create the distance index
|
|
194184
194186
|
*/
|
|
194185
194187
|
static createCapture(path, options) {
|
|
194186
194188
|
path = this.flattenNestedChains(path); // nested chains not allowed
|
|
194187
194189
|
const fragments = DistanceIndexConstructionContext.createPathFragmentIndex(path, options);
|
|
194188
|
-
|
|
194189
|
-
return result;
|
|
194190
|
+
return new CurveChainWithDistanceIndex(path, fragments);
|
|
194190
194191
|
}
|
|
194191
194192
|
/**
|
|
194192
194193
|
* Return the PathFragment object at the given `distance` along the chain.
|
|
@@ -194393,7 +194394,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194393
194394
|
const fragmentB = this.chainDistanceToFragment(distanceB, true);
|
|
194394
194395
|
const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result?.childDetail); // local detail related to the child curve
|
|
194395
194396
|
const endFraction = startFraction + (signedDistance / this._totalLength);
|
|
194396
|
-
const chainDetail =
|
|
194397
|
+
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__.CurveLocationDetail.createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result); // global detail related to the curve chain
|
|
194397
194398
|
chainDetail.childDetail = childDetail;
|
|
194398
194399
|
return chainDetail;
|
|
194399
194400
|
}
|
|
@@ -194438,12 +194439,12 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194438
194439
|
else {
|
|
194439
194440
|
const sortedFragments = PathFragment.collectSortedQuickMinDistances(this._fragments, spacePoint);
|
|
194440
194441
|
const extend0 = [
|
|
194441
|
-
|
|
194442
|
-
|
|
194442
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0),
|
|
194443
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__.CurveExtendMode.None,
|
|
194443
194444
|
];
|
|
194444
194445
|
const extend1 = [
|
|
194445
|
-
|
|
194446
|
-
|
|
194446
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__.CurveExtendMode.None,
|
|
194447
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1),
|
|
194447
194448
|
];
|
|
194448
194449
|
const fragment0 = this._fragments[0];
|
|
194449
194450
|
const fragment1 = this._fragments[this._fragments.length - 1];
|
|
@@ -194476,7 +194477,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194476
194477
|
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve) or offset options object.
|
|
194477
194478
|
*/
|
|
194478
194479
|
constructOffsetXY(offsetDistanceOrOptions) {
|
|
194479
|
-
const options =
|
|
194480
|
+
const options = _OffsetOptions__WEBPACK_IMPORTED_MODULE_9__.OffsetOptions.create(offsetDistanceOrOptions);
|
|
194480
194481
|
const offsets = [];
|
|
194481
194482
|
for (const prim of this.collectCurvePrimitives(undefined, true, true)) {
|
|
194482
194483
|
const offset = prim.constructOffsetXY(options);
|
|
@@ -194498,7 +194499,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194498
194499
|
* end of the ray.
|
|
194499
194500
|
*/
|
|
194500
194501
|
projectedParameterRange(ray, lowHigh) {
|
|
194501
|
-
return
|
|
194502
|
+
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_10__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
194502
194503
|
}
|
|
194503
194504
|
/**
|
|
194504
194505
|
* Compute the global chain detail corresponding to a local child detail.
|
|
@@ -194512,7 +194513,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194512
194513
|
if (fragment) {
|
|
194513
194514
|
const chainDistance = fragment.childFractionToChainDistance(childDetail.fraction);
|
|
194514
194515
|
const chainFraction = this.chainDistanceToChainFraction(chainDistance);
|
|
194515
|
-
const chainDetail =
|
|
194516
|
+
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__.CurveLocationDetail.createCurveFractionPoint(this, chainFraction, childDetail.point);
|
|
194516
194517
|
chainDetail.childDetail = childDetail;
|
|
194517
194518
|
chainDetail.a = childDetail.a;
|
|
194518
194519
|
return chainDetail;
|
|
@@ -194546,7 +194547,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
194546
194547
|
}
|
|
194547
194548
|
}
|
|
194548
194549
|
if (compressAdjacent)
|
|
194549
|
-
pairs =
|
|
194550
|
+
pairs = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__.CurveLocationDetailPair.removeAdjacentDuplicates(pairs, index0);
|
|
194550
194551
|
return pairs;
|
|
194551
194552
|
}
|
|
194552
194553
|
}
|
|
@@ -195020,6 +195021,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
195020
195021
|
class CurveCurve {
|
|
195021
195022
|
/**
|
|
195022
195023
|
* Return xy intersections of 2 curves.
|
|
195024
|
+
* * Curves can be extended if extend flags are set. B-splines are not extended even if the flag is set.
|
|
195023
195025
|
* @param curveA first curve
|
|
195024
195026
|
* @param extendA true to allow curveA to extend
|
|
195025
195027
|
* @param curveB second curve
|
|
@@ -195031,6 +195033,7 @@ class CurveCurve {
|
|
|
195031
195033
|
}
|
|
195032
195034
|
/**
|
|
195033
195035
|
* Return xy intersections of 2 projected curves.
|
|
195036
|
+
* * Curves can be extended if extend flags are set. B-splines are not extended even if the flag is set.
|
|
195034
195037
|
* @param worldToLocal transform (possibly perspective) defining the local coordinates in which to compute xy intersections
|
|
195035
195038
|
* @param curveA first curve
|
|
195036
195039
|
* @param extendA true to allow curveA to extend
|
|
@@ -195044,15 +195047,15 @@ class CurveCurve {
|
|
|
195044
195047
|
return handler.grabPairedResults();
|
|
195045
195048
|
}
|
|
195046
195049
|
/**
|
|
195047
|
-
|
|
195048
|
-
|
|
195049
|
-
|
|
195050
|
-
|
|
195051
|
-
|
|
195052
|
-
|
|
195053
|
-
|
|
195054
|
-
|
|
195055
|
-
|
|
195050
|
+
* Return full 3d xyz intersections of 2 curves.
|
|
195051
|
+
* * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.
|
|
195052
|
+
* * Not Implemented for bspline and bezier curves.
|
|
195053
|
+
* @param curveA first curve
|
|
195054
|
+
* @param extendA true to allow curveA to extend
|
|
195055
|
+
* @param curveB second curve
|
|
195056
|
+
* @param extendB true to allow curveB to extend
|
|
195057
|
+
* @returns array of intersections structured as CurveLocationDetailPair[]
|
|
195058
|
+
*/
|
|
195056
195059
|
static intersectionXYZPairs(curveA, extendA, curveB, extendB) {
|
|
195057
195060
|
const handler = new _internalContexts_CurveCurveIntersectXYZ__WEBPACK_IMPORTED_MODULE_2__.CurveCurveIntersectXYZ(extendA, curveB, extendB);
|
|
195058
195061
|
curveA.dispatchToGeometryHandler(handler);
|
|
@@ -195482,9 +195485,10 @@ class CurveFactory {
|
|
|
195482
195485
|
/**
|
|
195483
195486
|
* If `arcB` is a continuation of `arcA`, extend `arcA` (in place) to include the range of `arcB`
|
|
195484
195487
|
* * This only succeeds if the two arcs are part of identical complete arcs and end of `arcA` matches the beginning of `arcB`.
|
|
195485
|
-
*
|
|
195486
|
-
* @param
|
|
195487
|
-
* @param
|
|
195488
|
+
* @param arcA first arc, modified in place
|
|
195489
|
+
* @param arcB second arc, unmodified
|
|
195490
|
+
* @param allowReversed whether to consolidate even when second arc is reversed
|
|
195491
|
+
* @returns whether `arcA` was modified
|
|
195488
195492
|
*/
|
|
195489
195493
|
static appendToArcInPlace(arcA, arcB, allowReverse = false) {
|
|
195490
195494
|
if (arcA.center.isAlmostEqual(arcB.center)) {
|
|
@@ -198872,11 +198876,13 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePri
|
|
|
198872
198876
|
quickLength() { return this.curveLength(); }
|
|
198873
198877
|
/**
|
|
198874
198878
|
* Compute and normalize cross product among 3 points on the linestring.
|
|
198875
|
-
* *
|
|
198876
|
-
* * This is appropriate for polygon known to be convex.
|
|
198877
|
-
* *
|
|
198878
|
-
* * If
|
|
198879
|
-
*
|
|
198879
|
+
* * Essentially 3 random points are used to form the cross product.
|
|
198880
|
+
* * This is appropriate for a polygon known to be convex.
|
|
198881
|
+
* * No test for convexity or collinearity is performed.
|
|
198882
|
+
* * If the polygon is not convex, the returned normal may be reversed.
|
|
198883
|
+
* * If the random points used in the cross product are collinear, undefined is returned.
|
|
198884
|
+
* @param result pre-allocated object to populate and return
|
|
198885
|
+
* @returns unit normal, or undefined if normalization failed
|
|
198880
198886
|
*/
|
|
198881
198887
|
quickUnitNormal(result) {
|
|
198882
198888
|
let step = Math.floor(this._points.length / 3);
|
|
@@ -199561,14 +199567,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
199561
199567
|
/* harmony export */ "Loop": () => (/* binding */ Loop),
|
|
199562
199568
|
/* harmony export */ "LoopCurveLoopCurve": () => (/* binding */ LoopCurveLoopCurve)
|
|
199563
199569
|
/* harmony export */ });
|
|
199570
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
199564
199571
|
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
199565
|
-
/* harmony import */ var
|
|
199572
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
199566
199573
|
/*---------------------------------------------------------------------------------------------
|
|
199567
199574
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
199568
199575
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
199569
199576
|
*--------------------------------------------------------------------------------------------*/
|
|
199570
199577
|
|
|
199571
199578
|
|
|
199579
|
+
|
|
199572
199580
|
/**
|
|
199573
199581
|
* A `Loop` is a curve chain that is the boundary of a closed (planar) loop.
|
|
199574
199582
|
* @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.
|
|
@@ -199594,7 +199602,10 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
199594
199602
|
static create(...curves) {
|
|
199595
199603
|
const result = new Loop();
|
|
199596
199604
|
for (const curve of curves) {
|
|
199597
|
-
|
|
199605
|
+
if (curve instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_1__.CurveChainWithDistanceIndex)
|
|
199606
|
+
result.children.push(...curve.path.children);
|
|
199607
|
+
else
|
|
199608
|
+
result.children.push(curve);
|
|
199598
199609
|
}
|
|
199599
199610
|
return result;
|
|
199600
199611
|
}
|
|
@@ -199603,21 +199614,17 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
199603
199614
|
* @param curves array of individual curve primitives
|
|
199604
199615
|
*/
|
|
199605
199616
|
static createArray(curves) {
|
|
199606
|
-
|
|
199607
|
-
for (const curve of curves) {
|
|
199608
|
-
result.children.push(curve);
|
|
199609
|
-
}
|
|
199610
|
-
return result;
|
|
199617
|
+
return this.create(...curves);
|
|
199611
199618
|
}
|
|
199612
199619
|
/** Create a loop from an array of points */
|
|
199613
199620
|
static createPolygon(points) {
|
|
199614
|
-
const linestring =
|
|
199621
|
+
const linestring = _LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create(points);
|
|
199615
199622
|
linestring.addClosurePoint();
|
|
199616
199623
|
return Loop.create(linestring);
|
|
199617
199624
|
}
|
|
199618
199625
|
/** Create a loop with the stroked form of this loop. */
|
|
199619
199626
|
cloneStroked(options) {
|
|
199620
|
-
const strokes =
|
|
199627
|
+
const strokes = _LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create();
|
|
199621
199628
|
for (const curve of this.children)
|
|
199622
199629
|
curve.emitStrokes(strokes, options);
|
|
199623
199630
|
// eliminate near-duplicate points between children
|
|
@@ -200003,10 +200010,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
200003
200010
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
200004
200011
|
/* harmony export */ "Path": () => (/* binding */ Path)
|
|
200005
200012
|
/* harmony export */ });
|
|
200006
|
-
/* harmony import */ var
|
|
200013
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
200014
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
200007
200015
|
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
200008
|
-
/* harmony import */ var
|
|
200009
|
-
/* harmony import */ var
|
|
200016
|
+
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
200017
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
200010
200018
|
/*---------------------------------------------------------------------------------------------
|
|
200011
200019
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
200012
200020
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -200015,6 +200023,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
200015
200023
|
|
|
200016
200024
|
|
|
200017
200025
|
|
|
200026
|
+
|
|
200018
200027
|
/**
|
|
200019
200028
|
* * A `Path` object is a collection of curves that join head-to-tail to form a path.
|
|
200020
200029
|
* * A `Path` object does not bound a planar region. Use `Loop` to indicate region bounding.
|
|
@@ -200044,10 +200053,12 @@ class Path extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
200044
200053
|
static create(...curves) {
|
|
200045
200054
|
const result = new Path();
|
|
200046
200055
|
for (const curve of curves) {
|
|
200047
|
-
if (curve instanceof
|
|
200056
|
+
if (curve instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_1__.CurveChainWithDistanceIndex)
|
|
200057
|
+
result.children.push(...curve.path.children);
|
|
200058
|
+
else if (curve instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__.CurvePrimitive)
|
|
200048
200059
|
result.children.push(curve);
|
|
200049
|
-
else if (Array.isArray(curve) && curve.length > 0 && curve[0] instanceof
|
|
200050
|
-
result.children.push(
|
|
200060
|
+
else if (Array.isArray(curve) && curve.length > 0 && curve[0] instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d) {
|
|
200061
|
+
result.children.push(_LineString3d__WEBPACK_IMPORTED_MODULE_4__.LineString3d.create(curve));
|
|
200051
200062
|
}
|
|
200052
200063
|
}
|
|
200053
200064
|
return result;
|
|
@@ -200057,15 +200068,11 @@ class Path extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
200057
200068
|
* @param curves array of individual curve primitives.
|
|
200058
200069
|
*/
|
|
200059
200070
|
static createArray(curves) {
|
|
200060
|
-
|
|
200061
|
-
for (const curve of curves) {
|
|
200062
|
-
result.children.push(curve);
|
|
200063
|
-
}
|
|
200064
|
-
return result;
|
|
200071
|
+
return this.create(...curves);
|
|
200065
200072
|
}
|
|
200066
200073
|
/** Return a deep copy, with leaf-level curve primitives stroked. */
|
|
200067
200074
|
cloneStroked(options) {
|
|
200068
|
-
const strokes =
|
|
200075
|
+
const strokes = _LineString3d__WEBPACK_IMPORTED_MODULE_4__.LineString3d.create();
|
|
200069
200076
|
for (const curve of this.children)
|
|
200070
200077
|
curve.emitStrokes(strokes, options);
|
|
200071
200078
|
return Path.create(strokes);
|
|
@@ -200480,12 +200487,11 @@ class ConsolidateAdjacentCurvePrimitivesContext extends _geometry3d_GeometryHand
|
|
|
200480
200487
|
}
|
|
200481
200488
|
}
|
|
200482
200489
|
if (points.length > 1) {
|
|
200483
|
-
const
|
|
200484
|
-
const
|
|
200485
|
-
const compressedPointsB = _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__.PolylineOps.compressByPerpendicularDistance(compressedPointsA, tolerance);
|
|
200490
|
+
const compressedPointsA = _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__.PolylineOps.compressShortEdges(points, this._options.duplicatePointTolerance);
|
|
200491
|
+
const compressedPointsB = _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__.PolylineOps.compressByPerpendicularDistance(compressedPointsA, this._options.colinearPointTolerance);
|
|
200486
200492
|
if (i0 === 0 && i1 === numOriginal) {
|
|
200487
200493
|
// points is the entire curve, and the curve is closed. Maybe the first and last segments are colinear.
|
|
200488
|
-
_geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_5__.PolylineCompressionContext.compressColinearWrapInPlace(compressedPointsB,
|
|
200494
|
+
_geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_5__.PolylineCompressionContext.compressColinearWrapInPlace(compressedPointsB, this._options.duplicatePointTolerance, this._options.colinearPointTolerance);
|
|
200489
200495
|
}
|
|
200490
200496
|
if (compressedPointsB.length < 2) {
|
|
200491
200497
|
// Collapsed to a point? Make a single point linestring
|
|
@@ -202874,9 +202880,9 @@ function pushToInOnOutArrays(curve, select, arrayNegative, array0, arrayPositive
|
|
|
202874
202880
|
*/
|
|
202875
202881
|
class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
202876
202882
|
constructor() {
|
|
202877
|
-
/** True to
|
|
202883
|
+
/** True to consolidate adjacent linear geometry into a single LineString3d */
|
|
202878
202884
|
this.consolidateLinearGeometry = true;
|
|
202879
|
-
/** True to consolidate contiguous arcs */
|
|
202885
|
+
/** True to consolidate contiguous compatible arcs into a single Arc3d */
|
|
202880
202886
|
this.consolidateCompatibleArcs = true;
|
|
202881
202887
|
/** Tolerance for collapsing identical points */
|
|
202882
202888
|
this.duplicatePointTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance;
|
|
@@ -205540,24 +205546,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
205540
205546
|
/* harmony export */ "CurveCurveIntersectXY": () => (/* binding */ CurveCurveIntersectXY)
|
|
205541
205547
|
/* harmony export */ });
|
|
205542
205548
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
205543
|
-
/* harmony import */ var
|
|
205549
|
+
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
205544
205550
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
205545
205551
|
/* harmony import */ var _geometry3d_CoincidentGeometryOps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geometry3d/CoincidentGeometryOps */ "../../core/geometry/lib/esm/geometry3d/CoincidentGeometryOps.js");
|
|
205546
205552
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
205547
205553
|
/* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
|
|
205548
205554
|
/* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
|
|
205549
|
-
/* harmony import */ var
|
|
205550
|
-
/* harmony import */ var
|
|
205555
|
+
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
205556
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
205551
205557
|
/* harmony import */ var _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../geometry4d/Point4d */ "../../core/geometry/lib/esm/geometry4d/Point4d.js");
|
|
205552
205558
|
/* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
|
|
205553
205559
|
/* harmony import */ var _numerics_Newton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../numerics/Newton */ "../../core/geometry/lib/esm/numerics/Newton.js");
|
|
205554
205560
|
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
205555
|
-
/* harmony import */ var
|
|
205556
|
-
/* harmony import */ var
|
|
205561
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
205562
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
205557
205563
|
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
205558
205564
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
205559
|
-
/* harmony import */ var
|
|
205560
|
-
/* harmony import */ var
|
|
205565
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
205566
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
205567
|
+
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
205568
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
205561
205569
|
/*---------------------------------------------------------------------------------------------
|
|
205562
205570
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
205563
205571
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -205583,6 +205591,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
205583
205591
|
|
|
205584
205592
|
|
|
205585
205593
|
|
|
205594
|
+
|
|
205595
|
+
|
|
205586
205596
|
|
|
205587
205597
|
// cspell:word XYRR
|
|
205588
205598
|
/**
|
|
@@ -205602,9 +205612,11 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
205602
205612
|
*/
|
|
205603
205613
|
constructor(worldToLocal, extendA, geometryB, extendB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
205604
205614
|
super();
|
|
205605
|
-
this.
|
|
205615
|
+
this._extendA0 = extendA;
|
|
205616
|
+
this._extendA1 = extendA;
|
|
205606
205617
|
this._geometryB = geometryB;
|
|
205607
|
-
this.
|
|
205618
|
+
this._extendB0 = extendB;
|
|
205619
|
+
this._extendB1 = extendB;
|
|
205608
205620
|
this._worldToLocalPerspective = undefined;
|
|
205609
205621
|
this._worldToLocalAffine = undefined;
|
|
205610
205622
|
if (worldToLocal !== undefined && !worldToLocal.isIdentity()) {
|
|
@@ -205806,7 +205818,11 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
205806
205818
|
const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
205807
205819
|
for (let i = 0; i < numRoots; i++) {
|
|
205808
205820
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
205809
|
-
|
|
205821
|
+
let arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
|
|
205822
|
+
if (extendB0 && arcFraction > 1)
|
|
205823
|
+
arcFraction -= 2;
|
|
205824
|
+
else if (extendB1 && arcFraction < 0)
|
|
205825
|
+
arcFraction += 2;
|
|
205810
205826
|
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, arcPoint);
|
|
205811
205827
|
if (lineFraction !== undefined &&
|
|
205812
205828
|
this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
@@ -205834,7 +205850,11 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
205834
205850
|
const arcFractionTol = 1.0e-7;
|
|
205835
205851
|
for (let i = 0; i < numRoots; i++) {
|
|
205836
205852
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
205837
|
-
|
|
205853
|
+
let arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
|
|
205854
|
+
if (extendB0 && arcFraction > 1)
|
|
205855
|
+
arcFraction -= 2;
|
|
205856
|
+
else if (extendB1 && arcFraction < 0)
|
|
205857
|
+
arcFraction += 2;
|
|
205838
205858
|
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
205839
205859
|
if (lineFraction !== undefined &&
|
|
205840
205860
|
this.acceptFraction(extendA0, lineFraction, extendA1, lineFractionTol) &&
|
|
@@ -205850,7 +205870,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
205850
205870
|
* * Arcs are ordered so that matrixA is better conditioned.
|
|
205851
205871
|
*/
|
|
205852
205872
|
dispatchArcArcThisOrder(cpA, // arc closer to being circular
|
|
205853
|
-
matrixA,
|
|
205873
|
+
matrixA, extendA0, extendA1, cpB, matrixB, extendB0, extendB1, reversed) {
|
|
205854
205874
|
// inverseA transforms arcA to its local coordinates, where it is the unit xy-circle.
|
|
205855
205875
|
const inverseA = matrixA.inverse();
|
|
205856
205876
|
if (inverseA) {
|
|
@@ -205865,11 +205885,18 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
205865
205885
|
ellipseRadians, circleRadians);
|
|
205866
205886
|
// the intersections are transform-invariant, so the solution angles apply directly to the input arcs
|
|
205867
205887
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
205868
|
-
|
|
205869
|
-
|
|
205870
|
-
if (
|
|
205888
|
+
let fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);
|
|
205889
|
+
let fractionB = cpB.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
|
|
205890
|
+
if (extendA0 && fractionA > 1)
|
|
205891
|
+
fractionA -= 2;
|
|
205892
|
+
else if (extendA1 && fractionA < 0)
|
|
205893
|
+
fractionA += 2;
|
|
205894
|
+
if (extendB0 && fractionB > 1)
|
|
205895
|
+
fractionB -= 2;
|
|
205896
|
+
else if (extendB1 && fractionB < 0)
|
|
205897
|
+
fractionB += 2;
|
|
205898
|
+
if (this.acceptFraction(extendA0, fractionA, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1))
|
|
205871
205899
|
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
205872
|
-
}
|
|
205873
205900
|
}
|
|
205874
205901
|
}
|
|
205875
205902
|
}
|
|
@@ -205881,7 +205908,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
205881
205908
|
* 4- Find the intersection of arc and unit circle.
|
|
205882
205909
|
* 5- Convert intersection angles to fractions and record intersections.
|
|
205883
205910
|
*/
|
|
205884
|
-
dispatchArcArc(cpA,
|
|
205911
|
+
dispatchArcArc(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
205885
205912
|
let matrixA;
|
|
205886
205913
|
let matrixB;
|
|
205887
205914
|
if (this._worldToLocalPerspective) {
|
|
@@ -205900,9 +205927,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
205900
205927
|
const conditionB = matrixB.conditionNumber();
|
|
205901
205928
|
// pick the arc that is closest to circular.
|
|
205902
205929
|
if (conditionA > conditionB)
|
|
205903
|
-
this.dispatchArcArcThisOrder(cpA, matrixA,
|
|
205930
|
+
this.dispatchArcArcThisOrder(cpA, matrixA, extendA0, extendA1, cpB, matrixB, extendB0, extendB1, reversed);
|
|
205904
205931
|
else
|
|
205905
|
-
this.dispatchArcArcThisOrder(cpB, matrixB,
|
|
205932
|
+
this.dispatchArcArcThisOrder(cpB, matrixB, extendB0, extendB1, cpA, matrixA, extendA0, extendA1, !reversed);
|
|
205906
205933
|
// overlap handling. perspective is not handled.
|
|
205907
205934
|
if (!this._coincidentGeometryContext) {
|
|
205908
205935
|
// do nothing
|
|
@@ -205919,7 +205946,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
205919
205946
|
this.recordPairs(cpA, cpB, pairs, reversed);
|
|
205920
205947
|
}
|
|
205921
205948
|
}
|
|
205922
|
-
dispatchArcBsplineCurve3d(cpA,
|
|
205949
|
+
dispatchArcBsplineCurve3d(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
205923
205950
|
// Arc: X = C + cU + sV
|
|
205924
205951
|
// implicitize the arc as viewed. This "3d" matrix is homogeneous "XYW" not "xyz"
|
|
205925
205952
|
let matrixA;
|
|
@@ -205978,11 +206005,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
205978
206005
|
const bcurvePoint4d = bezier.fractionToPoint4d(root);
|
|
205979
206006
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
205980
206007
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
205981
|
-
|
|
205982
|
-
if (
|
|
205983
|
-
|
|
206008
|
+
let arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
206009
|
+
if (extendA0 && arcFraction > 1)
|
|
206010
|
+
arcFraction -= 2;
|
|
206011
|
+
else if (extendA1 && arcFraction < 0)
|
|
206012
|
+
arcFraction += 2;
|
|
206013
|
+
if (this.acceptFraction(extendA0, arcFraction, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1))
|
|
205984
206014
|
this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
205985
|
-
}
|
|
205986
206015
|
}
|
|
205987
206016
|
}
|
|
205988
206017
|
}
|
|
@@ -206131,7 +206160,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206131
206160
|
// Caller accesses data from segment and bsplineCurve.
|
|
206132
206161
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
206133
206162
|
// Solves the arc-arc equations.
|
|
206134
|
-
dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve,
|
|
206163
|
+
dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve, extendB0, extendB1, reversed) {
|
|
206135
206164
|
const pointA0H = this.projectPoint(pointA0);
|
|
206136
206165
|
const pointA1H = this.projectPoint(pointA1);
|
|
206137
206166
|
const planeCoffs = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.createPlanePointPointZ(pointA0H, pointA1H);
|
|
@@ -206148,14 +206177,14 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206148
206177
|
const curvePointH = this.projectPoint(curvePoint);
|
|
206149
206178
|
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
|
|
206150
206179
|
if (lineFraction !== undefined) {
|
|
206151
|
-
if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(
|
|
206180
|
+
if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1)) {
|
|
206152
206181
|
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed);
|
|
206153
206182
|
}
|
|
206154
206183
|
}
|
|
206155
206184
|
}
|
|
206156
206185
|
}
|
|
206157
206186
|
/** Low level dispatch of linestring with (beziers of) a bspline curve. */
|
|
206158
|
-
dispatchLineStringBSplineCurve(lsA,
|
|
206187
|
+
dispatchLineStringBSplineCurve(lsA, extendA0, extendA1, curveB, extendB0, extendB1, reversed) {
|
|
206159
206188
|
const numA = lsA.numPoints();
|
|
206160
206189
|
if (numA > 1) {
|
|
206161
206190
|
const dfA = 1.0 / (numA - 1);
|
|
@@ -206168,13 +206197,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206168
206197
|
for (let iA = 1; iA < numA; iA++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
206169
206198
|
lsA.pointAt(iA, pointA1);
|
|
206170
206199
|
fA1 = iA * dfA;
|
|
206171
|
-
this.dispatchSegmentBsplineCurve(lsA, iA === 1 &&
|
|
206200
|
+
this.dispatchSegmentBsplineCurve(lsA, iA === 1 && extendA0, pointA0, fA0, pointA1, fA1, (iA + 1) === numA && extendA1, curveB, extendB0, extendB1, reversed);
|
|
206172
206201
|
}
|
|
206173
206202
|
}
|
|
206174
206203
|
return undefined;
|
|
206175
206204
|
}
|
|
206176
206205
|
/** Detail computation for segment intersecting linestring. */
|
|
206177
|
-
computeSegmentLineString(lsA,
|
|
206206
|
+
computeSegmentLineString(lsA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
|
|
206178
206207
|
const pointA0 = lsA.point0Ref;
|
|
206179
206208
|
const pointA1 = lsA.point1Ref;
|
|
206180
206209
|
const pointB0 = CurveCurveIntersectXY._workPointBB0;
|
|
@@ -206189,13 +206218,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206189
206218
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
206190
206219
|
lsB.pointAt(ib, pointB1);
|
|
206191
206220
|
fB1 = ib * dfB;
|
|
206192
|
-
this.dispatchSegmentSegment(lsA,
|
|
206221
|
+
this.dispatchSegmentSegment(lsA, extendA0, pointA0, 0.0, pointA1, 1.0, extendA1, lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, reversed);
|
|
206193
206222
|
}
|
|
206194
206223
|
}
|
|
206195
206224
|
return undefined;
|
|
206196
206225
|
}
|
|
206197
206226
|
/** Detail computation for arc intersecting linestring. */
|
|
206198
|
-
computeArcLineString(arcA,
|
|
206227
|
+
computeArcLineString(arcA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
|
|
206199
206228
|
const pointB0 = CurveCurveIntersectXY._workPointBB0;
|
|
206200
206229
|
const pointB1 = CurveCurveIntersectXY._workPointBB1;
|
|
206201
206230
|
const numB = lsB.numPoints();
|
|
@@ -206208,7 +206237,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206208
206237
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
206209
206238
|
lsB.pointAt(ib, pointB1);
|
|
206210
206239
|
fB1 = ib * dfB;
|
|
206211
|
-
this.dispatchSegmentArc(lsB, ib === 1 &&
|
|
206240
|
+
this.dispatchSegmentArc(lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, arcA, extendA0, extendA1, !reversed);
|
|
206212
206241
|
}
|
|
206213
206242
|
}
|
|
206214
206243
|
return undefined;
|
|
@@ -206229,8 +206258,10 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206229
206258
|
let fB0;
|
|
206230
206259
|
let fA1;
|
|
206231
206260
|
let fB1;
|
|
206232
|
-
const
|
|
206233
|
-
const
|
|
206261
|
+
const extendA0 = this._extendA0;
|
|
206262
|
+
const extendA1 = this._extendA1;
|
|
206263
|
+
const extendB0 = this._extendB0;
|
|
206264
|
+
const extendB1 = this._extendB1;
|
|
206234
206265
|
lsA.pointAt(0, pointA0);
|
|
206235
206266
|
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
206236
206267
|
fA1 = ia * dfA;
|
|
@@ -206240,7 +206271,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206240
206271
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
206241
206272
|
lsB.pointAt(ib, pointB1);
|
|
206242
206273
|
fB1 = ib * dfB;
|
|
206243
|
-
this.dispatchSegmentSegment(lsA, ia === 1 &&
|
|
206274
|
+
this.dispatchSegmentSegment(lsA, ia === 1 && extendA0, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA1, lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, reversed);
|
|
206244
206275
|
}
|
|
206245
206276
|
}
|
|
206246
206277
|
}
|
|
@@ -206251,120 +206282,172 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206251
206282
|
transform.multiplyPoint3d(pointB0, this._workPointB0);
|
|
206252
206283
|
transform.multiplyPoint3d(pointB1, this._workPointB1);
|
|
206253
206284
|
}
|
|
206254
|
-
/**
|
|
206285
|
+
/**
|
|
206286
|
+
* Low level dispatch of curve collection.
|
|
206287
|
+
* We take care of extend variables of geometry's children here if geometry is Path or Loop.
|
|
206288
|
+
*/
|
|
206255
206289
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
206256
206290
|
const geomB = this._geometryB; // save
|
|
206257
206291
|
if (!geomB || !geomB.children || !(geomB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection))
|
|
206258
206292
|
return;
|
|
206259
|
-
|
|
206260
|
-
|
|
206293
|
+
const children = geomB.children;
|
|
206294
|
+
const extendB0 = this._extendB0; // save
|
|
206295
|
+
const extendB1 = this._extendB1; // save
|
|
206296
|
+
for (let i = 0; i < children.length; i++) {
|
|
206297
|
+
this.resetGeometry(children[i]);
|
|
206298
|
+
if (geomB instanceof _Path__WEBPACK_IMPORTED_MODULE_12__.Path) {
|
|
206299
|
+
if (i === 0) // first child only extends from start
|
|
206300
|
+
this._extendB1 = false;
|
|
206301
|
+
else if (i === children.length - 1) // last child only extends from end
|
|
206302
|
+
this._extendB0 = false;
|
|
206303
|
+
else { // middle children do not extend
|
|
206304
|
+
this._extendB0 = false;
|
|
206305
|
+
this._extendB1 = false;
|
|
206306
|
+
}
|
|
206307
|
+
}
|
|
206308
|
+
else if (geomB instanceof _Loop__WEBPACK_IMPORTED_MODULE_13__.Loop) { // Loop never extends
|
|
206309
|
+
this._extendB0 = false;
|
|
206310
|
+
this._extendB1 = false;
|
|
206311
|
+
}
|
|
206261
206312
|
geomAHandler(geomA);
|
|
206313
|
+
this._extendB0 = extendB0; // restore
|
|
206314
|
+
this._extendB1 = extendB1; // restore
|
|
206262
206315
|
}
|
|
206263
|
-
this.
|
|
206316
|
+
this.resetGeometry(geomB); // restore
|
|
206264
206317
|
}
|
|
206265
|
-
/**
|
|
206318
|
+
/**
|
|
206319
|
+
* Low level dispatch of CurveChainWithDistanceIndex.
|
|
206320
|
+
* We take care of extend variables of geometry's children here if geometry.path is Path or Loop.
|
|
206321
|
+
*/
|
|
206266
206322
|
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
206267
|
-
if (!this._geometryB || !(this._geometryB instanceof
|
|
206323
|
+
if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex))
|
|
206268
206324
|
return;
|
|
206269
|
-
if (geomA instanceof
|
|
206325
|
+
if (geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
206270
206326
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!"call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
206271
206327
|
return;
|
|
206272
206328
|
}
|
|
206273
206329
|
const index0 = this._results.length;
|
|
206274
206330
|
const geomB = this._geometryB; // save
|
|
206275
|
-
|
|
206276
|
-
|
|
206277
|
-
geomAHandler(geomA);
|
|
206278
|
-
}
|
|
206331
|
+
this.resetGeometry(geomB.path);
|
|
206332
|
+
this.dispatchCurveCollection(geomA, geomAHandler);
|
|
206279
206333
|
this.resetGeometry(geomB); // restore
|
|
206280
|
-
this._results =
|
|
206334
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
206335
|
+
}
|
|
206336
|
+
/**
|
|
206337
|
+
* Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children`.
|
|
206338
|
+
* We take care of extend variables of geometry's children here if geometry is Path or Loop.
|
|
206339
|
+
*/
|
|
206340
|
+
handleChildren(g) {
|
|
206341
|
+
const children = g.children;
|
|
206342
|
+
const extendA0 = this._extendA0; // save
|
|
206343
|
+
const extendA1 = this._extendA1; // save
|
|
206344
|
+
if (children)
|
|
206345
|
+
for (let i = 0; i < children.length; i++) {
|
|
206346
|
+
if (g instanceof _Path__WEBPACK_IMPORTED_MODULE_12__.Path) {
|
|
206347
|
+
if (i === 0) // first child only extends from start
|
|
206348
|
+
this._extendA1 = false;
|
|
206349
|
+
else if (i === children.length - 1) // last child only extends from end
|
|
206350
|
+
this._extendA0 = false;
|
|
206351
|
+
else { // middle children do not extend
|
|
206352
|
+
this._extendA0 = false;
|
|
206353
|
+
this._extendA1 = false;
|
|
206354
|
+
}
|
|
206355
|
+
}
|
|
206356
|
+
else if (g instanceof _Loop__WEBPACK_IMPORTED_MODULE_13__.Loop) { // Loop never extends
|
|
206357
|
+
this._extendA0 = false;
|
|
206358
|
+
this._extendA1 = false;
|
|
206359
|
+
}
|
|
206360
|
+
children[i].dispatchToGeometryHandler(this);
|
|
206361
|
+
this._extendA0 = extendA0; // restore
|
|
206362
|
+
this._extendA1 = extendA1; // restore
|
|
206363
|
+
}
|
|
206281
206364
|
}
|
|
206282
206365
|
/** Double dispatch handler for strongly typed segment. */
|
|
206283
206366
|
handleLineSegment3d(segmentA) {
|
|
206284
|
-
if (this._geometryB instanceof
|
|
206367
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d) {
|
|
206285
206368
|
const segmentB = this._geometryB;
|
|
206286
|
-
this.dispatchSegmentSegment(segmentA, this.
|
|
206369
|
+
this.dispatchSegmentSegment(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, segmentB, this._extendB0, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, this._extendB1, false);
|
|
206287
206370
|
}
|
|
206288
|
-
else if (this._geometryB instanceof
|
|
206289
|
-
this.computeSegmentLineString(segmentA, this.
|
|
206371
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
|
|
206372
|
+
this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
206290
206373
|
}
|
|
206291
|
-
else if (this._geometryB instanceof
|
|
206292
|
-
this.dispatchSegmentArc(segmentA, this.
|
|
206374
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_17__.Arc3d) {
|
|
206375
|
+
this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
206293
206376
|
}
|
|
206294
|
-
else if (this._geometryB instanceof
|
|
206295
|
-
this.dispatchSegmentBsplineCurve(segmentA, this.
|
|
206377
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__.BSplineCurve3d) {
|
|
206378
|
+
this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
206296
206379
|
}
|
|
206297
206380
|
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
206298
206381
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
206299
206382
|
}
|
|
206300
|
-
else if (this._geometryB instanceof
|
|
206383
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
206301
206384
|
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
206302
206385
|
}
|
|
206303
206386
|
return undefined;
|
|
206304
206387
|
}
|
|
206305
206388
|
/** Double dispatch handler for strongly typed linestring. */
|
|
206306
206389
|
handleLineString3d(lsA) {
|
|
206307
|
-
if (this._geometryB instanceof
|
|
206390
|
+
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
|
|
206308
206391
|
const lsB = this._geometryB;
|
|
206309
206392
|
this.computeLineStringLineString(lsA, lsB, false);
|
|
206310
206393
|
}
|
|
206311
|
-
else if (this._geometryB instanceof
|
|
206312
|
-
this.computeSegmentLineString(this._geometryB, this.
|
|
206394
|
+
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d) {
|
|
206395
|
+
this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
206313
206396
|
}
|
|
206314
|
-
else if (this._geometryB instanceof
|
|
206315
|
-
this.computeArcLineString(this._geometryB, this.
|
|
206397
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_17__.Arc3d) {
|
|
206398
|
+
this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
206316
206399
|
}
|
|
206317
|
-
else if (this._geometryB instanceof
|
|
206318
|
-
this.dispatchLineStringBSplineCurve(lsA, this.
|
|
206400
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__.BSplineCurve3d) {
|
|
206401
|
+
this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
206319
206402
|
}
|
|
206320
206403
|
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
206321
206404
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
206322
206405
|
}
|
|
206323
|
-
else if (this._geometryB instanceof
|
|
206406
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
206324
206407
|
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
206325
206408
|
}
|
|
206326
206409
|
return undefined;
|
|
206327
206410
|
}
|
|
206328
206411
|
/** Double dispatch handler for strongly typed arc. */
|
|
206329
206412
|
handleArc3d(arc0) {
|
|
206330
|
-
if (this._geometryB instanceof
|
|
206331
|
-
this.dispatchSegmentArc(this._geometryB, this.
|
|
206413
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d) {
|
|
206414
|
+
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arc0, this._extendA0, this._extendA1, true);
|
|
206332
206415
|
}
|
|
206333
|
-
else if (this._geometryB instanceof
|
|
206334
|
-
this.computeArcLineString(arc0, this.
|
|
206416
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
|
|
206417
|
+
this.computeArcLineString(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
206335
206418
|
}
|
|
206336
|
-
else if (this._geometryB instanceof
|
|
206337
|
-
this.dispatchArcArc(arc0, this.
|
|
206419
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_17__.Arc3d) {
|
|
206420
|
+
this.dispatchArcArc(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
206338
206421
|
}
|
|
206339
|
-
else if (this._geometryB instanceof
|
|
206340
|
-
this.dispatchArcBsplineCurve3d(arc0, this.
|
|
206422
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__.BSplineCurve3d) {
|
|
206423
|
+
this.dispatchArcBsplineCurve3d(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
206341
206424
|
}
|
|
206342
206425
|
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
206343
206426
|
this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
|
|
206344
206427
|
}
|
|
206345
|
-
else if (this._geometryB instanceof
|
|
206428
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
206346
206429
|
this.dispatchCurveChainWithDistanceIndex(arc0, this.handleArc3d.bind(this));
|
|
206347
206430
|
}
|
|
206348
206431
|
return undefined;
|
|
206349
206432
|
}
|
|
206350
206433
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
206351
206434
|
handleBSplineCurve3d(curve) {
|
|
206352
|
-
if (this._geometryB instanceof
|
|
206353
|
-
this.dispatchSegmentBsplineCurve(this._geometryB, this.
|
|
206435
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d) {
|
|
206436
|
+
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
206354
206437
|
}
|
|
206355
|
-
else if (this._geometryB instanceof
|
|
206356
|
-
this.dispatchLineStringBSplineCurve(this._geometryB, this.
|
|
206438
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
|
|
206439
|
+
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
206357
206440
|
}
|
|
206358
|
-
else if (this._geometryB instanceof
|
|
206359
|
-
this.dispatchArcBsplineCurve3d(this._geometryB, this.
|
|
206441
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_17__.Arc3d) {
|
|
206442
|
+
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
206360
206443
|
}
|
|
206361
|
-
else if (this._geometryB instanceof
|
|
206444
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__.BSplineCurve3dBase) {
|
|
206362
206445
|
this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
|
|
206363
206446
|
}
|
|
206364
206447
|
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
206365
206448
|
this.dispatchCurveCollection(curve, this.handleBSplineCurve3d.bind(this));
|
|
206366
206449
|
}
|
|
206367
|
-
else if (this._geometryB instanceof
|
|
206450
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
206368
206451
|
this.dispatchCurveChainWithDistanceIndex(curve, this.handleBSplineCurve3d.bind(this));
|
|
206369
206452
|
}
|
|
206370
206453
|
return undefined;
|
|
@@ -206373,9 +206456,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206373
206456
|
handleCurveChainWithDistanceIndex(chain) {
|
|
206374
206457
|
super.handleCurveChainWithDistanceIndex(chain);
|
|
206375
206458
|
// if _geometryB is also a CurveChainWithDistanceIndex, it will already have been converted by dispatchCurveChainWithDistanceIndex
|
|
206376
|
-
this._results =
|
|
206459
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, 0, chain, undefined, true);
|
|
206377
206460
|
}
|
|
206378
|
-
/** Double dispatch handler for strongly typed homogeneous bspline curve
|
|
206461
|
+
/** Double dispatch handler for strongly typed homogeneous bspline curve. */
|
|
206379
206462
|
handleBSplineCurve3dH(_curve) {
|
|
206380
206463
|
/*
|
|
206381
206464
|
// NEEDS WORK -- make "dispatch" methods tolerant of both 3d and 3dH .
|
|
@@ -206393,19 +206476,19 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
206393
206476
|
return undefined;
|
|
206394
206477
|
}
|
|
206395
206478
|
}
|
|
206396
|
-
CurveCurveIntersectXY._workVector2dA =
|
|
206479
|
+
CurveCurveIntersectXY._workVector2dA = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_19__.Vector2d.create();
|
|
206397
206480
|
CurveCurveIntersectXY._workPointA0H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.create();
|
|
206398
206481
|
CurveCurveIntersectXY._workPointA1H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.create();
|
|
206399
206482
|
CurveCurveIntersectXY._workPointB0H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.create();
|
|
206400
206483
|
CurveCurveIntersectXY._workPointB1H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.create();
|
|
206401
|
-
CurveCurveIntersectXY._workPointAA0 =
|
|
206402
|
-
CurveCurveIntersectXY._workPointAA1 =
|
|
206403
|
-
CurveCurveIntersectXY._workPointBB0 =
|
|
206404
|
-
CurveCurveIntersectXY._workPointBB1 =
|
|
206405
|
-
CurveCurveIntersectXY._workPointA0 =
|
|
206406
|
-
CurveCurveIntersectXY._workPointA1 =
|
|
206407
|
-
CurveCurveIntersectXY._workPointB0 =
|
|
206408
|
-
CurveCurveIntersectXY._workPointB1 =
|
|
206484
|
+
CurveCurveIntersectXY._workPointAA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
206485
|
+
CurveCurveIntersectXY._workPointAA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
206486
|
+
CurveCurveIntersectXY._workPointBB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
206487
|
+
CurveCurveIntersectXY._workPointBB1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
206488
|
+
CurveCurveIntersectXY._workPointA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
206489
|
+
CurveCurveIntersectXY._workPointA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
206490
|
+
CurveCurveIntersectXY._workPointB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
206491
|
+
CurveCurveIntersectXY._workPointB1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
206409
206492
|
|
|
206410
206493
|
|
|
206411
206494
|
/***/ }),
|
|
@@ -216096,14 +216179,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
216096
216179
|
/* harmony export */ "NullGeometryHandler": () => (/* binding */ NullGeometryHandler),
|
|
216097
216180
|
/* harmony export */ "RecurseToCurvesGeometryHandler": () => (/* binding */ RecurseToCurvesGeometryHandler)
|
|
216098
216181
|
/* harmony export */ });
|
|
216099
|
-
/* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
216100
|
-
/* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
216101
216182
|
/*---------------------------------------------------------------------------------------------
|
|
216102
216183
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
216103
216184
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
216104
216185
|
*--------------------------------------------------------------------------------------------*/
|
|
216105
|
-
|
|
216106
|
-
|
|
216107
216186
|
/**
|
|
216108
216187
|
* `GeometryHandler` defines the base abstract methods for double-dispatch geometry computation.
|
|
216109
216188
|
* * User code that wants to handle one or all of the commonly known geometry types implements a handler class.
|
|
@@ -216136,11 +216215,7 @@ class GeometryHandler {
|
|
|
216136
216215
|
}
|
|
216137
216216
|
/** Handle strongly typed [[CurveChainWithDistanceIndex]] (base class method calls [[handlePath]] or [[handleLoop]]) */
|
|
216138
216217
|
handleCurveChainWithDistanceIndex(g) {
|
|
216139
|
-
|
|
216140
|
-
return this.handlePath(g.path);
|
|
216141
|
-
if (g.path instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_1__.Loop)
|
|
216142
|
-
return this.handleLoop(g.path);
|
|
216143
|
-
return this.handleCurveCollection(g.path);
|
|
216218
|
+
return this.handlePath(g.path);
|
|
216144
216219
|
}
|
|
216145
216220
|
}
|
|
216146
216221
|
/**
|
|
@@ -228908,9 +228983,9 @@ class PolylineCompressionContext {
|
|
|
228908
228983
|
* @param points
|
|
228909
228984
|
* @param perpendicularDistance
|
|
228910
228985
|
*/
|
|
228911
|
-
static compressColinearWrapInPlace(points,
|
|
228986
|
+
static compressColinearWrapInPlace(points, duplicatePointTolerance, colinearPointTolerance) {
|
|
228912
228987
|
const lastIndex = points.length - 1;
|
|
228913
|
-
if (lastIndex >= 3 && points[0].distance(points[lastIndex]) <
|
|
228988
|
+
if (lastIndex >= 3 && points[0].distance(points[lastIndex]) < duplicatePointTolerance) {
|
|
228914
228989
|
// indices of 3 points potentially colinear.
|
|
228915
228990
|
const indexA = lastIndex - 1;
|
|
228916
228991
|
const indexB = 0;
|
|
@@ -228922,7 +228997,7 @@ class PolylineCompressionContext {
|
|
|
228922
228997
|
const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.conditionalDivideFraction(uDotV, uDotU);
|
|
228923
228998
|
if (fraction !== undefined && fraction > 0.0 && fraction < 1.0) {
|
|
228924
228999
|
const h2 = vectorV.magnitudeSquared() - fraction * fraction * uDotU;
|
|
228925
|
-
if (Math.sqrt(Math.abs(h2)) <
|
|
229000
|
+
if (Math.sqrt(Math.abs(h2)) < colinearPointTolerance) {
|
|
228926
229001
|
points[0] = points[indexA];
|
|
228927
229002
|
points.pop();
|
|
228928
229003
|
}
|
|
@@ -294055,7 +294130,7 @@ class TestContext {
|
|
|
294055
294130
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
294056
294131
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
294057
294132
|
await core_frontend_1.NoRenderApp.startup({
|
|
294058
|
-
applicationVersion: "4.9.0-dev.
|
|
294133
|
+
applicationVersion: "4.9.0-dev.19",
|
|
294059
294134
|
applicationId: this.settings.gprid,
|
|
294060
294135
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
294061
294136
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -318718,7 +318793,7 @@ function __disposeResources(env) {
|
|
|
318718
318793
|
/***/ ((module) => {
|
|
318719
318794
|
|
|
318720
318795
|
"use strict";
|
|
318721
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.9.0-dev.
|
|
318796
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.9.0-dev.19","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 --no-inline-config -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.9.0-dev.19","@itwin/core-bentley":"workspace:^4.9.0-dev.19","@itwin/core-common":"workspace:^4.9.0-dev.19","@itwin/core-geometry":"workspace:^4.9.0-dev.19","@itwin/core-orbitgt":"workspace:^4.9.0-dev.19","@itwin/core-quantity":"workspace:^4.9.0-dev.19"},"//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.2","@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.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.3.3","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.2.4","@itwin/object-storage-core":"^2.2.5","@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","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
318722
318797
|
|
|
318723
318798
|
/***/ }),
|
|
318724
318799
|
|