@itwin/ecschema-rpcinterface-tests 4.2.0-dev.31 → 4.2.0-dev.33
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/_0062.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +687 -557
- 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_4_7_node_modules_loaders_gl_draco_di-02c2bd.bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -170304,8 +170304,8 @@ class Geometry {
|
|
|
170304
170304
|
return result;
|
|
170305
170305
|
}
|
|
170306
170306
|
/**
|
|
170307
|
-
* For a line `f(x)` where `f(x0) = f0` and `f(x1) = f1`, return the `x` value at which `f(x) = fTarget
|
|
170308
|
-
* Return `defaultResult` if `(fTarget - f0) / (f1 - f0)` exceeds `Geometry.largeFractionResult
|
|
170307
|
+
* For a line `f(x)` where `f(x0) = f0` and `f(x1) = f1`, return the `x` value at which `f(x) = fTarget`.
|
|
170308
|
+
* Return `defaultResult` if `(fTarget - f0) / (f1 - f0)` exceeds `Geometry.largeFractionResult`.
|
|
170309
170309
|
*/
|
|
170310
170310
|
static inverseInterpolate(x0, f0, x1, f1, fTarget = 0, defaultResult) {
|
|
170311
170311
|
/**
|
|
@@ -182978,17 +182978,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
182978
182978
|
/* harmony export */ CurveChainWithDistanceIndex: () => (/* binding */ CurveChainWithDistanceIndex),
|
|
182979
182979
|
/* harmony export */ PathFragment: () => (/* binding */ PathFragment)
|
|
182980
182980
|
/* harmony export */ });
|
|
182981
|
-
/* harmony import */ var
|
|
182982
|
-
/* harmony import */ var
|
|
182983
|
-
/* harmony import */ var
|
|
182984
|
-
/* harmony import */ var
|
|
182985
|
-
/* harmony import */ var
|
|
182986
|
-
/* harmony import */ var
|
|
182987
|
-
/* harmony import */ var
|
|
182988
|
-
/* harmony import */ var
|
|
182989
|
-
/* harmony import */ var
|
|
182990
|
-
/* harmony import */ var
|
|
182991
|
-
/* harmony import */ var
|
|
182981
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
182982
|
+
/* harmony import */ var _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../curve/CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
182983
|
+
/* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
|
|
182984
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
182985
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
182986
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
182987
|
+
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
182988
|
+
/* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
182989
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
182990
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
182991
|
+
/* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
|
|
182992
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
182992
182993
|
/*---------------------------------------------------------------------------------------------
|
|
182993
182994
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
182994
182995
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -183007,15 +183008,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
183007
183008
|
|
|
183008
183009
|
|
|
183009
183010
|
|
|
183011
|
+
|
|
183010
183012
|
/**
|
|
183011
|
-
* Annotation of an interval of a curve.
|
|
183013
|
+
* Annotation of a fragment, i.e. an interval of a curve.
|
|
183012
183014
|
* * The interval is marked with two pairs of numbers:
|
|
183013
|
-
* * * fraction0, fraction1 = fraction parameters along the child curve
|
|
183014
|
-
* * * distance0,distance1 = distances within containing CurveChainWithDistanceIndex
|
|
183015
|
+
* * * fraction0, fraction1 = fraction parameters along the child curve.
|
|
183016
|
+
* * * distance0, distance1 = distances within containing CurveChainWithDistanceIndex.
|
|
183015
183017
|
* @public
|
|
183016
183018
|
*/
|
|
183017
183019
|
class PathFragment {
|
|
183018
|
-
/** Create a fragment with complete fraction, distance and child data. */
|
|
183020
|
+
/** Create a fragment with complete fraction, distance, and child data. */
|
|
183019
183021
|
constructor(childFraction0, childFraction1, distance0, distance1, childCurve, range) {
|
|
183020
183022
|
this.childFraction0 = childFraction0;
|
|
183021
183023
|
this.childFraction1 = childFraction1;
|
|
@@ -183025,68 +183027,64 @@ class PathFragment {
|
|
|
183025
183027
|
this.range = range;
|
|
183026
183028
|
this.a = 0;
|
|
183027
183029
|
}
|
|
183028
|
-
/**
|
|
183029
|
-
* Return true if the distance is within the distance limits of this fragment.
|
|
183030
|
-
* @param distance
|
|
183031
|
-
*/
|
|
183030
|
+
/** Return true if the distance is within the distance limits of this fragment. */
|
|
183032
183031
|
containsChainDistance(distance) {
|
|
183033
183032
|
return distance >= this.chainDistance0 && distance <= this.chainDistance1;
|
|
183034
183033
|
}
|
|
183035
|
-
/**
|
|
183034
|
+
/**
|
|
183035
|
+
* Return a quick minimum distance from spacePoint to the curve.
|
|
183036
|
+
* * The returned distance is to the curve's range box if defined; otherwise, the true distance is computed.
|
|
183037
|
+
* * Thus the returned distance may be SMALLER than the true distance to the curve, but not larger.
|
|
183038
|
+
*/
|
|
183036
183039
|
quickMinDistanceToChildCurve(spacePoint) {
|
|
183037
|
-
if (this.range)
|
|
183040
|
+
if (this.range)
|
|
183038
183041
|
return this.range.distanceToPoint(spacePoint);
|
|
183039
|
-
}
|
|
183040
|
-
// ugh. have to do real computation ..
|
|
183041
183042
|
const detail = this.childCurve.closestPoint(spacePoint, false);
|
|
183042
183043
|
if (detail)
|
|
183043
183044
|
return detail.a;
|
|
183044
183045
|
return 0;
|
|
183045
183046
|
}
|
|
183046
183047
|
/**
|
|
183047
|
-
* Return an array with (references to) all the path fragments, sorted smallest to largest on the "a" value
|
|
183048
|
-
*
|
|
183048
|
+
* Return an array with (references to) all the input path fragments, sorted smallest to largest on the "a" value,
|
|
183049
|
+
* initialized with `quickMinDistanceToChildCurve`
|
|
183049
183050
|
*/
|
|
183050
183051
|
static collectSortedQuickMinDistances(fragments, spacePoint) {
|
|
183051
183052
|
const sortedFragments = [];
|
|
183052
|
-
for (const
|
|
183053
|
-
|
|
183054
|
-
sortedFragments.push(
|
|
183053
|
+
for (const frag of fragments) {
|
|
183054
|
+
frag.a = frag.quickMinDistanceToChildCurve(spacePoint);
|
|
183055
|
+
sortedFragments.push(frag);
|
|
183055
183056
|
}
|
|
183056
|
-
sortedFragments.sort((
|
|
183057
|
+
sortedFragments.sort((frag1, frag2) => frag1.a - frag2.a);
|
|
183057
183058
|
return sortedFragments;
|
|
183058
183059
|
}
|
|
183059
|
-
/**
|
|
183060
|
-
* Return true if this fragment addresses `curve` and brackets `fraction`
|
|
183061
|
-
* @param distance
|
|
183062
|
-
*/
|
|
183060
|
+
/** Return true if `this` fragment addresses `curve` and brackets `fraction`. */
|
|
183063
183061
|
containsChildCurveAndChildFraction(curve, fraction) {
|
|
183064
183062
|
return this.childCurve === curve && fraction >= this.childFraction0 && fraction <= this.childFraction1;
|
|
183065
183063
|
}
|
|
183066
183064
|
/**
|
|
183067
|
-
* Convert distance to local fraction
|
|
183068
|
-
* Note that proportional calculation does NOT account for
|
|
183065
|
+
* Convert distance to local fraction and apply that to interpolate between the stored curve fractions.
|
|
183066
|
+
* Note that proportional calculation does NOT account for non-uniform parameterization in the child curve.
|
|
183069
183067
|
*/
|
|
183070
183068
|
chainDistanceToInterpolatedChildFraction(distance) {
|
|
183071
|
-
return
|
|
183069
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.inverseInterpolate(this.childFraction0, this.chainDistance0, this.childFraction1, this.chainDistance1, distance, this.childFraction0); // the interval must have nonzero length so division should be safe
|
|
183072
183070
|
}
|
|
183073
|
-
/** Convert chainDistance to
|
|
183071
|
+
/** Convert the given chainDistance to a fraction along this childCurve using `moveSignedDistanceFromFraction`. */
|
|
183074
183072
|
chainDistanceToAccurateChildFraction(chainDistance, allowExtrapolation) {
|
|
183075
|
-
// The fragments are really expected to do good mappings in their distance range ...
|
|
183076
183073
|
const childDetail = this.childCurve.moveSignedDistanceFromFraction(this.childFraction0, chainDistance - this.chainDistance0, allowExtrapolation ?? false);
|
|
183077
183074
|
return childDetail.fraction;
|
|
183078
183075
|
}
|
|
183079
183076
|
/**
|
|
183080
|
-
* Return the scale factor to map childCurve fraction derivatives to chain fraction derivatives
|
|
183081
|
-
* @param globalDistance total length of the global curve
|
|
183077
|
+
* Return the scale factor to map childCurve fraction derivatives to chain fraction derivatives.
|
|
183078
|
+
* @param globalDistance total length of the global curve
|
|
183082
183079
|
*/
|
|
183083
183080
|
fractionScaleFactor(globalDistance) {
|
|
183084
183081
|
return globalDistance * (this.childFraction1 - this.childFraction0) / (this.chainDistance1 - this.chainDistance0);
|
|
183085
183082
|
}
|
|
183086
183083
|
/**
|
|
183087
183084
|
* Reverse the fraction and distance data.
|
|
183088
|
-
* *
|
|
183089
|
-
* *
|
|
183085
|
+
* * Each child fraction `f` is replaced by `1-f`
|
|
183086
|
+
* * Each `chainDistance` is replaced by `totalDistance - chainDistance`
|
|
183087
|
+
* @param totalDistance the total distance
|
|
183090
183088
|
*/
|
|
183091
183089
|
reverseFractionsAndDistances(totalDistance) {
|
|
183092
183090
|
const f0 = this.childFraction0;
|
|
@@ -183098,14 +183096,14 @@ class PathFragment {
|
|
|
183098
183096
|
this.chainDistance0 = totalDistance - d1;
|
|
183099
183097
|
this.chainDistance1 = totalDistance - d0;
|
|
183100
183098
|
}
|
|
183101
|
-
/** @deprecated in 3.x. Use childFractionToChainDistance */
|
|
183099
|
+
/** @deprecated in 3.x. Use `PathFragment.childFractionToChainDistance`. */
|
|
183102
183100
|
childFractionTChainDistance(fraction) {
|
|
183103
183101
|
return this.childFractionToChainDistance(fraction);
|
|
183104
183102
|
}
|
|
183105
183103
|
/**
|
|
183106
|
-
* Convert a fractional position on the childCurve to distance
|
|
183107
|
-
* * Return value is SIGNED
|
|
183108
|
-
* @param fraction
|
|
183104
|
+
* Convert a fractional position on the childCurve of this fragment to distance on the curve chain.
|
|
183105
|
+
* * Return value is SIGNED and will be negative when `fraction < this.childFraction0`.
|
|
183106
|
+
* @param fraction the fractional position on the childCurve of this fragment
|
|
183109
183107
|
*/
|
|
183110
183108
|
childFractionToChainDistance(fraction) {
|
|
183111
183109
|
let d = this.childCurve.curveLengthBetweenFractions(this.childFraction0, fraction);
|
|
@@ -183114,7 +183112,7 @@ class PathFragment {
|
|
|
183114
183112
|
return this.chainDistance0 + d;
|
|
183115
183113
|
}
|
|
183116
183114
|
}
|
|
183117
|
-
/** Non-instantiable class to build a distance index for a
|
|
183115
|
+
/** Non-instantiable class to build a distance index for a curve chain. */
|
|
183118
183116
|
class DistanceIndexConstructionContext {
|
|
183119
183117
|
constructor() {
|
|
183120
183118
|
this._accumulatedDistance = 0;
|
|
@@ -183126,23 +183124,22 @@ class DistanceIndexConstructionContext {
|
|
|
183126
183124
|
endParentCurvePrimitive(_cp) { }
|
|
183127
183125
|
endCurvePrimitive(_cp) { }
|
|
183128
183126
|
announcePointTangent(_xyz, _fraction, _tangent) { }
|
|
183129
|
-
/** Announce numPoints interpolated between point0 and point1, with associated fractions */
|
|
183130
183127
|
announceSegmentInterval(cp, point0, point1, numStrokes, fraction0, fraction1) {
|
|
183131
183128
|
const fragmentPoint0 = point0.clone();
|
|
183132
183129
|
const fragmentPoint1 = point1.clone();
|
|
183133
183130
|
let d0 = this._accumulatedDistance;
|
|
183134
183131
|
if (numStrokes <= 1) {
|
|
183135
183132
|
this._accumulatedDistance += point0.distance(point1);
|
|
183136
|
-
this._fragments.push(new PathFragment(fraction0, fraction1, d0, this._accumulatedDistance, cp,
|
|
183133
|
+
this._fragments.push(new PathFragment(fraction0, fraction1, d0, this._accumulatedDistance, cp, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__.Range3d.create(fragmentPoint0, fragmentPoint1)));
|
|
183137
183134
|
}
|
|
183138
183135
|
else {
|
|
183139
183136
|
let f1;
|
|
183140
183137
|
for (let i = 1, f0 = fraction0; i <= numStrokes; i++, f0 = f1) {
|
|
183141
|
-
f1 =
|
|
183138
|
+
f1 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fraction0, i / numStrokes, fraction1);
|
|
183142
183139
|
point0.interpolate(f1, point1, fragmentPoint1);
|
|
183143
183140
|
d0 = this._accumulatedDistance;
|
|
183144
183141
|
this._accumulatedDistance += (Math.abs(f1 - f0) * point0.distance(point1));
|
|
183145
|
-
this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp,
|
|
183142
|
+
this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__.Range3d.create(fragmentPoint0, fragmentPoint1)));
|
|
183146
183143
|
fragmentPoint0.setFrom(fragmentPoint1);
|
|
183147
183144
|
}
|
|
183148
183145
|
}
|
|
@@ -183150,7 +183147,7 @@ class DistanceIndexConstructionContext {
|
|
|
183150
183147
|
announceIntervalForUniformStepStrokes(cp, numStrokes, fraction0, fraction1) {
|
|
183151
183148
|
let f1, d, d0;
|
|
183152
183149
|
for (let i = 1, f0 = fraction0; i <= numStrokes; i++, f0 = f1) {
|
|
183153
|
-
f1 =
|
|
183150
|
+
f1 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fraction0, i / numStrokes, fraction1);
|
|
183154
183151
|
d = cp.curveLengthBetweenFractions(f0, f1);
|
|
183155
183152
|
d0 = this._accumulatedDistance;
|
|
183156
183153
|
this._accumulatedDistance += d;
|
|
@@ -183158,7 +183155,10 @@ class DistanceIndexConstructionContext {
|
|
|
183158
183155
|
this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp, range));
|
|
183159
183156
|
}
|
|
183160
183157
|
}
|
|
183161
|
-
needPrimaryGeometryForStrokes() {
|
|
183158
|
+
needPrimaryGeometryForStrokes() {
|
|
183159
|
+
return true;
|
|
183160
|
+
}
|
|
183161
|
+
/** Create an array of PathFragment from input curve chain. */
|
|
183162
183162
|
static createPathFragmentIndex(path, options) {
|
|
183163
183163
|
const handler = new DistanceIndexConstructionContext();
|
|
183164
183164
|
for (const curve of path.children) {
|
|
@@ -183173,12 +183173,11 @@ class DistanceIndexConstructionContext {
|
|
|
183173
183173
|
* distance along a CurveChain.
|
|
183174
183174
|
* * For example if the total length of the chain is `L`, then the distance along the chain from parameters `t0`
|
|
183175
183175
|
* to `t1` is easily computed as `L*(t1-t0)`.
|
|
183176
|
-
* * The curve chain can be any type derived from CurveChain.
|
|
183177
|
-
* * * i.e. either a `Path` or a `Loop`
|
|
183176
|
+
* * The curve chain can be any type derived from `CurveChain`, i.e., either a `Path` or a `Loop`.
|
|
183178
183177
|
* @public
|
|
183179
183178
|
*/
|
|
183180
|
-
class CurveChainWithDistanceIndex extends
|
|
183181
|
-
/** Test if other is a `CurveChainWithDistanceIndex` */
|
|
183179
|
+
class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__.CurvePrimitive {
|
|
183180
|
+
/** Test if `other` is a `CurveChainWithDistanceIndex` */
|
|
183182
183181
|
isSameGeometryClass(other) {
|
|
183183
183182
|
return other instanceof CurveChainWithDistanceIndex;
|
|
183184
183183
|
}
|
|
@@ -183197,13 +183196,13 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183197
183196
|
*/
|
|
183198
183197
|
cloneTransformed(transform) {
|
|
183199
183198
|
const c = this._path.clone();
|
|
183200
|
-
if (c instanceof
|
|
183199
|
+
if (c instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_4__.CurveChain && c.tryTransformInPlace(transform))
|
|
183201
183200
|
return CurveChainWithDistanceIndex.createCapture(c);
|
|
183202
183201
|
return undefined;
|
|
183203
183202
|
}
|
|
183204
183203
|
/**
|
|
183205
183204
|
* Reference to the contained path.
|
|
183206
|
-
* * Do not modify the path.
|
|
183205
|
+
* * Do not modify the path. The distance index will be wrong.
|
|
183207
183206
|
*/
|
|
183208
183207
|
get path() {
|
|
183209
183208
|
return this._path;
|
|
@@ -183248,7 +183247,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183248
183247
|
const childFractionA = fragmentA.chainDistanceToAccurateChildFraction(chainDistanceA, true);
|
|
183249
183248
|
const childFractionB = fragmentB.chainDistanceToAccurateChildFraction(chainDistanceB, true);
|
|
183250
183249
|
// add a (possibly reversed) partial clone to newPath
|
|
183251
|
-
const newPath =
|
|
183250
|
+
const newPath = _Path__WEBPACK_IMPORTED_MODULE_5__.Path.create();
|
|
183252
183251
|
const addPartialChild = (childCurve, childFraction0, childFraction1, reversedClone) => {
|
|
183253
183252
|
if (childFraction0 === childFraction1)
|
|
183254
183253
|
return false;
|
|
@@ -183297,19 +183296,19 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183297
183296
|
}
|
|
183298
183297
|
return true;
|
|
183299
183298
|
}
|
|
183300
|
-
/** Return the start point of
|
|
183299
|
+
/** Return the start point of `this` curve. */
|
|
183301
183300
|
startPoint(result) {
|
|
183302
183301
|
const c = this._path.cyclicCurvePrimitive(0);
|
|
183303
183302
|
if (c)
|
|
183304
183303
|
return c.startPoint(result);
|
|
183305
|
-
return
|
|
183304
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.createZero(result);
|
|
183306
183305
|
}
|
|
183307
|
-
/** Return the end point of
|
|
183306
|
+
/** Return the end point of of `this` curve. */
|
|
183308
183307
|
endPoint(result) {
|
|
183309
183308
|
const c = this._path.cyclicCurvePrimitive(-1);
|
|
183310
183309
|
if (c)
|
|
183311
183310
|
return c.endPoint(result);
|
|
183312
|
-
return
|
|
183311
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.createZero(result);
|
|
183313
183312
|
}
|
|
183314
183313
|
/** Add strokes to caller-supplied linestring */
|
|
183315
183314
|
emitStrokes(dest, options) {
|
|
@@ -183340,7 +183339,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183340
183339
|
/**
|
|
183341
183340
|
* Return an array containing only the curve primitives.
|
|
183342
183341
|
* @param collectorArray array to receive primitives (pushed -- the array is not cleared)
|
|
183343
|
-
* @param smallestPossiblePrimitives if true, recurse on the
|
|
183342
|
+
* @param smallestPossiblePrimitives if true, recurse on the children. If false, only push `this`.
|
|
183344
183343
|
* @param explodeLinestrings (if smallestPossiblePrimitives is true) whether to push a [[LineSegment3d]] for each
|
|
183345
183344
|
* segment of a [[LineString3d]] child. If false, push only the [[LineString3d]].
|
|
183346
183345
|
*/
|
|
@@ -183360,28 +183359,24 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183360
183359
|
* @param parentStrokeMap evolving parent map.
|
|
183361
183360
|
*/
|
|
183362
183361
|
computeAndAttachRecursiveStrokeCounts(options, parentStrokeMap) {
|
|
183363
|
-
const myMap =
|
|
183362
|
+
const myMap = _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_7__.StrokeCountMap.createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap);
|
|
183364
183363
|
for (const c of this._path.children) {
|
|
183365
183364
|
c.computeAndAttachRecursiveStrokeCounts(options, myMap);
|
|
183366
183365
|
}
|
|
183367
|
-
|
|
183366
|
+
_curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__.CurvePrimitive.installStrokeCountMap(this, myMap, parentStrokeMap);
|
|
183368
183367
|
}
|
|
183369
183368
|
/**
|
|
183370
|
-
* Second step of double dispatch:
|
|
183369
|
+
* Second step of double dispatch: call `this._path.dispatchToGeometryHandler (handler)`
|
|
183371
183370
|
* * Note that this exposes the children individually to the handler.
|
|
183372
183371
|
*/
|
|
183373
183372
|
dispatchToGeometryHandler(handler) {
|
|
183374
|
-
return
|
|
183373
|
+
return handler.handleCurveChainWithDistanceIndex(this);
|
|
183375
183374
|
}
|
|
183376
|
-
/** Extend
|
|
183375
|
+
/** Extend `rangeToExtend` as needed to include these curves (optionally transformed) */
|
|
183377
183376
|
extendRange(rangeToExtend, transform) {
|
|
183378
183377
|
this._path.extendRange(rangeToExtend, transform);
|
|
183379
183378
|
}
|
|
183380
|
-
/**
|
|
183381
|
-
* Curve length is always positive.
|
|
183382
|
-
* @returns Returns a (high accuracy) length of the curve between fractional positions
|
|
183383
|
-
* @returns Returns the length of the curve.
|
|
183384
|
-
*/
|
|
183379
|
+
/** Return a (high accuracy and positive) length of the curve between fractional positions */
|
|
183385
183380
|
curveLengthBetweenFractions(fraction0, fraction1) {
|
|
183386
183381
|
return Math.abs(fraction1 - fraction0) * this._totalLength;
|
|
183387
183382
|
}
|
|
@@ -183395,9 +183390,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183395
183390
|
return result;
|
|
183396
183391
|
}
|
|
183397
183392
|
/**
|
|
183398
|
-
*
|
|
183399
|
-
* @param distance
|
|
183400
|
-
* @param allowExtrapolation
|
|
183393
|
+
* Return the PathFragment object at the given `distance` along the chain.
|
|
183394
|
+
* @param distance distance along the chain.
|
|
183395
|
+
* @param allowExtrapolation if `true`, returns first fragment for negative distances and returns last fragment
|
|
183396
|
+
* for distances larger than curve length. If `false` returns `undefined` for those out of bound distances.
|
|
183401
183397
|
*/
|
|
183402
183398
|
chainDistanceToFragment(distance, allowExtrapolation = false) {
|
|
183403
183399
|
const i = this.chainDistanceToFragmentIndex(distance, allowExtrapolation);
|
|
@@ -183406,9 +183402,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183406
183402
|
return undefined;
|
|
183407
183403
|
}
|
|
183408
183404
|
/**
|
|
183409
|
-
*
|
|
183410
|
-
* @param distance
|
|
183411
|
-
* @param allowExtrapolation
|
|
183405
|
+
* Return the index of the PathFragment at the given `distance` along the chain.
|
|
183406
|
+
* @param distance distance along the chain.
|
|
183407
|
+
* @param allowExtrapolation if `true`, returns 0 for negative distances and returns last fragment index for
|
|
183408
|
+
* distances larger than curve length. If `false` returns `undefined` for those out of bound distances.
|
|
183412
183409
|
*/
|
|
183413
183410
|
chainDistanceToFragmentIndex(distance, allowExtrapolation = false) {
|
|
183414
183411
|
const numFragments = this._fragments.length;
|
|
@@ -183418,7 +183415,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183418
183415
|
return allowExtrapolation ? 0 : undefined;
|
|
183419
183416
|
if (distance > this._totalLength)
|
|
183420
183417
|
return allowExtrapolation ? (numFragments - 1) : undefined;
|
|
183421
|
-
//
|
|
183418
|
+
// linear search (opportunity for improvement)
|
|
183422
183419
|
for (let i = 0; i < numFragments; i++) {
|
|
183423
183420
|
if (fragments[i].containsChainDistance(distance))
|
|
183424
183421
|
return i;
|
|
@@ -183428,33 +183425,29 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183428
183425
|
}
|
|
183429
183426
|
/**
|
|
183430
183427
|
* Convert distance along the chain to fraction along the chain.
|
|
183431
|
-
* @param distance distance along the chain
|
|
183428
|
+
* @param distance distance along the chain.
|
|
183432
183429
|
*/
|
|
183433
183430
|
chainDistanceToChainFraction(distance) {
|
|
183434
183431
|
return distance / this._totalLength;
|
|
183435
183432
|
}
|
|
183436
|
-
/**
|
|
183437
|
-
* Resolve a fraction within a specific curve to a fragment.
|
|
183438
|
-
* @param curve
|
|
183439
|
-
* @param fraction
|
|
183440
|
-
*/
|
|
183433
|
+
/** Return the PathFragment object containing the point at the given `fraction` of the given child curve. */
|
|
183441
183434
|
curveAndChildFractionToFragment(curve, fraction) {
|
|
183442
183435
|
const numFragments = this._fragments.length;
|
|
183443
183436
|
const fragments = this._fragments;
|
|
183444
183437
|
if (numFragments > 0) {
|
|
183445
|
-
|
|
183438
|
+
if (fraction < 0)
|
|
183439
|
+
return fragments[0];
|
|
183440
|
+
if (fraction > 1.0)
|
|
183441
|
+
return fragments[numFragments - 1];
|
|
183442
|
+
// linear search (opportunity for improvement)
|
|
183446
183443
|
for (const fragment of fragments) {
|
|
183447
183444
|
if (fragment.containsChildCurveAndChildFraction(curve, fraction))
|
|
183448
183445
|
return fragment;
|
|
183449
183446
|
}
|
|
183450
|
-
if (fraction <= 0)
|
|
183451
|
-
return fragments[0];
|
|
183452
|
-
if (fraction > 1.0)
|
|
183453
|
-
return fragments[numFragments - 1];
|
|
183454
183447
|
}
|
|
183455
183448
|
return undefined;
|
|
183456
183449
|
}
|
|
183457
|
-
/** Returns the total length of
|
|
183450
|
+
/** Returns the total length of `this` curve. */
|
|
183458
183451
|
curveLength() {
|
|
183459
183452
|
return this._totalLength;
|
|
183460
183453
|
}
|
|
@@ -183467,52 +183460,59 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183467
183460
|
}
|
|
183468
183461
|
/**
|
|
183469
183462
|
* Return the point (x,y,z) on the curve at fractional position along the chain.
|
|
183470
|
-
* @param fraction fractional position along the
|
|
183471
|
-
* @returns
|
|
183463
|
+
* @param fraction fractional position along the curve.
|
|
183464
|
+
* @returns a point on the curve.
|
|
183472
183465
|
*/
|
|
183473
183466
|
fractionToPoint(fraction, result) {
|
|
183474
|
-
const
|
|
183475
|
-
const fragment = this.chainDistanceToFragment(
|
|
183467
|
+
const distanceAlongPath = fraction * this._totalLength;
|
|
183468
|
+
const fragment = this.chainDistanceToFragment(distanceAlongPath, true);
|
|
183476
183469
|
if (fragment) {
|
|
183477
|
-
const childFraction = fragment.chainDistanceToAccurateChildFraction(
|
|
183470
|
+
const childFraction = fragment.chainDistanceToAccurateChildFraction(distanceAlongPath, true);
|
|
183478
183471
|
return fragment.childCurve.fractionToPoint(childFraction, result);
|
|
183479
183472
|
}
|
|
183480
|
-
//
|
|
183481
|
-
//
|
|
183473
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false); // we never expect to get here
|
|
183474
|
+
// no fragment found. just return the first point on the curve.
|
|
183482
183475
|
return this._fragments[0].childCurve.fractionToPoint(0.0, result);
|
|
183483
183476
|
}
|
|
183484
183477
|
/**
|
|
183485
183478
|
* Return the point (x,y,z) and derivative on the curve at fractional position.
|
|
183486
|
-
* * Note that
|
|
183487
|
-
* *
|
|
183488
|
-
* *
|
|
183479
|
+
* * Note that the derivative is "derivative of xyz with respect to fraction".
|
|
183480
|
+
* * The derivative shows the speed of the "fractional point" moving along the curve.
|
|
183481
|
+
* * The derivative is not generally a unit vector. Use `fractionToPointAndUnitTangent` for a unit vector.
|
|
183489
183482
|
* @param fraction fractional position along the geometry.
|
|
183490
|
-
* @
|
|
183483
|
+
* @param result optional receiver for the result.
|
|
183484
|
+
* @returns a ray whose origin is the curve point and direction is the derivative with respect to the fraction.
|
|
183491
183485
|
*/
|
|
183492
183486
|
fractionToPointAndDerivative(fraction, result) {
|
|
183493
183487
|
const distanceAlongPath = fraction * this._totalLength;
|
|
183494
183488
|
const fragment = this.chainDistanceToFragment(distanceAlongPath, true);
|
|
183495
|
-
const
|
|
183496
|
-
result = fragment.childCurve.fractionToPointAndDerivative(
|
|
183497
|
-
//
|
|
183498
|
-
//
|
|
183499
|
-
// Then
|
|
183500
|
-
// derivative we seek is
|
|
183501
|
-
|
|
183489
|
+
const childFraction = fragment.chainDistanceToAccurateChildFraction(distanceAlongPath, true);
|
|
183490
|
+
result = fragment.childCurve.fractionToPointAndDerivative(childFraction, result);
|
|
183491
|
+
// Recall the standard arclength formula s(t) for the curve C = C(t), with derivative s'(t) = ||C'||.
|
|
183492
|
+
// Define fractional arclength for C by f = f(t) = s(t)/L, where L is the total length of C. Then f' = ||C'||/L.
|
|
183493
|
+
// Denote the inverse of f by t = t(f). Then C = C(t(f)) is a parameterization of C by its fractional arclength f.
|
|
183494
|
+
// Since the derivative of t is t'=1/f'=L/||C'||, the derivative we seek is d/df(C(t(f))) = C' t' = C' L/||C'||.
|
|
183495
|
+
// The fragment gives us C', so we're just a scale away.
|
|
183496
|
+
// Math details can be found at core/geometry/internaldocs/Curve.md
|
|
183497
|
+
const a = this._totalLength / result.direction.magnitude(); // L/||C'||
|
|
183502
183498
|
result.direction.scaleInPlace(a);
|
|
183503
183499
|
return result;
|
|
183504
183500
|
}
|
|
183505
183501
|
/**
|
|
183506
|
-
*
|
|
183502
|
+
* Return the point (x,y,z) and normalized derivative on the curve at fractional position.
|
|
183503
|
+
* * Note that the derivative is "derivative of xyz with respect to fraction".
|
|
183504
|
+
* * The un-normalized derivative shows the speed of the "fractional point" moving along the curve.
|
|
183505
|
+
* * To find the un-normalized derivative, use `fractionToPointAndDerivative`.
|
|
183507
183506
|
* @param fraction fractional position on the curve
|
|
183508
183507
|
* @param result optional receiver for the result.
|
|
183509
|
-
*
|
|
183508
|
+
* @returns a ray whose origin is the curve point and direction is the normalized derivative with respect to
|
|
183509
|
+
* the fraction.
|
|
183510
183510
|
*/
|
|
183511
183511
|
fractionToPointAndUnitTangent(fraction, result) {
|
|
183512
183512
|
const distanceAlongPath = fraction * this._totalLength;
|
|
183513
183513
|
const fragment = this.chainDistanceToFragment(distanceAlongPath, true);
|
|
183514
|
-
const
|
|
183515
|
-
result = fragment.childCurve.fractionToPointAndDerivative(
|
|
183514
|
+
const childFraction = fragment.chainDistanceToAccurateChildFraction(distanceAlongPath, true);
|
|
183515
|
+
result = fragment.childCurve.fractionToPointAndDerivative(childFraction, result);
|
|
183516
183516
|
result.direction.normalizeInPlace();
|
|
183517
183517
|
return result;
|
|
183518
183518
|
}
|
|
@@ -183521,34 +183521,39 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183521
183521
|
* * origin at fractional position along the curve
|
|
183522
183522
|
* * vectorU is the first derivative, i.e. tangent vector with length equal to the rate of change with respect to
|
|
183523
183523
|
* the fraction.
|
|
183524
|
-
* * vectorV is the second derivative, i.e.derivative of vectorU
|
|
183524
|
+
* * vectorV is the second derivative, i.e. derivative of vectorU which points in the direction of the curve's
|
|
183525
|
+
* derivative's change.
|
|
183525
183526
|
*/
|
|
183526
183527
|
fractionToPointAnd2Derivatives(fraction, result) {
|
|
183527
183528
|
const distanceAlongPath = fraction * this._totalLength;
|
|
183528
183529
|
const fragment = this.chainDistanceToFragment(distanceAlongPath, true);
|
|
183529
|
-
const
|
|
183530
|
-
result = fragment.childCurve.fractionToPointAnd2Derivatives(
|
|
183530
|
+
const childFraction = fragment.chainDistanceToAccurateChildFraction(distanceAlongPath, true);
|
|
183531
|
+
result = fragment.childCurve.fractionToPointAnd2Derivatives(childFraction, result);
|
|
183531
183532
|
if (!result)
|
|
183532
183533
|
return undefined;
|
|
183533
|
-
// See fractionToPointAndDerivative
|
|
183534
|
-
//
|
|
183535
|
-
//
|
|
183536
|
-
//
|
|
183534
|
+
// See fractionToPointAndDerivative, where we show d/df(C(t(f))) = L C'/||C'||.
|
|
183535
|
+
// Here we seek the 2nd derivative. We'll use the quotient rule, and the identities
|
|
183536
|
+
// d/dt||x(t)|| = x.x'/||x|| and ||x||^2 = x.x, where "." is the dot product.
|
|
183537
|
+
// d2/df2(C(t(f))) = L d/df(C'/||C'||) = L (||C'|| d/df(C') - C' d/df||C'||) / ||C'||^2
|
|
183537
183538
|
// = L (||C'|| C" L/||C'|| - C' C'.C"/||C'|| L/||C'||) / ||C'||^2
|
|
183538
|
-
// = (L/||C'||)^2 (C" - C' C'.C"/C'.C' )
|
|
183539
|
-
//
|
|
183540
|
-
|
|
183541
|
-
|
|
183542
|
-
const
|
|
183543
|
-
|
|
183544
|
-
const
|
|
183545
|
-
result.vectorU.
|
|
183546
|
-
|
|
183539
|
+
// = (L/||C'||)^2 (C" - C' C'.C"/C'.C' ), where C' and C" are given by the fragment.
|
|
183540
|
+
// The second derivative that fractionToPointAnd2Derivatives returns is C", so the second
|
|
183541
|
+
// derivative we seek is just few scales away.
|
|
183542
|
+
// Math details can be found at core/geometry/internaldocs/Curve.md
|
|
183543
|
+
const magU = result.vectorU.magnitude(); // ||C'||
|
|
183544
|
+
const dotUU = magU * magU; // ||C'||^2
|
|
183545
|
+
const dotUV = result.vectorU.dotProduct(result.vectorV); // C'.C"
|
|
183546
|
+
result.vectorV.addScaledInPlace(result.vectorU, -dotUV / dotUU); // add -(C'*C'.C")/(||C'||^2) to vectorV
|
|
183547
|
+
const scale = this._totalLength / magU; // L/||C'||
|
|
183548
|
+
result.vectorU.scaleInPlace(scale); // scale vectorU by L/||C'||
|
|
183549
|
+
result.vectorV.scaleInPlace(scale * scale); // scale vectorV by (L/||C'(t)||)^2
|
|
183547
183550
|
return result;
|
|
183548
183551
|
}
|
|
183549
183552
|
/**
|
|
183550
183553
|
* Attempt to transform in place.
|
|
183551
|
-
* * Warning: If any child fails, this object becomes invalid
|
|
183554
|
+
* * Warning: If any child transform fails, `this` object becomes invalid but that should never happen.
|
|
183555
|
+
* @param transform the transform to be applied.
|
|
183556
|
+
* @returns true if all of child transforms succeed and false otherwise.
|
|
183552
183557
|
*/
|
|
183553
183558
|
tryTransformInPlace(transform) {
|
|
183554
183559
|
let numFail = 0;
|
|
@@ -183561,48 +183566,45 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183561
183566
|
/** Reverse the curve's data so that its fractional stroking moves in the opposite direction. */
|
|
183562
183567
|
reverseInPlace() {
|
|
183563
183568
|
this._path.reverseChildrenInPlace();
|
|
183564
|
-
const totalLength = this._totalLength;
|
|
183565
183569
|
for (const fragment of this._fragments) {
|
|
183566
|
-
fragment.reverseFractionsAndDistances(
|
|
183570
|
+
fragment.reverseFractionsAndDistances(this._totalLength);
|
|
183567
183571
|
}
|
|
183568
183572
|
this._fragments.reverse();
|
|
183569
183573
|
}
|
|
183570
183574
|
/**
|
|
183571
|
-
* Test for equality conditions
|
|
183572
|
-
* * Mismatched
|
|
183573
|
-
* * If
|
|
183574
|
-
* @param other
|
|
183575
|
+
* Test for equality conditions.
|
|
183576
|
+
* * Mismatched total length is a quick exit condition.
|
|
183577
|
+
* * If total length matches, recurse to the path for matching primitives.
|
|
183575
183578
|
*/
|
|
183576
183579
|
isAlmostEqual(other) {
|
|
183577
183580
|
if (other instanceof CurveChainWithDistanceIndex) {
|
|
183578
|
-
return
|
|
183579
|
-
&& this._path.isAlmostEqual(other._path);
|
|
183581
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this._totalLength, other._totalLength) && this._path.isAlmostEqual(other._path);
|
|
183580
183582
|
}
|
|
183581
183583
|
return false;
|
|
183582
183584
|
}
|
|
183583
183585
|
/**
|
|
183584
|
-
*
|
|
183585
|
-
* * See `CurvePrimitive` for parameter details.
|
|
183586
|
-
* * The returned location directly identifies fractional position along the CurveChainWithDistanceIndex
|
|
183586
|
+
* (Attempt to) find a position on the curve at a signed distance from start fraction.
|
|
183587
|
+
* * See `CurvePrimitive.moveSignedDistanceFromFraction` for parameter details.
|
|
183588
|
+
* * The returned location directly identifies fractional position along the CurveChainWithDistanceIndex and
|
|
183587
183589
|
* has pointer to an additional detail for the child curve.
|
|
183588
183590
|
*/
|
|
183589
183591
|
moveSignedDistanceFromFraction(startFraction, signedDistance, allowExtension, result) {
|
|
183590
183592
|
const distanceA = startFraction * this._totalLength;
|
|
183591
183593
|
const distanceB = distanceA + signedDistance;
|
|
183592
183594
|
const fragmentB = this.chainDistanceToFragment(distanceB, true);
|
|
183593
|
-
const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result);
|
|
183595
|
+
const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result); // local detail related to the child curve
|
|
183594
183596
|
const endFraction = startFraction + (signedDistance / this._totalLength);
|
|
183595
|
-
const chainDetail =
|
|
183597
|
+
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__.CurveLocationDetail.createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result); // global detail related to the curve chain
|
|
183596
183598
|
chainDetail.childDetail = childDetail;
|
|
183597
183599
|
return chainDetail;
|
|
183598
183600
|
}
|
|
183599
183601
|
/**
|
|
183602
|
+
* Return an object summarizing closest point test counts.
|
|
183600
183603
|
* The returned object has
|
|
183601
183604
|
* * numCalls = number of times closestPoint was called.
|
|
183602
|
-
* * numCurvesTested = number of curves tested with full closestPoint
|
|
183603
|
-
* * numAssigned = number of times a new minimum value was recorded
|
|
183605
|
+
* * numCurvesTested = number of curves tested with full closestPoint.
|
|
183606
|
+
* * numAssigned = number of times a new minimum value was recorded.
|
|
183604
183607
|
* * numCandidate = number of curves that would be tested in worst case.
|
|
183605
|
-
* return an object summarizing closest point test counts
|
|
183606
183608
|
* @param clear if true, counts are cleared after the return object is formed.
|
|
183607
183609
|
*/
|
|
183608
183610
|
static getClosestPointTestCounts(clear = true) {
|
|
@@ -183619,13 +183621,13 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183619
183621
|
}
|
|
183620
183622
|
/**
|
|
183621
183623
|
* Search for the curve point that is closest to the spacePoint.
|
|
183622
|
-
* * The CurveChainWithDistanceIndex invokes the base class CurvePrimitive method, which
|
|
183623
|
-
*
|
|
183624
|
-
* * The returned detail directly identifies fractional position along the CurveChainWithDistanceIndex
|
|
183624
|
+
* * The CurveChainWithDistanceIndex invokes the base class CurvePrimitive method, which (via a handler)
|
|
183625
|
+
* determines a CurveLocation detail among the children.
|
|
183626
|
+
* * The returned detail directly identifies fractional position along the CurveChainWithDistanceIndex and
|
|
183625
183627
|
* has pointer to an additional detail for the child curve.
|
|
183626
183628
|
* @param spacePoint point in space
|
|
183627
183629
|
* @param extend true to extend the curve
|
|
183628
|
-
* @returns
|
|
183630
|
+
* @returns a CurveLocationDetail structure that holds the details of the close point.
|
|
183629
183631
|
*/
|
|
183630
183632
|
closestPoint(spacePoint, extend) {
|
|
183631
183633
|
let childDetail;
|
|
@@ -183636,52 +183638,51 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183636
183638
|
}
|
|
183637
183639
|
else {
|
|
183638
183640
|
const sortedFragments = PathFragment.collectSortedQuickMinDistances(this._fragments, spacePoint);
|
|
183639
|
-
const extend0 = [
|
|
183640
|
-
|
|
183641
|
+
const extend0 = [
|
|
183642
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0),
|
|
183643
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__.CurveExtendMode.None,
|
|
183644
|
+
];
|
|
183645
|
+
const extend1 = [
|
|
183646
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__.CurveExtendMode.None,
|
|
183647
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1),
|
|
183648
|
+
];
|
|
183641
183649
|
const fragment0 = this._fragments[0];
|
|
183642
183650
|
const fragment1 = this._fragments[this._fragments.length - 1];
|
|
183643
183651
|
CurveChainWithDistanceIndex._numCalls++;
|
|
183644
183652
|
CurveChainWithDistanceIndex._numCandidate += sortedFragments.length;
|
|
183645
|
-
|
|
183646
|
-
|
|
183653
|
+
let detailA;
|
|
183654
|
+
for (const sortedFragment of sortedFragments) {
|
|
183655
|
+
if (sortedFragment.a > aMin)
|
|
183656
|
+
// sortedFragments help early exit because it is likely that one of the first few fragments
|
|
183657
|
+
// in sortedFragments is the fragment with minimum distance from space point to the curve.
|
|
183647
183658
|
break;
|
|
183648
183659
|
CurveChainWithDistanceIndex._numTested++;
|
|
183649
|
-
const child =
|
|
183650
|
-
|
|
183660
|
+
const child = sortedFragment.childCurve;
|
|
183661
|
+
detailA = child.closestPoint(spacePoint, sortedFragment === fragment0 ? extend0 : sortedFragment === fragment1 ? extend1 : false, detailA);
|
|
183651
183662
|
if (detailA && detailA.a < aMin) {
|
|
183652
183663
|
aMin = detailA.a;
|
|
183653
|
-
childDetail =
|
|
183654
|
-
childDetail.a = detailA.a;
|
|
183664
|
+
childDetail = detailA.clone(childDetail);
|
|
183655
183665
|
CurveChainWithDistanceIndex._numAssigned++;
|
|
183656
183666
|
}
|
|
183657
183667
|
}
|
|
183658
183668
|
}
|
|
183659
183669
|
if (!childDetail)
|
|
183660
183670
|
return undefined;
|
|
183661
|
-
|
|
183662
|
-
if (fragment) {
|
|
183663
|
-
const chainDistance = fragment.childFractionToChainDistance(childDetail.fraction);
|
|
183664
|
-
const chainFraction = this.chainDistanceToChainFraction(chainDistance);
|
|
183665
|
-
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__.CurveLocationDetail.createCurveFractionPoint(this, chainFraction, childDetail.point);
|
|
183666
|
-
chainDetail.childDetail = childDetail;
|
|
183667
|
-
chainDetail.a = childDetail.a;
|
|
183668
|
-
return chainDetail;
|
|
183669
|
-
}
|
|
183670
|
-
return undefined;
|
|
183671
|
+
return this.computeChainDetail(childDetail);
|
|
183671
183672
|
}
|
|
183672
183673
|
/**
|
|
183673
183674
|
* Construct an offset of each child as viewed in the xy-plane (ignoring z).
|
|
183674
|
-
* * No attempt is made to join the offset children. Use RegionOps.constructCurveXYOffset
|
|
183675
|
+
* * No attempt is made to join the offset children. Use RegionOps.constructCurveXYOffset to return a fully
|
|
183675
183676
|
* joined offset.
|
|
183676
|
-
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve)
|
|
183677
|
+
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve) or offset options object.
|
|
183677
183678
|
*/
|
|
183678
183679
|
constructOffsetXY(offsetDistanceOrOptions) {
|
|
183679
|
-
const options =
|
|
183680
|
+
const options = _OffsetOptions__WEBPACK_IMPORTED_MODULE_10__.OffsetOptions.create(offsetDistanceOrOptions);
|
|
183680
183681
|
const offsets = [];
|
|
183681
183682
|
for (const prim of this.collectCurvePrimitives(undefined, true, true)) {
|
|
183682
183683
|
const offset = prim.constructOffsetXY(options);
|
|
183683
183684
|
if (offset !== undefined) {
|
|
183684
|
-
if (offset instanceof
|
|
183685
|
+
if (offset instanceof _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__.CurvePrimitive)
|
|
183685
183686
|
offsets.push(offset);
|
|
183686
183687
|
else if (Array.isArray(offset))
|
|
183687
183688
|
offset.forEach((cp) => offsets.push(cp));
|
|
@@ -183693,12 +183694,31 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
183693
183694
|
* Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of
|
|
183694
183695
|
* projection.
|
|
183695
183696
|
* @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
|
|
183696
|
-
* @param lowHigh optional receiver for output
|
|
183697
|
+
* @param lowHigh optional receiver for output.
|
|
183697
183698
|
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
|
|
183698
183699
|
* end of the ray.
|
|
183699
183700
|
*/
|
|
183700
183701
|
projectedParameterRange(ray, lowHigh) {
|
|
183701
|
-
return
|
|
183702
|
+
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_11__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
183703
|
+
}
|
|
183704
|
+
/**
|
|
183705
|
+
* Compute the global chain detail corresponding to a local child detail.
|
|
183706
|
+
* @param childDetail the local detail, with respect to a child of this chain.
|
|
183707
|
+
* @returns the global detail, with respect to this chain.
|
|
183708
|
+
*/
|
|
183709
|
+
computeChainDetail(childDetail) {
|
|
183710
|
+
if (!childDetail.curve)
|
|
183711
|
+
return undefined;
|
|
183712
|
+
const fragment = this.curveAndChildFractionToFragment(childDetail.curve, childDetail.fraction);
|
|
183713
|
+
if (fragment) {
|
|
183714
|
+
const chainDistance = fragment.childFractionToChainDistance(childDetail.fraction);
|
|
183715
|
+
const chainFraction = this.chainDistanceToChainFraction(chainDistance);
|
|
183716
|
+
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__.CurveLocationDetail.createCurveFractionPoint(this, chainFraction, childDetail.point);
|
|
183717
|
+
chainDetail.childDetail = childDetail;
|
|
183718
|
+
chainDetail.a = childDetail.a;
|
|
183719
|
+
return chainDetail;
|
|
183720
|
+
}
|
|
183721
|
+
return undefined;
|
|
183702
183722
|
}
|
|
183703
183723
|
}
|
|
183704
183724
|
CurveChainWithDistanceIndex._numCalls = 0;
|
|
@@ -184154,10 +184174,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
184154
184174
|
/* harmony export */ });
|
|
184155
184175
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
184156
184176
|
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
184177
|
+
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
184157
184178
|
/* harmony import */ var _internalContexts_CurveCurveCloseApproachXY__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internalContexts/CurveCurveCloseApproachXY */ "../../core/geometry/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js");
|
|
184158
184179
|
/* harmony import */ var _internalContexts_CurveCurveIntersectXY__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internalContexts/CurveCurveIntersectXY */ "../../core/geometry/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js");
|
|
184159
184180
|
/* harmony import */ var _internalContexts_CurveCurveIntersectXYZ__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internalContexts/CurveCurveIntersectXYZ */ "../../core/geometry/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js");
|
|
184160
|
-
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
184161
184181
|
/*---------------------------------------------------------------------------------------------
|
|
184162
184182
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
184163
184183
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -184200,6 +184220,7 @@ class CurveCurve {
|
|
|
184200
184220
|
}
|
|
184201
184221
|
/**
|
|
184202
184222
|
* Return xy intersections of 2 projected curves.
|
|
184223
|
+
* @param worldToLocal transform (possibly perspective) defining the local coordinates in which to compute xy intersections.
|
|
184203
184224
|
* @param curveA first curve
|
|
184204
184225
|
* @param extendA true to allow curveA to extend
|
|
184205
184226
|
* @param curveB second curve
|
|
@@ -184212,19 +184233,20 @@ class CurveCurve {
|
|
|
184212
184233
|
return handler.grabPairedResults();
|
|
184213
184234
|
}
|
|
184214
184235
|
/**
|
|
184215
|
-
|
|
184216
|
-
|
|
184217
|
-
|
|
184218
|
-
|
|
184219
|
-
|
|
184220
|
-
|
|
184221
|
-
|
|
184222
|
-
|
|
184223
|
-
|
|
184224
|
-
|
|
184236
|
+
* Return full 3d xyz intersections of 2 curves.
|
|
184237
|
+
* * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.
|
|
184238
|
+
* * Not Implemented for bspline and bezier curves.
|
|
184239
|
+
* @beta
|
|
184240
|
+
* @param curveA first curve
|
|
184241
|
+
* @param extendA true to allow curveA to extend
|
|
184242
|
+
* @param curveB second curve
|
|
184243
|
+
* @param extendB true to allow curveB to extend
|
|
184244
|
+
* @returns array of intersections structured as CurveLocationDetailPair[]
|
|
184245
|
+
*/
|
|
184246
|
+
static intersectionXYZPairs(curveA, extendA, curveB, extendB) {
|
|
184225
184247
|
const handler = new _internalContexts_CurveCurveIntersectXYZ__WEBPACK_IMPORTED_MODULE_4__.CurveCurveIntersectXYZ(extendA, curveB, extendB);
|
|
184226
184248
|
curveA.dispatchToGeometryHandler(handler);
|
|
184227
|
-
return handler.
|
|
184249
|
+
return handler.grabPairedResults();
|
|
184228
184250
|
}
|
|
184229
184251
|
/**
|
|
184230
184252
|
* Return xy intersections of input curves.
|
|
@@ -185454,7 +185476,8 @@ class CurveLocationDetailPair {
|
|
|
185454
185476
|
}
|
|
185455
185477
|
}
|
|
185456
185478
|
/**
|
|
185457
|
-
* Data bundle for a pair of arrays of CurveLocationDetail structures
|
|
185479
|
+
* Data bundle for a pair of arrays of CurveLocationDetail structures.
|
|
185480
|
+
* @deprecated in 4.x. Use CurveLocationDetailPair[] instead.
|
|
185458
185481
|
* @public
|
|
185459
185482
|
*/
|
|
185460
185483
|
class CurveLocationDetailArrayPair {
|
|
@@ -186065,8 +186088,8 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
186065
186088
|
* directions), or array of distinct CurveExtendOptions for start and end.
|
|
186066
186089
|
* @returns Returns a CurveLocationDetail structure that holds the details of the close point.
|
|
186067
186090
|
*/
|
|
186068
|
-
closestPoint(spacePoint, extend) {
|
|
186069
|
-
const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.ClosestPointStrokeHandler(spacePoint, extend);
|
|
186091
|
+
closestPoint(spacePoint, extend, result) {
|
|
186092
|
+
const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.ClosestPointStrokeHandler(spacePoint, extend, result);
|
|
186070
186093
|
this.emitStrokableParts(strokeHandler);
|
|
186071
186094
|
return strokeHandler.claimResult();
|
|
186072
186095
|
}
|
|
@@ -193421,7 +193444,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193421
193444
|
* @internal
|
|
193422
193445
|
*/
|
|
193423
193446
|
class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORTED_MODULE_0__.NewtonRtoRStrokeHandler {
|
|
193424
|
-
constructor(spacePoint, extend) {
|
|
193447
|
+
constructor(spacePoint, extend, result) {
|
|
193425
193448
|
super();
|
|
193426
193449
|
this._fractionA = 0;
|
|
193427
193450
|
this._functionA = 0;
|
|
@@ -193431,7 +193454,7 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
|
|
|
193431
193454
|
this._spacePoint = spacePoint;
|
|
193432
193455
|
this._workPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
193433
193456
|
this._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_2__.Ray3d.createZero();
|
|
193434
|
-
this._closestPoint =
|
|
193457
|
+
this._closestPoint = result;
|
|
193435
193458
|
this._extend = extend;
|
|
193436
193459
|
this.startCurvePrimitive(undefined);
|
|
193437
193460
|
this._newtonSolver = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_3__.Newton1dUnboundedApproximateDerivative(this);
|
|
@@ -193607,18 +193630,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193607
193630
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
193608
193631
|
/* harmony export */ CurveCurveCloseApproachXY: () => (/* binding */ CurveCurveCloseApproachXY)
|
|
193609
193632
|
/* harmony export */ });
|
|
193610
|
-
/* harmony import */ var
|
|
193611
|
-
/* harmony import */ var
|
|
193612
|
-
/* harmony import */ var
|
|
193613
|
-
/* harmony import */ var
|
|
193614
|
-
/* harmony import */ var
|
|
193615
|
-
/* harmony import */ var
|
|
193616
|
-
/* harmony import */ var
|
|
193617
|
-
/* harmony import */ var
|
|
193618
|
-
/* harmony import */ var
|
|
193619
|
-
/* harmony import */ var
|
|
193620
|
-
/* harmony import */ var
|
|
193621
|
-
/* harmony import */ var
|
|
193633
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
193634
|
+
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
193635
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
193636
|
+
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
193637
|
+
/* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
|
|
193638
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
193639
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
193640
|
+
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
193641
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
193642
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
193643
|
+
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
193644
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
193645
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
193646
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
193622
193647
|
/*---------------------------------------------------------------------------------------------
|
|
193623
193648
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
193624
193649
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -193638,6 +193663,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193638
193663
|
|
|
193639
193664
|
|
|
193640
193665
|
|
|
193666
|
+
|
|
193667
|
+
|
|
193641
193668
|
// cspell:word XYRR
|
|
193642
193669
|
/**
|
|
193643
193670
|
* Handler class for XY close approach between _geometryB and another geometry.
|
|
@@ -193653,12 +193680,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193653
193680
|
* * geometryB is saved for later reference.
|
|
193654
193681
|
* @internal
|
|
193655
193682
|
*/
|
|
193656
|
-
class CurveCurveCloseApproachXY extends
|
|
193683
|
+
class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__.RecurseToCurvesGeometryHandler {
|
|
193657
193684
|
setGeometryB(geometryB) {
|
|
193658
193685
|
this._geometryB = geometryB;
|
|
193659
193686
|
this._circularArcB = undefined;
|
|
193660
193687
|
this._circularRadiusB = undefined;
|
|
193661
|
-
if (geometryB instanceof
|
|
193688
|
+
if (geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
193662
193689
|
const r = geometryB.circularRadiusXY();
|
|
193663
193690
|
if (r !== undefined) {
|
|
193664
193691
|
this._circularRadiusB = r;
|
|
@@ -193666,9 +193693,6 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193666
193693
|
}
|
|
193667
193694
|
}
|
|
193668
193695
|
}
|
|
193669
|
-
reinitialize() {
|
|
193670
|
-
this._results = [];
|
|
193671
|
-
}
|
|
193672
193696
|
/**
|
|
193673
193697
|
* Constructor.
|
|
193674
193698
|
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
@@ -193676,8 +193700,8 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193676
193700
|
constructor(geometryB) {
|
|
193677
193701
|
super();
|
|
193678
193702
|
this.setGeometryB(geometryB);
|
|
193679
|
-
this._maxDistanceSquared =
|
|
193680
|
-
this.
|
|
193703
|
+
this._maxDistanceSquared = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistanceSquared;
|
|
193704
|
+
this._results = [];
|
|
193681
193705
|
}
|
|
193682
193706
|
/** Set the (possibly undefined) max XY distance (z is ignored) to accept. */
|
|
193683
193707
|
set maxDistanceToAccept(value) {
|
|
@@ -193712,12 +193736,12 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193712
193736
|
grabPairedResults(reinitialize = false) {
|
|
193713
193737
|
const result = this._results;
|
|
193714
193738
|
if (reinitialize)
|
|
193715
|
-
this.
|
|
193739
|
+
this._results = [];
|
|
193716
193740
|
return result;
|
|
193717
193741
|
}
|
|
193718
193742
|
/** Returns `true` if `detail` has same curve and fraction. */
|
|
193719
193743
|
sameCurveAndFraction(cp, fraction, detail) {
|
|
193720
|
-
return cp === detail.curve &&
|
|
193744
|
+
return cp === detail.curve && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isAlmostEqualNumber(fraction, detail.fraction);
|
|
193721
193745
|
}
|
|
193722
193746
|
/**
|
|
193723
193747
|
* If distance between pointA and pointB is less than maxDistance, record CurveLocationDetailPair which is
|
|
@@ -193726,9 +193750,9 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193726
193750
|
testAndRecordPointPairApproach(cpA, fA, pointA, cpB, fB, pointB, reversed) {
|
|
193727
193751
|
const d2 = pointA.distanceSquaredXY(pointB);
|
|
193728
193752
|
if (d2 < this._maxDistanceSquared) {
|
|
193729
|
-
const detailA =
|
|
193730
|
-
const detailB =
|
|
193731
|
-
const pair =
|
|
193753
|
+
const detailA = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(cpA, fA, pointA);
|
|
193754
|
+
const detailB = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(cpB, fB, pointB);
|
|
193755
|
+
const pair = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair.createCapture(detailA, detailB);
|
|
193732
193756
|
if (reversed)
|
|
193733
193757
|
pair.swapDetails();
|
|
193734
193758
|
this._results.push(pair);
|
|
@@ -193744,7 +193768,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193744
193768
|
* @param cpB the second curve
|
|
193745
193769
|
* @param fractionB0 start of the second curve
|
|
193746
193770
|
* @param fractionB1 end of the second curve
|
|
193747
|
-
* @param reversed
|
|
193771
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
193748
193772
|
* @param intervalDetails optional CurveLocationDetailPair
|
|
193749
193773
|
*/
|
|
193750
193774
|
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed, intervalDetails) {
|
|
@@ -193754,14 +193778,14 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193754
193778
|
intervalDetails.detailA.hasFraction1 &&
|
|
193755
193779
|
intervalDetails.detailB.hasFraction1;
|
|
193756
193780
|
if (isInterval) {
|
|
193757
|
-
globalFractionA =
|
|
193758
|
-
globalFractionB =
|
|
193759
|
-
globalFractionA1 =
|
|
193760
|
-
globalFractionB1 =
|
|
193781
|
+
globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, intervalDetails.detailA.fraction, fractionA1);
|
|
193782
|
+
globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, intervalDetails.detailB.fraction, fractionB1);
|
|
193783
|
+
globalFractionA1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, intervalDetails.detailA.fraction1, fractionA1);
|
|
193784
|
+
globalFractionB1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, intervalDetails.detailB.fraction1, fractionB1);
|
|
193761
193785
|
}
|
|
193762
193786
|
else {
|
|
193763
|
-
globalFractionA = globalFractionA1 =
|
|
193764
|
-
globalFractionB = globalFractionB1 =
|
|
193787
|
+
globalFractionA = globalFractionA1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
|
|
193788
|
+
globalFractionB = globalFractionB1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
193765
193789
|
}
|
|
193766
193790
|
// ignore duplicate of most recent approach
|
|
193767
193791
|
const numPrevious = this._results.length;
|
|
@@ -193779,8 +193803,8 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193779
193803
|
return;
|
|
193780
193804
|
}
|
|
193781
193805
|
}
|
|
193782
|
-
const detailA =
|
|
193783
|
-
const detailB =
|
|
193806
|
+
const detailA = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(cpA, globalFractionA, cpA.fractionToPoint(globalFractionA));
|
|
193807
|
+
const detailB = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(cpB, globalFractionB, cpB.fractionToPoint(globalFractionB));
|
|
193784
193808
|
if (isInterval) {
|
|
193785
193809
|
detailA.captureFraction1Point1(globalFractionA1, cpA.fractionToPoint(globalFractionA1));
|
|
193786
193810
|
detailB.captureFraction1Point1(globalFractionB1, cpB.fractionToPoint(globalFractionB1));
|
|
@@ -193789,14 +193813,14 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193789
193813
|
const d2 = detailA.point.distanceSquaredXY(detailB.point);
|
|
193790
193814
|
if (d2 > this._maxDistanceSquared)
|
|
193791
193815
|
return;
|
|
193792
|
-
detailA.setIntervalRole(
|
|
193793
|
-
detailB.setIntervalRole(
|
|
193816
|
+
detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveIntervalRole.isolated);
|
|
193817
|
+
detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveIntervalRole.isolated);
|
|
193794
193818
|
}
|
|
193795
193819
|
if (reversed) {
|
|
193796
|
-
this._results.push(new
|
|
193820
|
+
this._results.push(new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair(detailB, detailA));
|
|
193797
193821
|
}
|
|
193798
193822
|
else {
|
|
193799
|
-
this._results.push(new
|
|
193823
|
+
this._results.push(new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair(detailA, detailB));
|
|
193800
193824
|
}
|
|
193801
193825
|
}
|
|
193802
193826
|
/**
|
|
@@ -193810,11 +193834,11 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193810
193834
|
* @param cpB curveB
|
|
193811
193835
|
* @param fractionB0 global start fraction on curveB
|
|
193812
193836
|
* @param fractionB1 global end fraction on curveB
|
|
193813
|
-
* @param reversed whether to reverse the details in the pair
|
|
193837
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
193814
193838
|
*/
|
|
193815
193839
|
capturePairWithLocalFractions(pair, cpA, fractionA0, fractionA1, cpB, fractionB0, fractionB1, reversed) {
|
|
193816
|
-
const globalFractionA =
|
|
193817
|
-
const globalFractionB =
|
|
193840
|
+
const globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, pair.detailA.fraction, fractionA1);
|
|
193841
|
+
const globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, pair.detailB.fraction, fractionB1);
|
|
193818
193842
|
// ignore duplicate of most recent pair
|
|
193819
193843
|
const numPrevious = this._results.length;
|
|
193820
193844
|
if (numPrevious > 0) {
|
|
@@ -193831,13 +193855,13 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193831
193855
|
return;
|
|
193832
193856
|
}
|
|
193833
193857
|
}
|
|
193858
|
+
// recompute the points just in case
|
|
193859
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveEvaluatedFraction(cpA, globalFractionA, pair.detailA);
|
|
193860
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveEvaluatedFraction(cpB, globalFractionB, pair.detailB);
|
|
193861
|
+
pair.detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveIntervalRole.isolated);
|
|
193862
|
+
pair.detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveIntervalRole.isolated);
|
|
193834
193863
|
if (reversed)
|
|
193835
193864
|
pair.swapDetails();
|
|
193836
|
-
// recompute the points just in case
|
|
193837
|
-
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__.CurveLocationDetail.createCurveEvaluatedFraction(cpA, globalFractionA, pair.detailA);
|
|
193838
|
-
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__.CurveLocationDetail.createCurveEvaluatedFraction(cpB, globalFractionB, pair.detailB);
|
|
193839
|
-
pair.detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__.CurveIntervalRole.isolated);
|
|
193840
|
-
pair.detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__.CurveIntervalRole.isolated);
|
|
193841
193865
|
this._results.push(pair);
|
|
193842
193866
|
}
|
|
193843
193867
|
/**
|
|
@@ -193845,7 +193869,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193845
193869
|
* @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible)
|
|
193846
193870
|
* @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible)
|
|
193847
193871
|
* @param pairs array of pairs
|
|
193848
|
-
* @param reversed
|
|
193872
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
193849
193873
|
*/
|
|
193850
193874
|
recordPairs(cpA, cpB, pairs, reversed) {
|
|
193851
193875
|
if (pairs !== undefined) {
|
|
@@ -193858,15 +193882,15 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193858
193882
|
* Record fully assembled (but possibly reversed) detail pair.
|
|
193859
193883
|
* @param detailA first detail
|
|
193860
193884
|
* @param detailB second detail
|
|
193861
|
-
* @param reversed
|
|
193885
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
193862
193886
|
*/
|
|
193863
193887
|
captureDetailPair(detailA, detailB, reversed) {
|
|
193864
193888
|
if (detailA && detailB) {
|
|
193865
193889
|
if (reversed) {
|
|
193866
|
-
this._results.push(
|
|
193890
|
+
this._results.push(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair.createCapture(detailB, detailA));
|
|
193867
193891
|
}
|
|
193868
193892
|
else {
|
|
193869
|
-
this._results.push(
|
|
193893
|
+
this._results.push(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair.createCapture(detailA, detailB));
|
|
193870
193894
|
}
|
|
193871
193895
|
}
|
|
193872
193896
|
}
|
|
@@ -193887,7 +193911,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193887
193911
|
}
|
|
193888
193912
|
/**
|
|
193889
193913
|
* Return fractions of close approach within maxDistance between two line segments (a0,a1) and (b0,b1).
|
|
193890
|
-
* * Math details can be found at
|
|
193914
|
+
* * Math details can be found at core/geometry/internaldocs/Curve.md
|
|
193891
193915
|
* @param a0 start point of line a
|
|
193892
193916
|
* @param a1 end point of line a
|
|
193893
193917
|
* @param b0 start point of line b
|
|
@@ -193907,38 +193931,38 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193907
193931
|
const e01y = b1.y - a0.y;
|
|
193908
193932
|
const e10x = b0.x - a1.x;
|
|
193909
193933
|
const e10y = b0.y - a1.y;
|
|
193910
|
-
const hab0 =
|
|
193911
|
-
const hab1 =
|
|
193912
|
-
const hba0 = -
|
|
193913
|
-
const hba1 = -
|
|
193934
|
+
const hab0 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(ux, uy, e00x, e00y);
|
|
193935
|
+
const hab1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(ux, uy, e01x, e01y);
|
|
193936
|
+
const hba0 = -_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(vx, vy, e00x, e00y);
|
|
193937
|
+
const hba1 = -_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(vx, vy, e10x, e10y);
|
|
193914
193938
|
if (hab0 * hab1 < 0.0 && hba0 * hba1 < 0.0) { // true intersection, strictly within both segments
|
|
193915
193939
|
const fractionA = -hba0 / (hba1 - hba0);
|
|
193916
193940
|
const fractionB = -hab0 / (hab1 - hab0);
|
|
193917
|
-
return
|
|
193941
|
+
return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair.createCapture(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(undefined, fractionA, a0.interpolate(fractionA, a1)), _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(undefined, fractionB, b0.interpolate(fractionB, b1)));
|
|
193918
193942
|
}
|
|
193919
193943
|
// there's no intersection, so find the closest approach within maxDistance from an endpoint
|
|
193920
|
-
const closestApproach = new
|
|
193944
|
+
const closestApproach = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair();
|
|
193921
193945
|
closestApproach.detailA.a = 2 * maxDistanceSquared; // init to an approach that's too far away
|
|
193922
193946
|
let reversed = false;
|
|
193923
|
-
const uu =
|
|
193947
|
+
const uu = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseSquaredXY(ux, uy);
|
|
193924
193948
|
if (hab0 * hab0 <= maxDistanceSquared * uu) { // test distance of b0 to u
|
|
193925
|
-
const fractionA =
|
|
193949
|
+
const fractionA = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYXY(ux, uy, e00x, e00y) / uu;
|
|
193926
193950
|
if (this.updatePointToSegmentDistance(0, b0, a0, a1, fractionA, maxDistanceSquared, closestApproach))
|
|
193927
193951
|
reversed = true;
|
|
193928
193952
|
}
|
|
193929
193953
|
if (hab1 * hab1 <= maxDistanceSquared * uu) { // test distance of b1 to u
|
|
193930
|
-
const fractionA =
|
|
193954
|
+
const fractionA = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYXY(ux, uy, e01x, e01y) / uu;
|
|
193931
193955
|
if (this.updatePointToSegmentDistance(1, b1, a0, a1, fractionA, maxDistanceSquared, closestApproach))
|
|
193932
193956
|
reversed = true;
|
|
193933
193957
|
}
|
|
193934
|
-
const vv =
|
|
193958
|
+
const vv = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseSquaredXY(vx, vy);
|
|
193935
193959
|
if (hba0 * hba0 <= maxDistanceSquared * vv) { // test distance of a0 to v
|
|
193936
|
-
const fractionB = -
|
|
193960
|
+
const fractionB = -_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYXY(vx, vy, e00x, e00y) / vv;
|
|
193937
193961
|
if (this.updatePointToSegmentDistance(0, a0, b0, b1, fractionB, maxDistanceSquared, closestApproach))
|
|
193938
193962
|
reversed = false;
|
|
193939
193963
|
}
|
|
193940
193964
|
if (hba1 * hba1 <= maxDistanceSquared * vv) { // test distance of a1 to v
|
|
193941
|
-
const fractionB = -
|
|
193965
|
+
const fractionB = -_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYXY(vx, vy, e10x, e10y) / vv;
|
|
193942
193966
|
if (this.updatePointToSegmentDistance(1, a1, b0, b1, fractionB, maxDistanceSquared, closestApproach))
|
|
193943
193967
|
reversed = false;
|
|
193944
193968
|
}
|
|
@@ -193960,7 +193984,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193960
193984
|
* @param fB0 fraction0 on curveB
|
|
193961
193985
|
* @param fB1 fraction0 on curveB
|
|
193962
193986
|
* @param testProjectionOnB whether to record projections of the given curveA points onto curveB
|
|
193963
|
-
* @param reversed
|
|
193987
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
193964
193988
|
*/
|
|
193965
193989
|
testAndRecordFractionalPairApproach(cpA, fA0, fA1, testProjectionOnA, cpB, fB0, fB1, testProjectionOnB, reversed) {
|
|
193966
193990
|
const pointA0 = cpA.fractionToPoint(fA0);
|
|
@@ -193985,7 +194009,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
193985
194009
|
// NO NO NO -- this is 3D closest point --- need 2d !!
|
|
193986
194010
|
const detail = cpB.closestPoint(pointA, false);
|
|
193987
194011
|
if (detail) {
|
|
193988
|
-
const fB =
|
|
194012
|
+
const fB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.restrictToInterval(detail.fraction, fB0, fB1);
|
|
193989
194013
|
if (fB === detail.fraction) { // if fraction is within fB0 and fB1
|
|
193990
194014
|
this.testAndRecordPointPairApproach(cpA, fA, pointA, cpB, detail.fraction, detail.point, reversed);
|
|
193991
194015
|
}
|
|
@@ -194024,7 +194048,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194024
194048
|
* @param pointA1 end point of the segment
|
|
194025
194049
|
* @param fractionA1 fraction of the end of the segment
|
|
194026
194050
|
* @param arc the arc
|
|
194027
|
-
* @param reversed
|
|
194051
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
194028
194052
|
*/
|
|
194029
194053
|
dispatchSegmentArc(cpA, pointA0, fractionA0, pointA1, fractionA1, arc, reversed) {
|
|
194030
194054
|
// 1) intersection between arc and segment
|
|
@@ -194040,18 +194064,18 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194040
194064
|
const data = arc.toTransformedVectors();
|
|
194041
194065
|
const pointA0Local = pointA0;
|
|
194042
194066
|
const pointA1Local = pointA1;
|
|
194043
|
-
const alpha =
|
|
194044
|
-
const beta =
|
|
194045
|
-
const gamma =
|
|
194046
|
-
const cosines = new
|
|
194047
|
-
const sines = new
|
|
194048
|
-
const radians = new
|
|
194049
|
-
const numRoots =
|
|
194067
|
+
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.center, 1); // det(A0, A1, C)
|
|
194068
|
+
const beta = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector0, 0); // det(A0, A1, U)
|
|
194069
|
+
const gamma = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector90, 0); // det(A0, A1, V)
|
|
194070
|
+
const cosines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_5__.GrowableFloat64Array(2);
|
|
194071
|
+
const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_5__.GrowableFloat64Array(2);
|
|
194072
|
+
const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_5__.GrowableFloat64Array(2);
|
|
194073
|
+
const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(// solve the equation
|
|
194050
194074
|
alpha, beta, gamma, cosines, sines, radians);
|
|
194051
194075
|
for (let i = 0; i < numRoots; i++) {
|
|
194052
194076
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
194053
194077
|
const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
|
|
194054
|
-
const lineFraction =
|
|
194078
|
+
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
194055
194079
|
// only add if the point is within the start and end fractions of both line segment and arc
|
|
194056
194080
|
if (lineFraction !== undefined && this.acceptFraction(lineFraction) && this.acceptFraction(arcFraction)) {
|
|
194057
194081
|
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
|
|
@@ -194071,7 +194095,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194071
194095
|
for (const radians1 of [parallelRadians, parallelRadians + Math.PI]) {
|
|
194072
194096
|
const arcPoint = data.center.plus2Scaled(data.vector0, Math.cos(radians1), data.vector90, Math.sin(radians1));
|
|
194073
194097
|
const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians1);
|
|
194074
|
-
const lineFraction =
|
|
194098
|
+
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
194075
194099
|
// only add if the point is within the start and end fractions of both line segment and arc
|
|
194076
194100
|
if (lineFraction !== undefined && this.acceptFraction(lineFraction) && this.acceptFraction(arcFraction)) {
|
|
194077
194101
|
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
|
|
@@ -194081,15 +194105,15 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194081
194105
|
/** Low level dispatch of circular arc with circular arc. radiusA must be larger than or equal to radiusB. */
|
|
194082
194106
|
dispatchCircularCircularOrdered(cpA, radiusA, cpB, radiusB, reversed) {
|
|
194083
194107
|
const c = cpA.center.distance(cpB.center);
|
|
194084
|
-
const e = this._maxDistanceToAccept !== undefined ? this._maxDistanceToAccept :
|
|
194108
|
+
const e = this._maxDistanceToAccept !== undefined ? this._maxDistanceToAccept : _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance;
|
|
194085
194109
|
if (c > radiusA + radiusB + e) // distance between circles is more than max distance
|
|
194086
194110
|
return;
|
|
194087
194111
|
// TODO: 1) intersection between arcs
|
|
194088
194112
|
// 2) endpoints to endpoints
|
|
194089
194113
|
this.testAndRecordFractionalPairApproach(cpA, 0, 1, false, cpB, 0, 1, false, reversed);
|
|
194090
194114
|
// 3) line from one arc to another (perpendicular to arc tangents along center-center line)
|
|
194091
|
-
if (!
|
|
194092
|
-
const vectorAB =
|
|
194115
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSmallMetricDistance(c)) {
|
|
194116
|
+
const vectorAB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.createStartEnd(cpA.center, cpB.center);
|
|
194093
194117
|
vectorAB.scaleInPlace(1.0 / c);
|
|
194094
194118
|
for (const rA of [-radiusA, radiusA]) {
|
|
194095
194119
|
for (const rB of [-radiusB, radiusB]) {
|
|
@@ -194114,7 +194138,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194114
194138
|
const radians = Math.atan2(s, c);
|
|
194115
194139
|
const fraction = arc.sweep.radiansToPositivePeriodicFraction(radians, 0);
|
|
194116
194140
|
if (fraction < 1.0)
|
|
194117
|
-
return
|
|
194141
|
+
return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveEvaluatedFraction(arc, fraction);
|
|
194118
194142
|
return undefined;
|
|
194119
194143
|
}
|
|
194120
194144
|
/** Low level dispatch of arc with arc. Only circular arcs are supported. */
|
|
@@ -194138,34 +194162,34 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194138
194162
|
}
|
|
194139
194163
|
/** Low level dispatch of arc with (beziers of) a bspline curve */
|
|
194140
194164
|
dispatchArcBsplineCurve3d(cpA, cpB, reversed) {
|
|
194141
|
-
const ls =
|
|
194165
|
+
const ls = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
194142
194166
|
cpB.emitStrokes(ls);
|
|
194143
194167
|
this.computeArcLineString(cpA, ls, reversed);
|
|
194144
194168
|
}
|
|
194145
194169
|
/** Low level dispatch of (beziers of) a bspline curve with (beziers of) a bspline curve */
|
|
194146
194170
|
dispatchBSplineCurve3dBSplineCurve3d(bcurveA, bcurveB, reversed) {
|
|
194147
|
-
const lsA =
|
|
194171
|
+
const lsA = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
194148
194172
|
bcurveA.emitStrokes(lsA);
|
|
194149
|
-
const lsB =
|
|
194173
|
+
const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
194150
194174
|
bcurveB.emitStrokes(lsB);
|
|
194151
194175
|
this.computeLineStringLineString(lsA, lsB, reversed);
|
|
194152
194176
|
}
|
|
194153
194177
|
/** Low level dispatch of linestring with (beziers of) a bspline curve */
|
|
194154
194178
|
dispatchLineStringBSplineCurve(lsA, curveB, reversed) {
|
|
194155
|
-
const lsB =
|
|
194179
|
+
const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
194156
194180
|
curveB.emitStrokes(lsB);
|
|
194157
194181
|
this.computeLineStringLineString(lsA, lsB, reversed);
|
|
194158
194182
|
}
|
|
194159
194183
|
/** Low level dispatch of segment with (beziers of) a bspline curve */
|
|
194160
194184
|
dispatchSegmentBsplineCurve(segA, curveB, reversed) {
|
|
194161
|
-
const lsB =
|
|
194185
|
+
const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
194162
194186
|
curveB.emitStrokes(lsB);
|
|
194163
194187
|
this.computeSegmentLineString(segA, lsB, reversed);
|
|
194164
194188
|
}
|
|
194165
194189
|
/** Detail computation for segment approaching linestring. */
|
|
194166
194190
|
computeSegmentLineString(segA, lsB, reversed) {
|
|
194167
194191
|
const numB = lsB.numPoints();
|
|
194168
|
-
const deltaFracB =
|
|
194192
|
+
const deltaFracB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.safeDivideFraction(1, numB - 1, 0);
|
|
194169
194193
|
const pointA0 = segA.point0Ref;
|
|
194170
194194
|
const pointA1 = segA.point1Ref;
|
|
194171
194195
|
const pointB0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
@@ -194205,7 +194229,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194205
194229
|
/** Low level dispatch of curve collection. */
|
|
194206
194230
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
194207
194231
|
const geomB = this._geometryB; // save
|
|
194208
|
-
if (!geomB || !geomB.children || !(geomB instanceof
|
|
194232
|
+
if (!geomB || !geomB.children || !(geomB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection))
|
|
194209
194233
|
return;
|
|
194210
194234
|
for (const child of geomB.children) {
|
|
194211
194235
|
this.resetGeometry(child);
|
|
@@ -194213,24 +194237,60 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194213
194237
|
}
|
|
194214
194238
|
this._geometryB = geomB; // restore
|
|
194215
194239
|
}
|
|
194240
|
+
/**
|
|
194241
|
+
* Given a parent chain, convert the corresponding child details so that they refer to the chain's global parameterization.
|
|
194242
|
+
* * It is assumed that `this._results[i].detailA.curve` is a child of chainA, and similarly for detailB/chainB.
|
|
194243
|
+
* @param chainA convert each detailA to the global parameterization of chainA
|
|
194244
|
+
* @param chainB convert each detailB to the global parameterization of chainB
|
|
194245
|
+
*/
|
|
194246
|
+
convertChildDetailToChainDetail(chainA, chainB) {
|
|
194247
|
+
for (const childDetailPair of this._results) {
|
|
194248
|
+
if (chainA) {
|
|
194249
|
+
const chainDetail = chainA.computeChainDetail(childDetailPair.detailA);
|
|
194250
|
+
if (chainDetail)
|
|
194251
|
+
childDetailPair.detailA = chainDetail;
|
|
194252
|
+
}
|
|
194253
|
+
if (chainB) {
|
|
194254
|
+
const chainDetail = chainB.computeChainDetail(childDetailPair.detailB);
|
|
194255
|
+
if (chainDetail)
|
|
194256
|
+
childDetailPair.detailB = chainDetail;
|
|
194257
|
+
}
|
|
194258
|
+
}
|
|
194259
|
+
}
|
|
194260
|
+
/** Low level dispatch to geomA given a CurveChainWithDistanceIndex in geometryB. */
|
|
194261
|
+
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
194262
|
+
if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex))
|
|
194263
|
+
return;
|
|
194264
|
+
const geomB = this._geometryB; // save
|
|
194265
|
+
for (const child of geomB.path.children) {
|
|
194266
|
+
this.resetGeometry(child);
|
|
194267
|
+
geomAHandler(geomA);
|
|
194268
|
+
}
|
|
194269
|
+
this.resetGeometry(geomB); // restore
|
|
194270
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!(geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex));
|
|
194271
|
+
this.convertChildDetailToChainDetail(undefined, geomB);
|
|
194272
|
+
}
|
|
194216
194273
|
/** Double dispatch handler for strongly typed segment. */
|
|
194217
194274
|
handleLineSegment3d(segmentA) {
|
|
194218
|
-
if (this._geometryB instanceof
|
|
194275
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
194219
194276
|
const segmentB = this._geometryB;
|
|
194220
194277
|
this.dispatchSegmentSegment(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, segmentB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, false);
|
|
194221
194278
|
}
|
|
194222
|
-
else if (this._geometryB instanceof
|
|
194279
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d) {
|
|
194223
194280
|
this.computeSegmentLineString(segmentA, this._geometryB, false);
|
|
194224
194281
|
}
|
|
194225
|
-
else if (this._geometryB instanceof
|
|
194282
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
194226
194283
|
this.dispatchSegmentArc(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._geometryB, false);
|
|
194227
194284
|
}
|
|
194228
|
-
else if (this._geometryB instanceof
|
|
194285
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__.BSplineCurve3d) {
|
|
194229
194286
|
this.dispatchSegmentBsplineCurve(segmentA, this._geometryB, false);
|
|
194230
194287
|
}
|
|
194231
|
-
else if (this._geometryB instanceof
|
|
194288
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection) {
|
|
194232
194289
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
194233
194290
|
}
|
|
194291
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex) {
|
|
194292
|
+
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
194293
|
+
}
|
|
194234
194294
|
return undefined;
|
|
194235
194295
|
}
|
|
194236
194296
|
/**
|
|
@@ -194271,7 +194331,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194271
194331
|
return;
|
|
194272
194332
|
let bitB0;
|
|
194273
194333
|
let bitB1;
|
|
194274
|
-
const rangeA1 =
|
|
194334
|
+
const rangeA1 = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.createNull();
|
|
194275
194335
|
const pointA0 = CurveCurveCloseApproachXY._workPointAA0;
|
|
194276
194336
|
const pointA1 = CurveCurveCloseApproachXY._workPointAA1;
|
|
194277
194337
|
const pointB0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
@@ -194311,62 +194371,76 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194311
194371
|
}
|
|
194312
194372
|
/** Double dispatch handler for strongly typed linestring. */
|
|
194313
194373
|
handleLineString3d(lsA) {
|
|
194314
|
-
if (this._geometryB instanceof
|
|
194374
|
+
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d) {
|
|
194315
194375
|
const lsB = this._geometryB;
|
|
194316
194376
|
this.computeLineStringLineString(lsA, lsB, false);
|
|
194317
194377
|
}
|
|
194318
|
-
else if (this._geometryB instanceof
|
|
194378
|
+
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
194319
194379
|
this.computeSegmentLineString(this._geometryB, lsA, true);
|
|
194320
194380
|
}
|
|
194321
|
-
else if (this._geometryB instanceof
|
|
194381
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
194322
194382
|
this.computeArcLineString(this._geometryB, lsA, true);
|
|
194323
194383
|
}
|
|
194324
|
-
else if (this._geometryB instanceof
|
|
194384
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__.BSplineCurve3d) {
|
|
194325
194385
|
this.dispatchLineStringBSplineCurve(lsA, this._geometryB, false);
|
|
194326
194386
|
}
|
|
194327
|
-
else if (this._geometryB instanceof
|
|
194387
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection) {
|
|
194328
194388
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
194329
194389
|
}
|
|
194390
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex) {
|
|
194391
|
+
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
194392
|
+
}
|
|
194330
194393
|
return undefined;
|
|
194331
194394
|
}
|
|
194332
194395
|
/** Double dispatch handler for strongly typed arc. */
|
|
194333
194396
|
handleArc3d(arc0) {
|
|
194334
|
-
if (this._geometryB instanceof
|
|
194397
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
194335
194398
|
this.dispatchSegmentArc(this._geometryB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, arc0, true);
|
|
194336
194399
|
}
|
|
194337
|
-
else if (this._geometryB instanceof
|
|
194400
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d) {
|
|
194338
194401
|
this.computeArcLineString(arc0, this._geometryB, false);
|
|
194339
194402
|
}
|
|
194340
|
-
else if (this._geometryB instanceof
|
|
194403
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
194341
194404
|
this.dispatchArcArc(arc0, this._geometryB, false);
|
|
194342
194405
|
}
|
|
194343
|
-
else if (this._geometryB instanceof
|
|
194406
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__.BSplineCurve3d) {
|
|
194344
194407
|
this.dispatchArcBsplineCurve3d(arc0, this._geometryB, false);
|
|
194345
194408
|
}
|
|
194346
|
-
else if (this._geometryB instanceof
|
|
194409
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection) {
|
|
194347
194410
|
this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
|
|
194348
194411
|
}
|
|
194412
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex) {
|
|
194413
|
+
this.dispatchCurveChainWithDistanceIndex(arc0, this.handleArc3d.bind(this));
|
|
194414
|
+
}
|
|
194349
194415
|
return undefined;
|
|
194350
194416
|
}
|
|
194351
194417
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
194352
194418
|
handleBSplineCurve3d(curve) {
|
|
194353
|
-
if (this._geometryB instanceof
|
|
194419
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
194354
194420
|
this.dispatchSegmentBsplineCurve(this._geometryB, curve, true);
|
|
194355
194421
|
}
|
|
194356
|
-
else if (this._geometryB instanceof
|
|
194422
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d) {
|
|
194357
194423
|
this.dispatchLineStringBSplineCurve(this._geometryB, curve, true);
|
|
194358
194424
|
}
|
|
194359
|
-
else if (this._geometryB instanceof
|
|
194425
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
194360
194426
|
this.dispatchArcBsplineCurve3d(this._geometryB, curve, true);
|
|
194361
194427
|
}
|
|
194362
|
-
else if (this._geometryB instanceof
|
|
194428
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__.BSplineCurve3dBase) {
|
|
194363
194429
|
this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
|
|
194364
194430
|
}
|
|
194365
|
-
else if (this._geometryB instanceof
|
|
194431
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection) {
|
|
194366
194432
|
this.dispatchCurveCollection(curve, this.handleBSplineCurve3d.bind(this));
|
|
194367
194433
|
}
|
|
194434
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex) {
|
|
194435
|
+
this.dispatchCurveChainWithDistanceIndex(curve, this.handleBSplineCurve3d.bind(this));
|
|
194436
|
+
}
|
|
194368
194437
|
return undefined;
|
|
194369
194438
|
}
|
|
194439
|
+
/** Double dispatch handler for strongly typed CurveChainWithDistanceIndex. */
|
|
194440
|
+
handleCurveChainWithDistanceIndex(chain) {
|
|
194441
|
+
super.handleCurveChainWithDistanceIndex(chain);
|
|
194442
|
+
this.convertChildDetailToChainDetail(chain, this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex ? this._geometryB : undefined);
|
|
194443
|
+
}
|
|
194370
194444
|
/** Double dispatch handler for strongly typed homogeneous bspline curve .. */
|
|
194371
194445
|
handleBSplineCurve3dH(_curve) {
|
|
194372
194446
|
/*
|
|
@@ -194385,11 +194459,11 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
194385
194459
|
return undefined;
|
|
194386
194460
|
}
|
|
194387
194461
|
}
|
|
194388
|
-
CurveCurveCloseApproachXY._workPointAA0 =
|
|
194389
|
-
CurveCurveCloseApproachXY._workPointAA1 =
|
|
194390
|
-
CurveCurveCloseApproachXY._workPointBB0 =
|
|
194391
|
-
CurveCurveCloseApproachXY._workPointBB1 =
|
|
194392
|
-
CurveCurveCloseApproachXY._workPointB =
|
|
194462
|
+
CurveCurveCloseApproachXY._workPointAA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
194463
|
+
CurveCurveCloseApproachXY._workPointAA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
194464
|
+
CurveCurveCloseApproachXY._workPointBB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
194465
|
+
CurveCurveCloseApproachXY._workPointBB1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
194466
|
+
CurveCurveCloseApproachXY._workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
194393
194467
|
|
|
194394
194468
|
|
|
194395
194469
|
|
|
@@ -194473,15 +194547,13 @@ class BezierBezierIntersectionXYRRToRRD extends _numerics_Newton__WEBPACK_IMPORT
|
|
|
194473
194547
|
* @internal
|
|
194474
194548
|
*/
|
|
194475
194549
|
class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_2__.NullGeometryHandler {
|
|
194476
|
-
reinitialize() {
|
|
194477
|
-
this._results = [];
|
|
194478
|
-
}
|
|
194479
194550
|
/**
|
|
194551
|
+
* The constructor.
|
|
194480
194552
|
* @param worldToLocal optional transform (possibly perspective) to project to xy plane for intersection.
|
|
194481
|
-
* @param extendA flag
|
|
194482
|
-
* @param geometryB second curve for intersection.
|
|
194553
|
+
* @param extendA flag for extension of the other geometry.
|
|
194554
|
+
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
194483
194555
|
* @param extendB flag for extension of geometryB.
|
|
194484
|
-
* @param tolerance optional distance tolerance for coincidence
|
|
194556
|
+
* @param tolerance optional distance tolerance for coincidence.
|
|
194485
194557
|
*/
|
|
194486
194558
|
constructor(worldToLocal, extendA, geometryB, extendB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
|
|
194487
194559
|
super();
|
|
@@ -194496,7 +194568,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194496
194568
|
this._worldToLocalPerspective = worldToLocal.clone();
|
|
194497
194569
|
}
|
|
194498
194570
|
this._coincidentGeometryContext = _geometry3d_CoincidentGeometryOps__WEBPACK_IMPORTED_MODULE_4__.CoincidentGeometryQuery.create(tolerance);
|
|
194499
|
-
this.
|
|
194571
|
+
this._results = [];
|
|
194500
194572
|
}
|
|
194501
194573
|
/** Reset the geometry and flags, leaving all other parts unchanged (and preserving accumulated intersections) */
|
|
194502
194574
|
resetGeometry(extendA, geometryB, extendB) {
|
|
@@ -194511,10 +194583,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194511
194583
|
return false;
|
|
194512
194584
|
return true;
|
|
194513
194585
|
}
|
|
194514
|
-
/**
|
|
194515
|
-
* Test the fraction by strict parameter, but allow toleranced distance test at ends.
|
|
194516
|
-
* @param tolerance optional distance tolerance to check proximity to start/end point
|
|
194517
|
-
*/
|
|
194586
|
+
/** Test the fraction by strict parameter, but allow toleranced distance test at ends. */
|
|
194518
194587
|
acceptFractionOnLine(extend0, fraction, extend1, pointA, pointB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
|
|
194519
194588
|
if (!extend0 && fraction < 0) {
|
|
194520
194589
|
return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isDistanceWithinTol(fraction * pointA.distanceXY(pointB), tolerance);
|
|
@@ -194524,25 +194593,32 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194524
194593
|
return true;
|
|
194525
194594
|
}
|
|
194526
194595
|
/**
|
|
194527
|
-
*
|
|
194596
|
+
* Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair
|
|
194528
194597
|
* @param reinitialize if true, a new results structure is created for use by later calls.
|
|
194529
194598
|
*/
|
|
194530
194599
|
grabPairedResults(reinitialize = false) {
|
|
194531
194600
|
const result = this._results;
|
|
194532
194601
|
if (reinitialize)
|
|
194533
|
-
this.
|
|
194602
|
+
this._results = [];
|
|
194534
194603
|
return result;
|
|
194535
194604
|
}
|
|
194536
194605
|
sameCurveAndFraction(cp, fraction, detail) {
|
|
194537
194606
|
return cp === detail.curve && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isAlmostEqualNumber(fraction, detail.fraction);
|
|
194538
194607
|
}
|
|
194539
194608
|
/**
|
|
194540
|
-
*
|
|
194541
|
-
*
|
|
194542
|
-
*
|
|
194609
|
+
* Record the pre-computed intersection between two curves. Filter by extension rules. Record with fraction mapping.
|
|
194610
|
+
* @param localFractionA intersection fraction local to the subcurve of cpA between fractionA0 and fractionA1
|
|
194611
|
+
* @param cpA the first curve
|
|
194612
|
+
* @param fractionA0 start of the subcurve of cpA
|
|
194613
|
+
* @param fractionA1 end of the subcurve of cpA
|
|
194614
|
+
* @param localFractionB intersection fraction local to the subcurve of cpB between fractionB0 and fractionB1
|
|
194615
|
+
* @param cpB the second curve
|
|
194616
|
+
* @param fractionB0 start of the subcurve of cpB
|
|
194617
|
+
* @param fractionB1 end of the subcurve of cpB
|
|
194618
|
+
* @param reversed whether to reverse the details in the recorded intersection pair
|
|
194619
|
+
* @param intervalDetails optional data for a coincident segment intersection
|
|
194543
194620
|
*/
|
|
194544
|
-
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB,
|
|
194545
|
-
cpB, fractionB0, fractionB1, reversed, intervalDetails) {
|
|
194621
|
+
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed, intervalDetails) {
|
|
194546
194622
|
let globalFractionA, globalFractionB;
|
|
194547
194623
|
let globalFractionA1, globalFractionB1;
|
|
194548
194624
|
const isInterval = intervalDetails !== undefined &&
|
|
@@ -194558,7 +194634,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194558
194634
|
globalFractionA = globalFractionA1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
|
|
194559
194635
|
globalFractionB = globalFractionB1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
194560
194636
|
}
|
|
194561
|
-
// ignore duplicate of most recent
|
|
194637
|
+
// ignore duplicate of most recent pair
|
|
194562
194638
|
const numPrevious = this._results.length;
|
|
194563
194639
|
if (numPrevious > 0 && !isInterval) {
|
|
194564
194640
|
const oldDetailA = this._results[numPrevious - 1].detailA;
|
|
@@ -194592,10 +194668,10 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194592
194668
|
}
|
|
194593
194669
|
}
|
|
194594
194670
|
/**
|
|
194595
|
-
* Emit recordPoint for multiple pairs (on full curve
|
|
194596
|
-
* @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible)
|
|
194597
|
-
* @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible)
|
|
194598
|
-
* @param pairs array of pairs
|
|
194671
|
+
* Emit recordPoint for multiple pairs (on full curve).
|
|
194672
|
+
* @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible).
|
|
194673
|
+
* @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible).
|
|
194674
|
+
* @param pairs array of pairs.
|
|
194599
194675
|
* @param reversed true to have order reversed in final structures.
|
|
194600
194676
|
*/
|
|
194601
194677
|
recordPairs(cpA, cpB, pairs, reversed) {
|
|
@@ -194605,11 +194681,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194605
194681
|
}
|
|
194606
194682
|
}
|
|
194607
194683
|
}
|
|
194608
|
-
/**
|
|
194609
|
-
* Compute intersection of two line segments.
|
|
194610
|
-
* Filter by extension rules.
|
|
194611
|
-
* Record with fraction mapping.
|
|
194612
|
-
*/
|
|
194684
|
+
/** Compute intersection of two line segments. Filter by extension rules. Record with fraction mapping. */
|
|
194613
194685
|
computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
194614
194686
|
const uv = CurveCurveIntersectXY._workVector2dA;
|
|
194615
194687
|
// Problem: Normal practice is to do the (quick, simple) transverse intersection first
|
|
@@ -194627,7 +194699,10 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194627
194699
|
}
|
|
194628
194700
|
}
|
|
194629
194701
|
}
|
|
194630
|
-
|
|
194702
|
+
/**
|
|
194703
|
+
* Compute intersection of projected homogeneous line segments. Filter by extension rules. Record with
|
|
194704
|
+
* fraction mapping. Assumes caller knows the _worldToLocal is present.
|
|
194705
|
+
*/
|
|
194631
194706
|
computeSegmentSegment3DH(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
194632
194707
|
const hA0 = CurveCurveIntersectXY._workPointA0H;
|
|
194633
194708
|
const hA1 = CurveCurveIntersectXY._workPointA1H;
|
|
@@ -194648,8 +194723,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194648
194723
|
}
|
|
194649
194724
|
}
|
|
194650
194725
|
// Caller accesses data from a line segment and passes to here.
|
|
194651
|
-
//
|
|
194652
|
-
// The fraction and extend parameters allow all combinations to be passed in
|
|
194726
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
194727
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
194653
194728
|
// This method applies transform.
|
|
194654
194729
|
dispatchSegmentSegment(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
194655
194730
|
if (this._worldToLocalAffine) {
|
|
@@ -194665,14 +194740,14 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194665
194740
|
}
|
|
194666
194741
|
}
|
|
194667
194742
|
// Caller accesses data from a linestring or segment and passes it here.
|
|
194668
|
-
//
|
|
194669
|
-
// The fraction and extend parameters allow all combinations to be passed in
|
|
194743
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
194744
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
194670
194745
|
dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
|
|
194671
194746
|
// Arc: X = C + cU + sV
|
|
194672
194747
|
// Line: contains points A0,A1
|
|
194673
194748
|
// Arc point colinear with line if det (A0, A1, X) = 0
|
|
194674
194749
|
// with homogeneous xyw points and vectors.
|
|
194675
|
-
// With equational X:
|
|
194750
|
+
// With equational X: det (A0, A1, C) + c det (A0, A1,U) + s det (A0, A1, V) = 0.
|
|
194676
194751
|
// solve for theta.
|
|
194677
194752
|
// evaluate points.
|
|
194678
194753
|
// project back to line.
|
|
@@ -194728,9 +194803,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194728
194803
|
}
|
|
194729
194804
|
}
|
|
194730
194805
|
// Caller accesses data from two arcs.
|
|
194731
|
-
//
|
|
194732
|
-
//
|
|
194733
|
-
//
|
|
194806
|
+
// Each matrix has [U V C] in (x,y,w) form from projection.
|
|
194807
|
+
// Invert the projection matrix matrixA.
|
|
194808
|
+
// Apply the inverse to matrixB. Then arc b is an ellipse in the circular space of A.
|
|
194734
194809
|
dispatchArcArcThisOrder(cpA, matrixA, // homogeneous xyw projection !!!
|
|
194735
194810
|
extendA, cpB, matrixB, // homogeneous xyw projection !!!
|
|
194736
194811
|
extendB, reversed) {
|
|
@@ -194754,8 +194829,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194754
194829
|
}
|
|
194755
194830
|
}
|
|
194756
194831
|
// Caller accesses data from two arcs.
|
|
194757
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
194758
|
-
// Solves the arc-arc equations
|
|
194832
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
194833
|
+
// Solves the arc-arc equations.
|
|
194759
194834
|
dispatchArcArc(cpA, extendA, cpB, extendB, reversed) {
|
|
194760
194835
|
// Arc: X = C + cU + sV
|
|
194761
194836
|
// Line: contains points A0,A1
|
|
@@ -194801,9 +194876,6 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194801
194876
|
this.recordPairs(cpA, cpB, pairs, reversed);
|
|
194802
194877
|
}
|
|
194803
194878
|
}
|
|
194804
|
-
// Caller accesses data from two arcs.
|
|
194805
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
194806
|
-
// Solves the arc-arc equations
|
|
194807
194879
|
dispatchArcBsplineCurve3d(cpA, extendA, cpB, extendB, reversed) {
|
|
194808
194880
|
// Arc: X = C + cU + sV
|
|
194809
194881
|
// implicitize the arc as viewed. This "3d" matrix is homogeneous "XYW" not "xyz"
|
|
@@ -194874,7 +194946,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194874
194946
|
}
|
|
194875
194947
|
}
|
|
194876
194948
|
}
|
|
194877
|
-
/** Apply the transformation to bezier curves.
|
|
194949
|
+
/** Apply the transformation to bezier curves. Optionally construct ranges. */
|
|
194878
194950
|
transformBeziers(beziers) {
|
|
194879
194951
|
if (this._worldToLocalAffine) {
|
|
194880
194952
|
for (const bezier of beziers)
|
|
@@ -194914,8 +194986,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194914
194986
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
194915
194987
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
194916
194988
|
if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
194917
|
-
this.recordPointWithLocalFractions(
|
|
194918
|
-
fractionB, cpB, 0, 1, reversed
|
|
194989
|
+
this.recordPointWithLocalFractions(
|
|
194990
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
194991
|
+
);
|
|
194919
194992
|
}
|
|
194920
194993
|
}
|
|
194921
194994
|
*/
|
|
@@ -194931,7 +195004,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194931
195004
|
bezierB.poleProductsXYZW(univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w);
|
|
194932
195005
|
let errors = 0;
|
|
194933
195006
|
const roots = univariateBezierB.roots(0.0, true);
|
|
194934
|
-
if (roots)
|
|
195007
|
+
if (roots) {
|
|
194935
195008
|
for (const r of roots) {
|
|
194936
195009
|
let bezierBFraction = r;
|
|
194937
195010
|
bezierB.fractionToPoint4d(bezierBFraction, this._xyzwB);
|
|
@@ -194968,11 +195041,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
194968
195041
|
}
|
|
194969
195042
|
}
|
|
194970
195043
|
}
|
|
195044
|
+
}
|
|
194971
195045
|
}
|
|
194972
195046
|
}
|
|
194973
|
-
// Caller accesses data from two arcs.
|
|
194974
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
194975
|
-
// Solves the arc-arc equations
|
|
194976
195047
|
dispatchBSplineCurve3dBSplineCurve3d(bcurveA, bcurveB, _reversed) {
|
|
194977
195048
|
const bezierSpanA = bcurveA.collectBezierSpans(true);
|
|
194978
195049
|
const bezierSpanB = bcurveB.collectBezierSpans(true);
|
|
@@ -195000,9 +195071,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
195000
195071
|
}
|
|
195001
195072
|
}
|
|
195002
195073
|
/**
|
|
195003
|
-
* Apply the projection transform (if any) to (xyz, w)
|
|
195074
|
+
* Apply the projection transform (if any) to (xyz, w).
|
|
195004
195075
|
* @param xyz xyz parts of input point.
|
|
195005
|
-
* @param w weight to use for homogeneous effects
|
|
195076
|
+
* @param w weight to use for homogeneous effects.
|
|
195006
195077
|
*/
|
|
195007
195078
|
projectPoint(xyz, w = 1.0) {
|
|
195008
195079
|
if (this._worldToLocalPerspective)
|
|
@@ -195027,9 +195098,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
195027
195098
|
npcPlane.clone(worldPlane);
|
|
195028
195099
|
}
|
|
195029
195100
|
}
|
|
195030
|
-
// Caller accesses data from segment and bsplineCurve
|
|
195031
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
195032
|
-
// Solves the arc-arc equations
|
|
195101
|
+
// Caller accesses data from segment and bsplineCurve.
|
|
195102
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
195103
|
+
// Solves the arc-arc equations.
|
|
195033
195104
|
dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve, extendB, reversed) {
|
|
195034
195105
|
const pointA0H = this.projectPoint(pointA0);
|
|
195035
195106
|
const pointA1H = this.projectPoint(pointA1);
|
|
@@ -195111,6 +195182,38 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
195111
195182
|
}
|
|
195112
195183
|
return undefined;
|
|
195113
195184
|
}
|
|
195185
|
+
/** Detail computation for linestring intersecting linestring. */
|
|
195186
|
+
computeLineStringLineString(lsA, lsB, reversed) {
|
|
195187
|
+
const pointA0 = CurveCurveIntersectXY._workPointAA0;
|
|
195188
|
+
const pointA1 = CurveCurveIntersectXY._workPointAA1;
|
|
195189
|
+
const pointB0 = CurveCurveIntersectXY._workPointBB0;
|
|
195190
|
+
const pointB1 = CurveCurveIntersectXY._workPointBB1;
|
|
195191
|
+
const numA = lsA.numPoints();
|
|
195192
|
+
const numB = lsB.numPoints();
|
|
195193
|
+
if (numA > 1 && numB > 1) {
|
|
195194
|
+
lsA.pointAt(0, pointA0);
|
|
195195
|
+
const dfA = 1.0 / (numA - 1);
|
|
195196
|
+
const dfB = 1.0 / (numB - 1);
|
|
195197
|
+
let fA0 = 0.0;
|
|
195198
|
+
let fB0;
|
|
195199
|
+
let fA1;
|
|
195200
|
+
let fB1;
|
|
195201
|
+
const extendA = this._extendA;
|
|
195202
|
+
const extendB = this._extendB;
|
|
195203
|
+
lsA.pointAt(0, pointA0);
|
|
195204
|
+
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
195205
|
+
fA1 = ia * dfA;
|
|
195206
|
+
fB0 = 0.0;
|
|
195207
|
+
lsA.pointAt(ia, pointA1);
|
|
195208
|
+
lsB.pointAt(0, pointB0);
|
|
195209
|
+
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
195210
|
+
lsB.pointAt(ib, pointB1);
|
|
195211
|
+
fB1 = ib * dfB;
|
|
195212
|
+
this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, reversed);
|
|
195213
|
+
}
|
|
195214
|
+
}
|
|
195215
|
+
}
|
|
195216
|
+
}
|
|
195114
195217
|
static setTransformedWorkPoints(transform, pointA0, pointA1, pointB0, pointB1) {
|
|
195115
195218
|
transform.multiplyPoint3d(pointA0, this._workPointA0);
|
|
195116
195219
|
transform.multiplyPoint3d(pointA1, this._workPointA1);
|
|
@@ -195132,40 +195235,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
195132
195235
|
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_14__.BSplineCurve3d) {
|
|
195133
195236
|
this.dispatchSegmentBsplineCurve(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, false);
|
|
195134
195237
|
}
|
|
195238
|
+
return undefined;
|
|
195135
195239
|
}
|
|
195136
195240
|
/** Double dispatch handler for strongly typed linestring. */
|
|
195137
195241
|
handleLineString3d(lsA) {
|
|
195138
195242
|
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_12__.LineString3d) {
|
|
195139
195243
|
const lsB = this._geometryB;
|
|
195140
|
-
|
|
195141
|
-
const pointA1 = CurveCurveIntersectXY._workPointAA1;
|
|
195142
|
-
const pointB0 = CurveCurveIntersectXY._workPointBB0;
|
|
195143
|
-
const pointB1 = CurveCurveIntersectXY._workPointBB1;
|
|
195144
|
-
const numA = lsA.numPoints();
|
|
195145
|
-
const numB = lsB.numPoints();
|
|
195146
|
-
if (numA > 1 && numB > 1) {
|
|
195147
|
-
lsA.pointAt(0, pointA0);
|
|
195148
|
-
const dfA = 1.0 / (numA - 1);
|
|
195149
|
-
const dfB = 1.0 / (numB - 1);
|
|
195150
|
-
let fA0 = 0.0;
|
|
195151
|
-
let fB0;
|
|
195152
|
-
let fA1;
|
|
195153
|
-
let fB1;
|
|
195154
|
-
const extendA = this._extendA;
|
|
195155
|
-
const extendB = this._extendB;
|
|
195156
|
-
lsA.pointAt(0, pointA0);
|
|
195157
|
-
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
195158
|
-
fA1 = ia * dfA;
|
|
195159
|
-
fB0 = 0.0;
|
|
195160
|
-
lsA.pointAt(ia, pointA1);
|
|
195161
|
-
lsB.pointAt(0, pointB0);
|
|
195162
|
-
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
195163
|
-
lsB.pointAt(ib, pointB1);
|
|
195164
|
-
fB1 = ib * dfB;
|
|
195165
|
-
this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, false);
|
|
195166
|
-
}
|
|
195167
|
-
}
|
|
195168
|
-
}
|
|
195244
|
+
this.computeLineStringLineString(lsA, lsB, false);
|
|
195169
195245
|
}
|
|
195170
195246
|
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
195171
195247
|
this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
|
|
@@ -195258,14 +195334,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
195258
195334
|
/* harmony export */ CurveCurveIntersectXYZ: () => (/* binding */ CurveCurveIntersectXYZ)
|
|
195259
195335
|
/* harmony export */ });
|
|
195260
195336
|
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
195261
|
-
/* harmony import */ var
|
|
195337
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
195262
195338
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
195263
195339
|
/* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
|
|
195264
195340
|
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
195265
195341
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
195266
195342
|
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
195267
195343
|
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
195268
|
-
/* harmony import */ var
|
|
195344
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
195269
195345
|
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
195270
195346
|
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
195271
195347
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -195294,9 +195370,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
195294
195370
|
* @internal
|
|
195295
195371
|
*/
|
|
195296
195372
|
class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_0__.NullGeometryHandler {
|
|
195297
|
-
reinitialize() {
|
|
195298
|
-
this._results = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__.CurveLocationDetailArrayPair();
|
|
195299
|
-
}
|
|
195300
195373
|
/**
|
|
195301
195374
|
* @param extendA flag to enable using extension of the other geometry.
|
|
195302
195375
|
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
@@ -195307,16 +195380,16 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195307
195380
|
this._extendA = extendA;
|
|
195308
195381
|
this._geometryB = geometryB;
|
|
195309
195382
|
this._extendB = extendB;
|
|
195310
|
-
this.
|
|
195383
|
+
this._results = [];
|
|
195311
195384
|
}
|
|
195312
195385
|
/**
|
|
195313
|
-
*
|
|
195386
|
+
* Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair.
|
|
195314
195387
|
* @param reinitialize if true, a new results structure is created for use by later calls.
|
|
195315
195388
|
*/
|
|
195316
|
-
|
|
195389
|
+
grabPairedResults(reinitialize = false) {
|
|
195317
195390
|
const result = this._results;
|
|
195318
195391
|
if (reinitialize)
|
|
195319
|
-
this.
|
|
195392
|
+
this._results = [];
|
|
195320
195393
|
return result;
|
|
195321
195394
|
}
|
|
195322
195395
|
acceptFraction(extend0, fraction, extend1) {
|
|
@@ -195332,23 +195405,22 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195332
195405
|
* Reject if evaluated points do not match coordinates (e.g. close approach point).
|
|
195333
195406
|
* Record with fraction mapping.
|
|
195334
195407
|
*/
|
|
195335
|
-
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB,
|
|
195336
|
-
|
|
195337
|
-
const
|
|
195338
|
-
const globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
195408
|
+
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed) {
|
|
195409
|
+
const globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
|
|
195410
|
+
const globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
195339
195411
|
// ignore duplicate of most recent point . ..
|
|
195340
|
-
const numPrevious = this._results.
|
|
195412
|
+
const numPrevious = this._results.length;
|
|
195341
195413
|
if (numPrevious > 0) {
|
|
195342
|
-
const topFractionA = this._results
|
|
195343
|
-
const topFractionB = this._results
|
|
195414
|
+
const topFractionA = this._results[numPrevious - 1].detailA.fraction;
|
|
195415
|
+
const topFractionB = this._results[numPrevious - 1].detailB.fraction;
|
|
195344
195416
|
if (reversed) {
|
|
195345
|
-
if (
|
|
195346
|
-
|
|
195417
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionA, globalFractionB) &&
|
|
195418
|
+
_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionB, globalFractionA))
|
|
195347
195419
|
return;
|
|
195348
195420
|
}
|
|
195349
195421
|
else {
|
|
195350
|
-
if (
|
|
195351
|
-
|
|
195422
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionA, globalFractionA) &&
|
|
195423
|
+
_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionB, globalFractionB))
|
|
195352
195424
|
return;
|
|
195353
195425
|
}
|
|
195354
195426
|
}
|
|
@@ -195356,17 +195428,17 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195356
195428
|
const pointB = cpB.fractionToPoint(globalFractionB);
|
|
195357
195429
|
if (!pointA.isAlmostEqualMetric(pointB))
|
|
195358
195430
|
return;
|
|
195359
|
-
const detailA =
|
|
195360
|
-
detailA.setIntervalRole(
|
|
195361
|
-
const detailB =
|
|
195362
|
-
detailB.setIntervalRole(
|
|
195431
|
+
const detailA = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(cpA, globalFractionA, pointA);
|
|
195432
|
+
detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveIntervalRole.isolated);
|
|
195433
|
+
const detailB = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(cpB, globalFractionB, pointB);
|
|
195434
|
+
detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveIntervalRole.isolated);
|
|
195363
195435
|
if (reversed) {
|
|
195364
|
-
|
|
195365
|
-
this._results.
|
|
195436
|
+
const pair = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetailPair(detailB, detailA);
|
|
195437
|
+
this._results.push(pair);
|
|
195366
195438
|
}
|
|
195367
195439
|
else {
|
|
195368
|
-
|
|
195369
|
-
this._results.
|
|
195440
|
+
const pair = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetailPair(detailA, detailB);
|
|
195441
|
+
this._results.push(pair);
|
|
195370
195442
|
}
|
|
195371
195443
|
}
|
|
195372
195444
|
/**
|
|
@@ -195382,8 +195454,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195382
195454
|
}
|
|
195383
195455
|
}
|
|
195384
195456
|
// Caller accesses data from a line segment and passes to here.
|
|
195385
|
-
//
|
|
195386
|
-
// allow all combinations to be passed in
|
|
195457
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
195458
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
195387
195459
|
// This method applies transform.
|
|
195388
195460
|
dispatchSegmentSegment(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
195389
195461
|
this.computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed);
|
|
@@ -195398,12 +195470,12 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195398
195470
|
* @param origin plane origin
|
|
195399
195471
|
* @param vectorA vector which must be in the plane.
|
|
195400
195472
|
* @param cosineValue largest cosine of the angle theta between vectorA and vectorB to prefer their cross product, e.g.
|
|
195401
|
-
*
|
|
195473
|
+
* passing 0.94 ~ cos(20deg) will switch to using vectorC in the cross product if theta < ~20deg or theta > ~160deg.
|
|
195402
195474
|
* @param vectorB first candidate for additional in-plane vector
|
|
195403
195475
|
* @param vectorC second candidate for additional in-plane vector
|
|
195404
195476
|
*/
|
|
195405
195477
|
createPlaneWithPreferredPerpendicular(origin, vectorA, cosineValue, vectorB, vectorC) {
|
|
195406
|
-
cosineValue =
|
|
195478
|
+
cosineValue = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.restrictToInterval(Math.abs(cosineValue), 0.0, 1.0 - _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallFraction);
|
|
195407
195479
|
const dotAA = vectorA.magnitudeSquared();
|
|
195408
195480
|
const dotBB = vectorB.magnitudeSquared();
|
|
195409
195481
|
const dotAB = Math.abs(vectorA.dotProduct(vectorB));
|
|
@@ -195413,8 +195485,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195413
195485
|
return undefined;
|
|
195414
195486
|
}
|
|
195415
195487
|
// Caller accesses data from a linestring or segment and passes it here.
|
|
195416
|
-
//
|
|
195417
|
-
// allow all combinations to be passed in
|
|
195488
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
195489
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
195418
195490
|
dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
|
|
195419
195491
|
const lineVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Vector3d.createStartEnd(pointA0, pointA1);
|
|
195420
195492
|
const plane = this.createPlaneWithPreferredPerpendicular(pointA0, lineVector, 0.94, arc.perpendicularVector, arc.vector0);
|
|
@@ -195449,7 +195521,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195449
195521
|
_numerics_Polynomials__WEBPACK_IMPORTED_MODULE_3__.TrigPolynomial.solveUnitCircleHomogeneousEllipseIntersection(otherVectors.center.x, otherVectors.center.y, 1.0, otherVectors.vector0.x, otherVectors.vector0.y, 0.0, otherVectors.vector90.x, otherVectors.vector90.y, 0.0, ellipseRadians, circleRadians);
|
|
195450
195522
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
195451
195523
|
const fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);
|
|
195452
|
-
const fractionB =
|
|
195524
|
+
const fractionB = cpB.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
|
|
195453
195525
|
// hm .. do we really need to check the fractions? We know they are internal to the beziers
|
|
195454
195526
|
if (this.acceptFraction(extendA, fractionA, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
195455
195527
|
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
@@ -195458,13 +195530,13 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195458
195530
|
}
|
|
195459
195531
|
}
|
|
195460
195532
|
// Caller accesses data from two arcs.
|
|
195461
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
195462
|
-
// Solves the arc-arc equations
|
|
195533
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
195534
|
+
// Solves the arc-arc equations.
|
|
195463
195535
|
dispatchArcArc(cpA, extendA, cpB, extendB, reversed) {
|
|
195464
195536
|
// If arcs are in different planes:
|
|
195465
195537
|
// 1) Intersect each plane with the other arc (quadratic)
|
|
195466
195538
|
// 2) accept points that appear in both intersection sets.
|
|
195467
|
-
// If arcs are in parallel planes -- no intersections
|
|
195539
|
+
// If arcs are in parallel planes -- no intersections.
|
|
195468
195540
|
// If arcs are in the same plane -- xy intersection in that plane.
|
|
195469
195541
|
const planeA = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_4__.Plane3dByOriginAndUnitNormal.create(cpA.center, cpA.perpendicularVector);
|
|
195470
195542
|
const planeB = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_4__.Plane3dByOriginAndUnitNormal.create(cpB.center, cpB.perpendicularVector);
|
|
@@ -195472,7 +195544,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195472
195544
|
return;
|
|
195473
195545
|
if (planeA.getNormalRef().isParallelTo(planeB.getNormalRef())) {
|
|
195474
195546
|
if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef())) {
|
|
195475
|
-
// coplanar
|
|
195547
|
+
// coplanar
|
|
195476
195548
|
this.dispatchArcArcInPlane(cpA, extendA, cpB, extendB, reversed);
|
|
195477
195549
|
}
|
|
195478
195550
|
}
|
|
@@ -195494,8 +195566,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195494
195566
|
}
|
|
195495
195567
|
}
|
|
195496
195568
|
// Caller accesses data from two arcs.
|
|
195497
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
195498
|
-
// Solves the arc-arc equations
|
|
195569
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
195570
|
+
// Solves the arc-arc equations.
|
|
195499
195571
|
dispatchArcBsplineCurve3d(_arc, _extendA, _cpB, _extendB, _reversed) {
|
|
195500
195572
|
/*
|
|
195501
195573
|
// Arc: X = C + cU + sV
|
|
@@ -195503,7 +195575,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195503
195575
|
let matrixA: Matrix3d;
|
|
195504
195576
|
if (this._worldToLocalPerspective) {
|
|
195505
195577
|
const dataA = cpA.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
195506
|
-
matrixA = Matrix3d.createColumnsXYW(
|
|
195578
|
+
matrixA = Matrix3d.createColumnsXYW(
|
|
195579
|
+
dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w,
|
|
195580
|
+
);
|
|
195507
195581
|
} else {
|
|
195508
195582
|
const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);
|
|
195509
195583
|
matrixA = Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);
|
|
@@ -195515,12 +195589,21 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195515
195589
|
const matrixAInverse = matrixA.inverse();
|
|
195516
195590
|
if (matrixAInverse) {
|
|
195517
195591
|
const orderF = cpB.order; // order of the beziers for simple coordinates
|
|
195518
|
-
const orderG = 2 * orderF - 1;
|
|
195592
|
+
const orderG = 2 * orderF - 1; // order of the (single) bezier for squared coordinates.
|
|
195519
195593
|
const coffF = new Float64Array(orderF);
|
|
195520
195594
|
const univariateBezierG = new UnivariateBezier(orderG);
|
|
195521
|
-
const axx = matrixAInverse.at(0, 0);
|
|
195522
|
-
const
|
|
195523
|
-
const
|
|
195595
|
+
const axx = matrixAInverse.at(0, 0);
|
|
195596
|
+
const axy = matrixAInverse.at(0, 1);
|
|
195597
|
+
const axz = 0.0;
|
|
195598
|
+
const axw = matrixAInverse.at(0, 2);
|
|
195599
|
+
const ayx = matrixAInverse.at(1, 0);
|
|
195600
|
+
const ayy = matrixAInverse.at(1, 1);
|
|
195601
|
+
const ayz = 0.0;
|
|
195602
|
+
const ayw = matrixAInverse.at(1, 2);
|
|
195603
|
+
const awx = matrixAInverse.at(2, 0);
|
|
195604
|
+
const awy = matrixAInverse.at(2, 1);
|
|
195605
|
+
const awz = 0.0;
|
|
195606
|
+
const aww = matrixAInverse.at(2, 2);
|
|
195524
195607
|
|
|
195525
195608
|
if (matrixAInverse) {
|
|
195526
195609
|
let bezier: BezierCurve3dH | undefined;
|
|
@@ -195547,9 +195630,11 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195547
195630
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
195548
195631
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
195549
195632
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
195550
|
-
if (this.acceptFraction(extendA, arcFraction, extendA) &&
|
|
195551
|
-
this.
|
|
195552
|
-
|
|
195633
|
+
if (this.acceptFraction(extendA, arcFraction, extendA) &&
|
|
195634
|
+
this.acceptFraction(extendB, fractionB, extendB)) {
|
|
195635
|
+
this.recordPointWithLocalFractions(
|
|
195636
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
195637
|
+
);
|
|
195553
195638
|
}
|
|
195554
195639
|
}
|
|
195555
195640
|
}
|
|
@@ -195559,8 +195644,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195559
195644
|
*/
|
|
195560
195645
|
}
|
|
195561
195646
|
/*
|
|
195562
|
-
//
|
|
195563
|
-
private transformBeziers(beziers: BezierCurve3dH[]) {
|
|
195647
|
+
// Apply the transformation to bezier curves. Optionally construct ranges.
|
|
195648
|
+
private transformBeziers(beziers: BezierCurve3dH[]): void {
|
|
195564
195649
|
if (this._worldToLocalAffine) {
|
|
195565
195650
|
for (const bezier of beziers) bezier.tryTransformInPlace(this._worldToLocalAffine);
|
|
195566
195651
|
} else if (this._worldToLocalPerspective) {
|
|
@@ -195577,11 +195662,6 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195577
195662
|
}
|
|
195578
195663
|
return ranges;
|
|
195579
195664
|
}
|
|
195580
|
-
private _xyzwA0?: Point4d;
|
|
195581
|
-
private _xyzwA1?: Point4d;
|
|
195582
|
-
private _xyzwPlane?: Point4d;
|
|
195583
|
-
private _xyzwB?: Point4d;
|
|
195584
|
-
|
|
195585
195665
|
private dispatchBezierBezierStrokeFirst(
|
|
195586
195666
|
bezierA: BezierCurve3dH,
|
|
195587
195667
|
bcurveA: BSplineCurve3dBase,
|
|
@@ -195590,11 +195670,16 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195590
195670
|
bcurveB: BSplineCurve3dBase,
|
|
195591
195671
|
_strokeCountB: number,
|
|
195592
195672
|
univariateBezierB: UnivariateBezier, // caller-allocated for univariate coefficients.
|
|
195593
|
-
reversed: boolean
|
|
195594
|
-
|
|
195595
|
-
if (!this.
|
|
195596
|
-
|
|
195597
|
-
if (!this.
|
|
195673
|
+
reversed: boolean,
|
|
195674
|
+
) {
|
|
195675
|
+
if (!this._xyzwA0)
|
|
195676
|
+
this._xyzwA0 = Point4d.create();
|
|
195677
|
+
if (!this._xyzwA1)
|
|
195678
|
+
this._xyzwA1 = Point4d.create();
|
|
195679
|
+
if (!this._xyzwPlane)
|
|
195680
|
+
this._xyzwPlane = Point4d.create();
|
|
195681
|
+
if (!this._xyzwB)
|
|
195682
|
+
this._xyzwB = Point4d.create();
|
|
195598
195683
|
const roots = univariateBezierG.roots(0.0, true);
|
|
195599
195684
|
if (roots) {
|
|
195600
195685
|
for (const root of roots) {
|
|
@@ -195605,8 +195690,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195605
195690
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
195606
195691
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
195607
195692
|
if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
195608
|
-
this.recordPointWithLocalFractions(
|
|
195609
|
-
fractionB, cpB, 0, 1, reversed
|
|
195693
|
+
this.recordPointWithLocalFractions(
|
|
195694
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
195695
|
+
);
|
|
195610
195696
|
}
|
|
195611
195697
|
}
|
|
195612
195698
|
bezierA.fractionToPoint4d(0.0, this._xyzwA0);
|
|
@@ -195618,7 +195704,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195618
195704
|
f1 = i * df;
|
|
195619
195705
|
bezierA.fractionToPoint4d(f1, this._xyzwA1);
|
|
195620
195706
|
Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);
|
|
195621
|
-
bezierB.poleProductsXYZW(
|
|
195707
|
+
bezierB.poleProductsXYZW(
|
|
195708
|
+
univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w,
|
|
195709
|
+
);
|
|
195622
195710
|
let errors = 0;
|
|
195623
195711
|
const roots = univariateBezierB.roots(0.0, true);
|
|
195624
195712
|
if (roots)
|
|
@@ -195628,7 +195716,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195628
195716
|
const segmentAFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(this._xyzwA0, this._xyzwA1, this._xyzwB);
|
|
195629
195717
|
if (segmentAFraction && Geometry.isIn01WithTolerance(segmentAFraction, intervalTolerance)) {
|
|
195630
195718
|
const bezierAFraction = Geometry.interpolate(f0, segmentAFraction, f1);
|
|
195631
|
-
|
|
195719
|
+
// TODO implement newton search
|
|
195632
195720
|
const xyMatchingFunction = new BezierBezierIntersectionXYRRToRRD(bezierA, bezierB);
|
|
195633
195721
|
const newtonSearcher = new Newton2dUnboundedWithDerivative(xyMatchingFunction);
|
|
195634
195722
|
newtonSearcher.setUV(bezierAFraction, bezierBFraction);
|
|
@@ -195653,9 +195741,11 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195653
195741
|
errors++;
|
|
195654
195742
|
if (errors > 0 && !xyzA1.isAlmostEqual(xyzB1))
|
|
195655
195743
|
errors++;
|
|
195656
|
-
if (this.acceptFraction(false, bcurveAFraction, false) &&
|
|
195657
|
-
this.
|
|
195658
|
-
|
|
195744
|
+
if (this.acceptFraction(false, bcurveAFraction, false) &&
|
|
195745
|
+
this.acceptFraction(false, bcurveBFraction, false)) {
|
|
195746
|
+
this.recordPointWithLocalFractions(
|
|
195747
|
+
bcurveAFraction, bcurveA, 0, 1, bcurveBFraction, bcurveB, 0, 1, reversed,
|
|
195748
|
+
);
|
|
195659
195749
|
}
|
|
195660
195750
|
}
|
|
195661
195751
|
}
|
|
@@ -195663,8 +195753,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195663
195753
|
}
|
|
195664
195754
|
*/
|
|
195665
195755
|
// Caller accesses data from two arcs.
|
|
195666
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
195667
|
-
// Solves the arc-arc equations
|
|
195756
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
195757
|
+
// Solves the arc-arc equations.
|
|
195668
195758
|
dispatchBSplineCurve3dBSplineCurve3d(_bcurveA, _bcurveB, _reversed) {
|
|
195669
195759
|
/*
|
|
195670
195760
|
const bezierSpanA = bcurveA.collectBezierSpans(true) as BezierCurve3dH[];
|
|
@@ -195685,9 +195775,13 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195685
195775
|
const strokeCountA = bezierSpanA[a].computeStrokeCountForOptions();
|
|
195686
195776
|
const strokeCountB = bezierSpanB[b].computeStrokeCountForOptions();
|
|
195687
195777
|
if (strokeCountA < strokeCountB)
|
|
195688
|
-
this.dispatchBezierBezierStrokeFirst(
|
|
195778
|
+
this.dispatchBezierBezierStrokeFirst(
|
|
195779
|
+
bezierSpanA[a], bcurveA, strokeCountA, bezierSpanB[b], bcurveB, strokeCountB, univariateCoffsB, _reversed,
|
|
195780
|
+
);
|
|
195689
195781
|
else
|
|
195690
|
-
this.dispatchBezierBezierStrokeFirst(
|
|
195782
|
+
this.dispatchBezierBezierStrokeFirst(
|
|
195783
|
+
bezierSpanB[b], bcurveB, strokeCountB, bezierSpanA[a], bcurveA, strokeCountA, univariateCoffsA, !_reversed,
|
|
195784
|
+
);
|
|
195691
195785
|
}
|
|
195692
195786
|
}
|
|
195693
195787
|
}
|
|
@@ -195695,9 +195789,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195695
195789
|
}
|
|
195696
195790
|
/*
|
|
195697
195791
|
/**
|
|
195698
|
-
* Apply the projection transform (if any) to (xyz, w)
|
|
195792
|
+
* Apply the projection transform (if any) to (xyz, w).
|
|
195699
195793
|
* @param xyz xyz parts of input point.
|
|
195700
|
-
* @param w
|
|
195794
|
+
* @param w weight to use for homogeneous effects.
|
|
195701
195795
|
*/
|
|
195702
195796
|
/*
|
|
195703
195797
|
private projectPoint(xyz: XYAndZ, w: number = 1.0): Point4d {
|
|
@@ -195734,16 +195828,19 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195734
195828
|
// NOW .. we have a plane in world space. Intersect it with the bspline:
|
|
195735
195829
|
const intersections: CurveLocationDetail[] = [];
|
|
195736
195830
|
bcurve.appendPlaneIntersectionPoints(planeCoffs, intersections);
|
|
195737
|
-
// intersections has WORLD points with bspline fractions.
|
|
195831
|
+
// intersections has WORLD points with bspline fractions.
|
|
195832
|
+
// (the bspline fractions are all good 0..1 fractions within the spline).
|
|
195738
195833
|
// accept those that are within the segment range.
|
|
195739
195834
|
for (const detail of intersections) {
|
|
195740
195835
|
const fractionB = detail.fraction;
|
|
195741
195836
|
const curvePoint = detail.point;
|
|
195742
195837
|
const curvePointH = this.projectPoint(curvePoint);
|
|
195743
195838
|
const lineFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
|
|
195744
|
-
if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
195745
|
-
this.
|
|
195746
|
-
|
|
195839
|
+
if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
195840
|
+
this.acceptFraction(extendB, fractionB, extendB)) {
|
|
195841
|
+
this.recordPointWithLocalFractions(
|
|
195842
|
+
lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed,
|
|
195843
|
+
);
|
|
195747
195844
|
}
|
|
195748
195845
|
}
|
|
195749
195846
|
*/
|
|
@@ -195760,7 +195857,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195760
195857
|
const pointA0 = CurveCurveIntersectXYZ._workPointA0;
|
|
195761
195858
|
const pointA1 = CurveCurveIntersectXYZ._workPointA1;
|
|
195762
195859
|
lsA.pointAt(0, pointA0);
|
|
195763
|
-
for (let iA = 1; iA < numA; iA
|
|
195860
|
+
for (let iA = 1; iA < numA; iA++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
195764
195861
|
lsA.pointAt(iA, pointA1);
|
|
195765
195862
|
fA1 = iA * dfA;
|
|
195766
195863
|
this.dispatchSegmentBsplineCurve(
|
|
@@ -195811,6 +195908,38 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195811
195908
|
}
|
|
195812
195909
|
return undefined;
|
|
195813
195910
|
}
|
|
195911
|
+
/** Detail computation for linestring intersecting linestring. */
|
|
195912
|
+
computeLineStringLineString(lsA, lsB, reversed) {
|
|
195913
|
+
const pointA0 = CurveCurveIntersectXYZ._workPointAA0;
|
|
195914
|
+
const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
|
|
195915
|
+
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
195916
|
+
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
195917
|
+
const numA = lsA.numPoints();
|
|
195918
|
+
const numB = lsB.numPoints();
|
|
195919
|
+
if (numA > 1 && numB > 1) {
|
|
195920
|
+
lsA.pointAt(0, pointA0);
|
|
195921
|
+
const dfA = 1.0 / (numA - 1);
|
|
195922
|
+
const dfB = 1.0 / (numB - 1);
|
|
195923
|
+
let fA0 = 0.0;
|
|
195924
|
+
let fB0;
|
|
195925
|
+
let fA1;
|
|
195926
|
+
let fB1;
|
|
195927
|
+
const extendA = this._extendA;
|
|
195928
|
+
const extendB = this._extendB;
|
|
195929
|
+
lsA.pointAt(0, pointA0);
|
|
195930
|
+
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
195931
|
+
fA1 = ia * dfA;
|
|
195932
|
+
fB0 = 0.0;
|
|
195933
|
+
lsA.pointAt(ia, pointA1);
|
|
195934
|
+
lsB.pointAt(0, pointB0);
|
|
195935
|
+
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
195936
|
+
lsB.pointAt(ib, pointB1);
|
|
195937
|
+
fB1 = ib * dfB;
|
|
195938
|
+
this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, reversed);
|
|
195939
|
+
}
|
|
195940
|
+
}
|
|
195941
|
+
}
|
|
195942
|
+
}
|
|
195814
195943
|
/** Double dispatch handler for strongly typed segment. */
|
|
195815
195944
|
handleLineSegment3d(segmentA) {
|
|
195816
195945
|
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d) {
|
|
@@ -195826,38 +195955,13 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195826
195955
|
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__.BSplineCurve3d) {
|
|
195827
195956
|
this.dispatchSegmentBsplineCurve(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, false);
|
|
195828
195957
|
}
|
|
195958
|
+
return undefined;
|
|
195829
195959
|
}
|
|
195830
|
-
/** double dispatch handler for strongly typed linestring
|
|
195960
|
+
/** double dispatch handler for strongly typed linestring. */
|
|
195831
195961
|
handleLineString3d(lsA) {
|
|
195832
195962
|
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d) {
|
|
195833
195963
|
const lsB = this._geometryB;
|
|
195834
|
-
|
|
195835
|
-
const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
|
|
195836
|
-
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
195837
|
-
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
195838
|
-
const numA = lsA.numPoints();
|
|
195839
|
-
const numB = lsB.numPoints();
|
|
195840
|
-
if (numA > 1 && numB > 1) {
|
|
195841
|
-
lsA.pointAt(0, pointA0);
|
|
195842
|
-
const dfA = 1.0 / (numA - 1);
|
|
195843
|
-
const dfB = 1.0 / (numB - 1);
|
|
195844
|
-
let fA0 = 0.0;
|
|
195845
|
-
let fA1, fB0, fB1;
|
|
195846
|
-
const extendA = this._extendA;
|
|
195847
|
-
const extendB = this._extendB;
|
|
195848
|
-
lsA.pointAt(0, pointA0);
|
|
195849
|
-
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
195850
|
-
fA1 = ia * dfA;
|
|
195851
|
-
fB0 = 0.0;
|
|
195852
|
-
lsA.pointAt(ia, pointA1);
|
|
195853
|
-
lsB.pointAt(0, pointB0);
|
|
195854
|
-
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
195855
|
-
lsB.pointAt(ib, pointB1);
|
|
195856
|
-
fB1 = ib * dfB;
|
|
195857
|
-
this.dispatchSegmentSegment(lsA, ia === 1 && extendA, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA, lsB, ib === 1 && extendB, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB, false);
|
|
195858
|
-
}
|
|
195859
|
-
}
|
|
195860
|
-
}
|
|
195964
|
+
this.computeLineStringLineString(lsA, lsB, false);
|
|
195861
195965
|
}
|
|
195862
195966
|
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d) {
|
|
195863
195967
|
this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
|
|
@@ -195886,7 +195990,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
195886
195990
|
}
|
|
195887
195991
|
return undefined;
|
|
195888
195992
|
}
|
|
195889
|
-
/** Double dispatch handler for strongly typed bspline curve
|
|
195993
|
+
/** Double dispatch handler for strongly typed bspline curve. */
|
|
195890
195994
|
handleBSplineCurve3d(curve) {
|
|
195891
195995
|
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d) {
|
|
195892
195996
|
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB, curve, this._extendA, true);
|
|
@@ -196045,11 +196149,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
196045
196149
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
196046
196150
|
/* harmony export */ CurveOffsetXYHandler: () => (/* binding */ CurveOffsetXYHandler)
|
|
196047
196151
|
/* harmony export */ });
|
|
196152
|
+
/* harmony import */ var _bspline_BSplineCurveOps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../bspline/BSplineCurveOps */ "../../core/geometry/lib/esm/bspline/BSplineCurveOps.js");
|
|
196153
|
+
/* harmony import */ var _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../bspline/InterpolationCurve3d */ "../../core/geometry/lib/esm/bspline/InterpolationCurve3d.js");
|
|
196048
196154
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
196049
196155
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
196050
196156
|
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
196051
|
-
/* harmony import */ var _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../bspline/InterpolationCurve3d */ "../../core/geometry/lib/esm/bspline/InterpolationCurve3d.js");
|
|
196052
|
-
/* harmony import */ var _bspline_BSplineCurveOps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../bspline/BSplineCurveOps */ "../../core/geometry/lib/esm/bspline/BSplineCurveOps.js");
|
|
196053
196157
|
/*---------------------------------------------------------------------------------------------
|
|
196054
196158
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
196055
196159
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -196087,13 +196191,16 @@ class CurveOffsetXYHandler {
|
|
|
196087
196191
|
if (!_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSmallMetricDistance(tangent.x) || !_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSmallMetricDistance(tangent.y))
|
|
196088
196192
|
this._fitOptions.fitPoints.push(xyz.plusScaled(tangent.unitPerpendicularXY(this._v0), this._offsetDistance));
|
|
196089
196193
|
}
|
|
196090
|
-
needPrimaryGeometryForStrokes() {
|
|
196194
|
+
needPrimaryGeometryForStrokes() {
|
|
196195
|
+
return true;
|
|
196196
|
+
}
|
|
196091
196197
|
startParentCurvePrimitive(_cp) { }
|
|
196092
196198
|
startCurvePrimitive(_cp) { }
|
|
196093
196199
|
endCurvePrimitive(_cp) { }
|
|
196094
196200
|
endParentCurvePrimitive(_cp) { }
|
|
196095
196201
|
announceIntervalForUniformStepStrokes(cp, numStrokes, fraction0, fraction1) {
|
|
196096
|
-
|
|
196202
|
+
// announce both start and end; adjacent duplicates will be filtered by c2 cubic fit logic
|
|
196203
|
+
for (let i = 0; i <= numStrokes; ++i) {
|
|
196097
196204
|
const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fraction0, i / numStrokes, fraction1);
|
|
196098
196205
|
const ray = cp.fractionToPointAndDerivative(fraction, this._r0);
|
|
196099
196206
|
this.pushOffsetPoint(ray.origin, ray.direction);
|
|
@@ -196102,7 +196209,8 @@ class CurveOffsetXYHandler {
|
|
|
196102
196209
|
announceSegmentInterval(_cp, point0, point1, numStrokes, _fraction0, _fraction1) {
|
|
196103
196210
|
if (numStrokes > 0) {
|
|
196104
196211
|
const tangent = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.createStartEnd(point0, point1, this._v1);
|
|
196105
|
-
|
|
196212
|
+
// announce both start and end; adjacent duplicates will be filtered by c2 cubic fit logic
|
|
196213
|
+
for (let i = 0; i <= numStrokes; ++i) {
|
|
196106
196214
|
this.pushOffsetPoint(point0.interpolate(i / numStrokes, point1, this._p0), tangent);
|
|
196107
196215
|
}
|
|
196108
196216
|
}
|
|
@@ -203747,10 +203855,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
203747
203855
|
/* harmony export */ NullGeometryHandler: () => (/* binding */ NullGeometryHandler),
|
|
203748
203856
|
/* harmony export */ RecurseToCurvesGeometryHandler: () => (/* binding */ RecurseToCurvesGeometryHandler)
|
|
203749
203857
|
/* harmony export */ });
|
|
203858
|
+
/* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
203859
|
+
/* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
203750
203860
|
/*---------------------------------------------------------------------------------------------
|
|
203751
203861
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
203752
203862
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
203753
203863
|
*--------------------------------------------------------------------------------------------*/
|
|
203864
|
+
|
|
203865
|
+
|
|
203754
203866
|
/**
|
|
203755
203867
|
* `GeometryHandler` defines the base abstract methods for double-dispatch geometry computation.
|
|
203756
203868
|
* * User code that wants to handle one or all of the commonly known geometry types implements a handler class.
|
|
@@ -203761,26 +203873,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
203761
203873
|
class GeometryHandler {
|
|
203762
203874
|
/** Handle strongly typed [[CurveCollection]] */
|
|
203763
203875
|
handleCurveCollection(_g) { }
|
|
203764
|
-
/** Handle strongly typed Path (base class method calls handleCurveCollection) */
|
|
203876
|
+
/** Handle strongly typed [[Path]] (base class method calls [[handleCurveCollection]]) */
|
|
203765
203877
|
handlePath(g) {
|
|
203766
203878
|
return this.handleCurveCollection(g);
|
|
203767
203879
|
}
|
|
203768
|
-
/** Handle strongly typed
|
|
203880
|
+
/** Handle strongly typed [[Loop]] (base class method calls [[handleCurveCollection]]) */
|
|
203769
203881
|
handleLoop(g) {
|
|
203770
203882
|
return this.handleCurveCollection(g);
|
|
203771
203883
|
}
|
|
203772
|
-
/** Handle strongly typed
|
|
203884
|
+
/** Handle strongly typed [[ParityRegion]] (base class method calls [[handleCurveCollection]]) */
|
|
203773
203885
|
handleParityRegion(g) {
|
|
203774
203886
|
return this.handleCurveCollection(g);
|
|
203775
203887
|
}
|
|
203776
|
-
/** Handle strongly typed
|
|
203888
|
+
/** Handle strongly typed [[UnionRegion]] (base class method calls [[handleCurveCollection]]) */
|
|
203777
203889
|
handleUnionRegion(g) {
|
|
203778
203890
|
return this.handleCurveCollection(g);
|
|
203779
203891
|
}
|
|
203780
|
-
/** Handle strongly typed
|
|
203892
|
+
/** Handle strongly typed [[BagOfCurves]] (base class method calls [[handleCurveCollection]]) */
|
|
203781
203893
|
handleBagOfCurves(g) {
|
|
203782
203894
|
return this.handleCurveCollection(g);
|
|
203783
203895
|
}
|
|
203896
|
+
/** Handle strongly typed [[CurveChainWithDistanceIndex]] (base class method calls [[handlePath]] or [[handleLoop]]) */
|
|
203897
|
+
handleCurveChainWithDistanceIndex(g) {
|
|
203898
|
+
if (g.path instanceof _curve_Path__WEBPACK_IMPORTED_MODULE_0__.Path)
|
|
203899
|
+
return this.handlePath(g.path);
|
|
203900
|
+
if (g.path instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_1__.Loop)
|
|
203901
|
+
return this.handleLoop(g.path);
|
|
203902
|
+
return this.handleCurveCollection(g.path);
|
|
203903
|
+
}
|
|
203784
203904
|
}
|
|
203785
203905
|
/**
|
|
203786
203906
|
* `NullGeometryHandler` is a base class for dispatching various geometry types to application specific implementation
|
|
@@ -203812,6 +203932,10 @@ class NullGeometryHandler extends GeometryHandler {
|
|
|
203812
203932
|
return undefined;
|
|
203813
203933
|
}
|
|
203814
203934
|
/** No-action implementation */
|
|
203935
|
+
handleCurveChainWithDistanceIndex(_g) {
|
|
203936
|
+
return undefined;
|
|
203937
|
+
}
|
|
203938
|
+
/** No-action implementation */
|
|
203815
203939
|
handleBSplineCurve3d(_g) {
|
|
203816
203940
|
return undefined;
|
|
203817
203941
|
}
|
|
@@ -203909,7 +204033,8 @@ class NullGeometryHandler extends GeometryHandler {
|
|
|
203909
204033
|
}
|
|
203910
204034
|
}
|
|
203911
204035
|
/**
|
|
203912
|
-
* Implement GeometryHandler methods,
|
|
204036
|
+
* Implement GeometryHandler methods, but override `handleCurveCollection` so that all methods
|
|
204037
|
+
* that operate on a [[CurveCollection]] recurse to their children.
|
|
203913
204038
|
* @public
|
|
203914
204039
|
*/
|
|
203915
204040
|
class RecurseToCurvesGeometryHandler extends GeometryHandler {
|
|
@@ -203973,26 +204098,6 @@ class RecurseToCurvesGeometryHandler extends GeometryHandler {
|
|
|
203973
204098
|
handleCurveCollection(g) {
|
|
203974
204099
|
return this.handleChildren(g);
|
|
203975
204100
|
}
|
|
203976
|
-
/** Recurse to children */
|
|
203977
|
-
handlePath(g) {
|
|
203978
|
-
return this.handleChildren(g);
|
|
203979
|
-
}
|
|
203980
|
-
/** Recurse to children */
|
|
203981
|
-
handleLoop(g) {
|
|
203982
|
-
return this.handleChildren(g);
|
|
203983
|
-
}
|
|
203984
|
-
/** Recurse to children */
|
|
203985
|
-
handleParityRegion(g) {
|
|
203986
|
-
return this.handleChildren(g);
|
|
203987
|
-
}
|
|
203988
|
-
/** Recurse to children */
|
|
203989
|
-
handleUnionRegion(g) {
|
|
203990
|
-
return this.handleChildren(g);
|
|
203991
|
-
}
|
|
203992
|
-
/** Recurse to children */
|
|
203993
|
-
handleBagOfCurves(g) {
|
|
203994
|
-
return this.handleChildren(g);
|
|
203995
|
-
}
|
|
203996
204101
|
/** No-action implementation */
|
|
203997
204102
|
handleSphere(_g) {
|
|
203998
204103
|
return undefined;
|
|
@@ -220703,7 +220808,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
220703
220808
|
|
|
220704
220809
|
|
|
220705
220810
|
|
|
220706
|
-
/**
|
|
220811
|
+
/**
|
|
220812
|
+
* Map4 carries two Matrix4d which are inverses of each other.
|
|
220707
220813
|
* @public
|
|
220708
220814
|
*/
|
|
220709
220815
|
class Map4d {
|
|
@@ -220712,16 +220818,23 @@ class Map4d {
|
|
|
220712
220818
|
this._matrix1 = matrix1;
|
|
220713
220819
|
}
|
|
220714
220820
|
/** Return a reference to (not copy of) the "forward" Matrix4d */
|
|
220715
|
-
get transform0() {
|
|
220821
|
+
get transform0() {
|
|
220822
|
+
return this._matrix0;
|
|
220823
|
+
}
|
|
220716
220824
|
/** Return a reference to (not copy of) the "reverse" Matrix4d */
|
|
220717
|
-
get transform1() {
|
|
220825
|
+
get transform1() {
|
|
220826
|
+
return this._matrix1;
|
|
220827
|
+
}
|
|
220718
220828
|
/** Create a Map4d, capturing the references to the two matrices. */
|
|
220719
220829
|
static createRefs(matrix0, matrix1) {
|
|
220720
220830
|
return new Map4d(matrix0, matrix1);
|
|
220721
220831
|
}
|
|
220722
220832
|
/** Create an identity map. */
|
|
220723
|
-
static createIdentity() {
|
|
220724
|
-
|
|
220833
|
+
static createIdentity() {
|
|
220834
|
+
return new Map4d(_Matrix4d__WEBPACK_IMPORTED_MODULE_0__.Matrix4d.createIdentity(), _Matrix4d__WEBPACK_IMPORTED_MODULE_0__.Matrix4d.createIdentity());
|
|
220835
|
+
}
|
|
220836
|
+
/**
|
|
220837
|
+
* Create a Map4d with given transform pair.
|
|
220725
220838
|
* @returns undefined if the transforms are not inverses of each other.
|
|
220726
220839
|
*/
|
|
220727
220840
|
static createTransform(transform0, transform1) {
|
|
@@ -220755,11 +220868,19 @@ class Map4d {
|
|
|
220755
220868
|
return undefined;
|
|
220756
220869
|
}
|
|
220757
220870
|
/** Copy contents from another Map4d */
|
|
220758
|
-
setFrom(other) {
|
|
220871
|
+
setFrom(other) {
|
|
220872
|
+
this._matrix0.setFrom(other._matrix0);
|
|
220873
|
+
this._matrix1.setFrom(other._matrix1);
|
|
220874
|
+
}
|
|
220759
220875
|
/** Return a clone of this Map4d */
|
|
220760
|
-
clone() {
|
|
220876
|
+
clone() {
|
|
220877
|
+
return new Map4d(this._matrix0.clone(), this._matrix1.clone());
|
|
220878
|
+
}
|
|
220761
220879
|
/** Reinitialize this Map4d as an identity. */
|
|
220762
|
-
setIdentity() {
|
|
220880
|
+
setIdentity() {
|
|
220881
|
+
this._matrix0.setIdentity();
|
|
220882
|
+
this._matrix1.setIdentity();
|
|
220883
|
+
}
|
|
220763
220884
|
/** Set this map4d from a json object that the two Matrix4d values as properties named matrix0 and matrix1 */
|
|
220764
220885
|
setFromJSON(json) {
|
|
220765
220886
|
if (json.matrix0 && json.matrix1) {
|
|
@@ -220776,15 +220897,18 @@ class Map4d {
|
|
|
220776
220897
|
return result;
|
|
220777
220898
|
}
|
|
220778
220899
|
/** Return a json object `{matrix0: value0, matrix1: value1}` */
|
|
220779
|
-
toJSON() {
|
|
220900
|
+
toJSON() {
|
|
220901
|
+
return { matrix0: this._matrix0.toJSON(), matrix1: this._matrix1.toJSON() };
|
|
220902
|
+
}
|
|
220780
220903
|
/** Test if both matrices are almost equal to those */
|
|
220781
220904
|
isAlmostEqual(other) {
|
|
220782
220905
|
return this._matrix0.isAlmostEqual(other._matrix0) && this._matrix1.isAlmostEqual(other._matrix1);
|
|
220783
220906
|
}
|
|
220784
|
-
/**
|
|
220907
|
+
/**
|
|
220908
|
+
* Create a map between a frustum and world coordinates.
|
|
220785
220909
|
* @param origin lower left of frustum
|
|
220786
|
-
* @param uVector Vector from lower left rear to lower right rear
|
|
220787
|
-
* @param vVector Vector from lower left rear to upper left rear
|
|
220910
|
+
* @param uVector Vector from lower left rear to lower right rear.
|
|
220911
|
+
* @param vVector Vector from lower left rear to upper left rear.
|
|
220788
220912
|
* @param wVector Vector from lower left rear to lower left front, i.e. lower left rear towards eye.
|
|
220789
220913
|
* @param fraction front size divided by rear size.
|
|
220790
220914
|
*/
|
|
@@ -220813,7 +220937,8 @@ class Map4d {
|
|
|
220813
220937
|
*/
|
|
220814
220938
|
return result;
|
|
220815
220939
|
}
|
|
220816
|
-
/**
|
|
220940
|
+
/**
|
|
220941
|
+
* Multiply this*other. The output matrices are
|
|
220817
220942
|
* * output matrix0 = `this.matrix0 * other.matrix0`
|
|
220818
220943
|
* * output matrix1 = 'other.matrix1 * this.matrix1`
|
|
220819
220944
|
*/
|
|
@@ -220826,19 +220951,21 @@ class Map4d {
|
|
|
220826
220951
|
this._matrix0 = this._matrix1;
|
|
220827
220952
|
this._matrix1 = temp;
|
|
220828
220953
|
}
|
|
220829
|
-
/**
|
|
220954
|
+
/**
|
|
220955
|
+
* Return a Map4d whose transform0 is
|
|
220830
220956
|
* other.transform0 * this.transform0 * other.transform1
|
|
220831
220957
|
*/
|
|
220832
220958
|
sandwich0This1(other) {
|
|
220833
220959
|
return new Map4d(other._matrix0.multiplyMatrixMatrix(this._matrix0.multiplyMatrixMatrix(other._matrix1)), other._matrix0.multiplyMatrixMatrix(this._matrix1.multiplyMatrixMatrix(other._matrix1)));
|
|
220834
220960
|
}
|
|
220835
|
-
/**
|
|
220961
|
+
/**
|
|
220962
|
+
* Return a Map4d whose transform0 is
|
|
220836
220963
|
* other.transform1 * this.transform0 * other.transform0
|
|
220837
220964
|
*/
|
|
220838
220965
|
sandwich1This0(other) {
|
|
220839
220966
|
return new Map4d(other._matrix1.multiplyMatrixMatrix(this._matrix0.multiplyMatrixMatrix(other._matrix0)), other._matrix1.multiplyMatrixMatrix(this._matrix1.multiplyMatrixMatrix(other._matrix0)));
|
|
220840
220967
|
}
|
|
220841
|
-
}
|
|
220968
|
+
}
|
|
220842
220969
|
|
|
220843
220970
|
|
|
220844
220971
|
/***/ }),
|
|
@@ -230754,7 +230881,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
230754
230881
|
|
|
230755
230882
|
|
|
230756
230883
|
|
|
230757
|
-
/* eslint-disable @typescript-eslint/naming-convention, @typescript-eslint/prefer-for-of */
|
|
230758
230884
|
/**
|
|
230759
230885
|
* A FacetSector
|
|
230760
230886
|
* * initially holds coordinate data for a place where xyz and sectionDerivative are known
|
|
@@ -231897,16 +232023,14 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
231897
232023
|
this.addBetweenLineStringsWithStoredIndices(strokeA, strokeB);
|
|
231898
232024
|
}
|
|
231899
232025
|
else if (stroke0 instanceof _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_12__.ParityRegion) {
|
|
231900
|
-
for (
|
|
231901
|
-
this.addBetweenRotatedStrokeSets(
|
|
232026
|
+
for (const child of stroke0.children) {
|
|
232027
|
+
this.addBetweenRotatedStrokeSets(child, transformA, vA, transformB, vB);
|
|
231902
232028
|
}
|
|
231903
232029
|
}
|
|
231904
232030
|
else if (stroke0 instanceof _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_13__.CurveChain) {
|
|
231905
|
-
const
|
|
231906
|
-
|
|
231907
|
-
|
|
231908
|
-
if (cpA instanceof _curve_LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
|
|
231909
|
-
this.addBetweenRotatedStrokeSets(cpA, transformA, vA, transformB, vB);
|
|
232031
|
+
for (const child of stroke0.children) {
|
|
232032
|
+
if (child instanceof _curve_LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
|
|
232033
|
+
this.addBetweenRotatedStrokeSets(child, transformA, vA, transformB, vB);
|
|
231910
232034
|
}
|
|
231911
232035
|
}
|
|
231912
232036
|
}
|
|
@@ -231941,8 +232065,8 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
231941
232065
|
let stroke0;
|
|
231942
232066
|
let stroke1;
|
|
231943
232067
|
const sectionMaps = [];
|
|
231944
|
-
for (
|
|
231945
|
-
sectionMaps.push(_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.createForParityRegionOrChain(
|
|
232068
|
+
for (const contour of contours) {
|
|
232069
|
+
sectionMaps.push(_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.createForParityRegionOrChain(contour.curves, this._options));
|
|
231946
232070
|
}
|
|
231947
232071
|
if (_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.enforceStrokeCountCompatibility(sectionMaps)) {
|
|
231948
232072
|
_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.enforceCompatibleDistanceSums(sectionMaps);
|
|
@@ -246797,7 +246921,13 @@ class Sample {
|
|
|
246797
246921
|
* * direct spiral (half-cosine)
|
|
246798
246922
|
*/
|
|
246799
246923
|
static createCurveChainWithDistanceIndex() {
|
|
246800
|
-
const pointsA = [
|
|
246924
|
+
const pointsA = [
|
|
246925
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0),
|
|
246926
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 3, 0),
|
|
246927
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(2, 4, 0),
|
|
246928
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(3, 3, 0),
|
|
246929
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(4, 0, 0),
|
|
246930
|
+
];
|
|
246801
246931
|
const result = [];
|
|
246802
246932
|
// one singleton per basic curve type ...
|
|
246803
246933
|
result.push(_curve_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_45__.CurveChainWithDistanceIndex.createCapture(_curve_Path__WEBPACK_IMPORTED_MODULE_22__.Path.create(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_20__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(5, 0, 0)))));
|
|
@@ -287946,7 +288076,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
287946
288076
|
/***/ ((module) => {
|
|
287947
288077
|
|
|
287948
288078
|
"use strict";
|
|
287949
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.2.0-dev.
|
|
288079
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.2.0-dev.33","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","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.2.0-dev.33","@itwin/core-bentley":"workspace:^4.2.0-dev.33","@itwin/core-common":"workspace:^4.2.0-dev.33","@itwin/core-geometry":"workspace:^4.2.0-dev.33","@itwin/core-orbitgt":"workspace:^4.2.0-dev.33","@itwin/core-quantity":"workspace:^4.2.0-dev.33"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"18.16.1","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
287950
288080
|
|
|
287951
288081
|
/***/ })
|
|
287952
288082
|
|