@itwin/ecschema-rpcinterface-tests 4.9.0-dev.17 → 4.9.0-dev.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +255 -180
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61.bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -187678,16 +187678,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187678
187678
|
/* harmony export */ });
|
|
187679
187679
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
187680
187680
|
/* harmony import */ var _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../curve/CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
187681
|
-
/* harmony import */ var
|
|
187681
|
+
/* harmony import */ var _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../curve/Query/StrokeCountMap */ "../../core/geometry/lib/esm/curve/Query/StrokeCountMap.js");
|
|
187682
187682
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
187683
|
-
/* harmony import */ var
|
|
187683
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
187684
187684
|
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
187685
|
-
/* harmony import */ var
|
|
187686
|
-
/* harmony import */ var
|
|
187687
|
-
/* harmony import */ var
|
|
187688
|
-
/* harmony import */ var
|
|
187689
|
-
/* harmony import */ var
|
|
187690
|
-
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
187685
|
+
/* harmony import */ var _CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CurveExtendMode */ "../../core/geometry/lib/esm/curve/CurveExtendMode.js");
|
|
187686
|
+
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
187687
|
+
/* harmony import */ var _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internalContexts/PlaneAltitudeRangeContext */ "../../core/geometry/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js");
|
|
187688
|
+
/* harmony import */ var _OffsetOptions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./OffsetOptions */ "../../core/geometry/lib/esm/curve/OffsetOptions.js");
|
|
187689
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
187691
187690
|
/*---------------------------------------------------------------------------------------------
|
|
187692
187691
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
187693
187692
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -187706,7 +187705,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187706
187705
|
|
|
187707
187706
|
|
|
187708
187707
|
|
|
187709
|
-
|
|
187710
187708
|
/**
|
|
187711
187709
|
* Annotation of a fragment, i.e. an interval of a curve.
|
|
187712
187710
|
* * The interval is marked with two pairs of numbers:
|
|
@@ -187867,11 +187865,14 @@ class DistanceIndexConstructionContext {
|
|
|
187867
187865
|
}
|
|
187868
187866
|
}
|
|
187869
187867
|
/**
|
|
187870
|
-
* `CurveChainWithDistanceIndex` is a CurvePrimitive whose fractional parameterization is proportional to true
|
|
187871
|
-
* distance along a
|
|
187868
|
+
* `CurveChainWithDistanceIndex` is a [[CurvePrimitive]] whose fractional parameterization is proportional to true
|
|
187869
|
+
* distance along a path.
|
|
187872
187870
|
* * For example if the total length of the chain is `L`, then the distance along the chain from parameters `t0`
|
|
187873
187871
|
* to `t1` is easily computed as `L*(t1-t0)`.
|
|
187874
|
-
* *
|
|
187872
|
+
* * In this way the `CurveChainWithDistanceIndex` provides a global arc length parameterization for a [[CurveChain]].
|
|
187873
|
+
* * A `CurveChainWithDistanceIndex` can be created from any [[CurveChain]], but a [[Path]] is stored internally.
|
|
187874
|
+
* * Adding a `CurveChainWithDistanceIndex` to a `CurveChain` does not preserve the distance index; instead the
|
|
187875
|
+
* internal path children are added directly to the `CurveChain`.
|
|
187875
187876
|
* @public
|
|
187876
187877
|
*/
|
|
187877
187878
|
class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_3__.CurvePrimitive {
|
|
@@ -187884,7 +187885,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
187884
187885
|
super();
|
|
187885
187886
|
/** String name for schema properties */
|
|
187886
187887
|
this.curvePrimitiveType = "curveChainWithDistanceIndex";
|
|
187887
|
-
this._path = path;
|
|
187888
|
+
this._path = path instanceof _Path__WEBPACK_IMPORTED_MODULE_4__.Path ? path : _Path__WEBPACK_IMPORTED_MODULE_4__.Path.create(...path.children);
|
|
187888
187889
|
this._fragments = fragments;
|
|
187889
187890
|
this._totalLength = fragments.length > 0 ? fragments[fragments.length - 1].chainDistance1 : 0;
|
|
187890
187891
|
}
|
|
@@ -187894,7 +187895,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
187894
187895
|
*/
|
|
187895
187896
|
cloneTransformed(transform) {
|
|
187896
187897
|
const c = this._path.clone();
|
|
187897
|
-
if (c
|
|
187898
|
+
if (c.tryTransformInPlace(transform))
|
|
187898
187899
|
return CurveChainWithDistanceIndex.createCapture(c);
|
|
187899
187900
|
return undefined;
|
|
187900
187901
|
}
|
|
@@ -187945,7 +187946,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
187945
187946
|
const childFractionA = fragmentA.chainDistanceToAccurateChildFraction(chainDistanceA, true);
|
|
187946
187947
|
const childFractionB = fragmentB.chainDistanceToAccurateChildFraction(chainDistanceB, true);
|
|
187947
187948
|
// add a (possibly reversed) partial clone to newPath
|
|
187948
|
-
const newPath =
|
|
187949
|
+
const newPath = _Path__WEBPACK_IMPORTED_MODULE_4__.Path.create();
|
|
187949
187950
|
const addPartialChild = (childCurve, childFraction0, childFraction1, reversedClone) => {
|
|
187950
187951
|
if (childFraction0 === childFraction1)
|
|
187951
187952
|
return false;
|
|
@@ -187999,14 +188000,14 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
187999
188000
|
const c = this._path.cyclicCurvePrimitive(0);
|
|
188000
188001
|
if (c)
|
|
188001
188002
|
return c.startPoint(result);
|
|
188002
|
-
return
|
|
188003
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.createZero(result);
|
|
188003
188004
|
}
|
|
188004
188005
|
/** Return the end point of of `this` curve. */
|
|
188005
188006
|
endPoint(result) {
|
|
188006
188007
|
const c = this._path.cyclicCurvePrimitive(-1);
|
|
188007
188008
|
if (c)
|
|
188008
188009
|
return c.endPoint(result);
|
|
188009
|
-
return
|
|
188010
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_5__.Point3d.createZero(result);
|
|
188010
188011
|
}
|
|
188011
188012
|
/** Add strokes to caller-supplied linestring */
|
|
188012
188013
|
emitStrokes(dest, options) {
|
|
@@ -188057,7 +188058,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
188057
188058
|
* @param parentStrokeMap evolving parent map.
|
|
188058
188059
|
*/
|
|
188059
188060
|
computeAndAttachRecursiveStrokeCounts(options, parentStrokeMap) {
|
|
188060
|
-
const myMap =
|
|
188061
|
+
const myMap = _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_6__.StrokeCountMap.createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap);
|
|
188061
188062
|
for (const c of this._path.children) {
|
|
188062
188063
|
c.computeAndAttachRecursiveStrokeCounts(options, myMap);
|
|
188063
188064
|
}
|
|
@@ -188095,14 +188096,14 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
188095
188096
|
return flatChain;
|
|
188096
188097
|
}
|
|
188097
188098
|
/**
|
|
188098
|
-
* Capture (not clone) a path into a new `CurveChainWithDistanceIndex
|
|
188099
|
-
* @param path
|
|
188099
|
+
* Capture (not clone) a path into a new `CurveChainWithDistanceIndex`.
|
|
188100
|
+
* @param path chain to be CAPTURED (not cloned)
|
|
188101
|
+
* @param options how finely to stroke the path to create the distance index
|
|
188100
188102
|
*/
|
|
188101
188103
|
static createCapture(path, options) {
|
|
188102
188104
|
path = this.flattenNestedChains(path); // nested chains not allowed
|
|
188103
188105
|
const fragments = DistanceIndexConstructionContext.createPathFragmentIndex(path, options);
|
|
188104
|
-
|
|
188105
|
-
return result;
|
|
188106
|
+
return new CurveChainWithDistanceIndex(path, fragments);
|
|
188106
188107
|
}
|
|
188107
188108
|
/**
|
|
188108
188109
|
* Return the PathFragment object at the given `distance` along the chain.
|
|
@@ -188309,7 +188310,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
188309
188310
|
const fragmentB = this.chainDistanceToFragment(distanceB, true);
|
|
188310
188311
|
const childDetail = fragmentB.childCurve.moveSignedDistanceFromFraction(fragmentB.childFraction0, distanceB - fragmentB.chainDistance0, allowExtension, result?.childDetail); // local detail related to the child curve
|
|
188311
188312
|
const endFraction = startFraction + (signedDistance / this._totalLength);
|
|
188312
|
-
const chainDetail =
|
|
188313
|
+
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__.CurveLocationDetail.createConditionalMoveSignedDistance(allowExtension, this, startFraction, endFraction, signedDistance, result); // global detail related to the curve chain
|
|
188313
188314
|
chainDetail.childDetail = childDetail;
|
|
188314
188315
|
return chainDetail;
|
|
188315
188316
|
}
|
|
@@ -188354,12 +188355,12 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
188354
188355
|
else {
|
|
188355
188356
|
const sortedFragments = PathFragment.collectSortedQuickMinDistances(this._fragments, spacePoint);
|
|
188356
188357
|
const extend0 = [
|
|
188357
|
-
|
|
188358
|
-
|
|
188358
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 0),
|
|
188359
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__.CurveExtendMode.None,
|
|
188359
188360
|
];
|
|
188360
188361
|
const extend1 = [
|
|
188361
|
-
|
|
188362
|
-
|
|
188362
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__.CurveExtendMode.None,
|
|
188363
|
+
_CurveExtendMode__WEBPACK_IMPORTED_MODULE_8__.CurveExtendOptions.resolveVariantCurveExtendParameterToCurveExtendMode(extend, 1),
|
|
188363
188364
|
];
|
|
188364
188365
|
const fragment0 = this._fragments[0];
|
|
188365
188366
|
const fragment1 = this._fragments[this._fragments.length - 1];
|
|
@@ -188392,7 +188393,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
188392
188393
|
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve) or offset options object.
|
|
188393
188394
|
*/
|
|
188394
188395
|
constructOffsetXY(offsetDistanceOrOptions) {
|
|
188395
|
-
const options =
|
|
188396
|
+
const options = _OffsetOptions__WEBPACK_IMPORTED_MODULE_9__.OffsetOptions.create(offsetDistanceOrOptions);
|
|
188396
188397
|
const offsets = [];
|
|
188397
188398
|
for (const prim of this.collectCurvePrimitives(undefined, true, true)) {
|
|
188398
188399
|
const offset = prim.constructOffsetXY(options);
|
|
@@ -188414,7 +188415,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
188414
188415
|
* end of the ray.
|
|
188415
188416
|
*/
|
|
188416
188417
|
projectedParameterRange(ray, lowHigh) {
|
|
188417
|
-
return
|
|
188418
|
+
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_10__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
188418
188419
|
}
|
|
188419
188420
|
/**
|
|
188420
188421
|
* Compute the global chain detail corresponding to a local child detail.
|
|
@@ -188428,7 +188429,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
188428
188429
|
if (fragment) {
|
|
188429
188430
|
const chainDistance = fragment.childFractionToChainDistance(childDetail.fraction);
|
|
188430
188431
|
const chainFraction = this.chainDistanceToChainFraction(chainDistance);
|
|
188431
|
-
const chainDetail =
|
|
188432
|
+
const chainDetail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__.CurveLocationDetail.createCurveFractionPoint(this, chainFraction, childDetail.point);
|
|
188432
188433
|
chainDetail.childDetail = childDetail;
|
|
188433
188434
|
chainDetail.a = childDetail.a;
|
|
188434
188435
|
return chainDetail;
|
|
@@ -188462,7 +188463,7 @@ class CurveChainWithDistanceIndex extends _curve_CurvePrimitive__WEBPACK_IMPORTE
|
|
|
188462
188463
|
}
|
|
188463
188464
|
}
|
|
188464
188465
|
if (compressAdjacent)
|
|
188465
|
-
pairs =
|
|
188466
|
+
pairs = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_7__.CurveLocationDetailPair.removeAdjacentDuplicates(pairs, index0);
|
|
188466
188467
|
return pairs;
|
|
188467
188468
|
}
|
|
188468
188469
|
}
|
|
@@ -188936,6 +188937,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188936
188937
|
class CurveCurve {
|
|
188937
188938
|
/**
|
|
188938
188939
|
* Return xy intersections of 2 curves.
|
|
188940
|
+
* * Curves can be extended if extend flags are set. B-splines are not extended even if the flag is set.
|
|
188939
188941
|
* @param curveA first curve
|
|
188940
188942
|
* @param extendA true to allow curveA to extend
|
|
188941
188943
|
* @param curveB second curve
|
|
@@ -188947,6 +188949,7 @@ class CurveCurve {
|
|
|
188947
188949
|
}
|
|
188948
188950
|
/**
|
|
188949
188951
|
* Return xy intersections of 2 projected curves.
|
|
188952
|
+
* * Curves can be extended if extend flags are set. B-splines are not extended even if the flag is set.
|
|
188950
188953
|
* @param worldToLocal transform (possibly perspective) defining the local coordinates in which to compute xy intersections
|
|
188951
188954
|
* @param curveA first curve
|
|
188952
188955
|
* @param extendA true to allow curveA to extend
|
|
@@ -188960,15 +188963,15 @@ class CurveCurve {
|
|
|
188960
188963
|
return handler.grabPairedResults();
|
|
188961
188964
|
}
|
|
188962
188965
|
/**
|
|
188963
|
-
|
|
188964
|
-
|
|
188965
|
-
|
|
188966
|
-
|
|
188967
|
-
|
|
188968
|
-
|
|
188969
|
-
|
|
188970
|
-
|
|
188971
|
-
|
|
188966
|
+
* Return full 3d xyz intersections of 2 curves.
|
|
188967
|
+
* * Implemented for combinations of LineSegment3d, LineString3d, Arc3d.
|
|
188968
|
+
* * Not Implemented for bspline and bezier curves.
|
|
188969
|
+
* @param curveA first curve
|
|
188970
|
+
* @param extendA true to allow curveA to extend
|
|
188971
|
+
* @param curveB second curve
|
|
188972
|
+
* @param extendB true to allow curveB to extend
|
|
188973
|
+
* @returns array of intersections structured as CurveLocationDetailPair[]
|
|
188974
|
+
*/
|
|
188972
188975
|
static intersectionXYZPairs(curveA, extendA, curveB, extendB) {
|
|
188973
188976
|
const handler = new _internalContexts_CurveCurveIntersectXYZ__WEBPACK_IMPORTED_MODULE_2__.CurveCurveIntersectXYZ(extendA, curveB, extendB);
|
|
188974
188977
|
curveA.dispatchToGeometryHandler(handler);
|
|
@@ -189398,9 +189401,10 @@ class CurveFactory {
|
|
|
189398
189401
|
/**
|
|
189399
189402
|
* If `arcB` is a continuation of `arcA`, extend `arcA` (in place) to include the range of `arcB`
|
|
189400
189403
|
* * This only succeeds if the two arcs are part of identical complete arcs and end of `arcA` matches the beginning of `arcB`.
|
|
189401
|
-
*
|
|
189402
|
-
* @param
|
|
189403
|
-
* @param
|
|
189404
|
+
* @param arcA first arc, modified in place
|
|
189405
|
+
* @param arcB second arc, unmodified
|
|
189406
|
+
* @param allowReversed whether to consolidate even when second arc is reversed
|
|
189407
|
+
* @returns whether `arcA` was modified
|
|
189404
189408
|
*/
|
|
189405
189409
|
static appendToArcInPlace(arcA, arcB, allowReverse = false) {
|
|
189406
189410
|
if (arcA.center.isAlmostEqual(arcB.center)) {
|
|
@@ -192788,11 +192792,13 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePri
|
|
|
192788
192792
|
quickLength() { return this.curveLength(); }
|
|
192789
192793
|
/**
|
|
192790
192794
|
* Compute and normalize cross product among 3 points on the linestring.
|
|
192791
|
-
* *
|
|
192792
|
-
* * This is appropriate for polygon known to be convex.
|
|
192793
|
-
* *
|
|
192794
|
-
* * If
|
|
192795
|
-
*
|
|
192795
|
+
* * Essentially 3 random points are used to form the cross product.
|
|
192796
|
+
* * This is appropriate for a polygon known to be convex.
|
|
192797
|
+
* * No test for convexity or collinearity is performed.
|
|
192798
|
+
* * If the polygon is not convex, the returned normal may be reversed.
|
|
192799
|
+
* * If the random points used in the cross product are collinear, undefined is returned.
|
|
192800
|
+
* @param result pre-allocated object to populate and return
|
|
192801
|
+
* @returns unit normal, or undefined if normalization failed
|
|
192796
192802
|
*/
|
|
192797
192803
|
quickUnitNormal(result) {
|
|
192798
192804
|
let step = Math.floor(this._points.length / 3);
|
|
@@ -193477,14 +193483,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193477
193483
|
/* harmony export */ "Loop": () => (/* binding */ Loop),
|
|
193478
193484
|
/* harmony export */ "LoopCurveLoopCurve": () => (/* binding */ LoopCurveLoopCurve)
|
|
193479
193485
|
/* harmony export */ });
|
|
193486
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
193480
193487
|
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
193481
|
-
/* harmony import */ var
|
|
193488
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
193482
193489
|
/*---------------------------------------------------------------------------------------------
|
|
193483
193490
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
193484
193491
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
193485
193492
|
*--------------------------------------------------------------------------------------------*/
|
|
193486
193493
|
|
|
193487
193494
|
|
|
193495
|
+
|
|
193488
193496
|
/**
|
|
193489
193497
|
* A `Loop` is a curve chain that is the boundary of a closed (planar) loop.
|
|
193490
193498
|
* @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.
|
|
@@ -193510,7 +193518,10 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
193510
193518
|
static create(...curves) {
|
|
193511
193519
|
const result = new Loop();
|
|
193512
193520
|
for (const curve of curves) {
|
|
193513
|
-
|
|
193521
|
+
if (curve instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_1__.CurveChainWithDistanceIndex)
|
|
193522
|
+
result.children.push(...curve.path.children);
|
|
193523
|
+
else
|
|
193524
|
+
result.children.push(curve);
|
|
193514
193525
|
}
|
|
193515
193526
|
return result;
|
|
193516
193527
|
}
|
|
@@ -193519,21 +193530,17 @@ class Loop extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
193519
193530
|
* @param curves array of individual curve primitives
|
|
193520
193531
|
*/
|
|
193521
193532
|
static createArray(curves) {
|
|
193522
|
-
|
|
193523
|
-
for (const curve of curves) {
|
|
193524
|
-
result.children.push(curve);
|
|
193525
|
-
}
|
|
193526
|
-
return result;
|
|
193533
|
+
return this.create(...curves);
|
|
193527
193534
|
}
|
|
193528
193535
|
/** Create a loop from an array of points */
|
|
193529
193536
|
static createPolygon(points) {
|
|
193530
|
-
const linestring =
|
|
193537
|
+
const linestring = _LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create(points);
|
|
193531
193538
|
linestring.addClosurePoint();
|
|
193532
193539
|
return Loop.create(linestring);
|
|
193533
193540
|
}
|
|
193534
193541
|
/** Create a loop with the stroked form of this loop. */
|
|
193535
193542
|
cloneStroked(options) {
|
|
193536
|
-
const strokes =
|
|
193543
|
+
const strokes = _LineString3d__WEBPACK_IMPORTED_MODULE_2__.LineString3d.create();
|
|
193537
193544
|
for (const curve of this.children)
|
|
193538
193545
|
curve.emitStrokes(strokes, options);
|
|
193539
193546
|
// eliminate near-duplicate points between children
|
|
@@ -193919,10 +193926,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193919
193926
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
193920
193927
|
/* harmony export */ "Path": () => (/* binding */ Path)
|
|
193921
193928
|
/* harmony export */ });
|
|
193922
|
-
/* harmony import */ var
|
|
193929
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
193930
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
193923
193931
|
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
193924
|
-
/* harmony import */ var
|
|
193925
|
-
/* harmony import */ var
|
|
193932
|
+
/* harmony import */ var _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CurvePrimitive */ "../../core/geometry/lib/esm/curve/CurvePrimitive.js");
|
|
193933
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
193926
193934
|
/*---------------------------------------------------------------------------------------------
|
|
193927
193935
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
193928
193936
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -193931,6 +193939,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193931
193939
|
|
|
193932
193940
|
|
|
193933
193941
|
|
|
193942
|
+
|
|
193934
193943
|
/**
|
|
193935
193944
|
* * A `Path` object is a collection of curves that join head-to-tail to form a path.
|
|
193936
193945
|
* * A `Path` object does not bound a planar region. Use `Loop` to indicate region bounding.
|
|
@@ -193960,10 +193969,12 @@ class Path extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
193960
193969
|
static create(...curves) {
|
|
193961
193970
|
const result = new Path();
|
|
193962
193971
|
for (const curve of curves) {
|
|
193963
|
-
if (curve instanceof
|
|
193972
|
+
if (curve instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_1__.CurveChainWithDistanceIndex)
|
|
193973
|
+
result.children.push(...curve.path.children);
|
|
193974
|
+
else if (curve instanceof _CurvePrimitive__WEBPACK_IMPORTED_MODULE_2__.CurvePrimitive)
|
|
193964
193975
|
result.children.push(curve);
|
|
193965
|
-
else if (Array.isArray(curve) && curve.length > 0 && curve[0] instanceof
|
|
193966
|
-
result.children.push(
|
|
193976
|
+
else if (Array.isArray(curve) && curve.length > 0 && curve[0] instanceof _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d) {
|
|
193977
|
+
result.children.push(_LineString3d__WEBPACK_IMPORTED_MODULE_4__.LineString3d.create(curve));
|
|
193967
193978
|
}
|
|
193968
193979
|
}
|
|
193969
193980
|
return result;
|
|
@@ -193973,15 +193984,11 @@ class Path extends _CurveCollection__WEBPACK_IMPORTED_MODULE_0__.CurveChain {
|
|
|
193973
193984
|
* @param curves array of individual curve primitives.
|
|
193974
193985
|
*/
|
|
193975
193986
|
static createArray(curves) {
|
|
193976
|
-
|
|
193977
|
-
for (const curve of curves) {
|
|
193978
|
-
result.children.push(curve);
|
|
193979
|
-
}
|
|
193980
|
-
return result;
|
|
193987
|
+
return this.create(...curves);
|
|
193981
193988
|
}
|
|
193982
193989
|
/** Return a deep copy, with leaf-level curve primitives stroked. */
|
|
193983
193990
|
cloneStroked(options) {
|
|
193984
|
-
const strokes =
|
|
193991
|
+
const strokes = _LineString3d__WEBPACK_IMPORTED_MODULE_4__.LineString3d.create();
|
|
193985
193992
|
for (const curve of this.children)
|
|
193986
193993
|
curve.emitStrokes(strokes, options);
|
|
193987
193994
|
return Path.create(strokes);
|
|
@@ -194396,12 +194403,11 @@ class ConsolidateAdjacentCurvePrimitivesContext extends _geometry3d_GeometryHand
|
|
|
194396
194403
|
}
|
|
194397
194404
|
}
|
|
194398
194405
|
if (points.length > 1) {
|
|
194399
|
-
const
|
|
194400
|
-
const
|
|
194401
|
-
const compressedPointsB = _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__.PolylineOps.compressByPerpendicularDistance(compressedPointsA, tolerance);
|
|
194406
|
+
const compressedPointsA = _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__.PolylineOps.compressShortEdges(points, this._options.duplicatePointTolerance);
|
|
194407
|
+
const compressedPointsB = _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__.PolylineOps.compressByPerpendicularDistance(compressedPointsA, this._options.colinearPointTolerance);
|
|
194402
194408
|
if (i0 === 0 && i1 === numOriginal) {
|
|
194403
194409
|
// points is the entire curve, and the curve is closed. Maybe the first and last segments are colinear.
|
|
194404
|
-
_geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_5__.PolylineCompressionContext.compressColinearWrapInPlace(compressedPointsB,
|
|
194410
|
+
_geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_5__.PolylineCompressionContext.compressColinearWrapInPlace(compressedPointsB, this._options.duplicatePointTolerance, this._options.colinearPointTolerance);
|
|
194405
194411
|
}
|
|
194406
194412
|
if (compressedPointsB.length < 2) {
|
|
194407
194413
|
// Collapsed to a point? Make a single point linestring
|
|
@@ -196790,9 +196796,9 @@ function pushToInOnOutArrays(curve, select, arrayNegative, array0, arrayPositive
|
|
|
196790
196796
|
*/
|
|
196791
196797
|
class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
196792
196798
|
constructor() {
|
|
196793
|
-
/** True to
|
|
196799
|
+
/** True to consolidate adjacent linear geometry into a single LineString3d */
|
|
196794
196800
|
this.consolidateLinearGeometry = true;
|
|
196795
|
-
/** True to consolidate contiguous arcs */
|
|
196801
|
+
/** True to consolidate contiguous compatible arcs into a single Arc3d */
|
|
196796
196802
|
this.consolidateCompatibleArcs = true;
|
|
196797
196803
|
/** Tolerance for collapsing identical points */
|
|
196798
196804
|
this.duplicatePointTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance;
|
|
@@ -199456,24 +199462,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
199456
199462
|
/* harmony export */ "CurveCurveIntersectXY": () => (/* binding */ CurveCurveIntersectXY)
|
|
199457
199463
|
/* harmony export */ });
|
|
199458
199464
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
199459
|
-
/* harmony import */ var
|
|
199465
|
+
/* harmony import */ var _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../bspline/BSplineCurve */ "../../core/geometry/lib/esm/bspline/BSplineCurve.js");
|
|
199460
199466
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
199461
199467
|
/* harmony import */ var _geometry3d_CoincidentGeometryOps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geometry3d/CoincidentGeometryOps */ "../../core/geometry/lib/esm/geometry3d/CoincidentGeometryOps.js");
|
|
199462
199468
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
199463
199469
|
/* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
|
|
199464
199470
|
/* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
|
|
199465
|
-
/* harmony import */ var
|
|
199466
|
-
/* harmony import */ var
|
|
199471
|
+
/* harmony import */ var _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../geometry3d/Point2dVector2d */ "../../core/geometry/lib/esm/geometry3d/Point2dVector2d.js");
|
|
199472
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
199467
199473
|
/* harmony import */ var _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../geometry4d/Point4d */ "../../core/geometry/lib/esm/geometry4d/Point4d.js");
|
|
199468
199474
|
/* harmony import */ var _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../numerics/BezierPolynomials */ "../../core/geometry/lib/esm/numerics/BezierPolynomials.js");
|
|
199469
199475
|
/* harmony import */ var _numerics_Newton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../numerics/Newton */ "../../core/geometry/lib/esm/numerics/Newton.js");
|
|
199470
199476
|
/* harmony import */ var _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../numerics/Polynomials */ "../../core/geometry/lib/esm/numerics/Polynomials.js");
|
|
199471
|
-
/* harmony import */ var
|
|
199472
|
-
/* harmony import */ var
|
|
199477
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
199478
|
+
/* harmony import */ var _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../CurveChainWithDistanceIndex */ "../../core/geometry/lib/esm/curve/CurveChainWithDistanceIndex.js");
|
|
199473
199479
|
/* harmony import */ var _CurveCollection__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
199474
199480
|
/* harmony import */ var _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../CurveLocationDetail */ "../../core/geometry/lib/esm/curve/CurveLocationDetail.js");
|
|
199475
|
-
/* harmony import */ var
|
|
199476
|
-
/* harmony import */ var
|
|
199481
|
+
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
199482
|
+
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
199483
|
+
/* harmony import */ var _Loop__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
199484
|
+
/* harmony import */ var _Path__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
199477
199485
|
/*---------------------------------------------------------------------------------------------
|
|
199478
199486
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
199479
199487
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -199499,6 +199507,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
199499
199507
|
|
|
199500
199508
|
|
|
199501
199509
|
|
|
199510
|
+
|
|
199511
|
+
|
|
199502
199512
|
|
|
199503
199513
|
// cspell:word XYRR
|
|
199504
199514
|
/**
|
|
@@ -199518,9 +199528,11 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
199518
199528
|
*/
|
|
199519
199529
|
constructor(worldToLocal, extendA, geometryB, extendB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
199520
199530
|
super();
|
|
199521
|
-
this.
|
|
199531
|
+
this._extendA0 = extendA;
|
|
199532
|
+
this._extendA1 = extendA;
|
|
199522
199533
|
this._geometryB = geometryB;
|
|
199523
|
-
this.
|
|
199534
|
+
this._extendB0 = extendB;
|
|
199535
|
+
this._extendB1 = extendB;
|
|
199524
199536
|
this._worldToLocalPerspective = undefined;
|
|
199525
199537
|
this._worldToLocalAffine = undefined;
|
|
199526
199538
|
if (worldToLocal !== undefined && !worldToLocal.isIdentity()) {
|
|
@@ -199722,7 +199734,11 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
199722
199734
|
const numRoots = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__.AnalyticRoots.appendImplicitLineUnitCircleIntersections(alpha, beta, gamma, cosines, sines, radians);
|
|
199723
199735
|
for (let i = 0; i < numRoots; i++) {
|
|
199724
199736
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
199725
|
-
|
|
199737
|
+
let arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
|
|
199738
|
+
if (extendB0 && arcFraction > 1)
|
|
199739
|
+
arcFraction -= 2;
|
|
199740
|
+
else if (extendB1 && arcFraction < 0)
|
|
199741
|
+
arcFraction += 2;
|
|
199726
199742
|
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, arcPoint);
|
|
199727
199743
|
if (lineFraction !== undefined &&
|
|
199728
199744
|
this.acceptFraction(extendA0, lineFraction, extendA1) &&
|
|
@@ -199750,7 +199766,11 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
199750
199766
|
const arcFractionTol = 1.0e-7;
|
|
199751
199767
|
for (let i = 0; i < numRoots; i++) {
|
|
199752
199768
|
const arcPoint = data.center.plus2Scaled(data.vector0, cosines.atUncheckedIndex(i), data.vector90, sines.atUncheckedIndex(i));
|
|
199753
|
-
|
|
199769
|
+
let arcFraction = data.sweep.radiansToSignedPeriodicFraction(radians.atUncheckedIndex(i));
|
|
199770
|
+
if (extendB0 && arcFraction > 1)
|
|
199771
|
+
arcFraction -= 2;
|
|
199772
|
+
else if (extendB1 && arcFraction < 0)
|
|
199773
|
+
arcFraction += 2;
|
|
199754
199774
|
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dXYClosestPointUnbounded(pointA0Local, pointA1Local, arcPoint);
|
|
199755
199775
|
if (lineFraction !== undefined &&
|
|
199756
199776
|
this.acceptFraction(extendA0, lineFraction, extendA1, lineFractionTol) &&
|
|
@@ -199766,7 +199786,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
199766
199786
|
* * Arcs are ordered so that matrixA is better conditioned.
|
|
199767
199787
|
*/
|
|
199768
199788
|
dispatchArcArcThisOrder(cpA, // arc closer to being circular
|
|
199769
|
-
matrixA,
|
|
199789
|
+
matrixA, extendA0, extendA1, cpB, matrixB, extendB0, extendB1, reversed) {
|
|
199770
199790
|
// inverseA transforms arcA to its local coordinates, where it is the unit xy-circle.
|
|
199771
199791
|
const inverseA = matrixA.inverse();
|
|
199772
199792
|
if (inverseA) {
|
|
@@ -199781,11 +199801,18 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
199781
199801
|
ellipseRadians, circleRadians);
|
|
199782
199802
|
// the intersections are transform-invariant, so the solution angles apply directly to the input arcs
|
|
199783
199803
|
for (let i = 0; i < ellipseRadians.length; i++) {
|
|
199784
|
-
|
|
199785
|
-
|
|
199786
|
-
if (
|
|
199804
|
+
let fractionA = cpA.sweep.radiansToSignedPeriodicFraction(circleRadians[i]);
|
|
199805
|
+
let fractionB = cpB.sweep.radiansToSignedPeriodicFraction(ellipseRadians[i]);
|
|
199806
|
+
if (extendA0 && fractionA > 1)
|
|
199807
|
+
fractionA -= 2;
|
|
199808
|
+
else if (extendA1 && fractionA < 0)
|
|
199809
|
+
fractionA += 2;
|
|
199810
|
+
if (extendB0 && fractionB > 1)
|
|
199811
|
+
fractionB -= 2;
|
|
199812
|
+
else if (extendB1 && fractionB < 0)
|
|
199813
|
+
fractionB += 2;
|
|
199814
|
+
if (this.acceptFraction(extendA0, fractionA, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1))
|
|
199787
199815
|
this.recordPointWithLocalFractions(fractionA, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
199788
|
-
}
|
|
199789
199816
|
}
|
|
199790
199817
|
}
|
|
199791
199818
|
}
|
|
@@ -199797,7 +199824,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
199797
199824
|
* 4- Find the intersection of arc and unit circle.
|
|
199798
199825
|
* 5- Convert intersection angles to fractions and record intersections.
|
|
199799
199826
|
*/
|
|
199800
|
-
dispatchArcArc(cpA,
|
|
199827
|
+
dispatchArcArc(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
199801
199828
|
let matrixA;
|
|
199802
199829
|
let matrixB;
|
|
199803
199830
|
if (this._worldToLocalPerspective) {
|
|
@@ -199816,9 +199843,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
199816
199843
|
const conditionB = matrixB.conditionNumber();
|
|
199817
199844
|
// pick the arc that is closest to circular.
|
|
199818
199845
|
if (conditionA > conditionB)
|
|
199819
|
-
this.dispatchArcArcThisOrder(cpA, matrixA,
|
|
199846
|
+
this.dispatchArcArcThisOrder(cpA, matrixA, extendA0, extendA1, cpB, matrixB, extendB0, extendB1, reversed);
|
|
199820
199847
|
else
|
|
199821
|
-
this.dispatchArcArcThisOrder(cpB, matrixB,
|
|
199848
|
+
this.dispatchArcArcThisOrder(cpB, matrixB, extendB0, extendB1, cpA, matrixA, extendA0, extendA1, !reversed);
|
|
199822
199849
|
// overlap handling. perspective is not handled.
|
|
199823
199850
|
if (!this._coincidentGeometryContext) {
|
|
199824
199851
|
// do nothing
|
|
@@ -199835,7 +199862,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
199835
199862
|
this.recordPairs(cpA, cpB, pairs, reversed);
|
|
199836
199863
|
}
|
|
199837
199864
|
}
|
|
199838
|
-
dispatchArcBsplineCurve3d(cpA,
|
|
199865
|
+
dispatchArcBsplineCurve3d(cpA, extendA0, extendA1, cpB, extendB0, extendB1, reversed) {
|
|
199839
199866
|
// Arc: X = C + cU + sV
|
|
199840
199867
|
// implicitize the arc as viewed. This "3d" matrix is homogeneous "XYW" not "xyz"
|
|
199841
199868
|
let matrixA;
|
|
@@ -199894,11 +199921,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
199894
199921
|
const bcurvePoint4d = bezier.fractionToPoint4d(root);
|
|
199895
199922
|
const c = bcurvePoint4d.dotProductXYZW(axx, axy, axz, axw);
|
|
199896
199923
|
const s = bcurvePoint4d.dotProductXYZW(ayx, ayy, ayz, ayw);
|
|
199897
|
-
|
|
199898
|
-
if (
|
|
199899
|
-
|
|
199924
|
+
let arcFraction = cpA.sweep.radiansToSignedPeriodicFraction(Math.atan2(s, c));
|
|
199925
|
+
if (extendA0 && arcFraction > 1)
|
|
199926
|
+
arcFraction -= 2;
|
|
199927
|
+
else if (extendA1 && arcFraction < 0)
|
|
199928
|
+
arcFraction += 2;
|
|
199929
|
+
if (this.acceptFraction(extendA0, arcFraction, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1))
|
|
199900
199930
|
this.recordPointWithLocalFractions(arcFraction, cpA, 0, 1, fractionB, cpB, 0, 1, reversed);
|
|
199901
|
-
}
|
|
199902
199931
|
}
|
|
199903
199932
|
}
|
|
199904
199933
|
}
|
|
@@ -200047,7 +200076,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200047
200076
|
// Caller accesses data from segment and bsplineCurve.
|
|
200048
200077
|
// Selects the best conditioned arc (in xy parts) as "circle after inversion".
|
|
200049
200078
|
// Solves the arc-arc equations.
|
|
200050
|
-
dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve,
|
|
200079
|
+
dispatchSegmentBsplineCurve(cpA, extendA0, pointA0, fractionA0, pointA1, fractionA1, extendA1, bcurve, extendB0, extendB1, reversed) {
|
|
200051
200080
|
const pointA0H = this.projectPoint(pointA0);
|
|
200052
200081
|
const pointA1H = this.projectPoint(pointA1);
|
|
200053
200082
|
const planeCoffs = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.createPlanePointPointZ(pointA0H, pointA1H);
|
|
@@ -200064,14 +200093,14 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200064
200093
|
const curvePointH = this.projectPoint(curvePoint);
|
|
200065
200094
|
const lineFraction = _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_5__.SmallSystem.lineSegment3dHXYClosestPointUnbounded(pointA0H, pointA1H, curvePointH);
|
|
200066
200095
|
if (lineFraction !== undefined) {
|
|
200067
|
-
if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(
|
|
200096
|
+
if (this.acceptFraction(extendA0, lineFraction, extendA1) && this.acceptFraction(extendB0, fractionB, extendB1)) {
|
|
200068
200097
|
this.recordPointWithLocalFractions(lineFraction, cpA, fractionA0, fractionA1, fractionB, bcurve, 0, 1, reversed);
|
|
200069
200098
|
}
|
|
200070
200099
|
}
|
|
200071
200100
|
}
|
|
200072
200101
|
}
|
|
200073
200102
|
/** Low level dispatch of linestring with (beziers of) a bspline curve. */
|
|
200074
|
-
dispatchLineStringBSplineCurve(lsA,
|
|
200103
|
+
dispatchLineStringBSplineCurve(lsA, extendA0, extendA1, curveB, extendB0, extendB1, reversed) {
|
|
200075
200104
|
const numA = lsA.numPoints();
|
|
200076
200105
|
if (numA > 1) {
|
|
200077
200106
|
const dfA = 1.0 / (numA - 1);
|
|
@@ -200084,13 +200113,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200084
200113
|
for (let iA = 1; iA < numA; iA++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
200085
200114
|
lsA.pointAt(iA, pointA1);
|
|
200086
200115
|
fA1 = iA * dfA;
|
|
200087
|
-
this.dispatchSegmentBsplineCurve(lsA, iA === 1 &&
|
|
200116
|
+
this.dispatchSegmentBsplineCurve(lsA, iA === 1 && extendA0, pointA0, fA0, pointA1, fA1, (iA + 1) === numA && extendA1, curveB, extendB0, extendB1, reversed);
|
|
200088
200117
|
}
|
|
200089
200118
|
}
|
|
200090
200119
|
return undefined;
|
|
200091
200120
|
}
|
|
200092
200121
|
/** Detail computation for segment intersecting linestring. */
|
|
200093
|
-
computeSegmentLineString(lsA,
|
|
200122
|
+
computeSegmentLineString(lsA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
|
|
200094
200123
|
const pointA0 = lsA.point0Ref;
|
|
200095
200124
|
const pointA1 = lsA.point1Ref;
|
|
200096
200125
|
const pointB0 = CurveCurveIntersectXY._workPointBB0;
|
|
@@ -200105,13 +200134,13 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200105
200134
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
200106
200135
|
lsB.pointAt(ib, pointB1);
|
|
200107
200136
|
fB1 = ib * dfB;
|
|
200108
|
-
this.dispatchSegmentSegment(lsA,
|
|
200137
|
+
this.dispatchSegmentSegment(lsA, extendA0, pointA0, 0.0, pointA1, 1.0, extendA1, lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, reversed);
|
|
200109
200138
|
}
|
|
200110
200139
|
}
|
|
200111
200140
|
return undefined;
|
|
200112
200141
|
}
|
|
200113
200142
|
/** Detail computation for arc intersecting linestring. */
|
|
200114
|
-
computeArcLineString(arcA,
|
|
200143
|
+
computeArcLineString(arcA, extendA0, extendA1, lsB, extendB0, extendB1, reversed) {
|
|
200115
200144
|
const pointB0 = CurveCurveIntersectXY._workPointBB0;
|
|
200116
200145
|
const pointB1 = CurveCurveIntersectXY._workPointBB1;
|
|
200117
200146
|
const numB = lsB.numPoints();
|
|
@@ -200124,7 +200153,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200124
200153
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
200125
200154
|
lsB.pointAt(ib, pointB1);
|
|
200126
200155
|
fB1 = ib * dfB;
|
|
200127
|
-
this.dispatchSegmentArc(lsB, ib === 1 &&
|
|
200156
|
+
this.dispatchSegmentArc(lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, arcA, extendA0, extendA1, !reversed);
|
|
200128
200157
|
}
|
|
200129
200158
|
}
|
|
200130
200159
|
return undefined;
|
|
@@ -200145,8 +200174,10 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200145
200174
|
let fB0;
|
|
200146
200175
|
let fA1;
|
|
200147
200176
|
let fB1;
|
|
200148
|
-
const
|
|
200149
|
-
const
|
|
200177
|
+
const extendA0 = this._extendA0;
|
|
200178
|
+
const extendA1 = this._extendA1;
|
|
200179
|
+
const extendB0 = this._extendB0;
|
|
200180
|
+
const extendB1 = this._extendB1;
|
|
200150
200181
|
lsA.pointAt(0, pointA0);
|
|
200151
200182
|
for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
|
|
200152
200183
|
fA1 = ia * dfA;
|
|
@@ -200156,7 +200187,7 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200156
200187
|
for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1) {
|
|
200157
200188
|
lsB.pointAt(ib, pointB1);
|
|
200158
200189
|
fB1 = ib * dfB;
|
|
200159
|
-
this.dispatchSegmentSegment(lsA, ia === 1 &&
|
|
200190
|
+
this.dispatchSegmentSegment(lsA, ia === 1 && extendA0, pointA0, fA0, pointA1, fA1, (ia + 1) === numA && extendA1, lsB, ib === 1 && extendB0, pointB0, fB0, pointB1, fB1, (ib + 1) === numB && extendB1, reversed);
|
|
200160
200191
|
}
|
|
200161
200192
|
}
|
|
200162
200193
|
}
|
|
@@ -200167,120 +200198,172 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200167
200198
|
transform.multiplyPoint3d(pointB0, this._workPointB0);
|
|
200168
200199
|
transform.multiplyPoint3d(pointB1, this._workPointB1);
|
|
200169
200200
|
}
|
|
200170
|
-
/**
|
|
200201
|
+
/**
|
|
200202
|
+
* Low level dispatch of curve collection.
|
|
200203
|
+
* We take care of extend variables of geometry's children here if geometry is Path or Loop.
|
|
200204
|
+
*/
|
|
200171
200205
|
dispatchCurveCollection(geomA, geomAHandler) {
|
|
200172
200206
|
const geomB = this._geometryB; // save
|
|
200173
200207
|
if (!geomB || !geomB.children || !(geomB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection))
|
|
200174
200208
|
return;
|
|
200175
|
-
|
|
200176
|
-
|
|
200209
|
+
const children = geomB.children;
|
|
200210
|
+
const extendB0 = this._extendB0; // save
|
|
200211
|
+
const extendB1 = this._extendB1; // save
|
|
200212
|
+
for (let i = 0; i < children.length; i++) {
|
|
200213
|
+
this.resetGeometry(children[i]);
|
|
200214
|
+
if (geomB instanceof _Path__WEBPACK_IMPORTED_MODULE_12__.Path) {
|
|
200215
|
+
if (i === 0) // first child only extends from start
|
|
200216
|
+
this._extendB1 = false;
|
|
200217
|
+
else if (i === children.length - 1) // last child only extends from end
|
|
200218
|
+
this._extendB0 = false;
|
|
200219
|
+
else { // middle children do not extend
|
|
200220
|
+
this._extendB0 = false;
|
|
200221
|
+
this._extendB1 = false;
|
|
200222
|
+
}
|
|
200223
|
+
}
|
|
200224
|
+
else if (geomB instanceof _Loop__WEBPACK_IMPORTED_MODULE_13__.Loop) { // Loop never extends
|
|
200225
|
+
this._extendB0 = false;
|
|
200226
|
+
this._extendB1 = false;
|
|
200227
|
+
}
|
|
200177
200228
|
geomAHandler(geomA);
|
|
200229
|
+
this._extendB0 = extendB0; // restore
|
|
200230
|
+
this._extendB1 = extendB1; // restore
|
|
200178
200231
|
}
|
|
200179
|
-
this.
|
|
200232
|
+
this.resetGeometry(geomB); // restore
|
|
200180
200233
|
}
|
|
200181
|
-
/**
|
|
200234
|
+
/**
|
|
200235
|
+
* Low level dispatch of CurveChainWithDistanceIndex.
|
|
200236
|
+
* We take care of extend variables of geometry's children here if geometry.path is Path or Loop.
|
|
200237
|
+
*/
|
|
200182
200238
|
dispatchCurveChainWithDistanceIndex(geomA, geomAHandler) {
|
|
200183
|
-
if (!this._geometryB || !(this._geometryB instanceof
|
|
200239
|
+
if (!this._geometryB || !(this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex))
|
|
200184
200240
|
return;
|
|
200185
|
-
if (geomA instanceof
|
|
200241
|
+
if (geomA instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
200186
200242
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!"call handleCurveChainWithDistanceIndex(geomA) instead");
|
|
200187
200243
|
return;
|
|
200188
200244
|
}
|
|
200189
200245
|
const index0 = this._results.length;
|
|
200190
200246
|
const geomB = this._geometryB; // save
|
|
200191
|
-
|
|
200192
|
-
|
|
200193
|
-
geomAHandler(geomA);
|
|
200194
|
-
}
|
|
200247
|
+
this.resetGeometry(geomB.path);
|
|
200248
|
+
this.dispatchCurveCollection(geomA, geomAHandler);
|
|
200195
200249
|
this.resetGeometry(geomB); // restore
|
|
200196
|
-
this._results =
|
|
200250
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, index0, undefined, geomB, true);
|
|
200251
|
+
}
|
|
200252
|
+
/**
|
|
200253
|
+
* Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children`.
|
|
200254
|
+
* We take care of extend variables of geometry's children here if geometry is Path or Loop.
|
|
200255
|
+
*/
|
|
200256
|
+
handleChildren(g) {
|
|
200257
|
+
const children = g.children;
|
|
200258
|
+
const extendA0 = this._extendA0; // save
|
|
200259
|
+
const extendA1 = this._extendA1; // save
|
|
200260
|
+
if (children)
|
|
200261
|
+
for (let i = 0; i < children.length; i++) {
|
|
200262
|
+
if (g instanceof _Path__WEBPACK_IMPORTED_MODULE_12__.Path) {
|
|
200263
|
+
if (i === 0) // first child only extends from start
|
|
200264
|
+
this._extendA1 = false;
|
|
200265
|
+
else if (i === children.length - 1) // last child only extends from end
|
|
200266
|
+
this._extendA0 = false;
|
|
200267
|
+
else { // middle children do not extend
|
|
200268
|
+
this._extendA0 = false;
|
|
200269
|
+
this._extendA1 = false;
|
|
200270
|
+
}
|
|
200271
|
+
}
|
|
200272
|
+
else if (g instanceof _Loop__WEBPACK_IMPORTED_MODULE_13__.Loop) { // Loop never extends
|
|
200273
|
+
this._extendA0 = false;
|
|
200274
|
+
this._extendA1 = false;
|
|
200275
|
+
}
|
|
200276
|
+
children[i].dispatchToGeometryHandler(this);
|
|
200277
|
+
this._extendA0 = extendA0; // restore
|
|
200278
|
+
this._extendA1 = extendA1; // restore
|
|
200279
|
+
}
|
|
200197
200280
|
}
|
|
200198
200281
|
/** Double dispatch handler for strongly typed segment. */
|
|
200199
200282
|
handleLineSegment3d(segmentA) {
|
|
200200
|
-
if (this._geometryB instanceof
|
|
200283
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d) {
|
|
200201
200284
|
const segmentB = this._geometryB;
|
|
200202
|
-
this.dispatchSegmentSegment(segmentA, this.
|
|
200285
|
+
this.dispatchSegmentSegment(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, segmentB, this._extendB0, segmentB.point0Ref, 0.0, segmentB.point1Ref, 1.0, this._extendB1, false);
|
|
200203
200286
|
}
|
|
200204
|
-
else if (this._geometryB instanceof
|
|
200205
|
-
this.computeSegmentLineString(segmentA, this.
|
|
200287
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
|
|
200288
|
+
this.computeSegmentLineString(segmentA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
200206
200289
|
}
|
|
200207
|
-
else if (this._geometryB instanceof
|
|
200208
|
-
this.dispatchSegmentArc(segmentA, this.
|
|
200290
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_17__.Arc3d) {
|
|
200291
|
+
this.dispatchSegmentArc(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
200209
200292
|
}
|
|
200210
|
-
else if (this._geometryB instanceof
|
|
200211
|
-
this.dispatchSegmentBsplineCurve(segmentA, this.
|
|
200293
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__.BSplineCurve3d) {
|
|
200294
|
+
this.dispatchSegmentBsplineCurve(segmentA, this._extendA0, segmentA.point0Ref, 0.0, segmentA.point1Ref, 1.0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
200212
200295
|
}
|
|
200213
200296
|
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
200214
200297
|
this.dispatchCurveCollection(segmentA, this.handleLineSegment3d.bind(this));
|
|
200215
200298
|
}
|
|
200216
|
-
else if (this._geometryB instanceof
|
|
200299
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
200217
200300
|
this.dispatchCurveChainWithDistanceIndex(segmentA, this.handleLineSegment3d.bind(this));
|
|
200218
200301
|
}
|
|
200219
200302
|
return undefined;
|
|
200220
200303
|
}
|
|
200221
200304
|
/** Double dispatch handler for strongly typed linestring. */
|
|
200222
200305
|
handleLineString3d(lsA) {
|
|
200223
|
-
if (this._geometryB instanceof
|
|
200306
|
+
if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
|
|
200224
200307
|
const lsB = this._geometryB;
|
|
200225
200308
|
this.computeLineStringLineString(lsA, lsB, false);
|
|
200226
200309
|
}
|
|
200227
|
-
else if (this._geometryB instanceof
|
|
200228
|
-
this.computeSegmentLineString(this._geometryB, this.
|
|
200310
|
+
else if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d) {
|
|
200311
|
+
this.computeSegmentLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
200229
200312
|
}
|
|
200230
|
-
else if (this._geometryB instanceof
|
|
200231
|
-
this.computeArcLineString(this._geometryB, this.
|
|
200313
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_17__.Arc3d) {
|
|
200314
|
+
this.computeArcLineString(this._geometryB, this._extendB0, this._extendB1, lsA, this._extendA0, this._extendA1, true);
|
|
200232
200315
|
}
|
|
200233
|
-
else if (this._geometryB instanceof
|
|
200234
|
-
this.dispatchLineStringBSplineCurve(lsA, this.
|
|
200316
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__.BSplineCurve3d) {
|
|
200317
|
+
this.dispatchLineStringBSplineCurve(lsA, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
200235
200318
|
}
|
|
200236
200319
|
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
200237
200320
|
this.dispatchCurveCollection(lsA, this.handleLineString3d.bind(this));
|
|
200238
200321
|
}
|
|
200239
|
-
else if (this._geometryB instanceof
|
|
200322
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
200240
200323
|
this.dispatchCurveChainWithDistanceIndex(lsA, this.handleLineString3d.bind(this));
|
|
200241
200324
|
}
|
|
200242
200325
|
return undefined;
|
|
200243
200326
|
}
|
|
200244
200327
|
/** Double dispatch handler for strongly typed arc. */
|
|
200245
200328
|
handleArc3d(arc0) {
|
|
200246
|
-
if (this._geometryB instanceof
|
|
200247
|
-
this.dispatchSegmentArc(this._geometryB, this.
|
|
200329
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d) {
|
|
200330
|
+
this.dispatchSegmentArc(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, arc0, this._extendA0, this._extendA1, true);
|
|
200248
200331
|
}
|
|
200249
|
-
else if (this._geometryB instanceof
|
|
200250
|
-
this.computeArcLineString(arc0, this.
|
|
200332
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
|
|
200333
|
+
this.computeArcLineString(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
200251
200334
|
}
|
|
200252
|
-
else if (this._geometryB instanceof
|
|
200253
|
-
this.dispatchArcArc(arc0, this.
|
|
200335
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_17__.Arc3d) {
|
|
200336
|
+
this.dispatchArcArc(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
200254
200337
|
}
|
|
200255
|
-
else if (this._geometryB instanceof
|
|
200256
|
-
this.dispatchArcBsplineCurve3d(arc0, this.
|
|
200338
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__.BSplineCurve3d) {
|
|
200339
|
+
this.dispatchArcBsplineCurve3d(arc0, this._extendA0, this._extendA1, this._geometryB, this._extendB0, this._extendB1, false);
|
|
200257
200340
|
}
|
|
200258
200341
|
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
200259
200342
|
this.dispatchCurveCollection(arc0, this.handleArc3d.bind(this));
|
|
200260
200343
|
}
|
|
200261
|
-
else if (this._geometryB instanceof
|
|
200344
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
200262
200345
|
this.dispatchCurveChainWithDistanceIndex(arc0, this.handleArc3d.bind(this));
|
|
200263
200346
|
}
|
|
200264
200347
|
return undefined;
|
|
200265
200348
|
}
|
|
200266
200349
|
/** Double dispatch handler for strongly typed bspline curve. */
|
|
200267
200350
|
handleBSplineCurve3d(curve) {
|
|
200268
|
-
if (this._geometryB instanceof
|
|
200269
|
-
this.dispatchSegmentBsplineCurve(this._geometryB, this.
|
|
200351
|
+
if (this._geometryB instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d) {
|
|
200352
|
+
this.dispatchSegmentBsplineCurve(this._geometryB, this._extendB0, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
200270
200353
|
}
|
|
200271
|
-
else if (this._geometryB instanceof
|
|
200272
|
-
this.dispatchLineStringBSplineCurve(this._geometryB, this.
|
|
200354
|
+
else if (this._geometryB instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_16__.LineString3d) {
|
|
200355
|
+
this.dispatchLineStringBSplineCurve(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
200273
200356
|
}
|
|
200274
|
-
else if (this._geometryB instanceof
|
|
200275
|
-
this.dispatchArcBsplineCurve3d(this._geometryB, this.
|
|
200357
|
+
else if (this._geometryB instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_17__.Arc3d) {
|
|
200358
|
+
this.dispatchArcBsplineCurve3d(this._geometryB, this._extendB0, this._extendB1, curve, this._extendA0, this._extendA1, true);
|
|
200276
200359
|
}
|
|
200277
|
-
else if (this._geometryB instanceof
|
|
200360
|
+
else if (this._geometryB instanceof _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_18__.BSplineCurve3dBase) {
|
|
200278
200361
|
this.dispatchBSplineCurve3dBSplineCurve3d(curve, this._geometryB, false);
|
|
200279
200362
|
}
|
|
200280
200363
|
else if (this._geometryB instanceof _CurveCollection__WEBPACK_IMPORTED_MODULE_11__.CurveCollection) {
|
|
200281
200364
|
this.dispatchCurveCollection(curve, this.handleBSplineCurve3d.bind(this));
|
|
200282
200365
|
}
|
|
200283
|
-
else if (this._geometryB instanceof
|
|
200366
|
+
else if (this._geometryB instanceof _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex) {
|
|
200284
200367
|
this.dispatchCurveChainWithDistanceIndex(curve, this.handleBSplineCurve3d.bind(this));
|
|
200285
200368
|
}
|
|
200286
200369
|
return undefined;
|
|
@@ -200289,9 +200372,9 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200289
200372
|
handleCurveChainWithDistanceIndex(chain) {
|
|
200290
200373
|
super.handleCurveChainWithDistanceIndex(chain);
|
|
200291
200374
|
// if _geometryB is also a CurveChainWithDistanceIndex, it will already have been converted by dispatchCurveChainWithDistanceIndex
|
|
200292
|
-
this._results =
|
|
200375
|
+
this._results = _CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_14__.CurveChainWithDistanceIndex.convertChildDetailToChainDetail(this._results, 0, chain, undefined, true);
|
|
200293
200376
|
}
|
|
200294
|
-
/** Double dispatch handler for strongly typed homogeneous bspline curve
|
|
200377
|
+
/** Double dispatch handler for strongly typed homogeneous bspline curve. */
|
|
200295
200378
|
handleBSplineCurve3dH(_curve) {
|
|
200296
200379
|
/*
|
|
200297
200380
|
// NEEDS WORK -- make "dispatch" methods tolerant of both 3d and 3dH .
|
|
@@ -200309,19 +200392,19 @@ class CurveCurveIntersectXY extends _geometry3d_GeometryHandler__WEBPACK_IMPORTE
|
|
|
200309
200392
|
return undefined;
|
|
200310
200393
|
}
|
|
200311
200394
|
}
|
|
200312
|
-
CurveCurveIntersectXY._workVector2dA =
|
|
200395
|
+
CurveCurveIntersectXY._workVector2dA = _geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_19__.Vector2d.create();
|
|
200313
200396
|
CurveCurveIntersectXY._workPointA0H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.create();
|
|
200314
200397
|
CurveCurveIntersectXY._workPointA1H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.create();
|
|
200315
200398
|
CurveCurveIntersectXY._workPointB0H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.create();
|
|
200316
200399
|
CurveCurveIntersectXY._workPointB1H = _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_9__.Point4d.create();
|
|
200317
|
-
CurveCurveIntersectXY._workPointAA0 =
|
|
200318
|
-
CurveCurveIntersectXY._workPointAA1 =
|
|
200319
|
-
CurveCurveIntersectXY._workPointBB0 =
|
|
200320
|
-
CurveCurveIntersectXY._workPointBB1 =
|
|
200321
|
-
CurveCurveIntersectXY._workPointA0 =
|
|
200322
|
-
CurveCurveIntersectXY._workPointA1 =
|
|
200323
|
-
CurveCurveIntersectXY._workPointB0 =
|
|
200324
|
-
CurveCurveIntersectXY._workPointB1 =
|
|
200400
|
+
CurveCurveIntersectXY._workPointAA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
200401
|
+
CurveCurveIntersectXY._workPointAA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
200402
|
+
CurveCurveIntersectXY._workPointBB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
200403
|
+
CurveCurveIntersectXY._workPointBB1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
200404
|
+
CurveCurveIntersectXY._workPointA0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
200405
|
+
CurveCurveIntersectXY._workPointA1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
200406
|
+
CurveCurveIntersectXY._workPointB0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
200407
|
+
CurveCurveIntersectXY._workPointB1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_20__.Point3d.create();
|
|
200325
200408
|
|
|
200326
200409
|
|
|
200327
200410
|
/***/ }),
|
|
@@ -210012,14 +210095,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
210012
210095
|
/* harmony export */ "NullGeometryHandler": () => (/* binding */ NullGeometryHandler),
|
|
210013
210096
|
/* harmony export */ "RecurseToCurvesGeometryHandler": () => (/* binding */ RecurseToCurvesGeometryHandler)
|
|
210014
210097
|
/* harmony export */ });
|
|
210015
|
-
/* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
210016
|
-
/* harmony import */ var _curve_Path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../curve/Path */ "../../core/geometry/lib/esm/curve/Path.js");
|
|
210017
210098
|
/*---------------------------------------------------------------------------------------------
|
|
210018
210099
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
210019
210100
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
210020
210101
|
*--------------------------------------------------------------------------------------------*/
|
|
210021
|
-
|
|
210022
|
-
|
|
210023
210102
|
/**
|
|
210024
210103
|
* `GeometryHandler` defines the base abstract methods for double-dispatch geometry computation.
|
|
210025
210104
|
* * User code that wants to handle one or all of the commonly known geometry types implements a handler class.
|
|
@@ -210052,11 +210131,7 @@ class GeometryHandler {
|
|
|
210052
210131
|
}
|
|
210053
210132
|
/** Handle strongly typed [[CurveChainWithDistanceIndex]] (base class method calls [[handlePath]] or [[handleLoop]]) */
|
|
210054
210133
|
handleCurveChainWithDistanceIndex(g) {
|
|
210055
|
-
|
|
210056
|
-
return this.handlePath(g.path);
|
|
210057
|
-
if (g.path instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_1__.Loop)
|
|
210058
|
-
return this.handleLoop(g.path);
|
|
210059
|
-
return this.handleCurveCollection(g.path);
|
|
210134
|
+
return this.handlePath(g.path);
|
|
210060
210135
|
}
|
|
210061
210136
|
}
|
|
210062
210137
|
/**
|
|
@@ -222824,9 +222899,9 @@ class PolylineCompressionContext {
|
|
|
222824
222899
|
* @param points
|
|
222825
222900
|
* @param perpendicularDistance
|
|
222826
222901
|
*/
|
|
222827
|
-
static compressColinearWrapInPlace(points,
|
|
222902
|
+
static compressColinearWrapInPlace(points, duplicatePointTolerance, colinearPointTolerance) {
|
|
222828
222903
|
const lastIndex = points.length - 1;
|
|
222829
|
-
if (lastIndex >= 3 && points[0].distance(points[lastIndex]) <
|
|
222904
|
+
if (lastIndex >= 3 && points[0].distance(points[lastIndex]) < duplicatePointTolerance) {
|
|
222830
222905
|
// indices of 3 points potentially colinear.
|
|
222831
222906
|
const indexA = lastIndex - 1;
|
|
222832
222907
|
const indexB = 0;
|
|
@@ -222838,7 +222913,7 @@ class PolylineCompressionContext {
|
|
|
222838
222913
|
const fraction = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.conditionalDivideFraction(uDotV, uDotU);
|
|
222839
222914
|
if (fraction !== undefined && fraction > 0.0 && fraction < 1.0) {
|
|
222840
222915
|
const h2 = vectorV.magnitudeSquared() - fraction * fraction * uDotU;
|
|
222841
|
-
if (Math.sqrt(Math.abs(h2)) <
|
|
222916
|
+
if (Math.sqrt(Math.abs(h2)) < colinearPointTolerance) {
|
|
222842
222917
|
points[0] = points[indexA];
|
|
222843
222918
|
points.pop();
|
|
222844
222919
|
}
|
|
@@ -301877,7 +301952,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
301877
301952
|
/***/ ((module) => {
|
|
301878
301953
|
|
|
301879
301954
|
"use strict";
|
|
301880
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.9.0-dev.
|
|
301955
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.9.0-dev.19","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.9.0-dev.19","@itwin/core-bentley":"workspace:^4.9.0-dev.19","@itwin/core-common":"workspace:^4.9.0-dev.19","@itwin/core-geometry":"workspace:^4.9.0-dev.19","@itwin/core-orbitgt":"workspace:^4.9.0-dev.19","@itwin/core-quantity":"workspace:^4.9.0-dev.19"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.2","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.3.3","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.2.5","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
301881
301956
|
|
|
301882
301957
|
/***/ })
|
|
301883
301958
|
|