@itwin/rpcinterface-full-stack-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 +688 -558
- 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 +14 -14
|
@@ -173063,8 +173063,8 @@ class Geometry {
|
|
|
173063
173063
|
return result;
|
|
173064
173064
|
}
|
|
173065
173065
|
/**
|
|
173066
|
-
* For a line `f(x)` where `f(x0) = f0` and `f(x1) = f1`, return the `x` value at which `f(x) = fTarget
|
|
173067
|
-
* Return `defaultResult` if `(fTarget - f0) / (f1 - f0)` exceeds `Geometry.largeFractionResult
|
|
173066
|
+
* For a line `f(x)` where `f(x0) = f0` and `f(x1) = f1`, return the `x` value at which `f(x) = fTarget`.
|
|
173067
|
+
* Return `defaultResult` if `(fTarget - f0) / (f1 - f0)` exceeds `Geometry.largeFractionResult`.
|
|
173068
173068
|
*/
|
|
173069
173069
|
static inverseInterpolate(x0, f0, x1, f1, fTarget = 0, defaultResult) {
|
|
173070
173070
|
/**
|
|
@@ -185737,17 +185737,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
185737
185737
|
/* harmony export */ CurveChainWithDistanceIndex: () => (/* binding */ CurveChainWithDistanceIndex),
|
|
185738
185738
|
/* harmony export */ PathFragment: () => (/* binding */ PathFragment)
|
|
185739
185739
|
/* harmony export */ });
|
|
185740
|
-
/* harmony import */ var
|
|
185741
|
-
/* harmony import */ var
|
|
185742
|
-
/* harmony import */ var
|
|
185743
|
-
/* harmony import */ var
|
|
185744
|
-
/* harmony import */ var
|
|
185745
|
-
/* harmony import */ var
|
|
185746
|
-
/* harmony import */ var
|
|
185747
|
-
/* harmony import */ var
|
|
185748
|
-
/* harmony import */ var
|
|
185749
|
-
/* harmony import */ var
|
|
185750
|
-
/* harmony import */ var
|
|
185740
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
185741
|
+
/* harmony import */ var _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../curve/CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
185742
|
+
/* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
|
|
185743
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
185744
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
185745
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
185746
|
+
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
185747
|
+
/* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
185748
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
185749
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
185750
|
+
/* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
|
|
185751
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
185751
185752
|
/*---------------------------------------------------------------------------------------------
|
|
185752
185753
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
185753
185754
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -185766,15 +185767,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
185766
185767
|
|
|
185767
185768
|
|
|
185768
185769
|
|
|
185770
|
+
|
|
185769
185771
|
/**
|
|
185770
|
-
* Annotation of an interval of a curve.
|
|
185772
|
+
* Annotation of a fragment, i.e. an interval of a curve.
|
|
185771
185773
|
* * The interval is marked with two pairs of numbers:
|
|
185772
|
-
* * * fraction0, fraction1 = fraction parameters along the child curve
|
|
185773
|
-
* * * distance0,distance1 = distances within containing CurveChainWithDistanceIndex
|
|
185774
|
+
* * * fraction0, fraction1 = fraction parameters along the child curve.
|
|
185775
|
+
* * * distance0, distance1 = distances within containing CurveChainWithDistanceIndex.
|
|
185774
185776
|
* @public
|
|
185775
185777
|
*/
|
|
185776
185778
|
class PathFragment {
|
|
185777
|
-
/** Create a fragment with complete fraction, distance and child data. */
|
|
185779
|
+
/** Create a fragment with complete fraction, distance, and child data. */
|
|
185778
185780
|
constructor(childFraction0, childFraction1, distance0, distance1, childCurve, range) {
|
|
185779
185781
|
this.childFraction0 = childFraction0;
|
|
185780
185782
|
this.childFraction1 = childFraction1;
|
|
@@ -185784,68 +185786,64 @@ class PathFragment {
|
|
|
185784
185786
|
this.range = range;
|
|
185785
185787
|
this.a = 0;
|
|
185786
185788
|
}
|
|
185787
|
-
/**
|
|
185788
|
-
* Return true if the distance is within the distance limits of this fragment.
|
|
185789
|
-
* @param distance
|
|
185790
|
-
*/
|
|
185789
|
+
/** Return true if the distance is within the distance limits of this fragment. */
|
|
185791
185790
|
containsChainDistance(distance) {
|
|
185792
185791
|
return distance >= this.chainDistance0 && distance <= this.chainDistance1;
|
|
185793
185792
|
}
|
|
185794
|
-
/**
|
|
185793
|
+
/**
|
|
185794
|
+
* Return a quick minimum distance from spacePoint to the curve.
|
|
185795
|
+
* * The returned distance is to the curve's range box if defined; otherwise, the true distance is computed.
|
|
185796
|
+
* * Thus the returned distance may be SMALLER than the true distance to the curve, but not larger.
|
|
185797
|
+
*/
|
|
185795
185798
|
quickMinDistanceToChildCurve(spacePoint) {
|
|
185796
|
-
if (this.range)
|
|
185799
|
+
if (this.range)
|
|
185797
185800
|
return this.range.distanceToPoint(spacePoint);
|
|
185798
|
-
}
|
|
185799
|
-
// ugh. have to do real computation ..
|
|
185800
185801
|
const detail = this.childCurve.closestPoint(spacePoint, false);
|
|
185801
185802
|
if (detail)
|
|
185802
185803
|
return detail.a;
|
|
185803
185804
|
return 0;
|
|
185804
185805
|
}
|
|
185805
185806
|
/**
|
|
185806
|
-
* Return an array with (references to) all the path fragments, sorted smallest to largest on the "a" value
|
|
185807
|
-
*
|
|
185807
|
+
* Return an array with (references to) all the input path fragments, sorted smallest to largest on the "a" value,
|
|
185808
|
+
* initialized with `quickMinDistanceToChildCurve`
|
|
185808
185809
|
*/
|
|
185809
185810
|
static collectSortedQuickMinDistances(fragments, spacePoint) {
|
|
185810
185811
|
const sortedFragments = [];
|
|
185811
|
-
for (const
|
|
185812
|
-
|
|
185813
|
-
sortedFragments.push(
|
|
185812
|
+
for (const frag of fragments) {
|
|
185813
|
+
frag.a = frag.quickMinDistanceToChildCurve(spacePoint);
|
|
185814
|
+
sortedFragments.push(frag);
|
|
185814
185815
|
}
|
|
185815
|
-
sortedFragments.sort((
|
|
185816
|
+
sortedFragments.sort((frag1, frag2) => frag1.a - frag2.a);
|
|
185816
185817
|
return sortedFragments;
|
|
185817
185818
|
}
|
|
185818
|
-
/**
|
|
185819
|
-
* Return true if this fragment addresses `curve` and brackets `fraction`
|
|
185820
|
-
* @param distance
|
|
185821
|
-
*/
|
|
185819
|
+
/** Return true if `this` fragment addresses `curve` and brackets `fraction`. */
|
|
185822
185820
|
containsChildCurveAndChildFraction(curve, fraction) {
|
|
185823
185821
|
return this.childCurve === curve && fraction >= this.childFraction0 && fraction <= this.childFraction1;
|
|
185824
185822
|
}
|
|
185825
185823
|
/**
|
|
185826
|
-
* Convert distance to local fraction
|
|
185827
|
-
* Note that proportional calculation does NOT account for
|
|
185824
|
+
* Convert distance to local fraction and apply that to interpolate between the stored curve fractions.
|
|
185825
|
+
* Note that proportional calculation does NOT account for non-uniform parameterization in the child curve.
|
|
185828
185826
|
*/
|
|
185829
185827
|
chainDistanceToInterpolatedChildFraction(distance) {
|
|
185830
|
-
return
|
|
185828
|
+
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
|
|
185831
185829
|
}
|
|
185832
|
-
/** Convert chainDistance to
|
|
185830
|
+
/** Convert the given chainDistance to a fraction along this childCurve using `moveSignedDistanceFromFraction`. */
|
|
185833
185831
|
chainDistanceToAccurateChildFraction(chainDistance, allowExtrapolation) {
|
|
185834
|
-
// The fragments are really expected to do good mappings in their distance range ...
|
|
185835
185832
|
const childDetail = this.childCurve.moveSignedDistanceFromFraction(this.childFraction0, chainDistance - this.chainDistance0, allowExtrapolation ?? false);
|
|
185836
185833
|
return childDetail.fraction;
|
|
185837
185834
|
}
|
|
185838
185835
|
/**
|
|
185839
|
-
* Return the scale factor to map childCurve fraction derivatives to chain fraction derivatives
|
|
185840
|
-
* @param globalDistance total length of the global curve
|
|
185836
|
+
* Return the scale factor to map childCurve fraction derivatives to chain fraction derivatives.
|
|
185837
|
+
* @param globalDistance total length of the global curve
|
|
185841
185838
|
*/
|
|
185842
185839
|
fractionScaleFactor(globalDistance) {
|
|
185843
185840
|
return globalDistance * (this.childFraction1 - this.childFraction0) / (this.chainDistance1 - this.chainDistance0);
|
|
185844
185841
|
}
|
|
185845
185842
|
/**
|
|
185846
185843
|
* Reverse the fraction and distance data.
|
|
185847
|
-
* *
|
|
185848
|
-
* *
|
|
185844
|
+
* * Each child fraction `f` is replaced by `1-f`
|
|
185845
|
+
* * Each `chainDistance` is replaced by `totalDistance - chainDistance`
|
|
185846
|
+
* @param totalDistance the total distance
|
|
185849
185847
|
*/
|
|
185850
185848
|
reverseFractionsAndDistances(totalDistance) {
|
|
185851
185849
|
const f0 = this.childFraction0;
|
|
@@ -185857,14 +185855,14 @@ class PathFragment {
|
|
|
185857
185855
|
this.chainDistance0 = totalDistance - d1;
|
|
185858
185856
|
this.chainDistance1 = totalDistance - d0;
|
|
185859
185857
|
}
|
|
185860
|
-
/** @deprecated in 3.x. Use childFractionToChainDistance */
|
|
185858
|
+
/** @deprecated in 3.x. Use `PathFragment.childFractionToChainDistance`. */
|
|
185861
185859
|
childFractionTChainDistance(fraction) {
|
|
185862
185860
|
return this.childFractionToChainDistance(fraction);
|
|
185863
185861
|
}
|
|
185864
185862
|
/**
|
|
185865
|
-
* Convert a fractional position on the childCurve to distance
|
|
185866
|
-
* * Return value is SIGNED
|
|
185867
|
-
* @param fraction
|
|
185863
|
+
* Convert a fractional position on the childCurve of this fragment to distance on the curve chain.
|
|
185864
|
+
* * Return value is SIGNED and will be negative when `fraction < this.childFraction0`.
|
|
185865
|
+
* @param fraction the fractional position on the childCurve of this fragment
|
|
185868
185866
|
*/
|
|
185869
185867
|
childFractionToChainDistance(fraction) {
|
|
185870
185868
|
let d = this.childCurve.curveLengthBetweenFractions(this.childFraction0, fraction);
|
|
@@ -185873,7 +185871,7 @@ class PathFragment {
|
|
|
185873
185871
|
return this.chainDistance0 + d;
|
|
185874
185872
|
}
|
|
185875
185873
|
}
|
|
185876
|
-
/** Non-instantiable class to build a distance index for a
|
|
185874
|
+
/** Non-instantiable class to build a distance index for a curve chain. */
|
|
185877
185875
|
class DistanceIndexConstructionContext {
|
|
185878
185876
|
constructor() {
|
|
185879
185877
|
this._accumulatedDistance = 0;
|
|
@@ -185885,23 +185883,22 @@ class DistanceIndexConstructionContext {
|
|
|
185885
185883
|
endParentCurvePrimitive(_cp) { }
|
|
185886
185884
|
endCurvePrimitive(_cp) { }
|
|
185887
185885
|
announcePointTangent(_xyz, _fraction, _tangent) { }
|
|
185888
|
-
/** Announce numPoints interpolated between point0 and point1, with associated fractions */
|
|
185889
185886
|
announceSegmentInterval(cp, point0, point1, numStrokes, fraction0, fraction1) {
|
|
185890
185887
|
const fragmentPoint0 = point0.clone();
|
|
185891
185888
|
const fragmentPoint1 = point1.clone();
|
|
185892
185889
|
let d0 = this._accumulatedDistance;
|
|
185893
185890
|
if (numStrokes <= 1) {
|
|
185894
185891
|
this._accumulatedDistance += point0.distance(point1);
|
|
185895
|
-
this._fragments.push(new PathFragment(fraction0, fraction1, d0, this._accumulatedDistance, cp,
|
|
185892
|
+
this._fragments.push(new PathFragment(fraction0, fraction1, d0, this._accumulatedDistance, cp, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__.Range3d.create(fragmentPoint0, fragmentPoint1)));
|
|
185896
185893
|
}
|
|
185897
185894
|
else {
|
|
185898
185895
|
let f1;
|
|
185899
185896
|
for (let i = 1, f0 = fraction0; i <= numStrokes; i++, f0 = f1) {
|
|
185900
|
-
f1 =
|
|
185897
|
+
f1 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fraction0, i / numStrokes, fraction1);
|
|
185901
185898
|
point0.interpolate(f1, point1, fragmentPoint1);
|
|
185902
185899
|
d0 = this._accumulatedDistance;
|
|
185903
185900
|
this._accumulatedDistance += (Math.abs(f1 - f0) * point0.distance(point1));
|
|
185904
|
-
this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp,
|
|
185901
|
+
this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp, _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__.Range3d.create(fragmentPoint0, fragmentPoint1)));
|
|
185905
185902
|
fragmentPoint0.setFrom(fragmentPoint1);
|
|
185906
185903
|
}
|
|
185907
185904
|
}
|
|
@@ -185909,7 +185906,7 @@ class DistanceIndexConstructionContext {
|
|
|
185909
185906
|
announceIntervalForUniformStepStrokes(cp, numStrokes, fraction0, fraction1) {
|
|
185910
185907
|
let f1, d, d0;
|
|
185911
185908
|
for (let i = 1, f0 = fraction0; i <= numStrokes; i++, f0 = f1) {
|
|
185912
|
-
f1 =
|
|
185909
|
+
f1 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fraction0, i / numStrokes, fraction1);
|
|
185913
185910
|
d = cp.curveLengthBetweenFractions(f0, f1);
|
|
185914
185911
|
d0 = this._accumulatedDistance;
|
|
185915
185912
|
this._accumulatedDistance += d;
|
|
@@ -185917,7 +185914,10 @@ class DistanceIndexConstructionContext {
|
|
|
185917
185914
|
this._fragments.push(new PathFragment(f0, f1, d0, this._accumulatedDistance, cp, range));
|
|
185918
185915
|
}
|
|
185919
185916
|
}
|
|
185920
|
-
needPrimaryGeometryForStrokes() {
|
|
185917
|
+
needPrimaryGeometryForStrokes() {
|
|
185918
|
+
return true;
|
|
185919
|
+
}
|
|
185920
|
+
/** Create an array of PathFragment from input curve chain. */
|
|
185921
185921
|
static createPathFragmentIndex(path, options) {
|
|
185922
185922
|
const handler = new DistanceIndexConstructionContext();
|
|
185923
185923
|
for (const curve of path.children) {
|
|
@@ -185932,12 +185932,11 @@ class DistanceIndexConstructionContext {
|
|
|
185932
185932
|
* distance along a CurveChain.
|
|
185933
185933
|
* * For example if the total length of the chain is `L`, then the distance along the chain from parameters `t0`
|
|
185934
185934
|
* to `t1` is easily computed as `L*(t1-t0)`.
|
|
185935
|
-
* * The curve chain can be any type derived from CurveChain.
|
|
185936
|
-
* * * i.e. either a `Path` or a `Loop`
|
|
185935
|
+
* * The curve chain can be any type derived from `CurveChain`, i.e., either a `Path` or a `Loop`.
|
|
185937
185936
|
* @public
|
|
185938
185937
|
*/
|
|
185939
|
-
class CurveChainWithDistanceIndex extends
|
|
185940
|
-
/** Test if other is a `CurveChainWithDistanceIndex` */
|
|
185938
|
+
class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__.CurvePrimitive {
|
|
185939
|
+
/** Test if `other` is a `CurveChainWithDistanceIndex` */
|
|
185941
185940
|
isSameGeometryClass(other) {
|
|
185942
185941
|
return other instanceof CurveChainWithDistanceIndex;
|
|
185943
185942
|
}
|
|
@@ -185956,13 +185955,13 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
185956
185955
|
*/
|
|
185957
185956
|
cloneTransformed(transform) {
|
|
185958
185957
|
const c = this._path.clone();
|
|
185959
|
-
if (c instanceof
|
|
185958
|
+
if (c instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_4__.CurveChain && c.tryTransformInPlace(transform))
|
|
185960
185959
|
return CurveChainWithDistanceIndex.createCapture(c);
|
|
185961
185960
|
return undefined;
|
|
185962
185961
|
}
|
|
185963
185962
|
/**
|
|
185964
185963
|
* Reference to the contained path.
|
|
185965
|
-
* * Do not modify the path.
|
|
185964
|
+
* * Do not modify the path. The distance index will be wrong.
|
|
185966
185965
|
*/
|
|
185967
185966
|
get path() {
|
|
185968
185967
|
return this._path;
|
|
@@ -186007,7 +186006,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186007
186006
|
const childFractionA = fragmentA.chainDistanceToAccurateChildFraction(chainDistanceA, true);
|
|
186008
186007
|
const childFractionB = fragmentB.chainDistanceToAccurateChildFraction(chainDistanceB, true);
|
|
186009
186008
|
// add a (possibly reversed) partial clone to newPath
|
|
186010
|
-
const newPath =
|
|
186009
|
+
const newPath = _Path__WEBPACK_IMPORTED_MODULE_5__.Path.create();
|
|
186011
186010
|
const addPartialChild = (childCurve, childFraction0, childFraction1, reversedClone) => {
|
|
186012
186011
|
if (childFraction0 === childFraction1)
|
|
186013
186012
|
return false;
|
|
@@ -186056,19 +186055,19 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186056
186055
|
}
|
|
186057
186056
|
return true;
|
|
186058
186057
|
}
|
|
186059
|
-
/** Return the start point of
|
|
186058
|
+
/** Return the start point of `this` curve. */
|
|
186060
186059
|
startPoint(result) {
|
|
186061
186060
|
const c = this._path.cyclicCurvePrimitive(0);
|
|
186062
186061
|
if (c)
|
|
186063
186062
|
return c.startPoint(result);
|
|
186064
|
-
return
|
|
186063
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.createZero(result);
|
|
186065
186064
|
}
|
|
186066
|
-
/** Return the end point of
|
|
186065
|
+
/** Return the end point of of `this` curve. */
|
|
186067
186066
|
endPoint(result) {
|
|
186068
186067
|
const c = this._path.cyclicCurvePrimitive(-1);
|
|
186069
186068
|
if (c)
|
|
186070
186069
|
return c.endPoint(result);
|
|
186071
|
-
return
|
|
186070
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.createZero(result);
|
|
186072
186071
|
}
|
|
186073
186072
|
/** Add strokes to caller-supplied linestring */
|
|
186074
186073
|
emitStrokes(dest, options) {
|
|
@@ -186099,7 +186098,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186099
186098
|
/**
|
|
186100
186099
|
* Return an array containing only the curve primitives.
|
|
186101
186100
|
* @param collectorArray array to receive primitives (pushed -- the array is not cleared)
|
|
186102
|
-
* @param smallestPossiblePrimitives if true, recurse on the
|
|
186101
|
+
* @param smallestPossiblePrimitives if true, recurse on the children. If false, only push `this`.
|
|
186103
186102
|
* @param explodeLinestrings (if smallestPossiblePrimitives is true) whether to push a [[LineSegment3d]] for each
|
|
186104
186103
|
* segment of a [[LineString3d]] child. If false, push only the [[LineString3d]].
|
|
186105
186104
|
*/
|
|
@@ -186119,28 +186118,24 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186119
186118
|
* @param parentStrokeMap evolving parent map.
|
|
186120
186119
|
*/
|
|
186121
186120
|
computeAndAttachRecursiveStrokeCounts(options, parentStrokeMap) {
|
|
186122
|
-
const myMap =
|
|
186121
|
+
const myMap = _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_7__.StrokeCountMap.createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap);
|
|
186123
186122
|
for (const c of this._path.children) {
|
|
186124
186123
|
c.computeAndAttachRecursiveStrokeCounts(options, myMap);
|
|
186125
186124
|
}
|
|
186126
|
-
|
|
186125
|
+
_curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__.CurvePrimitive.installStrokeCountMap(this, myMap, parentStrokeMap);
|
|
186127
186126
|
}
|
|
186128
186127
|
/**
|
|
186129
|
-
* Second step of double dispatch:
|
|
186128
|
+
* Second step of double dispatch: call `this._path.dispatchToGeometryHandler (handler)`
|
|
186130
186129
|
* * Note that this exposes the children individually to the handler.
|
|
186131
186130
|
*/
|
|
186132
186131
|
dispatchToGeometryHandler(handler) {
|
|
186133
|
-
return
|
|
186132
|
+
return handler.handleCurveChainWithDistanceIndex(this);
|
|
186134
186133
|
}
|
|
186135
|
-
/** Extend
|
|
186134
|
+
/** Extend `rangeToExtend` as needed to include these curves (optionally transformed) */
|
|
186136
186135
|
extendRange(rangeToExtend, transform) {
|
|
186137
186136
|
this._path.extendRange(rangeToExtend, transform);
|
|
186138
186137
|
}
|
|
186139
|
-
/**
|
|
186140
|
-
* Curve length is always positive.
|
|
186141
|
-
* @returns Returns a (high accuracy) length of the curve between fractional positions
|
|
186142
|
-
* @returns Returns the length of the curve.
|
|
186143
|
-
*/
|
|
186138
|
+
/** Return a (high accuracy and positive) length of the curve between fractional positions */
|
|
186144
186139
|
curveLengthBetweenFractions(fraction0, fraction1) {
|
|
186145
186140
|
return Math.abs(fraction1 - fraction0) * this._totalLength;
|
|
186146
186141
|
}
|
|
@@ -186154,9 +186149,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186154
186149
|
return result;
|
|
186155
186150
|
}
|
|
186156
186151
|
/**
|
|
186157
|
-
*
|
|
186158
|
-
* @param distance
|
|
186159
|
-
* @param allowExtrapolation
|
|
186152
|
+
* Return the PathFragment object at the given `distance` along the chain.
|
|
186153
|
+
* @param distance distance along the chain.
|
|
186154
|
+
* @param allowExtrapolation if `true`, returns first fragment for negative distances and returns last fragment
|
|
186155
|
+
* for distances larger than curve length. If `false` returns `undefined` for those out of bound distances.
|
|
186160
186156
|
*/
|
|
186161
186157
|
chainDistanceToFragment(distance, allowExtrapolation = false) {
|
|
186162
186158
|
const i = this.chainDistanceToFragmentIndex(distance, allowExtrapolation);
|
|
@@ -186165,9 +186161,10 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186165
186161
|
return undefined;
|
|
186166
186162
|
}
|
|
186167
186163
|
/**
|
|
186168
|
-
*
|
|
186169
|
-
* @param distance
|
|
186170
|
-
* @param allowExtrapolation
|
|
186164
|
+
* Return the index of the PathFragment at the given `distance` along the chain.
|
|
186165
|
+
* @param distance distance along the chain.
|
|
186166
|
+
* @param allowExtrapolation if `true`, returns 0 for negative distances and returns last fragment index for
|
|
186167
|
+
* distances larger than curve length. If `false` returns `undefined` for those out of bound distances.
|
|
186171
186168
|
*/
|
|
186172
186169
|
chainDistanceToFragmentIndex(distance, allowExtrapolation = false) {
|
|
186173
186170
|
const numFragments = this._fragments.length;
|
|
@@ -186177,7 +186174,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186177
186174
|
return allowExtrapolation ? 0 : undefined;
|
|
186178
186175
|
if (distance > this._totalLength)
|
|
186179
186176
|
return allowExtrapolation ? (numFragments - 1) : undefined;
|
|
186180
|
-
//
|
|
186177
|
+
// linear search (opportunity for improvement)
|
|
186181
186178
|
for (let i = 0; i < numFragments; i++) {
|
|
186182
186179
|
if (fragments[i].containsChainDistance(distance))
|
|
186183
186180
|
return i;
|
|
@@ -186187,33 +186184,29 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186187
186184
|
}
|
|
186188
186185
|
/**
|
|
186189
186186
|
* Convert distance along the chain to fraction along the chain.
|
|
186190
|
-
* @param distance distance along the chain
|
|
186187
|
+
* @param distance distance along the chain.
|
|
186191
186188
|
*/
|
|
186192
186189
|
chainDistanceToChainFraction(distance) {
|
|
186193
186190
|
return distance / this._totalLength;
|
|
186194
186191
|
}
|
|
186195
|
-
/**
|
|
186196
|
-
* Resolve a fraction within a specific curve to a fragment.
|
|
186197
|
-
* @param curve
|
|
186198
|
-
* @param fraction
|
|
186199
|
-
*/
|
|
186192
|
+
/** Return the PathFragment object containing the point at the given `fraction` of the given child curve. */
|
|
186200
186193
|
curveAndChildFractionToFragment(curve, fraction) {
|
|
186201
186194
|
const numFragments = this._fragments.length;
|
|
186202
186195
|
const fragments = this._fragments;
|
|
186203
186196
|
if (numFragments > 0) {
|
|
186204
|
-
|
|
186197
|
+
if (fraction < 0)
|
|
186198
|
+
return fragments[0];
|
|
186199
|
+
if (fraction > 1.0)
|
|
186200
|
+
return fragments[numFragments - 1];
|
|
186201
|
+
// linear search (opportunity for improvement)
|
|
186205
186202
|
for (const fragment of fragments) {
|
|
186206
186203
|
if (fragment.containsChildCurveAndChildFraction(curve, fraction))
|
|
186207
186204
|
return fragment;
|
|
186208
186205
|
}
|
|
186209
|
-
if (fraction <= 0)
|
|
186210
|
-
return fragments[0];
|
|
186211
|
-
if (fraction > 1.0)
|
|
186212
|
-
return fragments[numFragments - 1];
|
|
186213
186206
|
}
|
|
186214
186207
|
return undefined;
|
|
186215
186208
|
}
|
|
186216
|
-
/** Returns the total length of
|
|
186209
|
+
/** Returns the total length of `this` curve. */
|
|
186217
186210
|
curveLength() {
|
|
186218
186211
|
return this._totalLength;
|
|
186219
186212
|
}
|
|
@@ -186226,52 +186219,59 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186226
186219
|
}
|
|
186227
186220
|
/**
|
|
186228
186221
|
* Return the point (x,y,z) on the curve at fractional position along the chain.
|
|
186229
|
-
* @param fraction fractional position along the
|
|
186230
|
-
* @returns
|
|
186222
|
+
* @param fraction fractional position along the curve.
|
|
186223
|
+
* @returns a point on the curve.
|
|
186231
186224
|
*/
|
|
186232
186225
|
fractionToPoint(fraction, result) {
|
|
186233
|
-
const
|
|
186234
|
-
const fragment = this.chainDistanceToFragment(
|
|
186226
|
+
const distanceAlongPath = fraction * this._totalLength;
|
|
186227
|
+
const fragment = this.chainDistanceToFragment(distanceAlongPath, true);
|
|
186235
186228
|
if (fragment) {
|
|
186236
|
-
const childFraction = fragment.chainDistanceToAccurateChildFraction(
|
|
186229
|
+
const childFraction = fragment.chainDistanceToAccurateChildFraction(distanceAlongPath, true);
|
|
186237
186230
|
return fragment.childCurve.fractionToPoint(childFraction, result);
|
|
186238
186231
|
}
|
|
186239
|
-
//
|
|
186240
|
-
//
|
|
186232
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false); // we never expect to get here
|
|
186233
|
+
// no fragment found. just return the first point on the curve.
|
|
186241
186234
|
return this._fragments[0].childCurve.fractionToPoint(0.0, result);
|
|
186242
186235
|
}
|
|
186243
186236
|
/**
|
|
186244
186237
|
* Return the point (x,y,z) and derivative on the curve at fractional position.
|
|
186245
|
-
* * Note that
|
|
186246
|
-
* *
|
|
186247
|
-
* *
|
|
186238
|
+
* * Note that the derivative is "derivative of xyz with respect to fraction".
|
|
186239
|
+
* * The derivative shows the speed of the "fractional point" moving along the curve.
|
|
186240
|
+
* * The derivative is not generally a unit vector. Use `fractionToPointAndUnitTangent` for a unit vector.
|
|
186248
186241
|
* @param fraction fractional position along the geometry.
|
|
186249
|
-
* @
|
|
186242
|
+
* @param result optional receiver for the result.
|
|
186243
|
+
* @returns a ray whose origin is the curve point and direction is the derivative with respect to the fraction.
|
|
186250
186244
|
*/
|
|
186251
186245
|
fractionToPointAndDerivative(fraction, result) {
|
|
186252
186246
|
const distanceAlongPath = fraction * this._totalLength;
|
|
186253
186247
|
const fragment = this.chainDistanceToFragment(distanceAlongPath, true);
|
|
186254
|
-
const
|
|
186255
|
-
result = fragment.childCurve.fractionToPointAndDerivative(
|
|
186256
|
-
//
|
|
186257
|
-
//
|
|
186258
|
-
// Then
|
|
186259
|
-
// derivative we seek is
|
|
186260
|
-
|
|
186248
|
+
const childFraction = fragment.chainDistanceToAccurateChildFraction(distanceAlongPath, true);
|
|
186249
|
+
result = fragment.childCurve.fractionToPointAndDerivative(childFraction, result);
|
|
186250
|
+
// Recall the standard arclength formula s(t) for the curve C = C(t), with derivative s'(t) = ||C'||.
|
|
186251
|
+
// Define fractional arclength for C by f = f(t) = s(t)/L, where L is the total length of C. Then f' = ||C'||/L.
|
|
186252
|
+
// Denote the inverse of f by t = t(f). Then C = C(t(f)) is a parameterization of C by its fractional arclength f.
|
|
186253
|
+
// 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'||.
|
|
186254
|
+
// The fragment gives us C', so we're just a scale away.
|
|
186255
|
+
// Math details can be found at core/geometry/internaldocs/Curve.md
|
|
186256
|
+
const a = this._totalLength / result.direction.magnitude(); // L/||C'||
|
|
186261
186257
|
result.direction.scaleInPlace(a);
|
|
186262
186258
|
return result;
|
|
186263
186259
|
}
|
|
186264
186260
|
/**
|
|
186265
|
-
*
|
|
186261
|
+
* Return the point (x,y,z) and normalized derivative on the curve at fractional position.
|
|
186262
|
+
* * Note that the derivative is "derivative of xyz with respect to fraction".
|
|
186263
|
+
* * The un-normalized derivative shows the speed of the "fractional point" moving along the curve.
|
|
186264
|
+
* * To find the un-normalized derivative, use `fractionToPointAndDerivative`.
|
|
186266
186265
|
* @param fraction fractional position on the curve
|
|
186267
186266
|
* @param result optional receiver for the result.
|
|
186268
|
-
*
|
|
186267
|
+
* @returns a ray whose origin is the curve point and direction is the normalized derivative with respect to
|
|
186268
|
+
* the fraction.
|
|
186269
186269
|
*/
|
|
186270
186270
|
fractionToPointAndUnitTangent(fraction, result) {
|
|
186271
186271
|
const distanceAlongPath = fraction * this._totalLength;
|
|
186272
186272
|
const fragment = this.chainDistanceToFragment(distanceAlongPath, true);
|
|
186273
|
-
const
|
|
186274
|
-
result = fragment.childCurve.fractionToPointAndDerivative(
|
|
186273
|
+
const childFraction = fragment.chainDistanceToAccurateChildFraction(distanceAlongPath, true);
|
|
186274
|
+
result = fragment.childCurve.fractionToPointAndDerivative(childFraction, result);
|
|
186275
186275
|
result.direction.normalizeInPlace();
|
|
186276
186276
|
return result;
|
|
186277
186277
|
}
|
|
@@ -186280,34 +186280,39 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186280
186280
|
* * origin at fractional position along the curve
|
|
186281
186281
|
* * vectorU is the first derivative, i.e. tangent vector with length equal to the rate of change with respect to
|
|
186282
186282
|
* the fraction.
|
|
186283
|
-
* * vectorV is the second derivative, i.e.derivative of vectorU
|
|
186283
|
+
* * vectorV is the second derivative, i.e. derivative of vectorU which points in the direction of the curve's
|
|
186284
|
+
* derivative's change.
|
|
186284
186285
|
*/
|
|
186285
186286
|
fractionToPointAnd2Derivatives(fraction, result) {
|
|
186286
186287
|
const distanceAlongPath = fraction * this._totalLength;
|
|
186287
186288
|
const fragment = this.chainDistanceToFragment(distanceAlongPath, true);
|
|
186288
|
-
const
|
|
186289
|
-
result = fragment.childCurve.fractionToPointAnd2Derivatives(
|
|
186289
|
+
const childFraction = fragment.chainDistanceToAccurateChildFraction(distanceAlongPath, true);
|
|
186290
|
+
result = fragment.childCurve.fractionToPointAnd2Derivatives(childFraction, result);
|
|
186290
186291
|
if (!result)
|
|
186291
186292
|
return undefined;
|
|
186292
|
-
// See fractionToPointAndDerivative
|
|
186293
|
-
//
|
|
186294
|
-
//
|
|
186295
|
-
//
|
|
186293
|
+
// See fractionToPointAndDerivative, where we show d/df(C(t(f))) = L C'/||C'||.
|
|
186294
|
+
// Here we seek the 2nd derivative. We'll use the quotient rule, and the identities
|
|
186295
|
+
// d/dt||x(t)|| = x.x'/||x|| and ||x||^2 = x.x, where "." is the dot product.
|
|
186296
|
+
// d2/df2(C(t(f))) = L d/df(C'/||C'||) = L (||C'|| d/df(C') - C' d/df||C'||) / ||C'||^2
|
|
186296
186297
|
// = L (||C'|| C" L/||C'|| - C' C'.C"/||C'|| L/||C'||) / ||C'||^2
|
|
186297
|
-
// = (L/||C'||)^2 (C" - C' C'.C"/C'.C' )
|
|
186298
|
-
//
|
|
186299
|
-
|
|
186300
|
-
|
|
186301
|
-
const
|
|
186302
|
-
|
|
186303
|
-
const
|
|
186304
|
-
result.vectorU.
|
|
186305
|
-
|
|
186298
|
+
// = (L/||C'||)^2 (C" - C' C'.C"/C'.C' ), where C' and C" are given by the fragment.
|
|
186299
|
+
// The second derivative that fractionToPointAnd2Derivatives returns is C", so the second
|
|
186300
|
+
// derivative we seek is just few scales away.
|
|
186301
|
+
// Math details can be found at core/geometry/internaldocs/Curve.md
|
|
186302
|
+
const magU = result.vectorU.magnitude(); // ||C'||
|
|
186303
|
+
const dotUU = magU * magU; // ||C'||^2
|
|
186304
|
+
const dotUV = result.vectorU.dotProduct(result.vectorV); // C'.C"
|
|
186305
|
+
result.vectorV.addScaledInPlace(result.vectorU, -dotUV / dotUU); // add -(C'*C'.C")/(||C'||^2) to vectorV
|
|
186306
|
+
const scale = this._totalLength / magU; // L/||C'||
|
|
186307
|
+
result.vectorU.scaleInPlace(scale); // scale vectorU by L/||C'||
|
|
186308
|
+
result.vectorV.scaleInPlace(scale * scale); // scale vectorV by (L/||C'(t)||)^2
|
|
186306
186309
|
return result;
|
|
186307
186310
|
}
|
|
186308
186311
|
/**
|
|
186309
186312
|
* Attempt to transform in place.
|
|
186310
|
-
* * Warning: If any child fails, this object becomes invalid
|
|
186313
|
+
* * Warning: If any child transform fails, `this` object becomes invalid but that should never happen.
|
|
186314
|
+
* @param transform the transform to be applied.
|
|
186315
|
+
* @returns true if all of child transforms succeed and false otherwise.
|
|
186311
186316
|
*/
|
|
186312
186317
|
tryTransformInPlace(transform) {
|
|
186313
186318
|
let numFail = 0;
|
|
@@ -186320,48 +186325,45 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186320
186325
|
/** Reverse the curve's data so that its fractional stroking moves in the opposite direction. */
|
|
186321
186326
|
reverseInPlace() {
|
|
186322
186327
|
this._path.reverseChildrenInPlace();
|
|
186323
|
-
const totalLength = this._totalLength;
|
|
186324
186328
|
for (const fragment of this._fragments) {
|
|
186325
|
-
fragment.reverseFractionsAndDistances(
|
|
186329
|
+
fragment.reverseFractionsAndDistances(this._totalLength);
|
|
186326
186330
|
}
|
|
186327
186331
|
this._fragments.reverse();
|
|
186328
186332
|
}
|
|
186329
186333
|
/**
|
|
186330
|
-
* Test for equality conditions
|
|
186331
|
-
* * Mismatched
|
|
186332
|
-
* * If
|
|
186333
|
-
* @param other
|
|
186334
|
+
* Test for equality conditions.
|
|
186335
|
+
* * Mismatched total length is a quick exit condition.
|
|
186336
|
+
* * If total length matches, recurse to the path for matching primitives.
|
|
186334
186337
|
*/
|
|
186335
186338
|
isAlmostEqual(other) {
|
|
186336
186339
|
if (other instanceof CurveChainWithDistanceIndex) {
|
|
186337
|
-
return
|
|
186338
|
-
&& this._path.isAlmostEqual(other._path);
|
|
186340
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this._totalLength, other._totalLength) && this._path.isAlmostEqual(other._path);
|
|
186339
186341
|
}
|
|
186340
186342
|
return false;
|
|
186341
186343
|
}
|
|
186342
186344
|
/**
|
|
186343
|
-
*
|
|
186344
|
-
* * See `CurvePrimitive` for parameter details.
|
|
186345
|
-
* * The returned location directly identifies fractional position along the CurveChainWithDistanceIndex
|
|
186345
|
+
* (Attempt to) find a position on the curve at a signed distance from start fraction.
|
|
186346
|
+
* * See `CurvePrimitive.moveSignedDistanceFromFraction` for parameter details.
|
|
186347
|
+
* * The returned location directly identifies fractional position along the CurveChainWithDistanceIndex and
|
|
186346
186348
|
* has pointer to an additional detail for the child curve.
|
|
186347
186349
|
*/
|
|
186348
186350
|
moveSignedDistanceFromFraction(startFraction, signedDistance, allowExtension, result) {
|
|
186349
186351
|
const distanceA = startFraction * this._totalLength;
|
|
186350
186352
|
const distanceB = distanceA + signedDistance;
|
|
186351
186353
|
const fragmentB = this.chainDistanceToFragment(distanceB, true);
|
|
186352
|
-
const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result);
|
|
186354
|
+
const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result); // local detail related to the child curve
|
|
186353
186355
|
const endFraction = startFraction + (signedDistance / this._totalLength);
|
|
186354
|
-
const chainDetail =
|
|
186356
|
+
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__.CurveLocationDetail.createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result); // global detail related to the curve chain
|
|
186355
186357
|
chainDetail.childDetail = childDetail;
|
|
186356
186358
|
return chainDetail;
|
|
186357
186359
|
}
|
|
186358
186360
|
/**
|
|
186361
|
+
* Return an object summarizing closest point test counts.
|
|
186359
186362
|
* The returned object has
|
|
186360
186363
|
* * numCalls = number of times closestPoint was called.
|
|
186361
|
-
* * numCurvesTested = number of curves tested with full closestPoint
|
|
186362
|
-
* * numAssigned = number of times a new minimum value was recorded
|
|
186364
|
+
* * numCurvesTested = number of curves tested with full closestPoint.
|
|
186365
|
+
* * numAssigned = number of times a new minimum value was recorded.
|
|
186363
186366
|
* * numCandidate = number of curves that would be tested in worst case.
|
|
186364
|
-
* return an object summarizing closest point test counts
|
|
186365
186367
|
* @param clear if true, counts are cleared after the return object is formed.
|
|
186366
186368
|
*/
|
|
186367
186369
|
static getClosestPointTestCounts(clear = true) {
|
|
@@ -186378,13 +186380,13 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186378
186380
|
}
|
|
186379
186381
|
/**
|
|
186380
186382
|
* Search for the curve point that is closest to the spacePoint.
|
|
186381
|
-
* * The CurveChainWithDistanceIndex invokes the base class CurvePrimitive method, which
|
|
186382
|
-
*
|
|
186383
|
-
* * The returned detail directly identifies fractional position along the CurveChainWithDistanceIndex
|
|
186383
|
+
* * The CurveChainWithDistanceIndex invokes the base class CurvePrimitive method, which (via a handler)
|
|
186384
|
+
* determines a CurveLocation detail among the children.
|
|
186385
|
+
* * The returned detail directly identifies fractional position along the CurveChainWithDistanceIndex and
|
|
186384
186386
|
* has pointer to an additional detail for the child curve.
|
|
186385
186387
|
* @param spacePoint point in space
|
|
186386
186388
|
* @param extend true to extend the curve
|
|
186387
|
-
* @returns
|
|
186389
|
+
* @returns a CurveLocationDetail structure that holds the details of the close point.
|
|
186388
186390
|
*/
|
|
186389
186391
|
closestPoint(spacePoint, extend) {
|
|
186390
186392
|
let childDetail;
|
|
@@ -186395,52 +186397,51 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186395
186397
|
}
|
|
186396
186398
|
else {
|
|
186397
186399
|
const sortedFragments = PathFragment.collectSortedQuickMinDistances(this._fragments, spacePoint);
|
|
186398
|
-
const extend0 = [
|
|
186399
|
-
|
|
186400
|
+
const extend0 = [
|
|
186401
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0),
|
|
186402
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__.CurveExtendMode.None,
|
|
186403
|
+
];
|
|
186404
|
+
const extend1 = [
|
|
186405
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__.CurveExtendMode.None,
|
|
186406
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_9__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1),
|
|
186407
|
+
];
|
|
186400
186408
|
const fragment0 = this._fragments[0];
|
|
186401
186409
|
const fragment1 = this._fragments[this._fragments.length - 1];
|
|
186402
186410
|
CurveChainWithDistanceIndex._numCalls++;
|
|
186403
186411
|
CurveChainWithDistanceIndex._numCandidate += sortedFragments.length;
|
|
186404
|
-
|
|
186405
|
-
|
|
186412
|
+
let detailA;
|
|
186413
|
+
for (const sortedFragment of sortedFragments) {
|
|
186414
|
+
if (sortedFragment.a > aMin)
|
|
186415
|
+
// sortedFragments help early exit because it is likely that one of the first few fragments
|
|
186416
|
+
// in sortedFragments is the fragment with minimum distance from space point to the curve.
|
|
186406
186417
|
break;
|
|
186407
186418
|
CurveChainWithDistanceIndex._numTested++;
|
|
186408
|
-
const child =
|
|
186409
|
-
|
|
186419
|
+
const child = sortedFragment.childCurve;
|
|
186420
|
+
detailA = child.closestPoint(spacePoint, sortedFragment === fragment0 ? extend0 : sortedFragment === fragment1 ? extend1 : false, detailA);
|
|
186410
186421
|
if (detailA && detailA.a < aMin) {
|
|
186411
186422
|
aMin = detailA.a;
|
|
186412
|
-
childDetail =
|
|
186413
|
-
childDetail.a = detailA.a;
|
|
186423
|
+
childDetail = detailA.clone(childDetail);
|
|
186414
186424
|
CurveChainWithDistanceIndex._numAssigned++;
|
|
186415
186425
|
}
|
|
186416
186426
|
}
|
|
186417
186427
|
}
|
|
186418
186428
|
if (!childDetail)
|
|
186419
186429
|
return undefined;
|
|
186420
|
-
|
|
186421
|
-
if (fragment) {
|
|
186422
|
-
const chainDistance = fragment.childFractionToChainDistance(childDetail.fraction);
|
|
186423
|
-
const chainFraction = this.chainDistanceToChainFraction(chainDistance);
|
|
186424
|
-
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__.CurveLocationDetail.createCurveFractionPoint(this, chainFraction, childDetail.point);
|
|
186425
|
-
chainDetail.childDetail = childDetail;
|
|
186426
|
-
chainDetail.a = childDetail.a;
|
|
186427
|
-
return chainDetail;
|
|
186428
|
-
}
|
|
186429
|
-
return undefined;
|
|
186430
|
+
return this.computeChainDetail(childDetail);
|
|
186430
186431
|
}
|
|
186431
186432
|
/**
|
|
186432
186433
|
* Construct an offset of each child as viewed in the xy-plane (ignoring z).
|
|
186433
|
-
* * No attempt is made to join the offset children. Use RegionOps.constructCurveXYOffset
|
|
186434
|
+
* * No attempt is made to join the offset children. Use RegionOps.constructCurveXYOffset to return a fully
|
|
186434
186435
|
* joined offset.
|
|
186435
|
-
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve)
|
|
186436
|
+
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve) or offset options object.
|
|
186436
186437
|
*/
|
|
186437
186438
|
constructOffsetXY(offsetDistanceOrOptions) {
|
|
186438
|
-
const options =
|
|
186439
|
+
const options = _OffsetOptions__WEBPACK_IMPORTED_MODULE_10__.OffsetOptions.create(offsetDistanceOrOptions);
|
|
186439
186440
|
const offsets = [];
|
|
186440
186441
|
for (const prim of this.collectCurvePrimitives(undefined, true, true)) {
|
|
186441
186442
|
const offset = prim.constructOffsetXY(options);
|
|
186442
186443
|
if (offset !== undefined) {
|
|
186443
|
-
if (offset instanceof
|
|
186444
|
+
if (offset instanceof _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__.CurvePrimitive)
|
|
186444
186445
|
offsets.push(offset);
|
|
186445
186446
|
else if (Array.isArray(offset))
|
|
186446
186447
|
offset.forEach((cp) => offsets.push(cp));
|
|
@@ -186452,12 +186453,31 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
186452
186453
|
* Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of
|
|
186453
186454
|
* projection.
|
|
186454
186455
|
* @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
|
|
186455
|
-
* @param lowHigh optional receiver for output
|
|
186456
|
+
* @param lowHigh optional receiver for output.
|
|
186456
186457
|
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
|
|
186457
186458
|
* end of the ray.
|
|
186458
186459
|
*/
|
|
186459
186460
|
projectedParameterRange(ray, lowHigh) {
|
|
186460
|
-
return
|
|
186461
|
+
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_11__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
186462
|
+
}
|
|
186463
|
+
/**
|
|
186464
|
+
* Compute the global chain detail corresponding to a local child detail.
|
|
186465
|
+
* @param childDetail the local detail, with respect to a child of this chain.
|
|
186466
|
+
* @returns the global detail, with respect to this chain.
|
|
186467
|
+
*/
|
|
186468
|
+
computeChainDetail(childDetail) {
|
|
186469
|
+
if (!childDetail.curve)
|
|
186470
|
+
return undefined;
|
|
186471
|
+
const fragment = this.curveAndChildFractionToFragment(childDetail.curve, childDetail.fraction);
|
|
186472
|
+
if (fragment) {
|
|
186473
|
+
const chainDistance = fragment.childFractionToChainDistance(childDetail.fraction);
|
|
186474
|
+
const chainFraction = this.chainDistanceToChainFraction(chainDistance);
|
|
186475
|
+
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_8__.CurveLocationDetail.createCurveFractionPoint(this, chainFraction, childDetail.point);
|
|
186476
|
+
chainDetail.childDetail = childDetail;
|
|
186477
|
+
chainDetail.a = childDetail.a;
|
|
186478
|
+
return chainDetail;
|
|
186479
|
+
}
|
|
186480
|
+
return undefined;
|
|
186461
186481
|
}
|
|
186462
186482
|
}
|
|
186463
186483
|
CurveChainWithDistanceIndex._numCalls = 0;
|
|
@@ -186913,10 +186933,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
186913
186933
|
/* harmony export */ });
|
|
186914
186934
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
186915
186935
|
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
186936
|
+
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
186916
186937
|
/* harmony import */ var _internalContexts_CurveCurveCloseApproachXY__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internalContexts/CurveCurveCloseApproachXY */ "../../core/geometry/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js");
|
|
186917
186938
|
/* harmony import */ var _internalContexts_CurveCurveIntersectXY__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internalContexts/CurveCurveIntersectXY */ "../../core/geometry/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js");
|
|
186918
186939
|
/* harmony import */ var _internalContexts_CurveCurveIntersectXYZ__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internalContexts/CurveCurveIntersectXYZ */ "../../core/geometry/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js");
|
|
186919
|
-
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
186920
186940
|
/*---------------------------------------------------------------------------------------------
|
|
186921
186941
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
186922
186942
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -186959,6 +186979,7 @@ class CurveCurve {
|
|
|
186959
186979
|
}
|
|
186960
186980
|
/**
|
|
186961
186981
|
* Return xy intersections of 2 projected curves.
|
|
186982
|
+
* @param worldToLocal transform (possibly perspective) defining the local coordinates in which to compute xy intersections.
|
|
186962
186983
|
* @param curveA first curve
|
|
186963
186984
|
* @param extendA true to allow curveA to extend
|
|
186964
186985
|
* @param curveB second curve
|
|
@@ -186971,19 +186992,20 @@ class CurveCurve {
|
|
|
186971
186992
|
return handler.grabPairedResults();
|
|
186972
186993
|
}
|
|
186973
186994
|
/**
|
|
186974
|
-
|
|
186975
|
-
|
|
186976
|
-
|
|
186977
|
-
|
|
186978
|
-
|
|
186979
|
-
|
|
186980
|
-
|
|
186981
|
-
|
|
186982
|
-
|
|
186983
|
-
|
|
186995
|
+
* Return full 3d xyz intersections of 2 curves.
|
|
186996
|
+
* * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.
|
|
186997
|
+
* * Not Implemented for bspline and bezier curves.
|
|
186998
|
+
* @beta
|
|
186999
|
+
* @param curveA first curve
|
|
187000
|
+
* @param extendA true to allow curveA to extend
|
|
187001
|
+
* @param curveB second curve
|
|
187002
|
+
* @param extendB true to allow curveB to extend
|
|
187003
|
+
* @returns array of intersections structured as CurveLocationDetailPair[]
|
|
187004
|
+
*/
|
|
187005
|
+
static intersectionXYZPairs(curveA, extendA, curveB, extendB) {
|
|
186984
187006
|
const handler = new _internalContexts_CurveCurveIntersectXYZ__WEBPACK_IMPORTED_MODULE_4__.CurveCurveIntersectXYZ(extendA, curveB, extendB);
|
|
186985
187007
|
curveA.dispatchToGeometryHandler(handler);
|
|
186986
|
-
return handler.
|
|
187008
|
+
return handler.grabPairedResults();
|
|
186987
187009
|
}
|
|
186988
187010
|
/**
|
|
186989
187011
|
* Return xy intersections of input curves.
|
|
@@ -188213,7 +188235,8 @@ class CurveLocationDetailPair {
|
|
|
188213
188235
|
}
|
|
188214
188236
|
}
|
|
188215
188237
|
/**
|
|
188216
|
-
* Data bundle for a pair of arrays of CurveLocationDetail structures
|
|
188238
|
+
* Data bundle for a pair of arrays of CurveLocationDetail structures.
|
|
188239
|
+
* @deprecated in 4.x. Use CurveLocationDetailPair[] instead.
|
|
188217
188240
|
* @public
|
|
188218
188241
|
*/
|
|
188219
188242
|
class CurveLocationDetailArrayPair {
|
|
@@ -188824,8 +188847,8 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
188824
188847
|
* directions), or array of distinct CurveExtendOptions for start and end.
|
|
188825
188848
|
* @returns Returns a CurveLocationDetail structure that holds the details of the close point.
|
|
188826
188849
|
*/
|
|
188827
|
-
closestPoint(spacePoint, extend) {
|
|
188828
|
-
const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.ClosestPointStrokeHandler(spacePoint, extend);
|
|
188850
|
+
closestPoint(spacePoint, extend, result) {
|
|
188851
|
+
const strokeHandler = new _internalContexts_ClosestPointStrokeHandler__WEBPACK_IMPORTED_MODULE_10__.ClosestPointStrokeHandler(spacePoint, extend, result);
|
|
188829
188852
|
this.emitStrokableParts(strokeHandler);
|
|
188830
188853
|
return strokeHandler.claimResult();
|
|
188831
188854
|
}
|
|
@@ -196180,7 +196203,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
196180
196203
|
* @internal
|
|
196181
196204
|
*/
|
|
196182
196205
|
class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORTED_MODULE_0__.NewtonRtoRStrokeHandler {
|
|
196183
|
-
constructor(spacePoint, extend) {
|
|
196206
|
+
constructor(spacePoint, extend, result) {
|
|
196184
196207
|
super();
|
|
196185
196208
|
this._fractionA = 0;
|
|
196186
196209
|
this._functionA = 0;
|
|
@@ -196190,7 +196213,7 @@ class ClosestPointStrokeHandler extends _NewtonRtoRStrokeHandler__WEBPACK_IMPORT
|
|
|
196190
196213
|
this._spacePoint = spacePoint;
|
|
196191
196214
|
this._workPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
196192
196215
|
this._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_2__.Ray3d.createZero();
|
|
196193
|
-
this._closestPoint =
|
|
196216
|
+
this._closestPoint = result;
|
|
196194
196217
|
this._extend = extend;
|
|
196195
196218
|
this.startCurvePrimitive(undefined);
|
|
196196
196219
|
this._newtonSolver = new _numerics_Newton__WEBPACK_IMPORTED_MODULE_3__.Newton1dUnboundedApproximateDerivative(this);
|
|
@@ -196366,18 +196389,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
196366
196389
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
196367
196390
|
/* harmony export */ CurveCurveCloseApproachXY: () => (/* binding */ CurveCurveCloseApproachXY)
|
|
196368
196391
|
/* harmony export */ });
|
|
196369
|
-
/* harmony import */ var
|
|
196370
|
-
/* harmony import */ var
|
|
196371
|
-
/* harmony import */ var
|
|
196372
|
-
/* harmony import */ var
|
|
196373
|
-
/* harmony import */ var
|
|
196374
|
-
/* harmony import */ var
|
|
196375
|
-
/* harmony import */ var
|
|
196376
|
-
/* harmony import */ var
|
|
196377
|
-
/* harmony import */ var
|
|
196378
|
-
/* harmony import */ var
|
|
196379
|
-
/* harmony import */ var
|
|
196380
|
-
/* harmony import */ var
|
|
196392
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
196393
|
+
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
196394
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
196395
|
+
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
196396
|
+
/* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
|
|
196397
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
196398
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
196399
|
+
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
196400
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
196401
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
196402
|
+
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
196403
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
196404
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
196405
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
196381
196406
|
/*---------------------------------------------------------------------------------------------
|
|
196382
196407
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
196383
196408
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -196397,6 +196422,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
196397
196422
|
|
|
196398
196423
|
|
|
196399
196424
|
|
|
196425
|
+
|
|
196426
|
+
|
|
196400
196427
|
// cspell:word XYRR
|
|
196401
196428
|
/**
|
|
196402
196429
|
* Handler class for XY close approach between _geometryB and another geometry.
|
|
@@ -196412,12 +196439,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
196412
196439
|
* * geometryB is saved for later reference.
|
|
196413
196440
|
* @internal
|
|
196414
196441
|
*/
|
|
196415
|
-
class CurveCurveCloseApproachXY extends
|
|
196442
|
+
class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__.RecurseToCurvesGeometryHandler {
|
|
196416
196443
|
setGeometryB(geometryB) {
|
|
196417
196444
|
this._geometryB = geometryB;
|
|
196418
196445
|
this._circularArcB = undefined;
|
|
196419
196446
|
this._circularRadiusB = undefined;
|
|
196420
|
-
if (geometryB instanceof
|
|
196447
|
+
if (geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
196421
196448
|
const r = geometryB.circularRadiusXY();
|
|
196422
196449
|
if (r !== undefined) {
|
|
196423
196450
|
this._circularRadiusB = r;
|
|
@@ -196425,9 +196452,6 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196425
196452
|
}
|
|
196426
196453
|
}
|
|
196427
196454
|
}
|
|
196428
|
-
reinitialize() {
|
|
196429
|
-
this._results = [];
|
|
196430
|
-
}
|
|
196431
196455
|
/**
|
|
196432
196456
|
* Constructor.
|
|
196433
196457
|
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
@@ -196435,8 +196459,8 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196435
196459
|
constructor(geometryB) {
|
|
196436
196460
|
super();
|
|
196437
196461
|
this.setGeometryB(geometryB);
|
|
196438
|
-
this._maxDistanceSquared =
|
|
196439
|
-
this.
|
|
196462
|
+
this._maxDistanceSquared = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistanceSquared;
|
|
196463
|
+
this._results = [];
|
|
196440
196464
|
}
|
|
196441
196465
|
/** Set the (possibly undefined) max XY distance (z is ignored) to accept. */
|
|
196442
196466
|
set maxDistanceToAccept(value) {
|
|
@@ -196471,12 +196495,12 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196471
196495
|
grabPairedResults(reinitialize = false) {
|
|
196472
196496
|
const result = this._results;
|
|
196473
196497
|
if (reinitialize)
|
|
196474
|
-
this.
|
|
196498
|
+
this._results = [];
|
|
196475
196499
|
return result;
|
|
196476
196500
|
}
|
|
196477
196501
|
/** Returns `true` if `detail` has same curve and fraction. */
|
|
196478
196502
|
sameCurveAndFraction(cp, fraction, detail) {
|
|
196479
|
-
return cp === detail.curve &&
|
|
196503
|
+
return cp === detail.curve && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isAlmostEqualNumber(fraction, detail.fraction);
|
|
196480
196504
|
}
|
|
196481
196505
|
/**
|
|
196482
196506
|
* If distance between pointA and pointB is less than maxDistance, record CurveLocationDetailPair which is
|
|
@@ -196485,9 +196509,9 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196485
196509
|
testAndRecordPointPairApproach(cpA, fA, pointA, cpB, fB, pointB, reversed) {
|
|
196486
196510
|
const d2 = pointA.distanceSquaredXY(pointB);
|
|
196487
196511
|
if (d2 < this._maxDistanceSquared) {
|
|
196488
|
-
const detailA =
|
|
196489
|
-
const detailB =
|
|
196490
|
-
const pair =
|
|
196512
|
+
const detailA = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(cpA, fA, pointA);
|
|
196513
|
+
const detailB = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(cpB, fB, pointB);
|
|
196514
|
+
const pair = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair.createCapture(detailA, detailB);
|
|
196491
196515
|
if (reversed)
|
|
196492
196516
|
pair.swapDetails();
|
|
196493
196517
|
this._results.push(pair);
|
|
@@ -196503,7 +196527,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196503
196527
|
* @param cpB the second curve
|
|
196504
196528
|
* @param fractionB0 start of the second curve
|
|
196505
196529
|
* @param fractionB1 end of the second curve
|
|
196506
|
-
* @param reversed
|
|
196530
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
196507
196531
|
* @param intervalDetails optional CurveLocationDetailPair
|
|
196508
196532
|
*/
|
|
196509
196533
|
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed, intervalDetails) {
|
|
@@ -196513,14 +196537,14 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196513
196537
|
intervalDetails.detailA.hasFraction1 &&
|
|
196514
196538
|
intervalDetails.detailB.hasFraction1;
|
|
196515
196539
|
if (isInterval) {
|
|
196516
|
-
globalFractionA =
|
|
196517
|
-
globalFractionB =
|
|
196518
|
-
globalFractionA1 =
|
|
196519
|
-
globalFractionB1 =
|
|
196540
|
+
globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, intervalDetails.detailA.fraction, fractionA1);
|
|
196541
|
+
globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, intervalDetails.detailB.fraction, fractionB1);
|
|
196542
|
+
globalFractionA1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, intervalDetails.detailA.fraction1, fractionA1);
|
|
196543
|
+
globalFractionB1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, intervalDetails.detailB.fraction1, fractionB1);
|
|
196520
196544
|
}
|
|
196521
196545
|
else {
|
|
196522
|
-
globalFractionA = globalFractionA1 =
|
|
196523
|
-
globalFractionB = globalFractionB1 =
|
|
196546
|
+
globalFractionA = globalFractionA1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
|
|
196547
|
+
globalFractionB = globalFractionB1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
196524
196548
|
}
|
|
196525
196549
|
// ignore duplicate of most recent approach
|
|
196526
196550
|
const numPrevious = this._results.length;
|
|
@@ -196538,8 +196562,8 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196538
196562
|
return;
|
|
196539
196563
|
}
|
|
196540
196564
|
}
|
|
196541
|
-
const detailA =
|
|
196542
|
-
const detailB =
|
|
196565
|
+
const detailA = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(cpA, globalFractionA, cpA.fractionToPoint(globalFractionA));
|
|
196566
|
+
const detailB = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveFractionPoint(cpB, globalFractionB, cpB.fractionToPoint(globalFractionB));
|
|
196543
196567
|
if (isInterval) {
|
|
196544
196568
|
detailA.captureFraction1Point1(globalFractionA1, cpA.fractionToPoint(globalFractionA1));
|
|
196545
196569
|
detailB.captureFraction1Point1(globalFractionB1, cpB.fractionToPoint(globalFractionB1));
|
|
@@ -196548,14 +196572,14 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196548
196572
|
const d2 = detailA.point.distanceSquaredXY(detailB.point);
|
|
196549
196573
|
if (d2 > this._maxDistanceSquared)
|
|
196550
196574
|
return;
|
|
196551
|
-
detailA.setIntervalRole(
|
|
196552
|
-
detailB.setIntervalRole(
|
|
196575
|
+
detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveIntervalRole.isolated);
|
|
196576
|
+
detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveIntervalRole.isolated);
|
|
196553
196577
|
}
|
|
196554
196578
|
if (reversed) {
|
|
196555
|
-
this._results.push(new
|
|
196579
|
+
this._results.push(new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair(detailB, detailA));
|
|
196556
196580
|
}
|
|
196557
196581
|
else {
|
|
196558
|
-
this._results.push(new
|
|
196582
|
+
this._results.push(new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair(detailA, detailB));
|
|
196559
196583
|
}
|
|
196560
196584
|
}
|
|
196561
196585
|
/**
|
|
@@ -196569,11 +196593,11 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196569
196593
|
* @param cpB curveB
|
|
196570
196594
|
* @param fractionB0 global start fraction on curveB
|
|
196571
196595
|
* @param fractionB1 global end fraction on curveB
|
|
196572
|
-
* @param reversed whether to reverse the details in the pair
|
|
196596
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
196573
196597
|
*/
|
|
196574
196598
|
capturePairWithLocalFractions(pair, cpA, fractionA0, fractionA1, cpB, fractionB0, fractionB1, reversed) {
|
|
196575
|
-
const globalFractionA =
|
|
196576
|
-
const globalFractionB =
|
|
196599
|
+
const globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, pair.detailA.fraction, fractionA1);
|
|
196600
|
+
const globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, pair.detailB.fraction, fractionB1);
|
|
196577
196601
|
// ignore duplicate of most recent pair
|
|
196578
196602
|
const numPrevious = this._results.length;
|
|
196579
196603
|
if (numPrevious > 0) {
|
|
@@ -196590,13 +196614,13 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196590
196614
|
return;
|
|
196591
196615
|
}
|
|
196592
196616
|
}
|
|
196617
|
+
// recompute the points just in case
|
|
196618
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveEvaluatedFraction(cpA, globalFractionA, pair.detailA);
|
|
196619
|
+
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveEvaluatedFraction(cpB, globalFractionB, pair.detailB);
|
|
196620
|
+
pair.detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveIntervalRole.isolated);
|
|
196621
|
+
pair.detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveIntervalRole.isolated);
|
|
196593
196622
|
if (reversed)
|
|
196594
196623
|
pair.swapDetails();
|
|
196595
|
-
// recompute the points just in case
|
|
196596
|
-
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__.CurveLocationDetail.createCurveEvaluatedFraction(cpA, globalFractionA, pair.detailA);
|
|
196597
|
-
_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__.CurveLocationDetail.createCurveEvaluatedFraction(cpB, globalFractionB, pair.detailB);
|
|
196598
|
-
pair.detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__.CurveIntervalRole.isolated);
|
|
196599
|
-
pair.detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_3__.CurveIntervalRole.isolated);
|
|
196600
196624
|
this._results.push(pair);
|
|
196601
196625
|
}
|
|
196602
196626
|
/**
|
|
@@ -196604,7 +196628,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196604
196628
|
* @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible)
|
|
196605
196629
|
* @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible)
|
|
196606
196630
|
* @param pairs array of pairs
|
|
196607
|
-
* @param reversed
|
|
196631
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
196608
196632
|
*/
|
|
196609
196633
|
recordPairs(cpA, cpB, pairs, reversed) {
|
|
196610
196634
|
if (pairs !== undefined) {
|
|
@@ -196617,15 +196641,15 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196617
196641
|
* Record fully assembled (but possibly reversed) detail pair.
|
|
196618
196642
|
* @param detailA first detail
|
|
196619
196643
|
* @param detailB second detail
|
|
196620
|
-
* @param reversed
|
|
196644
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
196621
196645
|
*/
|
|
196622
196646
|
captureDetailPair(detailA, detailB, reversed) {
|
|
196623
196647
|
if (detailA && detailB) {
|
|
196624
196648
|
if (reversed) {
|
|
196625
|
-
this._results.push(
|
|
196649
|
+
this._results.push(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair.createCapture(detailB, detailA));
|
|
196626
196650
|
}
|
|
196627
196651
|
else {
|
|
196628
|
-
this._results.push(
|
|
196652
|
+
this._results.push(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair.createCapture(detailA, detailB));
|
|
196629
196653
|
}
|
|
196630
196654
|
}
|
|
196631
196655
|
}
|
|
@@ -196646,7 +196670,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196646
196670
|
}
|
|
196647
196671
|
/**
|
|
196648
196672
|
* Return fractions of close approach within maxDistance between two line segments (a0,a1) and (b0,b1).
|
|
196649
|
-
* * Math details can be found at
|
|
196673
|
+
* * Math details can be found at core/geometry/internaldocs/Curve.md
|
|
196650
196674
|
* @param a0 start point of line a
|
|
196651
196675
|
* @param a1 end point of line a
|
|
196652
196676
|
* @param b0 start point of line b
|
|
@@ -196666,38 +196690,38 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196666
196690
|
const e01y = b1.y - a0.y;
|
|
196667
196691
|
const e10x = b0.x - a1.x;
|
|
196668
196692
|
const e10y = b0.y - a1.y;
|
|
196669
|
-
const hab0 =
|
|
196670
|
-
const hab1 =
|
|
196671
|
-
const hba0 = -
|
|
196672
|
-
const hba1 = -
|
|
196693
|
+
const hab0 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(ux, uy, e00x, e00y);
|
|
196694
|
+
const hab1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(ux, uy, e01x, e01y);
|
|
196695
|
+
const hba0 = -_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(vx, vy, e00x, e00y);
|
|
196696
|
+
const hba1 = -_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.crossProductXYXY(vx, vy, e10x, e10y);
|
|
196673
196697
|
if (hab0 * hab1 < 0.0 && hba0 * hba1 < 0.0) { // true intersection, strictly within both segments
|
|
196674
196698
|
const fractionA = -hba0 / (hba1 - hba0);
|
|
196675
196699
|
const fractionB = -hab0 / (hab1 - hab0);
|
|
196676
|
-
return
|
|
196700
|
+
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)));
|
|
196677
196701
|
}
|
|
196678
196702
|
// there's no intersection, so find the closest approach within maxDistance from an endpoint
|
|
196679
|
-
const closestApproach = new
|
|
196703
|
+
const closestApproach = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetailPair();
|
|
196680
196704
|
closestApproach.detailA.a = 2 * maxDistanceSquared; // init to an approach that's too far away
|
|
196681
196705
|
let reversed = false;
|
|
196682
|
-
const uu =
|
|
196706
|
+
const uu = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseSquaredXY(ux, uy);
|
|
196683
196707
|
if (hab0 * hab0 <= maxDistanceSquared * uu) { // test distance of b0 to u
|
|
196684
|
-
const fractionA =
|
|
196708
|
+
const fractionA = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYXY(ux, uy, e00x, e00y) / uu;
|
|
196685
196709
|
if (this.updatePointToSegmentDistance(0, b0, a0, a1, fractionA, maxDistanceSquared, closestApproach))
|
|
196686
196710
|
reversed = true;
|
|
196687
196711
|
}
|
|
196688
196712
|
if (hab1 * hab1 <= maxDistanceSquared * uu) { // test distance of b1 to u
|
|
196689
|
-
const fractionA =
|
|
196713
|
+
const fractionA = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYXY(ux, uy, e01x, e01y) / uu;
|
|
196690
196714
|
if (this.updatePointToSegmentDistance(1, b1, a0, a1, fractionA, maxDistanceSquared, closestApproach))
|
|
196691
196715
|
reversed = true;
|
|
196692
196716
|
}
|
|
196693
|
-
const vv =
|
|
196717
|
+
const vv = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.hypotenuseSquaredXY(vx, vy);
|
|
196694
196718
|
if (hba0 * hba0 <= maxDistanceSquared * vv) { // test distance of a0 to v
|
|
196695
|
-
const fractionB = -
|
|
196719
|
+
const fractionB = -_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYXY(vx, vy, e00x, e00y) / vv;
|
|
196696
196720
|
if (this.updatePointToSegmentDistance(0, a0, b0, b1, fractionB, maxDistanceSquared, closestApproach))
|
|
196697
196721
|
reversed = false;
|
|
196698
196722
|
}
|
|
196699
196723
|
if (hba1 * hba1 <= maxDistanceSquared * vv) { // test distance of a1 to v
|
|
196700
|
-
const fractionB = -
|
|
196724
|
+
const fractionB = -_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.dotProductXYXY(vx, vy, e10x, e10y) / vv;
|
|
196701
196725
|
if (this.updatePointToSegmentDistance(1, a1, b0, b1, fractionB, maxDistanceSquared, closestApproach))
|
|
196702
196726
|
reversed = false;
|
|
196703
196727
|
}
|
|
@@ -196719,7 +196743,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196719
196743
|
* @param fB0 fraction0 on curveB
|
|
196720
196744
|
* @param fB1 fraction0 on curveB
|
|
196721
196745
|
* @param testProjectionOnB whether to record projections of the given curveA points onto curveB
|
|
196722
|
-
* @param reversed
|
|
196746
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
196723
196747
|
*/
|
|
196724
196748
|
testAndRecordFractionalPairApproach(cpA, fA0, fA1, testProjectionOnA, cpB, fB0, fB1, testProjectionOnB, reversed) {
|
|
196725
196749
|
const pointA0 = cpA.fractionToPoint(fA0);
|
|
@@ -196744,7 +196768,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196744
196768
|
// NO NO NO -- this is 3D closest point --- need 2d !!
|
|
196745
196769
|
const detail = cpB.closestPoint(pointA, false);
|
|
196746
196770
|
if (detail) {
|
|
196747
|
-
const fB =
|
|
196771
|
+
const fB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.restrictToInterval(detail.fraction, fB0, fB1);
|
|
196748
196772
|
if (fB === detail.fraction) { // if fraction is within fB0 and fB1
|
|
196749
196773
|
this.testAndRecordPointPairApproach(cpA, fA, pointA, cpB, detail.fraction, detail.point, reversed);
|
|
196750
196774
|
}
|
|
@@ -196783,7 +196807,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196783
196807
|
* @param pointA1 end point of the segment
|
|
196784
196808
|
* @param fractionA1 fraction of the end of the segment
|
|
196785
196809
|
* @param arc the arc
|
|
196786
|
-
* @param reversed
|
|
196810
|
+
* @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
|
|
196787
196811
|
*/
|
|
196788
196812
|
dispatchSegmentArc(cpA, pointA0, fractionA0, pointA1, fractionA1, arc, reversed) {
|
|
196789
196813
|
// 1) intersection between arc and segment
|
|
@@ -196799,18 +196823,18 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196799
196823
|
const data = arc.toTransformedVectors();
|
|
196800
196824
|
const pointA0Local = pointA0;
|
|
196801
196825
|
const pointA1Local = pointA1;
|
|
196802
|
-
const alpha =
|
|
196803
|
-
const beta =
|
|
196804
|
-
const gamma =
|
|
196805
|
-
const cosines = new
|
|
196806
|
-
const sines = new
|
|
196807
|
-
const radians = new
|
|
196808
|
-
const numRoots =
|
|
196826
|
+
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.center, 1); // det(A0, A1, C)
|
|
196827
|
+
const beta = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector0, 0); // det(A0, A1, U)
|
|
196828
|
+
const gamma = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.tripleProductXYW(pointA0Local, 1, pointA1Local, 1, data.vector90, 0); // det(A0, A1, V)
|
|
196829
|
+
const cosines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_5__.GrowableFloat64Array(2);
|
|
196830
|
+
const sines = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_5__.GrowableFloat64Array(2);
|
|
196831
|
+
const radians = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_5__.GrowableFloat64Array(2);
|
|
196832
|
+
const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(// solve the equation
|
|
196809
196833
|
alpha, beta, gamma, cosines, sines, radians);
|
|
196810
196834
|
for (let i = 0; i < numRoots; i++) {
|
|
196811
196835
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
196812
196836
|
const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
|
|
196813
|
-
const lineFraction =
|
|
196837
|
+
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
196814
196838
|
// only add if the point is within the start and end fractions of both line segment and arc
|
|
196815
196839
|
if (lineFraction !== undefined && this.acceptFraction(lineFraction) && this.acceptFraction(arcFraction)) {
|
|
196816
196840
|
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
|
|
@@ -196830,7 +196854,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196830
196854
|
for (const radians1 of [parallelRadians, parallelRadians + Math.PI]) {
|
|
196831
196855
|
const arcPoint = data.center.plus2Scaled(data.vector0, Math.cos(radians1), data.vector90, Math.sin(radians1));
|
|
196832
196856
|
const arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians1);
|
|
196833
|
-
const lineFraction =
|
|
196857
|
+
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_6__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
196834
196858
|
// only add if the point is within the start and end fractions of both line segment and arc
|
|
196835
196859
|
if (lineFraction !== undefined && this.acceptFraction(lineFraction) && this.acceptFraction(arcFraction)) {
|
|
196836
196860
|
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, arcFraction, arc, 0, 1, reversed);
|
|
@@ -196840,15 +196864,15 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196840
196864
|
/** Low level dispatch of circular arc with circular arc. radiusA must be larger than or equal to radiusB. */
|
|
196841
196865
|
dispatchCircularCircularOrdered(cpA, radiusA, cpB, radiusB, reversed) {
|
|
196842
196866
|
const c = cpA.center.distance(cpB.center);
|
|
196843
|
-
const e = this._maxDistanceToAccept !== undefined ? this._maxDistanceToAccept :
|
|
196867
|
+
const e = this._maxDistanceToAccept !== undefined ? this._maxDistanceToAccept : _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance;
|
|
196844
196868
|
if (c > radiusA + radiusB + e) // distance between circles is more than max distance
|
|
196845
196869
|
return;
|
|
196846
196870
|
// TODO: 1) intersection between arcs
|
|
196847
196871
|
// 2) endpoints to endpoints
|
|
196848
196872
|
this.testAndRecordFractionalPairApproach(cpA, 0, 1, false, cpB, 0, 1, false, reversed);
|
|
196849
196873
|
// 3) line from one arc to another (perpendicular to arc tangents along center-center line)
|
|
196850
|
-
if (!
|
|
196851
|
-
const vectorAB =
|
|
196874
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSmallMetricDistance(c)) {
|
|
196875
|
+
const vectorAB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Vector3d.createStartEnd(cpA.center, cpB.center);
|
|
196852
196876
|
vectorAB.scaleInPlace(1.0 / c);
|
|
196853
196877
|
for (const rA of [-radiusA, radiusA]) {
|
|
196854
196878
|
for (const rB of [-radiusB, radiusB]) {
|
|
@@ -196873,7 +196897,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196873
196897
|
const radians = Math.atan2(s, c);
|
|
196874
196898
|
const fraction = arc.sweep.radiansToPositivePeriodicFraction(radians, 0);
|
|
196875
196899
|
if (fraction < 1.0)
|
|
196876
|
-
return
|
|
196900
|
+
return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__.CurveLocationDetail.createCurveEvaluatedFraction(arc, fraction);
|
|
196877
196901
|
return undefined;
|
|
196878
196902
|
}
|
|
196879
196903
|
/** Low level dispatch of arc with arc. Only circular arcs are supported. */
|
|
@@ -196897,34 +196921,34 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196897
196921
|
}
|
|
196898
196922
|
/** Low level dispatch of arc with (beziers of) a bspline curve */
|
|
196899
196923
|
dispatchArcBsplineCurve3d(cpA, cpB, reversed) {
|
|
196900
|
-
const ls =
|
|
196924
|
+
const ls = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
196901
196925
|
cpB.emitStrokes(ls);
|
|
196902
196926
|
this.computeArcLineString(cpA, ls, reversed);
|
|
196903
196927
|
}
|
|
196904
196928
|
/** Low level dispatch of (beziers of) a bspline curve with (beziers of) a bspline curve */
|
|
196905
196929
|
dispatchBSplineCurve3dBSplineCurve3d(bcurveA, bcurveB, reversed) {
|
|
196906
|
-
const lsA =
|
|
196930
|
+
const lsA = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
196907
196931
|
bcurveA.emitStrokes(lsA);
|
|
196908
|
-
const lsB =
|
|
196932
|
+
const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
196909
196933
|
bcurveB.emitStrokes(lsB);
|
|
196910
196934
|
this.computeLineStringLineString(lsA, lsB, reversed);
|
|
196911
196935
|
}
|
|
196912
196936
|
/** Low level dispatch of linestring with (beziers of) a bspline curve */
|
|
196913
196937
|
dispatchLineStringBSplineCurve(lsA, curveB, reversed) {
|
|
196914
|
-
const lsB =
|
|
196938
|
+
const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
196915
196939
|
curveB.emitStrokes(lsB);
|
|
196916
196940
|
this.computeLineStringLineString(lsA, lsB, reversed);
|
|
196917
196941
|
}
|
|
196918
196942
|
/** Low level dispatch of segment with (beziers of) a bspline curve */
|
|
196919
196943
|
dispatchSegmentBsplineCurve(segA, curveB, reversed) {
|
|
196920
|
-
const lsB =
|
|
196944
|
+
const lsB = _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d.create();
|
|
196921
196945
|
curveB.emitStrokes(lsB);
|
|
196922
196946
|
this.computeSegmentLineString(segA, lsB, reversed);
|
|
196923
196947
|
}
|
|
196924
196948
|
/** Detail computation for segment approaching linestring. */
|
|
196925
196949
|
computeSegmentLineString(segA, lsB, reversed) {
|
|
196926
196950
|
const numB = lsB.numPoints();
|
|
196927
|
-
const deltaFracB =
|
|
196951
|
+
const deltaFracB = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.safeDivideFraction(1, numB - 1, 0);
|
|
196928
196952
|
const pointA0 = segA.point0Ref;
|
|
196929
196953
|
const pointA1 = segA.point1Ref;
|
|
196930
196954
|
const pointB0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
@@ -196964,7 +196988,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196964
196988
|
/** Low level dispatch of curve collection. */
|
|
196965
196989
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
196966
196990
|
const geomB = this._geometryB; // save
|
|
196967
|
-
if (!geomB || !geomB.children || !(geomB instanceof
|
|
196991
|
+
if (!geomB || !geomB.children || !(geomB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection))
|
|
196968
196992
|
return;
|
|
196969
196993
|
for (const child of geomB.children) {
|
|
196970
196994
|
this.resetGeometry(child);
|
|
@@ -196972,24 +196996,60 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
196972
196996
|
}
|
|
196973
196997
|
this._geometryB = geomB; // restore
|
|
196974
196998
|
}
|
|
196999
|
+
/**
|
|
197000
|
+
* Given a parent chain, convert the corresponding child details so that they refer to the chain's global parameterization.
|
|
197001
|
+
* * It is assumed that `this._results[i].detailA.curve` is a child of chainA, and similarly for detailB/chainB.
|
|
197002
|
+
* @param chainA convert each detailA to the global parameterization of chainA
|
|
197003
|
+
* @param chainB convert each detailB to the global parameterization of chainB
|
|
197004
|
+
*/
|
|
197005
|
+
convertChildDetailToChainDetail(chainA, chainB) {
|
|
197006
|
+
for (const childDetailPair of this._results) {
|
|
197007
|
+
if (chainA) {
|
|
197008
|
+
const chainDetail = chainA.computeChainDetail(childDetailPair.detailA);
|
|
197009
|
+
if (chainDetail)
|
|
197010
|
+
childDetailPair.detailA = chainDetail;
|
|
197011
|
+
}
|
|
197012
|
+
if (chainB) {
|
|
197013
|
+
const chainDetail = chainB.computeChainDetail(childDetailPair.detailB);
|
|
197014
|
+
if (chainDetail)
|
|
197015
|
+
childDetailPair.detailB = chainDetail;
|
|
197016
|
+
}
|
|
197017
|
+
}
|
|
197018
|
+
}
|
|
197019
|
+
/** Low level dispatch to geomA given a CurveChainWithDistanceIndex in geometryB. */
|
|
197020
|
+
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
197021
|
+
if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex))
|
|
197022
|
+
return;
|
|
197023
|
+
const geomB = this._geometryB; // save
|
|
197024
|
+
for (const child of geomB.path.children) {
|
|
197025
|
+
this.resetGeometry(child);
|
|
197026
|
+
geomAHandler(geomA);
|
|
197027
|
+
}
|
|
197028
|
+
this.resetGeometry(geomB); // restore
|
|
197029
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!(geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex));
|
|
197030
|
+
this.convertChildDetailToChainDetail(undefined, geomB);
|
|
197031
|
+
}
|
|
196975
197032
|
/** Double dispatch handler for strongly typed segment. */
|
|
196976
197033
|
handleLineSegment3d(segmentA) {
|
|
196977
|
-
if (this._geometryB instanceof
|
|
197034
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
196978
197035
|
const segmentB = this._geometryB;
|
|
196979
197036
|
this.dispatchSegmentSegment(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, segmentB, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, false);
|
|
196980
197037
|
}
|
|
196981
|
-
else if (this._geometryB instanceof
|
|
197038
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d) {
|
|
196982
197039
|
this.computeSegmentLineString(segmentA, this._geometryB, false);
|
|
196983
197040
|
}
|
|
196984
|
-
else if (this._geometryB instanceof
|
|
197041
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
196985
197042
|
this.dispatchSegmentArc(segmentA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._geometryB, false);
|
|
196986
197043
|
}
|
|
196987
|
-
else if (this._geometryB instanceof
|
|
197044
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__.BSplineCurve3d) {
|
|
196988
197045
|
this.dispatchSegmentBsplineCurve(segmentA, this._geometryB, false);
|
|
196989
197046
|
}
|
|
196990
|
-
else if (this._geometryB instanceof
|
|
197047
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection) {
|
|
196991
197048
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
196992
197049
|
}
|
|
197050
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex) {
|
|
197051
|
+
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
197052
|
+
}
|
|
196993
197053
|
return undefined;
|
|
196994
197054
|
}
|
|
196995
197055
|
/**
|
|
@@ -197030,7 +197090,7 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
197030
197090
|
return;
|
|
197031
197091
|
let bitB0;
|
|
197032
197092
|
let bitB1;
|
|
197033
|
-
const rangeA1 =
|
|
197093
|
+
const rangeA1 = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_13__.Range3d.createNull();
|
|
197034
197094
|
const pointA0 = CurveCurveCloseApproachXY._workPointAA0;
|
|
197035
197095
|
const pointA1 = CurveCurveCloseApproachXY._workPointAA1;
|
|
197036
197096
|
const pointB0 = CurveCurveCloseApproachXY._workPointBB0;
|
|
@@ -197070,62 +197130,76 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
197070
197130
|
}
|
|
197071
197131
|
/** Double dispatch handler for strongly typed linestring. */
|
|
197072
197132
|
handleLineString3d(lsA) {
|
|
197073
|
-
if (this._geometryB instanceof
|
|
197133
|
+
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d) {
|
|
197074
197134
|
const lsB = this._geometryB;
|
|
197075
197135
|
this.computeLineStringLineString(lsA, lsB, false);
|
|
197076
197136
|
}
|
|
197077
|
-
else if (this._geometryB instanceof
|
|
197137
|
+
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
197078
197138
|
this.computeSegmentLineString(this._geometryB, lsA, true);
|
|
197079
197139
|
}
|
|
197080
|
-
else if (this._geometryB instanceof
|
|
197140
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
197081
197141
|
this.computeArcLineString(this._geometryB, lsA, true);
|
|
197082
197142
|
}
|
|
197083
|
-
else if (this._geometryB instanceof
|
|
197143
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__.BSplineCurve3d) {
|
|
197084
197144
|
this.dispatchLineStringBSplineCurve(lsA, this._geometryB, false);
|
|
197085
197145
|
}
|
|
197086
|
-
else if (this._geometryB instanceof
|
|
197146
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection) {
|
|
197087
197147
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
197088
197148
|
}
|
|
197149
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex) {
|
|
197150
|
+
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
197151
|
+
}
|
|
197089
197152
|
return undefined;
|
|
197090
197153
|
}
|
|
197091
197154
|
/** Double dispatch handler for strongly typed arc. */
|
|
197092
197155
|
handleArc3d(arc0) {
|
|
197093
|
-
if (this._geometryB instanceof
|
|
197156
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
197094
197157
|
this.dispatchSegmentArc(this._geometryB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, arc0, true);
|
|
197095
197158
|
}
|
|
197096
|
-
else if (this._geometryB instanceof
|
|
197159
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d) {
|
|
197097
197160
|
this.computeArcLineString(arc0, this._geometryB, false);
|
|
197098
197161
|
}
|
|
197099
|
-
else if (this._geometryB instanceof
|
|
197162
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
197100
197163
|
this.dispatchArcArc(arc0, this._geometryB, false);
|
|
197101
197164
|
}
|
|
197102
|
-
else if (this._geometryB instanceof
|
|
197165
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__.BSplineCurve3d) {
|
|
197103
197166
|
this.dispatchArcBsplineCurve3d(arc0, this._geometryB, false);
|
|
197104
197167
|
}
|
|
197105
|
-
else if (this._geometryB instanceof
|
|
197168
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection) {
|
|
197106
197169
|
this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
|
|
197107
197170
|
}
|
|
197171
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex) {
|
|
197172
|
+
this.dispatchCurveChainWithDistanceIndex(arc0, this.handleArc3d.bind(this));
|
|
197173
|
+
}
|
|
197108
197174
|
return undefined;
|
|
197109
197175
|
}
|
|
197110
197176
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
197111
197177
|
handleBSplineCurve3d(curve) {
|
|
197112
|
-
if (this._geometryB instanceof
|
|
197178
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
197113
197179
|
this.dispatchSegmentBsplineCurve(this._geometryB, curve, true);
|
|
197114
197180
|
}
|
|
197115
|
-
else if (this._geometryB instanceof
|
|
197181
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_8__.LineString3d) {
|
|
197116
197182
|
this.dispatchLineStringBSplineCurve(this._geometryB, curve, true);
|
|
197117
197183
|
}
|
|
197118
|
-
else if (this._geometryB instanceof
|
|
197184
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_2__.Arc3d) {
|
|
197119
197185
|
this.dispatchArcBsplineCurve3d(this._geometryB, curve, true);
|
|
197120
197186
|
}
|
|
197121
|
-
else if (this._geometryB instanceof
|
|
197187
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_12__.BSplineCurve3dBase) {
|
|
197122
197188
|
this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
|
|
197123
197189
|
}
|
|
197124
|
-
else if (this._geometryB instanceof
|
|
197190
|
+
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_9__.CurveCollection) {
|
|
197125
197191
|
this.dispatchCurveCollection(curve, this.handleBSplineCurve3d.bind(this));
|
|
197126
197192
|
}
|
|
197193
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex) {
|
|
197194
|
+
this.dispatchCurveChainWithDistanceIndex(curve, this.handleBSplineCurve3d.bind(this));
|
|
197195
|
+
}
|
|
197127
197196
|
return undefined;
|
|
197128
197197
|
}
|
|
197198
|
+
/** Double dispatch handler for strongly typed CurveChainWithDistanceIndex. */
|
|
197199
|
+
handleCurveChainWithDistanceIndex(chain) {
|
|
197200
|
+
super.handleCurveChainWithDistanceIndex(chain);
|
|
197201
|
+
this.convertChildDetailToChainDetail(chain, this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_10__.CurveChainWithDistanceIndex ? this._geometryB : undefined);
|
|
197202
|
+
}
|
|
197129
197203
|
/** Double dispatch handler for strongly typed homogeneous bspline curve .. */
|
|
197130
197204
|
handleBSplineCurve3dH(_curve) {
|
|
197131
197205
|
/*
|
|
@@ -197144,11 +197218,11 @@ class CurveCurveCloseApproachXY extends _geometry3d_GeometryHandler__WEBPACK_IMP
|
|
|
197144
197218
|
return undefined;
|
|
197145
197219
|
}
|
|
197146
197220
|
}
|
|
197147
|
-
CurveCurveCloseApproachXY._workPointAA0 =
|
|
197148
|
-
CurveCurveCloseApproachXY._workPointAA1 =
|
|
197149
|
-
CurveCurveCloseApproachXY._workPointBB0 =
|
|
197150
|
-
CurveCurveCloseApproachXY._workPointBB1 =
|
|
197151
|
-
CurveCurveCloseApproachXY._workPointB =
|
|
197221
|
+
CurveCurveCloseApproachXY._workPointAA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
197222
|
+
CurveCurveCloseApproachXY._workPointAA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
197223
|
+
CurveCurveCloseApproachXY._workPointBB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
197224
|
+
CurveCurveCloseApproachXY._workPointBB1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
197225
|
+
CurveCurveCloseApproachXY._workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_7__.Point3d.create();
|
|
197152
197226
|
|
|
197153
197227
|
|
|
197154
197228
|
|
|
@@ -197232,15 +197306,13 @@ class BezierBezierIntersectionXYRRToRRD extends _numerics_Newton__WEBPACK_IMPORT
|
|
|
197232
197306
|
* @internal
|
|
197233
197307
|
*/
|
|
197234
197308
|
class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_2__.NullGeometryHandler {
|
|
197235
|
-
reinitialize() {
|
|
197236
|
-
this._results = [];
|
|
197237
|
-
}
|
|
197238
197309
|
/**
|
|
197310
|
+
* The constructor.
|
|
197239
197311
|
* @param worldToLocal optional transform (possibly perspective) to project to xy plane for intersection.
|
|
197240
|
-
* @param extendA flag
|
|
197241
|
-
* @param geometryB second curve for intersection.
|
|
197312
|
+
* @param extendA flag for extension of the other geometry.
|
|
197313
|
+
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
197242
197314
|
* @param extendB flag for extension of geometryB.
|
|
197243
|
-
* @param tolerance optional distance tolerance for coincidence
|
|
197315
|
+
* @param tolerance optional distance tolerance for coincidence.
|
|
197244
197316
|
*/
|
|
197245
197317
|
constructor(worldToLocal, extendA, geometryB, extendB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
|
|
197246
197318
|
super();
|
|
@@ -197255,7 +197327,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197255
197327
|
this._worldToLocalPerspective = worldToLocal.clone();
|
|
197256
197328
|
}
|
|
197257
197329
|
this._coincidentGeometryContext = _geometry3d_CoincidentGeometryOps__WEBPACK_IMPORTED_MODULE_4__.CoincidentGeometryQuery.create(tolerance);
|
|
197258
|
-
this.
|
|
197330
|
+
this._results = [];
|
|
197259
197331
|
}
|
|
197260
197332
|
/** Reset the geometry and flags, leaving all other parts unchanged (and preserving accumulated intersections) */
|
|
197261
197333
|
resetGeometry(extendA, geometryB, extendB) {
|
|
@@ -197270,10 +197342,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197270
197342
|
return false;
|
|
197271
197343
|
return true;
|
|
197272
197344
|
}
|
|
197273
|
-
/**
|
|
197274
|
-
* Test the fraction by strict parameter, but allow toleranced distance test at ends.
|
|
197275
|
-
* @param tolerance optional distance tolerance to check proximity to start/end point
|
|
197276
|
-
*/
|
|
197345
|
+
/** Test the fraction by strict parameter, but allow toleranced distance test at ends. */
|
|
197277
197346
|
acceptFractionOnLine(extend0, fraction, extend1, pointA, pointB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
|
|
197278
197347
|
if (!extend0 && fraction < 0) {
|
|
197279
197348
|
return _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isDistanceWithinTol(fraction * pointA.distanceXY(pointB), tolerance);
|
|
@@ -197283,25 +197352,32 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197283
197352
|
return true;
|
|
197284
197353
|
}
|
|
197285
197354
|
/**
|
|
197286
|
-
*
|
|
197355
|
+
* Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair
|
|
197287
197356
|
* @param reinitialize if true, a new results structure is created for use by later calls.
|
|
197288
197357
|
*/
|
|
197289
197358
|
grabPairedResults(reinitialize = false) {
|
|
197290
197359
|
const result = this._results;
|
|
197291
197360
|
if (reinitialize)
|
|
197292
|
-
this.
|
|
197361
|
+
this._results = [];
|
|
197293
197362
|
return result;
|
|
197294
197363
|
}
|
|
197295
197364
|
sameCurveAndFraction(cp, fraction, detail) {
|
|
197296
197365
|
return cp === detail.curve && _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isAlmostEqualNumber(fraction, detail.fraction);
|
|
197297
197366
|
}
|
|
197298
197367
|
/**
|
|
197299
|
-
*
|
|
197300
|
-
*
|
|
197301
|
-
*
|
|
197368
|
+
* Record the pre-computed intersection between two curves. Filter by extension rules. Record with fraction mapping.
|
|
197369
|
+
* @param localFractionA intersection fraction local to the subcurve of cpA between fractionA0 and fractionA1
|
|
197370
|
+
* @param cpA the first curve
|
|
197371
|
+
* @param fractionA0 start of the subcurve of cpA
|
|
197372
|
+
* @param fractionA1 end of the subcurve of cpA
|
|
197373
|
+
* @param localFractionB intersection fraction local to the subcurve of cpB between fractionB0 and fractionB1
|
|
197374
|
+
* @param cpB the second curve
|
|
197375
|
+
* @param fractionB0 start of the subcurve of cpB
|
|
197376
|
+
* @param fractionB1 end of the subcurve of cpB
|
|
197377
|
+
* @param reversed whether to reverse the details in the recorded intersection pair
|
|
197378
|
+
* @param intervalDetails optional data for a coincident segment intersection
|
|
197302
197379
|
*/
|
|
197303
|
-
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB,
|
|
197304
|
-
cpB, fractionB0, fractionB1, reversed, intervalDetails) {
|
|
197380
|
+
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed, intervalDetails) {
|
|
197305
197381
|
let globalFractionA, globalFractionB;
|
|
197306
197382
|
let globalFractionA1, globalFractionB1;
|
|
197307
197383
|
const isInterval = intervalDetails !== undefined &&
|
|
@@ -197317,7 +197393,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197317
197393
|
globalFractionA = globalFractionA1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
|
|
197318
197394
|
globalFractionB = globalFractionB1 = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
197319
197395
|
}
|
|
197320
|
-
// ignore duplicate of most recent
|
|
197396
|
+
// ignore duplicate of most recent pair
|
|
197321
197397
|
const numPrevious = this._results.length;
|
|
197322
197398
|
if (numPrevious > 0 && !isInterval) {
|
|
197323
197399
|
const oldDetailA = this._results[numPrevious - 1].detailA;
|
|
@@ -197351,10 +197427,10 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197351
197427
|
}
|
|
197352
197428
|
}
|
|
197353
197429
|
/**
|
|
197354
|
-
* Emit recordPoint for multiple pairs (on full curve
|
|
197355
|
-
* @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible)
|
|
197356
|
-
* @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible)
|
|
197357
|
-
* @param pairs array of pairs
|
|
197430
|
+
* Emit recordPoint for multiple pairs (on full curve).
|
|
197431
|
+
* @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible).
|
|
197432
|
+
* @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible).
|
|
197433
|
+
* @param pairs array of pairs.
|
|
197358
197434
|
* @param reversed true to have order reversed in final structures.
|
|
197359
197435
|
*/
|
|
197360
197436
|
recordPairs(cpA, cpB, pairs, reversed) {
|
|
@@ -197364,11 +197440,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197364
197440
|
}
|
|
197365
197441
|
}
|
|
197366
197442
|
}
|
|
197367
|
-
/**
|
|
197368
|
-
* Compute intersection of two line segments.
|
|
197369
|
-
* Filter by extension rules.
|
|
197370
|
-
* Record with fraction mapping.
|
|
197371
|
-
*/
|
|
197443
|
+
/** Compute intersection of two line segments. Filter by extension rules. Record with fraction mapping. */
|
|
197372
197444
|
computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
197373
197445
|
const uv = CurveCurveIntersectXY._workVector2dA;
|
|
197374
197446
|
// Problem: Normal practice is to do the (quick, simple) transverse intersection first
|
|
@@ -197386,7 +197458,10 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197386
197458
|
}
|
|
197387
197459
|
}
|
|
197388
197460
|
}
|
|
197389
|
-
|
|
197461
|
+
/**
|
|
197462
|
+
* Compute intersection of projected homogeneous line segments. Filter by extension rules. Record with
|
|
197463
|
+
* fraction mapping. Assumes caller knows the _worldToLocal is present.
|
|
197464
|
+
*/
|
|
197390
197465
|
computeSegmentSegment3DH(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
197391
197466
|
const hA0 = CurveCurveIntersectXY._workPointA0H;
|
|
197392
197467
|
const hA1 = CurveCurveIntersectXY._workPointA1H;
|
|
@@ -197407,8 +197482,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197407
197482
|
}
|
|
197408
197483
|
}
|
|
197409
197484
|
// Caller accesses data from a line segment and passes to here.
|
|
197410
|
-
//
|
|
197411
|
-
// The fraction and extend parameters allow all combinations to be passed in
|
|
197485
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
197486
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
197412
197487
|
// This method applies transform.
|
|
197413
197488
|
dispatchSegmentSegment(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
197414
197489
|
if (this._worldToLocalAffine) {
|
|
@@ -197424,14 +197499,14 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197424
197499
|
}
|
|
197425
197500
|
}
|
|
197426
197501
|
// Caller accesses data from a linestring or segment and passes it here.
|
|
197427
|
-
//
|
|
197428
|
-
// The fraction and extend parameters allow all combinations to be passed in
|
|
197502
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
197503
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
197429
197504
|
dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
|
|
197430
197505
|
// Arc: X = C + cU + sV
|
|
197431
197506
|
// Line: contains points A0,A1
|
|
197432
197507
|
// Arc point colinear with line if det (A0, A1, X) = 0
|
|
197433
197508
|
// with homogeneous xyw points and vectors.
|
|
197434
|
-
// With equational X:
|
|
197509
|
+
// With equational X: det (A0, A1, C) + c det (A0, A1,U) + s det (A0, A1, V) = 0.
|
|
197435
197510
|
// solve for theta.
|
|
197436
197511
|
// evaluate points.
|
|
197437
197512
|
// project back to line.
|
|
@@ -197487,9 +197562,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197487
197562
|
}
|
|
197488
197563
|
}
|
|
197489
197564
|
// Caller accesses data from two arcs.
|
|
197490
|
-
//
|
|
197491
|
-
//
|
|
197492
|
-
//
|
|
197565
|
+
// Each matrix has [U V C] in (x,y,w) form from projection.
|
|
197566
|
+
// Invert the projection matrix matrixA.
|
|
197567
|
+
// Apply the inverse to matrixB. Then arc b is an ellipse in the circular space of A.
|
|
197493
197568
|
dispatchArcArcThisOrder(cpA, matrixA, // homogeneous xyw projection !!!
|
|
197494
197569
|
extendA, cpB, matrixB, // homogeneous xyw projection !!!
|
|
197495
197570
|
extendB, reversed) {
|
|
@@ -197513,8 +197588,8 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197513
197588
|
}
|
|
197514
197589
|
}
|
|
197515
197590
|
// Caller accesses data from two arcs.
|
|
197516
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
197517
|
-
// Solves the arc-arc equations
|
|
197591
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
197592
|
+
// Solves the arc-arc equations.
|
|
197518
197593
|
dispatchArcArc(cpA, extendA, cpB, extendB, reversed) {
|
|
197519
197594
|
// Arc: X = C + cU + sV
|
|
197520
197595
|
// Line: contains points A0,A1
|
|
@@ -197560,9 +197635,6 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197560
197635
|
this.recordPairs(cpA, cpB, pairs, reversed);
|
|
197561
197636
|
}
|
|
197562
197637
|
}
|
|
197563
|
-
// Caller accesses data from two arcs.
|
|
197564
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
197565
|
-
// Solves the arc-arc equations
|
|
197566
197638
|
dispatchArcBsplineCurve3d(cpA, extendA, cpB, extendB, reversed) {
|
|
197567
197639
|
// Arc: X = C + cU + sV
|
|
197568
197640
|
// implicitize the arc as viewed. This "3d" matrix is homogeneous "XYW" not "xyz"
|
|
@@ -197633,7 +197705,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197633
197705
|
}
|
|
197634
197706
|
}
|
|
197635
197707
|
}
|
|
197636
|
-
/** Apply the transformation to bezier curves.
|
|
197708
|
+
/** Apply the transformation to bezier curves. Optionally construct ranges. */
|
|
197637
197709
|
transformBeziers(beziers) {
|
|
197638
197710
|
if (this._worldToLocalAffine) {
|
|
197639
197711
|
for (const bezier of beziers)
|
|
@@ -197673,8 +197745,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197673
197745
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
197674
197746
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
197675
197747
|
if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
197676
|
-
this.recordPointWithLocalFractions(
|
|
197677
|
-
fractionB, cpB, 0, 1, reversed
|
|
197748
|
+
this.recordPointWithLocalFractions(
|
|
197749
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
197750
|
+
);
|
|
197678
197751
|
}
|
|
197679
197752
|
}
|
|
197680
197753
|
*/
|
|
@@ -197690,7 +197763,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197690
197763
|
bezierB.poleProductsXYZW(univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w);
|
|
197691
197764
|
let errors = 0;
|
|
197692
197765
|
const roots = univariateBezierB.roots(0.0, true);
|
|
197693
|
-
if (roots)
|
|
197766
|
+
if (roots) {
|
|
197694
197767
|
for (const r of roots) {
|
|
197695
197768
|
let bezierBFraction = r;
|
|
197696
197769
|
bezierB.fractionToPoint4d(bezierBFraction, this._xyzwB);
|
|
@@ -197727,11 +197800,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197727
197800
|
}
|
|
197728
197801
|
}
|
|
197729
197802
|
}
|
|
197803
|
+
}
|
|
197730
197804
|
}
|
|
197731
197805
|
}
|
|
197732
|
-
// Caller accesses data from two arcs.
|
|
197733
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
197734
|
-
// Solves the arc-arc equations
|
|
197735
197806
|
dispatchBSplineCurve3dBSplineCurve3d(bcurveA, bcurveB, _reversed) {
|
|
197736
197807
|
const bezierSpanA = bcurveA.collectBezierSpans(true);
|
|
197737
197808
|
const bezierSpanB = bcurveB.collectBezierSpans(true);
|
|
@@ -197759,9 +197830,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197759
197830
|
}
|
|
197760
197831
|
}
|
|
197761
197832
|
/**
|
|
197762
|
-
* Apply the projection transform (if any) to (xyz, w)
|
|
197833
|
+
* Apply the projection transform (if any) to (xyz, w).
|
|
197763
197834
|
* @param xyz xyz parts of input point.
|
|
197764
|
-
* @param w weight to use for homogeneous effects
|
|
197835
|
+
* @param w weight to use for homogeneous effects.
|
|
197765
197836
|
*/
|
|
197766
197837
|
projectPoint(xyz, w = 1.0) {
|
|
197767
197838
|
if (this._worldToLocalPerspective)
|
|
@@ -197786,9 +197857,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197786
197857
|
npcPlane.clone(worldPlane);
|
|
197787
197858
|
}
|
|
197788
197859
|
}
|
|
197789
|
-
// Caller accesses data from segment and bsplineCurve
|
|
197790
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
197791
|
-
// Solves the arc-arc equations
|
|
197860
|
+
// Caller accesses data from segment and bsplineCurve.
|
|
197861
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
197862
|
+
// Solves the arc-arc equations.
|
|
197792
197863
|
dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve, extendB, reversed) {
|
|
197793
197864
|
const pointA0H = this.projectPoint(pointA0);
|
|
197794
197865
|
const pointA1H = this.projectPoint(pointA1);
|
|
@@ -197870,6 +197941,38 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197870
197941
|
}
|
|
197871
197942
|
return undefined;
|
|
197872
197943
|
}
|
|
197944
|
+
/** Detail computation for linestring intersecting linestring. */
|
|
197945
|
+
computeLineStringLineString(lsA, lsB, reversed) {
|
|
197946
|
+
const pointA0 = CurveCurveIntersectXY._workPointAA0;
|
|
197947
|
+
const pointA1 = CurveCurveIntersectXY._workPointAA1;
|
|
197948
|
+
const pointB0 = CurveCurveIntersectXY._workPointBB0;
|
|
197949
|
+
const pointB1 = CurveCurveIntersectXY._workPointBB1;
|
|
197950
|
+
const numA = lsA.numPoints();
|
|
197951
|
+
const numB = lsB.numPoints();
|
|
197952
|
+
if (numA > 1 && numB > 1) {
|
|
197953
|
+
lsA.pointAt(0, pointA0);
|
|
197954
|
+
const dfA = 1.0 / (numA - 1);
|
|
197955
|
+
const dfB = 1.0 / (numB - 1);
|
|
197956
|
+
let fA0 = 0.0;
|
|
197957
|
+
let fB0;
|
|
197958
|
+
let fA1;
|
|
197959
|
+
let fB1;
|
|
197960
|
+
const extendA = this._extendA;
|
|
197961
|
+
const extendB = this._extendB;
|
|
197962
|
+
lsA.pointAt(0, pointA0);
|
|
197963
|
+
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
197964
|
+
fA1 = ia * dfA;
|
|
197965
|
+
fB0 = 0.0;
|
|
197966
|
+
lsA.pointAt(ia, pointA1);
|
|
197967
|
+
lsB.pointAt(0, pointB0);
|
|
197968
|
+
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
197969
|
+
lsB.pointAt(ib, pointB1);
|
|
197970
|
+
fB1 = ib * dfB;
|
|
197971
|
+
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);
|
|
197972
|
+
}
|
|
197973
|
+
}
|
|
197974
|
+
}
|
|
197975
|
+
}
|
|
197873
197976
|
static setTransformedWorkPoints(transform, pointA0, pointA1, pointB0, pointB1) {
|
|
197874
197977
|
transform.multiplyPoint3d(pointA0, this._workPointA0);
|
|
197875
197978
|
transform.multiplyPoint3d(pointA1, this._workPointA1);
|
|
@@ -197891,40 +197994,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
197891
197994
|
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_14__.BSplineCurve3d) {
|
|
197892
197995
|
this.dispatchSegmentBsplineCurve(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, false);
|
|
197893
197996
|
}
|
|
197997
|
+
return undefined;
|
|
197894
197998
|
}
|
|
197895
197999
|
/** Double dispatch handler for strongly typed linestring. */
|
|
197896
198000
|
handleLineString3d(lsA) {
|
|
197897
198001
|
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_12__.LineString3d) {
|
|
197898
198002
|
const lsB = this._geometryB;
|
|
197899
|
-
|
|
197900
|
-
const pointA1 = CurveCurveIntersectXY._workPointAA1;
|
|
197901
|
-
const pointB0 = CurveCurveIntersectXY._workPointBB0;
|
|
197902
|
-
const pointB1 = CurveCurveIntersectXY._workPointBB1;
|
|
197903
|
-
const numA = lsA.numPoints();
|
|
197904
|
-
const numB = lsB.numPoints();
|
|
197905
|
-
if (numA > 1 && numB > 1) {
|
|
197906
|
-
lsA.pointAt(0, pointA0);
|
|
197907
|
-
const dfA = 1.0 / (numA - 1);
|
|
197908
|
-
const dfB = 1.0 / (numB - 1);
|
|
197909
|
-
let fA0 = 0.0;
|
|
197910
|
-
let fB0;
|
|
197911
|
-
let fA1;
|
|
197912
|
-
let fB1;
|
|
197913
|
-
const extendA = this._extendA;
|
|
197914
|
-
const extendB = this._extendB;
|
|
197915
|
-
lsA.pointAt(0, pointA0);
|
|
197916
|
-
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
197917
|
-
fA1 = ia * dfA;
|
|
197918
|
-
fB0 = 0.0;
|
|
197919
|
-
lsA.pointAt(ia, pointA1);
|
|
197920
|
-
lsB.pointAt(0, pointB0);
|
|
197921
|
-
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
197922
|
-
lsB.pointAt(ib, pointB1);
|
|
197923
|
-
fB1 = ib * dfB;
|
|
197924
|
-
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);
|
|
197925
|
-
}
|
|
197926
|
-
}
|
|
197927
|
-
}
|
|
198003
|
+
this.computeLineStringLineString(lsA, lsB, false);
|
|
197928
198004
|
}
|
|
197929
198005
|
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_11__.LineSegment3d) {
|
|
197930
198006
|
this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
|
|
@@ -198017,14 +198093,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
198017
198093
|
/* harmony export */ CurveCurveIntersectXYZ: () => (/* binding */ CurveCurveIntersectXYZ)
|
|
198018
198094
|
/* harmony export */ });
|
|
198019
198095
|
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
198020
|
-
/* harmony import */ var
|
|
198096
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
198021
198097
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
198022
198098
|
/* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
|
|
198023
198099
|
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
198024
198100
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
198025
198101
|
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
198026
198102
|
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
198027
|
-
/* harmony import */ var
|
|
198103
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
198028
198104
|
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
198029
198105
|
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
198030
198106
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -198053,9 +198129,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
198053
198129
|
* @internal
|
|
198054
198130
|
*/
|
|
198055
198131
|
class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_0__.NullGeometryHandler {
|
|
198056
|
-
reinitialize() {
|
|
198057
|
-
this._results = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_1__.CurveLocationDetailArrayPair();
|
|
198058
|
-
}
|
|
198059
198132
|
/**
|
|
198060
198133
|
* @param extendA flag to enable using extension of the other geometry.
|
|
198061
198134
|
* @param geometryB second curve for intersection. Saved for reference by specific handler methods.
|
|
@@ -198066,16 +198139,16 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198066
198139
|
this._extendA = extendA;
|
|
198067
198140
|
this._geometryB = geometryB;
|
|
198068
198141
|
this._extendB = extendB;
|
|
198069
|
-
this.
|
|
198142
|
+
this._results = [];
|
|
198070
198143
|
}
|
|
198071
198144
|
/**
|
|
198072
|
-
*
|
|
198145
|
+
* Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair.
|
|
198073
198146
|
* @param reinitialize if true, a new results structure is created for use by later calls.
|
|
198074
198147
|
*/
|
|
198075
|
-
|
|
198148
|
+
grabPairedResults(reinitialize = false) {
|
|
198076
198149
|
const result = this._results;
|
|
198077
198150
|
if (reinitialize)
|
|
198078
|
-
this.
|
|
198151
|
+
this._results = [];
|
|
198079
198152
|
return result;
|
|
198080
198153
|
}
|
|
198081
198154
|
acceptFraction(extend0, fraction, extend1) {
|
|
@@ -198091,23 +198164,22 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198091
198164
|
* Reject if evaluated points do not match coordinates (e.g. close approach point).
|
|
198092
198165
|
* Record with fraction mapping.
|
|
198093
198166
|
*/
|
|
198094
|
-
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB,
|
|
198095
|
-
|
|
198096
|
-
const
|
|
198097
|
-
const globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
198167
|
+
recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, cpB, fractionB0, fractionB1, reversed) {
|
|
198168
|
+
const globalFractionA = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fractionA0, localFractionA, fractionA1);
|
|
198169
|
+
const globalFractionB = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(fractionB0, localFractionB, fractionB1);
|
|
198098
198170
|
// ignore duplicate of most recent point . ..
|
|
198099
|
-
const numPrevious = this._results.
|
|
198171
|
+
const numPrevious = this._results.length;
|
|
198100
198172
|
if (numPrevious > 0) {
|
|
198101
|
-
const topFractionA = this._results
|
|
198102
|
-
const topFractionB = this._results
|
|
198173
|
+
const topFractionA = this._results[numPrevious - 1].detailA.fraction;
|
|
198174
|
+
const topFractionB = this._results[numPrevious - 1].detailB.fraction;
|
|
198103
198175
|
if (reversed) {
|
|
198104
|
-
if (
|
|
198105
|
-
|
|
198176
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionA, globalFractionB) &&
|
|
198177
|
+
_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionB, globalFractionA))
|
|
198106
198178
|
return;
|
|
198107
198179
|
}
|
|
198108
198180
|
else {
|
|
198109
|
-
if (
|
|
198110
|
-
|
|
198181
|
+
if (_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionA, globalFractionA) &&
|
|
198182
|
+
_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isAlmostEqualNumber(topFractionB, globalFractionB))
|
|
198111
198183
|
return;
|
|
198112
198184
|
}
|
|
198113
198185
|
}
|
|
@@ -198115,17 +198187,17 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198115
198187
|
const pointB = cpB.fractionToPoint(globalFractionB);
|
|
198116
198188
|
if (!pointA.isAlmostEqualMetric(pointB))
|
|
198117
198189
|
return;
|
|
198118
|
-
const detailA =
|
|
198119
|
-
detailA.setIntervalRole(
|
|
198120
|
-
const detailB =
|
|
198121
|
-
detailB.setIntervalRole(
|
|
198190
|
+
const detailA = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(cpA, globalFractionA, pointA);
|
|
198191
|
+
detailA.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveIntervalRole.isolated);
|
|
198192
|
+
const detailB = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetail.createCurveFractionPoint(cpB, globalFractionB, pointB);
|
|
198193
|
+
detailB.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveIntervalRole.isolated);
|
|
198122
198194
|
if (reversed) {
|
|
198123
|
-
|
|
198124
|
-
this._results.
|
|
198195
|
+
const pair = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetailPair(detailB, detailA);
|
|
198196
|
+
this._results.push(pair);
|
|
198125
198197
|
}
|
|
198126
198198
|
else {
|
|
198127
|
-
|
|
198128
|
-
this._results.
|
|
198199
|
+
const pair = new _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_2__.CurveLocationDetailPair(detailA, detailB);
|
|
198200
|
+
this._results.push(pair);
|
|
198129
198201
|
}
|
|
198130
198202
|
}
|
|
198131
198203
|
/**
|
|
@@ -198141,8 +198213,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198141
198213
|
}
|
|
198142
198214
|
}
|
|
198143
198215
|
// Caller accesses data from a line segment and passes to here.
|
|
198144
|
-
//
|
|
198145
|
-
// allow all combinations to be passed in
|
|
198216
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
198217
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
198146
198218
|
// This method applies transform.
|
|
198147
198219
|
dispatchSegmentSegment(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed) {
|
|
198148
198220
|
this.computeSegmentSegment3D(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, cpB, extendB0, pointB0, fractionB0, pointB1, fractionB1, extendB1, reversed);
|
|
@@ -198157,12 +198229,12 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198157
198229
|
* @param origin plane origin
|
|
198158
198230
|
* @param vectorA vector which must be in the plane.
|
|
198159
198231
|
* @param cosineValue largest cosine of the angle theta between vectorA and vectorB to prefer their cross product, e.g.
|
|
198160
|
-
*
|
|
198232
|
+
* passing 0.94 ~ cos(20deg) will switch to using vectorC in the cross product if theta < ~20deg or theta > ~160deg.
|
|
198161
198233
|
* @param vectorB first candidate for additional in-plane vector
|
|
198162
198234
|
* @param vectorC second candidate for additional in-plane vector
|
|
198163
198235
|
*/
|
|
198164
198236
|
createPlaneWithPreferredPerpendicular(origin, vectorA, cosineValue, vectorB, vectorC) {
|
|
198165
|
-
cosineValue =
|
|
198237
|
+
cosineValue = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.restrictToInterval(Math.abs(cosineValue), 0.0, 1.0 - _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallFraction);
|
|
198166
198238
|
const dotAA = vectorA.magnitudeSquared();
|
|
198167
198239
|
const dotBB = vectorB.magnitudeSquared();
|
|
198168
198240
|
const dotAB = Math.abs(vectorA.dotProduct(vectorB));
|
|
@@ -198172,8 +198244,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198172
198244
|
return undefined;
|
|
198173
198245
|
}
|
|
198174
198246
|
// Caller accesses data from a linestring or segment and passes it here.
|
|
198175
|
-
//
|
|
198176
|
-
// allow all combinations to be passed in
|
|
198247
|
+
// The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
|
|
198248
|
+
// The fraction and extend parameters allow all combinations to be passed in.
|
|
198177
198249
|
dispatchSegmentArc(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, arc, extendB0, extendB1, reversed) {
|
|
198178
198250
|
const lineVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Vector3d.createStartEnd(pointA0, pointA1);
|
|
198179
198251
|
const plane = this.createPlaneWithPreferredPerpendicular(pointA0, lineVector, 0.94, arc.perpendicularVector, arc.vector0);
|
|
@@ -198208,7 +198280,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198208
198280
|
_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);
|
|
198209
198281
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
198210
198282
|
const fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);
|
|
198211
|
-
const fractionB =
|
|
198283
|
+
const fractionB = cpB.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
|
|
198212
198284
|
// hm .. do we really need to check the fractions? We know they are internal to the beziers
|
|
198213
198285
|
if (this.acceptFraction(extendA, fractionA, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
198214
198286
|
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
@@ -198217,13 +198289,13 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198217
198289
|
}
|
|
198218
198290
|
}
|
|
198219
198291
|
// Caller accesses data from two arcs.
|
|
198220
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
198221
|
-
// Solves the arc-arc equations
|
|
198292
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
198293
|
+
// Solves the arc-arc equations.
|
|
198222
198294
|
dispatchArcArc(cpA, extendA, cpB, extendB, reversed) {
|
|
198223
198295
|
// If arcs are in different planes:
|
|
198224
198296
|
// 1) Intersect each plane with the other arc (quadratic)
|
|
198225
198297
|
// 2) accept points that appear in both intersection sets.
|
|
198226
|
-
// If arcs are in parallel planes -- no intersections
|
|
198298
|
+
// If arcs are in parallel planes -- no intersections.
|
|
198227
198299
|
// If arcs are in the same plane -- xy intersection in that plane.
|
|
198228
198300
|
const planeA = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_4__.Plane3dByOriginAndUnitNormal.create(cpA.center, cpA.perpendicularVector);
|
|
198229
198301
|
const planeB = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_4__.Plane3dByOriginAndUnitNormal.create(cpB.center, cpB.perpendicularVector);
|
|
@@ -198231,7 +198303,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198231
198303
|
return;
|
|
198232
198304
|
if (planeA.getNormalRef().isParallelTo(planeB.getNormalRef())) {
|
|
198233
198305
|
if (planeA.isPointInPlane(planeB.getOriginRef()) && planeB.isPointInPlane(planeA.getOriginRef())) {
|
|
198234
|
-
// coplanar
|
|
198306
|
+
// coplanar
|
|
198235
198307
|
this.dispatchArcArcInPlane(cpA, extendA, cpB, extendB, reversed);
|
|
198236
198308
|
}
|
|
198237
198309
|
}
|
|
@@ -198253,8 +198325,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198253
198325
|
}
|
|
198254
198326
|
}
|
|
198255
198327
|
// Caller accesses data from two arcs.
|
|
198256
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
198257
|
-
// Solves the arc-arc equations
|
|
198328
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
198329
|
+
// Solves the arc-arc equations.
|
|
198258
198330
|
dispatchArcBsplineCurve3d(_arc, _extendA, _cpB, _extendB, _reversed) {
|
|
198259
198331
|
/*
|
|
198260
198332
|
// Arc: X = C + cU + sV
|
|
@@ -198262,7 +198334,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198262
198334
|
let matrixA: Matrix3d;
|
|
198263
198335
|
if (this._worldToLocalPerspective) {
|
|
198264
198336
|
const dataA = cpA.toTransformedPoint4d(this._worldToLocalPerspective);
|
|
198265
|
-
matrixA = Matrix3d.createColumnsXYW(
|
|
198337
|
+
matrixA = Matrix3d.createColumnsXYW(
|
|
198338
|
+
dataA.vector0, dataA.vector0.w, dataA.vector90, dataA.vector90.w, dataA.center, dataA.center.w,
|
|
198339
|
+
);
|
|
198266
198340
|
} else {
|
|
198267
198341
|
const dataA = cpA.toTransformedVectors(this._worldToLocalAffine);
|
|
198268
198342
|
matrixA = Matrix3d.createColumnsXYW(dataA.vector0, 0, dataA.vector90, 0, dataA.center, 1);
|
|
@@ -198274,12 +198348,21 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198274
198348
|
const matrixAInverse = matrixA.inverse();
|
|
198275
198349
|
if (matrixAInverse) {
|
|
198276
198350
|
const orderF = cpB.order; // order of the beziers for simple coordinates
|
|
198277
|
-
const orderG = 2 * orderF - 1;
|
|
198351
|
+
const orderG = 2 * orderF - 1; // order of the (single) bezier for squared coordinates.
|
|
198278
198352
|
const coffF = new Float64Array(orderF);
|
|
198279
198353
|
const univariateBezierG = new UnivariateBezier(orderG);
|
|
198280
|
-
const axx = matrixAInverse.at(0, 0);
|
|
198281
|
-
const
|
|
198282
|
-
const
|
|
198354
|
+
const axx = matrixAInverse.at(0, 0);
|
|
198355
|
+
const axy = matrixAInverse.at(0, 1);
|
|
198356
|
+
const axz = 0.0;
|
|
198357
|
+
const axw = matrixAInverse.at(0, 2);
|
|
198358
|
+
const ayx = matrixAInverse.at(1, 0);
|
|
198359
|
+
const ayy = matrixAInverse.at(1, 1);
|
|
198360
|
+
const ayz = 0.0;
|
|
198361
|
+
const ayw = matrixAInverse.at(1, 2);
|
|
198362
|
+
const awx = matrixAInverse.at(2, 0);
|
|
198363
|
+
const awy = matrixAInverse.at(2, 1);
|
|
198364
|
+
const awz = 0.0;
|
|
198365
|
+
const aww = matrixAInverse.at(2, 2);
|
|
198283
198366
|
|
|
198284
198367
|
if (matrixAInverse) {
|
|
198285
198368
|
let bezier: BezierCurve3dH | undefined;
|
|
@@ -198306,9 +198389,11 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198306
198389
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
198307
198390
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
198308
198391
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
198309
|
-
if (this.acceptFraction(extendA, arcFraction, extendA) &&
|
|
198310
|
-
this.
|
|
198311
|
-
|
|
198392
|
+
if (this.acceptFraction(extendA, arcFraction, extendA) &&
|
|
198393
|
+
this.acceptFraction(extendB, fractionB, extendB)) {
|
|
198394
|
+
this.recordPointWithLocalFractions(
|
|
198395
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
198396
|
+
);
|
|
198312
198397
|
}
|
|
198313
198398
|
}
|
|
198314
198399
|
}
|
|
@@ -198318,8 +198403,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198318
198403
|
*/
|
|
198319
198404
|
}
|
|
198320
198405
|
/*
|
|
198321
|
-
//
|
|
198322
|
-
private transformBeziers(beziers: BezierCurve3dH[]) {
|
|
198406
|
+
// Apply the transformation to bezier curves. Optionally construct ranges.
|
|
198407
|
+
private transformBeziers(beziers: BezierCurve3dH[]): void {
|
|
198323
198408
|
if (this._worldToLocalAffine) {
|
|
198324
198409
|
for (const bezier of beziers) bezier.tryTransformInPlace(this._worldToLocalAffine);
|
|
198325
198410
|
} else if (this._worldToLocalPerspective) {
|
|
@@ -198336,11 +198421,6 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198336
198421
|
}
|
|
198337
198422
|
return ranges;
|
|
198338
198423
|
}
|
|
198339
|
-
private _xyzwA0?: Point4d;
|
|
198340
|
-
private _xyzwA1?: Point4d;
|
|
198341
|
-
private _xyzwPlane?: Point4d;
|
|
198342
|
-
private _xyzwB?: Point4d;
|
|
198343
|
-
|
|
198344
198424
|
private dispatchBezierBezierStrokeFirst(
|
|
198345
198425
|
bezierA: BezierCurve3dH,
|
|
198346
198426
|
bcurveA: BSplineCurve3dBase,
|
|
@@ -198349,11 +198429,16 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198349
198429
|
bcurveB: BSplineCurve3dBase,
|
|
198350
198430
|
_strokeCountB: number,
|
|
198351
198431
|
univariateBezierB: UnivariateBezier, // caller-allocated for univariate coefficients.
|
|
198352
|
-
reversed: boolean
|
|
198353
|
-
|
|
198354
|
-
if (!this.
|
|
198355
|
-
|
|
198356
|
-
if (!this.
|
|
198432
|
+
reversed: boolean,
|
|
198433
|
+
) {
|
|
198434
|
+
if (!this._xyzwA0)
|
|
198435
|
+
this._xyzwA0 = Point4d.create();
|
|
198436
|
+
if (!this._xyzwA1)
|
|
198437
|
+
this._xyzwA1 = Point4d.create();
|
|
198438
|
+
if (!this._xyzwPlane)
|
|
198439
|
+
this._xyzwPlane = Point4d.create();
|
|
198440
|
+
if (!this._xyzwB)
|
|
198441
|
+
this._xyzwB = Point4d.create();
|
|
198357
198442
|
const roots = univariateBezierG.roots(0.0, true);
|
|
198358
198443
|
if (roots) {
|
|
198359
198444
|
for (const root of roots) {
|
|
@@ -198364,8 +198449,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198364
198449
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
198365
198450
|
const arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
198366
198451
|
if (this.acceptFraction(extendA, arcFraction, extendA) && this.acceptFraction(extendB, fractionB, extendB)) {
|
|
198367
|
-
this.recordPointWithLocalFractions(
|
|
198368
|
-
fractionB, cpB, 0, 1, reversed
|
|
198452
|
+
this.recordPointWithLocalFractions(
|
|
198453
|
+
arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed,
|
|
198454
|
+
);
|
|
198369
198455
|
}
|
|
198370
198456
|
}
|
|
198371
198457
|
bezierA.fractionToPoint4d(0.0, this._xyzwA0);
|
|
@@ -198377,7 +198463,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198377
198463
|
f1 = i * df;
|
|
198378
198464
|
bezierA.fractionToPoint4d(f1, this._xyzwA1);
|
|
198379
198465
|
Point4d.createPlanePointPointZ(this._xyzwA0, this._xyzwA1, this._xyzwPlane);
|
|
198380
|
-
bezierB.poleProductsXYZW(
|
|
198466
|
+
bezierB.poleProductsXYZW(
|
|
198467
|
+
univariateBezierB.coffs, this._xyzwPlane.x, this._xyzwPlane.y, this._xyzwPlane.z, this._xyzwPlane.w,
|
|
198468
|
+
);
|
|
198381
198469
|
let errors = 0;
|
|
198382
198470
|
const roots = univariateBezierB.roots(0.0, true);
|
|
198383
198471
|
if (roots)
|
|
@@ -198387,7 +198475,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198387
198475
|
const segmentAFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(this._xyzwA0, this._xyzwA1, this._xyzwB);
|
|
198388
198476
|
if (segmentAFraction && Geometry.isIn01WithTolerance(segmentAFraction, intervalTolerance)) {
|
|
198389
198477
|
const bezierAFraction = Geometry.interpolate(f0, segmentAFraction, f1);
|
|
198390
|
-
|
|
198478
|
+
// TODO implement newton search
|
|
198391
198479
|
const xyMatchingFunction = new BezierBezierIntersectionXYRRToRRD(bezierA, bezierB);
|
|
198392
198480
|
const newtonSearcher = new Newton2dUnboundedWithDerivative(xyMatchingFunction);
|
|
198393
198481
|
newtonSearcher.setUV(bezierAFraction, bezierBFraction);
|
|
@@ -198412,9 +198500,11 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198412
198500
|
errors++;
|
|
198413
198501
|
if (errors > 0 && !xyzA1.isAlmostEqual(xyzB1))
|
|
198414
198502
|
errors++;
|
|
198415
|
-
if (this.acceptFraction(false, bcurveAFraction, false) &&
|
|
198416
|
-
this.
|
|
198417
|
-
|
|
198503
|
+
if (this.acceptFraction(false, bcurveAFraction, false) &&
|
|
198504
|
+
this.acceptFraction(false, bcurveBFraction, false)) {
|
|
198505
|
+
this.recordPointWithLocalFractions(
|
|
198506
|
+
bcurveAFraction, bcurveA, 0, 1, bcurveBFraction, bcurveB, 0, 1, reversed,
|
|
198507
|
+
);
|
|
198418
198508
|
}
|
|
198419
198509
|
}
|
|
198420
198510
|
}
|
|
@@ -198422,8 +198512,8 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198422
198512
|
}
|
|
198423
198513
|
*/
|
|
198424
198514
|
// Caller accesses data from two arcs.
|
|
198425
|
-
// Selects the best conditioned arc (in xy parts) as "circle after inversion"
|
|
198426
|
-
// Solves the arc-arc equations
|
|
198515
|
+
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
198516
|
+
// Solves the arc-arc equations.
|
|
198427
198517
|
dispatchBSplineCurve3dBSplineCurve3d(_bcurveA, _bcurveB, _reversed) {
|
|
198428
198518
|
/*
|
|
198429
198519
|
const bezierSpanA = bcurveA.collectBezierSpans(true) as BezierCurve3dH[];
|
|
@@ -198444,9 +198534,13 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198444
198534
|
const strokeCountA = bezierSpanA[a].computeStrokeCountForOptions();
|
|
198445
198535
|
const strokeCountB = bezierSpanB[b].computeStrokeCountForOptions();
|
|
198446
198536
|
if (strokeCountA < strokeCountB)
|
|
198447
|
-
this.dispatchBezierBezierStrokeFirst(
|
|
198537
|
+
this.dispatchBezierBezierStrokeFirst(
|
|
198538
|
+
bezierSpanA[a], bcurveA, strokeCountA, bezierSpanB[b], bcurveB, strokeCountB, univariateCoffsB, _reversed,
|
|
198539
|
+
);
|
|
198448
198540
|
else
|
|
198449
|
-
this.dispatchBezierBezierStrokeFirst(
|
|
198541
|
+
this.dispatchBezierBezierStrokeFirst(
|
|
198542
|
+
bezierSpanB[b], bcurveB, strokeCountB, bezierSpanA[a], bcurveA, strokeCountA, univariateCoffsA, !_reversed,
|
|
198543
|
+
);
|
|
198450
198544
|
}
|
|
198451
198545
|
}
|
|
198452
198546
|
}
|
|
@@ -198454,9 +198548,9 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198454
198548
|
}
|
|
198455
198549
|
/*
|
|
198456
198550
|
/**
|
|
198457
|
-
* Apply the projection transform (if any) to (xyz, w)
|
|
198551
|
+
* Apply the projection transform (if any) to (xyz, w).
|
|
198458
198552
|
* @param xyz xyz parts of input point.
|
|
198459
|
-
* @param w
|
|
198553
|
+
* @param w weight to use for homogeneous effects.
|
|
198460
198554
|
*/
|
|
198461
198555
|
/*
|
|
198462
198556
|
private projectPoint(xyz: XYAndZ, w: number = 1.0): Point4d {
|
|
@@ -198493,16 +198587,19 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198493
198587
|
// NOW .. we have a plane in world space. Intersect it with the bspline:
|
|
198494
198588
|
const intersections: CurveLocationDetail[] = [];
|
|
198495
198589
|
bcurve.appendPlaneIntersectionPoints(planeCoffs, intersections);
|
|
198496
|
-
// intersections has WORLD points with bspline fractions.
|
|
198590
|
+
// intersections has WORLD points with bspline fractions.
|
|
198591
|
+
// (the bspline fractions are all good 0..1 fractions within the spline).
|
|
198497
198592
|
// accept those that are within the segment range.
|
|
198498
198593
|
for (const detail of intersections) {
|
|
198499
198594
|
const fractionB = detail.fraction;
|
|
198500
198595
|
const curvePoint = detail.point;
|
|
198501
198596
|
const curvePointH = this.projectPoint(curvePoint);
|
|
198502
198597
|
const lineFraction = SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
|
|
198503
|
-
if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
198504
|
-
this.
|
|
198505
|
-
|
|
198598
|
+
if (lineFraction !== undefined && this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
198599
|
+
this.acceptFraction(extendB, fractionB, extendB)) {
|
|
198600
|
+
this.recordPointWithLocalFractions(
|
|
198601
|
+
lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed,
|
|
198602
|
+
);
|
|
198506
198603
|
}
|
|
198507
198604
|
}
|
|
198508
198605
|
*/
|
|
@@ -198519,7 +198616,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198519
198616
|
const pointA0 = CurveCurveIntersectXYZ._workPointA0;
|
|
198520
198617
|
const pointA1 = CurveCurveIntersectXYZ._workPointA1;
|
|
198521
198618
|
lsA.pointAt(0, pointA0);
|
|
198522
|
-
for (let iA = 1; iA < numA; iA
|
|
198619
|
+
for (let iA = 1; iA < numA; iA++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
198523
198620
|
lsA.pointAt(iA, pointA1);
|
|
198524
198621
|
fA1 = iA * dfA;
|
|
198525
198622
|
this.dispatchSegmentBsplineCurve(
|
|
@@ -198570,6 +198667,38 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198570
198667
|
}
|
|
198571
198668
|
return undefined;
|
|
198572
198669
|
}
|
|
198670
|
+
/** Detail computation for linestring intersecting linestring. */
|
|
198671
|
+
computeLineStringLineString(lsA, lsB, reversed) {
|
|
198672
|
+
const pointA0 = CurveCurveIntersectXYZ._workPointAA0;
|
|
198673
|
+
const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
|
|
198674
|
+
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
198675
|
+
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
198676
|
+
const numA = lsA.numPoints();
|
|
198677
|
+
const numB = lsB.numPoints();
|
|
198678
|
+
if (numA > 1 && numB > 1) {
|
|
198679
|
+
lsA.pointAt(0, pointA0);
|
|
198680
|
+
const dfA = 1.0 / (numA - 1);
|
|
198681
|
+
const dfB = 1.0 / (numB - 1);
|
|
198682
|
+
let fA0 = 0.0;
|
|
198683
|
+
let fB0;
|
|
198684
|
+
let fA1;
|
|
198685
|
+
let fB1;
|
|
198686
|
+
const extendA = this._extendA;
|
|
198687
|
+
const extendB = this._extendB;
|
|
198688
|
+
lsA.pointAt(0, pointA0);
|
|
198689
|
+
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
198690
|
+
fA1 = ia * dfA;
|
|
198691
|
+
fB0 = 0.0;
|
|
198692
|
+
lsA.pointAt(ia, pointA1);
|
|
198693
|
+
lsB.pointAt(0, pointB0);
|
|
198694
|
+
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
198695
|
+
lsB.pointAt(ib, pointB1);
|
|
198696
|
+
fB1 = ib * dfB;
|
|
198697
|
+
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);
|
|
198698
|
+
}
|
|
198699
|
+
}
|
|
198700
|
+
}
|
|
198701
|
+
}
|
|
198573
198702
|
/** Double dispatch handler for strongly typed segment. */
|
|
198574
198703
|
handleLineSegment3d(segmentA) {
|
|
198575
198704
|
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d) {
|
|
@@ -198585,38 +198714,13 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198585
198714
|
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__.BSplineCurve3d) {
|
|
198586
198715
|
this.dispatchSegmentBsplineCurve(segmentA, this._extendA, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA, this._geometryB, this._extendB, false);
|
|
198587
198716
|
}
|
|
198717
|
+
return undefined;
|
|
198588
198718
|
}
|
|
198589
|
-
/** double dispatch handler for strongly typed linestring
|
|
198719
|
+
/** double dispatch handler for strongly typed linestring. */
|
|
198590
198720
|
handleLineString3d(lsA) {
|
|
198591
198721
|
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_7__.LineString3d) {
|
|
198592
198722
|
const lsB = this._geometryB;
|
|
198593
|
-
|
|
198594
|
-
const pointA1 = CurveCurveIntersectXYZ._workPointAA1;
|
|
198595
|
-
const pointB0 = CurveCurveIntersectXYZ._workPointBB0;
|
|
198596
|
-
const pointB1 = CurveCurveIntersectXYZ._workPointBB1;
|
|
198597
|
-
const numA = lsA.numPoints();
|
|
198598
|
-
const numB = lsB.numPoints();
|
|
198599
|
-
if (numA > 1 && numB > 1) {
|
|
198600
|
-
lsA.pointAt(0, pointA0);
|
|
198601
|
-
const dfA = 1.0 / (numA - 1);
|
|
198602
|
-
const dfB = 1.0 / (numB - 1);
|
|
198603
|
-
let fA0 = 0.0;
|
|
198604
|
-
let fA1, fB0, fB1;
|
|
198605
|
-
const extendA = this._extendA;
|
|
198606
|
-
const extendB = this._extendB;
|
|
198607
|
-
lsA.pointAt(0, pointA0);
|
|
198608
|
-
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
198609
|
-
fA1 = ia * dfA;
|
|
198610
|
-
fB0 = 0.0;
|
|
198611
|
-
lsA.pointAt(ia, pointA1);
|
|
198612
|
-
lsB.pointAt(0, pointB0);
|
|
198613
|
-
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
198614
|
-
lsB.pointAt(ib, pointB1);
|
|
198615
|
-
fB1 = ib * dfB;
|
|
198616
|
-
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);
|
|
198617
|
-
}
|
|
198618
|
-
}
|
|
198619
|
-
}
|
|
198723
|
+
this.computeLineStringLineString(lsA, lsB, false);
|
|
198620
198724
|
}
|
|
198621
198725
|
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d) {
|
|
198622
198726
|
this.computeSegmentLineString(this._geometryB, this._extendB, lsA, this._extendA, true);
|
|
@@ -198645,7 +198749,7 @@ class CurveCurveIntersectXYZ extends _geometry3d_GeometryHandler__WEBPACK_IMPORT
|
|
|
198645
198749
|
}
|
|
198646
198750
|
return undefined;
|
|
198647
198751
|
}
|
|
198648
|
-
/** Double dispatch handler for strongly typed bspline curve
|
|
198752
|
+
/** Double dispatch handler for strongly typed bspline curve. */
|
|
198649
198753
|
handleBSplineCurve3d(curve) {
|
|
198650
198754
|
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_6__.LineSegment3d) {
|
|
198651
198755
|
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB, curve, this._extendA, true);
|
|
@@ -198804,11 +198908,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
198804
198908
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
198805
198909
|
/* harmony export */ CurveOffsetXYHandler: () => (/* binding */ CurveOffsetXYHandler)
|
|
198806
198910
|
/* harmony export */ });
|
|
198911
|
+
/* harmony import */ var _bspline_BSplineCurveOps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../bspline/BSplineCurveOps */ "../../core/geometry/lib/esm/bspline/BSplineCurveOps.js");
|
|
198912
|
+
/* harmony import */ var _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../bspline/InterpolationCurve3d */ "../../core/geometry/lib/esm/bspline/InterpolationCurve3d.js");
|
|
198807
198913
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
198808
198914
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
198809
198915
|
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
198810
|
-
/* harmony import */ var _bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../bspline/InterpolationCurve3d */ "../../core/geometry/lib/esm/bspline/InterpolationCurve3d.js");
|
|
198811
|
-
/* harmony import */ var _bspline_BSplineCurveOps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../bspline/BSplineCurveOps */ "../../core/geometry/lib/esm/bspline/BSplineCurveOps.js");
|
|
198812
198916
|
/*---------------------------------------------------------------------------------------------
|
|
198813
198917
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
198814
198918
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -198846,13 +198950,16 @@ class CurveOffsetXYHandler {
|
|
|
198846
198950
|
if (!_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSmallMetricDistance(tangent.x) || !_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.isSmallMetricDistance(tangent.y))
|
|
198847
198951
|
this._fitOptions.fitPoints.push(xyz.plusScaled(tangent.unitPerpendicularXY(this._v0), this._offsetDistance));
|
|
198848
198952
|
}
|
|
198849
|
-
needPrimaryGeometryForStrokes() {
|
|
198953
|
+
needPrimaryGeometryForStrokes() {
|
|
198954
|
+
return true;
|
|
198955
|
+
}
|
|
198850
198956
|
startParentCurvePrimitive(_cp) { }
|
|
198851
198957
|
startCurvePrimitive(_cp) { }
|
|
198852
198958
|
endCurvePrimitive(_cp) { }
|
|
198853
198959
|
endParentCurvePrimitive(_cp) { }
|
|
198854
198960
|
announceIntervalForUniformStepStrokes(cp, numStrokes, fraction0, fraction1) {
|
|
198855
|
-
|
|
198961
|
+
// announce both start and end; adjacent duplicates will be filtered by c2 cubic fit logic
|
|
198962
|
+
for (let i = 0; i <= numStrokes; ++i) {
|
|
198856
198963
|
const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.interpolate(fraction0, i / numStrokes, fraction1);
|
|
198857
198964
|
const ray = cp.fractionToPointAndDerivative(fraction, this._r0);
|
|
198858
198965
|
this.pushOffsetPoint(ray.origin, ray.direction);
|
|
@@ -198861,7 +198968,8 @@ class CurveOffsetXYHandler {
|
|
|
198861
198968
|
announceSegmentInterval(_cp, point0, point1, numStrokes, _fraction0, _fraction1) {
|
|
198862
198969
|
if (numStrokes > 0) {
|
|
198863
198970
|
const tangent = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.createStartEnd(point0, point1, this._v1);
|
|
198864
|
-
|
|
198971
|
+
// announce both start and end; adjacent duplicates will be filtered by c2 cubic fit logic
|
|
198972
|
+
for (let i = 0; i <= numStrokes; ++i) {
|
|
198865
198973
|
this.pushOffsetPoint(point0.interpolate(i / numStrokes, point1, this._p0), tangent);
|
|
198866
198974
|
}
|
|
198867
198975
|
}
|
|
@@ -206506,10 +206614,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
206506
206614
|
/* harmony export */ NullGeometryHandler: () => (/* binding */ NullGeometryHandler),
|
|
206507
206615
|
/* harmony export */ RecurseToCurvesGeometryHandler: () => (/* binding */ RecurseToCurvesGeometryHandler)
|
|
206508
206616
|
/* harmony export */ });
|
|
206617
|
+
/* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
206618
|
+
/* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
206509
206619
|
/*---------------------------------------------------------------------------------------------
|
|
206510
206620
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
206511
206621
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
206512
206622
|
*--------------------------------------------------------------------------------------------*/
|
|
206623
|
+
|
|
206624
|
+
|
|
206513
206625
|
/**
|
|
206514
206626
|
* `GeometryHandler` defines the base abstract methods for double-dispatch geometry computation.
|
|
206515
206627
|
* * User code that wants to handle one or all of the commonly known geometry types implements a handler class.
|
|
@@ -206520,26 +206632,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
206520
206632
|
class GeometryHandler {
|
|
206521
206633
|
/** Handle strongly typed [[CurveCollection]] */
|
|
206522
206634
|
handleCurveCollection(_g) { }
|
|
206523
|
-
/** Handle strongly typed Path (base class method calls handleCurveCollection) */
|
|
206635
|
+
/** Handle strongly typed [[Path]] (base class method calls [[handleCurveCollection]]) */
|
|
206524
206636
|
handlePath(g) {
|
|
206525
206637
|
return this.handleCurveCollection(g);
|
|
206526
206638
|
}
|
|
206527
|
-
/** Handle strongly typed
|
|
206639
|
+
/** Handle strongly typed [[Loop]] (base class method calls [[handleCurveCollection]]) */
|
|
206528
206640
|
handleLoop(g) {
|
|
206529
206641
|
return this.handleCurveCollection(g);
|
|
206530
206642
|
}
|
|
206531
|
-
/** Handle strongly typed
|
|
206643
|
+
/** Handle strongly typed [[ParityRegion]] (base class method calls [[handleCurveCollection]]) */
|
|
206532
206644
|
handleParityRegion(g) {
|
|
206533
206645
|
return this.handleCurveCollection(g);
|
|
206534
206646
|
}
|
|
206535
|
-
/** Handle strongly typed
|
|
206647
|
+
/** Handle strongly typed [[UnionRegion]] (base class method calls [[handleCurveCollection]]) */
|
|
206536
206648
|
handleUnionRegion(g) {
|
|
206537
206649
|
return this.handleCurveCollection(g);
|
|
206538
206650
|
}
|
|
206539
|
-
/** Handle strongly typed
|
|
206651
|
+
/** Handle strongly typed [[BagOfCurves]] (base class method calls [[handleCurveCollection]]) */
|
|
206540
206652
|
handleBagOfCurves(g) {
|
|
206541
206653
|
return this.handleCurveCollection(g);
|
|
206542
206654
|
}
|
|
206655
|
+
/** Handle strongly typed [[CurveChainWithDistanceIndex]] (base class method calls [[handlePath]] or [[handleLoop]]) */
|
|
206656
|
+
handleCurveChainWithDistanceIndex(g) {
|
|
206657
|
+
if (g.path instanceof _curve_Path__WEBPACK_IMPORTED_MODULE_0__.Path)
|
|
206658
|
+
return this.handlePath(g.path);
|
|
206659
|
+
if (g.path instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_1__.Loop)
|
|
206660
|
+
return this.handleLoop(g.path);
|
|
206661
|
+
return this.handleCurveCollection(g.path);
|
|
206662
|
+
}
|
|
206543
206663
|
}
|
|
206544
206664
|
/**
|
|
206545
206665
|
* `NullGeometryHandler` is a base class for dispatching various geometry types to application specific implementation
|
|
@@ -206571,6 +206691,10 @@ class NullGeometryHandler extends GeometryHandler {
|
|
|
206571
206691
|
return undefined;
|
|
206572
206692
|
}
|
|
206573
206693
|
/** No-action implementation */
|
|
206694
|
+
handleCurveChainWithDistanceIndex(_g) {
|
|
206695
|
+
return undefined;
|
|
206696
|
+
}
|
|
206697
|
+
/** No-action implementation */
|
|
206574
206698
|
handleBSplineCurve3d(_g) {
|
|
206575
206699
|
return undefined;
|
|
206576
206700
|
}
|
|
@@ -206668,7 +206792,8 @@ class NullGeometryHandler extends GeometryHandler {
|
|
|
206668
206792
|
}
|
|
206669
206793
|
}
|
|
206670
206794
|
/**
|
|
206671
|
-
* Implement GeometryHandler methods,
|
|
206795
|
+
* Implement GeometryHandler methods, but override `handleCurveCollection` so that all methods
|
|
206796
|
+
* that operate on a [[CurveCollection]] recurse to their children.
|
|
206672
206797
|
* @public
|
|
206673
206798
|
*/
|
|
206674
206799
|
class RecurseToCurvesGeometryHandler extends GeometryHandler {
|
|
@@ -206732,26 +206857,6 @@ class RecurseToCurvesGeometryHandler extends GeometryHandler {
|
|
|
206732
206857
|
handleCurveCollection(g) {
|
|
206733
206858
|
return this.handleChildren(g);
|
|
206734
206859
|
}
|
|
206735
|
-
/** Recurse to children */
|
|
206736
|
-
handlePath(g) {
|
|
206737
|
-
return this.handleChildren(g);
|
|
206738
|
-
}
|
|
206739
|
-
/** Recurse to children */
|
|
206740
|
-
handleLoop(g) {
|
|
206741
|
-
return this.handleChildren(g);
|
|
206742
|
-
}
|
|
206743
|
-
/** Recurse to children */
|
|
206744
|
-
handleParityRegion(g) {
|
|
206745
|
-
return this.handleChildren(g);
|
|
206746
|
-
}
|
|
206747
|
-
/** Recurse to children */
|
|
206748
|
-
handleUnionRegion(g) {
|
|
206749
|
-
return this.handleChildren(g);
|
|
206750
|
-
}
|
|
206751
|
-
/** Recurse to children */
|
|
206752
|
-
handleBagOfCurves(g) {
|
|
206753
|
-
return this.handleChildren(g);
|
|
206754
|
-
}
|
|
206755
206860
|
/** No-action implementation */
|
|
206756
206861
|
handleSphere(_g) {
|
|
206757
206862
|
return undefined;
|
|
@@ -223462,7 +223567,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223462
223567
|
|
|
223463
223568
|
|
|
223464
223569
|
|
|
223465
|
-
/**
|
|
223570
|
+
/**
|
|
223571
|
+
* Map4 carries two Matrix4d which are inverses of each other.
|
|
223466
223572
|
* @public
|
|
223467
223573
|
*/
|
|
223468
223574
|
class Map4d {
|
|
@@ -223471,16 +223577,23 @@ class Map4d {
|
|
|
223471
223577
|
this._matrix1 = matrix1;
|
|
223472
223578
|
}
|
|
223473
223579
|
/** Return a reference to (not copy of) the "forward" Matrix4d */
|
|
223474
|
-
get transform0() {
|
|
223580
|
+
get transform0() {
|
|
223581
|
+
return this._matrix0;
|
|
223582
|
+
}
|
|
223475
223583
|
/** Return a reference to (not copy of) the "reverse" Matrix4d */
|
|
223476
|
-
get transform1() {
|
|
223584
|
+
get transform1() {
|
|
223585
|
+
return this._matrix1;
|
|
223586
|
+
}
|
|
223477
223587
|
/** Create a Map4d, capturing the references to the two matrices. */
|
|
223478
223588
|
static createRefs(matrix0, matrix1) {
|
|
223479
223589
|
return new Map4d(matrix0, matrix1);
|
|
223480
223590
|
}
|
|
223481
223591
|
/** Create an identity map. */
|
|
223482
|
-
static createIdentity() {
|
|
223483
|
-
|
|
223592
|
+
static createIdentity() {
|
|
223593
|
+
return new Map4d(_Matrix4d__WEBPACK_IMPORTED_MODULE_0__.Matrix4d.createIdentity(), _Matrix4d__WEBPACK_IMPORTED_MODULE_0__.Matrix4d.createIdentity());
|
|
223594
|
+
}
|
|
223595
|
+
/**
|
|
223596
|
+
* Create a Map4d with given transform pair.
|
|
223484
223597
|
* @returns undefined if the transforms are not inverses of each other.
|
|
223485
223598
|
*/
|
|
223486
223599
|
static createTransform(transform0, transform1) {
|
|
@@ -223514,11 +223627,19 @@ class Map4d {
|
|
|
223514
223627
|
return undefined;
|
|
223515
223628
|
}
|
|
223516
223629
|
/** Copy contents from another Map4d */
|
|
223517
|
-
setFrom(other) {
|
|
223630
|
+
setFrom(other) {
|
|
223631
|
+
this._matrix0.setFrom(other._matrix0);
|
|
223632
|
+
this._matrix1.setFrom(other._matrix1);
|
|
223633
|
+
}
|
|
223518
223634
|
/** Return a clone of this Map4d */
|
|
223519
|
-
clone() {
|
|
223635
|
+
clone() {
|
|
223636
|
+
return new Map4d(this._matrix0.clone(), this._matrix1.clone());
|
|
223637
|
+
}
|
|
223520
223638
|
/** Reinitialize this Map4d as an identity. */
|
|
223521
|
-
setIdentity() {
|
|
223639
|
+
setIdentity() {
|
|
223640
|
+
this._matrix0.setIdentity();
|
|
223641
|
+
this._matrix1.setIdentity();
|
|
223642
|
+
}
|
|
223522
223643
|
/** Set this map4d from a json object that the two Matrix4d values as properties named matrix0 and matrix1 */
|
|
223523
223644
|
setFromJSON(json) {
|
|
223524
223645
|
if (json.matrix0 && json.matrix1) {
|
|
@@ -223535,15 +223656,18 @@ class Map4d {
|
|
|
223535
223656
|
return result;
|
|
223536
223657
|
}
|
|
223537
223658
|
/** Return a json object `{matrix0: value0, matrix1: value1}` */
|
|
223538
|
-
toJSON() {
|
|
223659
|
+
toJSON() {
|
|
223660
|
+
return { matrix0: this._matrix0.toJSON(), matrix1: this._matrix1.toJSON() };
|
|
223661
|
+
}
|
|
223539
223662
|
/** Test if both matrices are almost equal to those */
|
|
223540
223663
|
isAlmostEqual(other) {
|
|
223541
223664
|
return this._matrix0.isAlmostEqual(other._matrix0) && this._matrix1.isAlmostEqual(other._matrix1);
|
|
223542
223665
|
}
|
|
223543
|
-
/**
|
|
223666
|
+
/**
|
|
223667
|
+
* Create a map between a frustum and world coordinates.
|
|
223544
223668
|
* @param origin lower left of frustum
|
|
223545
|
-
* @param uVector Vector from lower left rear to lower right rear
|
|
223546
|
-
* @param vVector Vector from lower left rear to upper left rear
|
|
223669
|
+
* @param uVector Vector from lower left rear to lower right rear.
|
|
223670
|
+
* @param vVector Vector from lower left rear to upper left rear.
|
|
223547
223671
|
* @param wVector Vector from lower left rear to lower left front, i.e. lower left rear towards eye.
|
|
223548
223672
|
* @param fraction front size divided by rear size.
|
|
223549
223673
|
*/
|
|
@@ -223572,7 +223696,8 @@ class Map4d {
|
|
|
223572
223696
|
*/
|
|
223573
223697
|
return result;
|
|
223574
223698
|
}
|
|
223575
|
-
/**
|
|
223699
|
+
/**
|
|
223700
|
+
* Multiply this*other. The output matrices are
|
|
223576
223701
|
* * output matrix0 = `this.matrix0 * other.matrix0`
|
|
223577
223702
|
* * output matrix1 = 'other.matrix1 * this.matrix1`
|
|
223578
223703
|
*/
|
|
@@ -223585,19 +223710,21 @@ class Map4d {
|
|
|
223585
223710
|
this._matrix0 = this._matrix1;
|
|
223586
223711
|
this._matrix1 = temp;
|
|
223587
223712
|
}
|
|
223588
|
-
/**
|
|
223713
|
+
/**
|
|
223714
|
+
* Return a Map4d whose transform0 is
|
|
223589
223715
|
* other.transform0 * this.transform0 * other.transform1
|
|
223590
223716
|
*/
|
|
223591
223717
|
sandwich0This1(other) {
|
|
223592
223718
|
return new Map4d(other._matrix0.multiplyMatrixMatrix(this._matrix0.multiplyMatrixMatrix(other._matrix1)), other._matrix0.multiplyMatrixMatrix(this._matrix1.multiplyMatrixMatrix(other._matrix1)));
|
|
223593
223719
|
}
|
|
223594
|
-
/**
|
|
223720
|
+
/**
|
|
223721
|
+
* Return a Map4d whose transform0 is
|
|
223595
223722
|
* other.transform1 * this.transform0 * other.transform0
|
|
223596
223723
|
*/
|
|
223597
223724
|
sandwich1This0(other) {
|
|
223598
223725
|
return new Map4d(other._matrix1.multiplyMatrixMatrix(this._matrix0.multiplyMatrixMatrix(other._matrix0)), other._matrix1.multiplyMatrixMatrix(this._matrix1.multiplyMatrixMatrix(other._matrix0)));
|
|
223599
223726
|
}
|
|
223600
|
-
}
|
|
223727
|
+
}
|
|
223601
223728
|
|
|
223602
223729
|
|
|
223603
223730
|
/***/ }),
|
|
@@ -233513,7 +233640,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
233513
233640
|
|
|
233514
233641
|
|
|
233515
233642
|
|
|
233516
|
-
/* eslint-disable @typescript-eslint/naming-convention, @typescript-eslint/prefer-for-of */
|
|
233517
233643
|
/**
|
|
233518
233644
|
* A FacetSector
|
|
233519
233645
|
* * initially holds coordinate data for a place where xyz and sectionDerivative are known
|
|
@@ -234656,16 +234782,14 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
234656
234782
|
this.addBetweenLineStringsWithStoredIndices(strokeA, strokeB);
|
|
234657
234783
|
}
|
|
234658
234784
|
else if (stroke0 instanceof _curve_ParityRegion__WEBPACK_IMPORTED_MODULE_12__.ParityRegion) {
|
|
234659
|
-
for (
|
|
234660
|
-
this.addBetweenRotatedStrokeSets(
|
|
234785
|
+
for (const child of stroke0.children) {
|
|
234786
|
+
this.addBetweenRotatedStrokeSets(child, transformA, vA, transformB, vB);
|
|
234661
234787
|
}
|
|
234662
234788
|
}
|
|
234663
234789
|
else if (stroke0 instanceof _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_13__.CurveChain) {
|
|
234664
|
-
const
|
|
234665
|
-
|
|
234666
|
-
|
|
234667
|
-
if (cpA instanceof _curve_LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
|
|
234668
|
-
this.addBetweenRotatedStrokeSets(cpA, transformA, vA, transformB, vB);
|
|
234790
|
+
for (const child of stroke0.children) {
|
|
234791
|
+
if (child instanceof _curve_LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d) {
|
|
234792
|
+
this.addBetweenRotatedStrokeSets(child, transformA, vA, transformB, vB);
|
|
234669
234793
|
}
|
|
234670
234794
|
}
|
|
234671
234795
|
}
|
|
@@ -234700,8 +234824,8 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
234700
234824
|
let stroke0;
|
|
234701
234825
|
let stroke1;
|
|
234702
234826
|
const sectionMaps = [];
|
|
234703
|
-
for (
|
|
234704
|
-
sectionMaps.push(_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.createForParityRegionOrChain(
|
|
234827
|
+
for (const contour of contours) {
|
|
234828
|
+
sectionMaps.push(_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.createForParityRegionOrChain(contour.curves, this._options));
|
|
234705
234829
|
}
|
|
234706
234830
|
if (_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.enforceStrokeCountCompatibility(sectionMaps)) {
|
|
234707
234831
|
_curve_Query_StrokeCountChain__WEBPACK_IMPORTED_MODULE_16__.StrokeCountSection.enforceCompatibleDistanceSums(sectionMaps);
|
|
@@ -249556,7 +249680,13 @@ class Sample {
|
|
|
249556
249680
|
* * direct spiral (half-cosine)
|
|
249557
249681
|
*/
|
|
249558
249682
|
static createCurveChainWithDistanceIndex() {
|
|
249559
|
-
const pointsA = [
|
|
249683
|
+
const pointsA = [
|
|
249684
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0),
|
|
249685
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 3, 0),
|
|
249686
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(2, 4, 0),
|
|
249687
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(3, 3, 0),
|
|
249688
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(4, 0, 0),
|
|
249689
|
+
];
|
|
249560
249690
|
const result = [];
|
|
249561
249691
|
// one singleton per basic curve type ...
|
|
249562
249692
|
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)))));
|
|
@@ -280425,7 +280555,7 @@ class TestContext {
|
|
|
280425
280555
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
280426
280556
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
280427
280557
|
await core_frontend_1.NoRenderApp.startup({
|
|
280428
|
-
applicationVersion: "4.2.0-dev.
|
|
280558
|
+
applicationVersion: "4.2.0-dev.33",
|
|
280429
280559
|
applicationId: this.settings.gprid,
|
|
280430
280560
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
280431
280561
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -299833,7 +299963,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
299833
299963
|
/***/ ((module) => {
|
|
299834
299964
|
|
|
299835
299965
|
"use strict";
|
|
299836
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.2.0-dev.
|
|
299966
|
+
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"}}');
|
|
299837
299967
|
|
|
299838
299968
|
/***/ }),
|
|
299839
299969
|
|