@itwin/rpcinterface-full-stack-tests 4.1.0-dev.3 → 4.1.0-dev.5
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/_a8a9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +622 -458
- 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/object-storage-azure.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_6_0_node_modules_itwin_obj-0f69b1.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_3_node_modules_loaders_gl_draco_di-28f62e.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -75368,9 +75368,13 @@ class AccuSnap {
|
|
|
75368
75368
|
this.aSnapHits.removeCurrentHit();
|
|
75369
75369
|
hit = await this.getAccuSnapDetail(this.aSnapHits, out);
|
|
75370
75370
|
}
|
|
75371
|
+
if (!this._doSnapping)
|
|
75372
|
+
hit = undefined; // Snap no longer requested...
|
|
75371
75373
|
}
|
|
75372
75374
|
else if (this.isLocateEnabled) {
|
|
75373
75375
|
hit = await this.findLocatableHit(ev, false, out); // get next AccuSnap path (or undefined)
|
|
75376
|
+
if (!this.isLocateEnabled)
|
|
75377
|
+
hit = undefined; // Hit no longer requested...
|
|
75374
75378
|
}
|
|
75375
75379
|
// set the current hit
|
|
75376
75380
|
if (hit || this.currHit)
|
|
@@ -75391,9 +75395,13 @@ class AccuSnap {
|
|
|
75391
75395
|
if (this._doSnapping) {
|
|
75392
75396
|
out.snapStatus = this.findHits(ev);
|
|
75393
75397
|
hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
|
|
75398
|
+
if (!this._doSnapping)
|
|
75399
|
+
hit = undefined; // Snap no longer requested...
|
|
75394
75400
|
}
|
|
75395
75401
|
else if (this.isLocateEnabled) {
|
|
75396
75402
|
hit = await this.findLocatableHit(ev, true, out);
|
|
75403
|
+
if (!this.isLocateEnabled)
|
|
75404
|
+
hit = undefined; // Hit no longer requested...
|
|
75397
75405
|
}
|
|
75398
75406
|
}
|
|
75399
75407
|
// set the current hit and display the sprite (based on snap's KeypointType)
|
|
@@ -180792,58 +180800,61 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
180792
180800
|
|
|
180793
180801
|
/**
|
|
180794
180802
|
* Circular or elliptic arc.
|
|
180795
|
-
*
|
|
180796
180803
|
* * The angle to point equation is:
|
|
180797
|
-
*
|
|
180798
|
-
* * `X = center + cos(theta) * vector0 + sin(theta) * vector90`
|
|
180804
|
+
* * `X = center + cos(theta) * vector0 + sin(theta) * vector90`
|
|
180799
180805
|
* * When the two vectors are perpendicular and have equal length, it is a true circle.
|
|
180800
180806
|
* * Non-perpendicular vectors are always elliptic.
|
|
180801
|
-
* *
|
|
180807
|
+
* * Vectors of unequal length are always elliptic.
|
|
180802
180808
|
* * To create an ellipse in the common "major and minor axis" form of an ellipse:
|
|
180803
180809
|
* ** vector0 is the vector from the center to the major axis extreme.
|
|
180804
180810
|
* ** vector90 is the vector from the center to the minor axis extreme.
|
|
180805
|
-
* ** note
|
|
180806
|
-
* *
|
|
180807
|
-
* * The unrestricted form is much easier to work with for common calculations -- stroking, projection to 2d,
|
|
180811
|
+
* ** note that constructing the vectors to the extreme points makes them perpendicular.
|
|
180812
|
+
* * The method toScaledMatrix3d() can be called to convert the unrestricted vector0,vector90 to perpendicular form.
|
|
180813
|
+
* * The unrestricted form is much easier to work with for common calculations -- stroking, projection to 2d,
|
|
180814
|
+
* intersection with plane.
|
|
180808
180815
|
* @public
|
|
180809
180816
|
*/
|
|
180810
180817
|
class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive {
|
|
180811
|
-
/**
|
|
180812
|
-
|
|
180813
|
-
|
|
180814
|
-
|
|
180815
|
-
/**
|
|
180816
|
-
|
|
180817
|
-
|
|
180818
|
-
|
|
180819
|
-
/**
|
|
180820
|
-
|
|
180821
|
-
|
|
180822
|
-
|
|
180823
|
-
/**
|
|
180824
|
-
|
|
180825
|
-
|
|
180826
|
-
|
|
180827
|
-
/**
|
|
180828
|
-
|
|
180829
|
-
|
|
180830
|
-
|
|
180831
|
-
/**
|
|
180832
|
-
|
|
180833
|
-
|
|
180834
|
-
|
|
180835
|
-
/**
|
|
180836
|
-
|
|
180837
|
-
|
|
180838
|
-
|
|
180818
|
+
/** Test if this and other are both instances of Arc3d. */
|
|
180819
|
+
isSameGeometryClass(other) {
|
|
180820
|
+
return other instanceof Arc3d;
|
|
180821
|
+
}
|
|
180822
|
+
/** Read property for (clone of) center */
|
|
180823
|
+
get center() {
|
|
180824
|
+
return this._center.clone();
|
|
180825
|
+
}
|
|
180826
|
+
/** Read property for (clone of) vector0 */
|
|
180827
|
+
get vector0() {
|
|
180828
|
+
return this._matrix.columnX();
|
|
180829
|
+
}
|
|
180830
|
+
/** Read property for (clone of) vector90 */
|
|
180831
|
+
get vector90() {
|
|
180832
|
+
return this._matrix.columnY();
|
|
180833
|
+
}
|
|
180834
|
+
/** Read property for (clone of) plane normal, with arbitrary length. */
|
|
180835
|
+
get perpendicularVector() {
|
|
180836
|
+
return this._matrix.columnZ();
|
|
180837
|
+
}
|
|
180838
|
+
/** Read property for (clone of) matrix of vector0, vector90, unit normal */
|
|
180839
|
+
matrixClone() {
|
|
180840
|
+
return this._matrix.clone();
|
|
180841
|
+
}
|
|
180842
|
+
/** Read property for (reference to) matrix of vector0, vector90, unit normal */
|
|
180843
|
+
get matrixRef() {
|
|
180844
|
+
return this._matrix;
|
|
180845
|
+
}
|
|
180839
180846
|
/** Sweep of the angle. */
|
|
180840
|
-
get sweep() {
|
|
180841
|
-
|
|
180842
|
-
|
|
180843
|
-
|
|
180844
|
-
|
|
180845
|
-
|
|
180846
|
-
|
|
180847
|
+
get sweep() {
|
|
180848
|
+
return this._sweep;
|
|
180849
|
+
}
|
|
180850
|
+
set sweep(value) {
|
|
180851
|
+
this._sweep.setFrom(value);
|
|
180852
|
+
}
|
|
180853
|
+
/** An Arc3d extends along its complete elliptic arc */
|
|
180854
|
+
get isExtensibleFractionSpace() {
|
|
180855
|
+
return true;
|
|
180856
|
+
}
|
|
180857
|
+
// constructor copies the pointers
|
|
180847
180858
|
constructor(center, matrix, sweep) {
|
|
180848
180859
|
super();
|
|
180849
180860
|
/** String name for schema properties */
|
|
@@ -180853,7 +180864,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
180853
180864
|
this._sweep = sweep;
|
|
180854
180865
|
}
|
|
180855
180866
|
/**
|
|
180856
|
-
*
|
|
180867
|
+
* Return a clone of the arc, with transform applied
|
|
180857
180868
|
* @param transform
|
|
180858
180869
|
*/
|
|
180859
180870
|
cloneTransformed(transform) {
|
|
@@ -180881,9 +180892,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
180881
180892
|
set(center, matrix, sweep) {
|
|
180882
180893
|
this.setRefs(center.clone(), matrix.clone(), sweep ? sweep.clone() : _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_1__.AngleSweep.create360());
|
|
180883
180894
|
}
|
|
180884
|
-
/**
|
|
180885
|
-
* Copy center, matrix, and sweep from other Arc3d.
|
|
180886
|
-
*/
|
|
180895
|
+
/** Copy center, matrix, and sweep from other Arc3d */
|
|
180887
180896
|
setFrom(other) {
|
|
180888
180897
|
this._center.setFrom(other._center);
|
|
180889
180898
|
this._matrix.setFrom(other._matrix);
|
|
@@ -180941,11 +180950,12 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
180941
180950
|
* @param result optional preallocated result
|
|
180942
180951
|
*/
|
|
180943
180952
|
static create(center, vector0, vector90, sweep, result) {
|
|
180944
|
-
const normal = vector0.unitCrossProductWithDefault(vector90, 0, 0, 0); // normal will be 000 for degenerate case
|
|
180953
|
+
const normal = vector0.unitCrossProductWithDefault(vector90, 0, 0, 0); // normal will be 000 for degenerate case
|
|
180945
180954
|
const matrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createColumns(vector0, vector90, normal);
|
|
180946
180955
|
return Arc3d.createRefs(center !== undefined ? center.clone() : _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create(0, 0, 0), matrix, sweep ? sweep.clone() : _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_1__.AngleSweep.create360(), result);
|
|
180947
180956
|
}
|
|
180948
|
-
/**
|
|
180957
|
+
/**
|
|
180958
|
+
* Return a clone of this arc, projected to given z value.
|
|
180949
180959
|
* * If `z` is omitted, the clone is at the z of the center.
|
|
180950
180960
|
* * Note that projection to fixed z can change circle into ellipse (and (rarely) ellipse to circle)
|
|
180951
180961
|
*/
|
|
@@ -180955,7 +180965,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
180955
180965
|
return Arc3d.createXYZXYZXYZ(this._center.x, this._center.y, this._center.z, this._matrix.coffs[0], this._matrix.coffs[3], 0, this._matrix.coffs[1], this._matrix.coffs[4], 0, this._sweep);
|
|
180956
180966
|
}
|
|
180957
180967
|
/**
|
|
180958
|
-
* Create an arc by center (cx,cy,xz) with vectors (ux,uy,uz) and (vx,vy,vz) to points at 0 and 90 degrees in
|
|
180968
|
+
* Create an arc by center (cx,cy,xz) with vectors (ux,uy,uz) and (vx,vy,vz) to points at 0 and 90 degrees in
|
|
180969
|
+
* parameter space.
|
|
180959
180970
|
* @param result optional preallocated result
|
|
180960
180971
|
*/
|
|
180961
180972
|
static createXYZXYZXYZ(cx, cy, cz, ux, uy, uz, vx, vy, vz, sweep, result) {
|
|
@@ -180974,7 +180985,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
180974
180985
|
const largeAxis = _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.maxXY(magX, magY);
|
|
180975
180986
|
return jacobian / (largeAxis * largeAxis);
|
|
180976
180987
|
}
|
|
180977
|
-
/**
|
|
180988
|
+
/**
|
|
180989
|
+
* Create a circular arc defined by start point, any intermediate point, and end point.
|
|
180978
180990
|
* If the points are colinear, assemble them into a linestring.
|
|
180979
180991
|
*/
|
|
180980
180992
|
static createCircularStartMiddleEnd(pointA, pointB, pointC, result) {
|
|
@@ -181037,7 +181049,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181037
181049
|
result.direction.scaleInPlace(this._sweep.sweepRadians);
|
|
181038
181050
|
return result;
|
|
181039
181051
|
}
|
|
181040
|
-
/**
|
|
181052
|
+
/**
|
|
181053
|
+
* Construct a plane with
|
|
181041
181054
|
* * origin at the fractional position along the arc
|
|
181042
181055
|
* * x axis is the first derivative, i.e. tangent along the arc
|
|
181043
181056
|
* * y axis is the second derivative, i.e. in the plane and on the center side of the tangent.
|
|
@@ -181115,12 +181128,16 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181115
181128
|
* Return the start point tof the arc.
|
|
181116
181129
|
* @param result optional preallocated result
|
|
181117
181130
|
*/
|
|
181118
|
-
startPoint(result) {
|
|
181131
|
+
startPoint(result) {
|
|
181132
|
+
return this.fractionToPoint(0.0, result);
|
|
181133
|
+
}
|
|
181119
181134
|
/**
|
|
181120
181135
|
* Return the end point tof the arc.
|
|
181121
181136
|
* @param result optional preallocated result
|
|
181122
181137
|
*/
|
|
181123
|
-
endPoint(result) {
|
|
181138
|
+
endPoint(result) {
|
|
181139
|
+
return this.fractionToPoint(1.0, result);
|
|
181140
|
+
}
|
|
181124
181141
|
/** * If this is a circular arc, return the simple length derived from radius and sweep.
|
|
181125
181142
|
* * Otherwise (i.e. if this elliptical) fall through to CurvePrimitive base implementation which
|
|
181126
181143
|
* Uses quadrature.
|
|
@@ -181128,7 +181145,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181128
181145
|
curveLength() {
|
|
181129
181146
|
return this.curveLengthBetweenFractions(0, 1);
|
|
181130
181147
|
}
|
|
181131
|
-
/**
|
|
181148
|
+
/**
|
|
181149
|
+
* * If this is a circular arc, return the simple length derived from radius and sweep.
|
|
181132
181150
|
* * Otherwise (i.e. if this elliptical) fall through CurvePrimitive integrator.
|
|
181133
181151
|
*/
|
|
181134
181152
|
curveLengthBetweenFractions(fraction0, fraction1) {
|
|
@@ -181156,9 +181174,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181156
181174
|
/**
|
|
181157
181175
|
* Return an approximate (but easy to compute) arc length.
|
|
181158
181176
|
* The estimate is:
|
|
181159
|
-
* * Form 8 chords on full circle, proportionally fewer for partials
|
|
181160
|
-
* *
|
|
181161
|
-
* * For a circle, we know this crude approximation has to be increased by a factor (theta/(2
|
|
181177
|
+
* * Form 8 chords on full circle, proportionally fewer for partials (but 2 extras if less than half circle).
|
|
181178
|
+
* * Sum the chord lengths.
|
|
181179
|
+
* * For a circle, we know this crude approximation has to be increased by a factor (theta/(2*sin(theta/2))).
|
|
181162
181180
|
* * Apply that factor.
|
|
181163
181181
|
* * Experiments confirm that this is within 3 percent for a variety of eccentricities and arc sweeps.
|
|
181164
181182
|
*/
|
|
@@ -181223,7 +181241,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181223
181241
|
/**
|
|
181224
181242
|
* Return details of the closest point on the arc, optionally extending to full ellipse.
|
|
181225
181243
|
* @param spacePoint search for point closest to this point.
|
|
181226
|
-
* @param extend if true, consider projections to the complete ellipse.
|
|
181244
|
+
* @param extend if true, consider projections to the complete ellipse. If false, consider only endpoints and
|
|
181245
|
+
* projections within the arc sweep.
|
|
181227
181246
|
* @param result optional preallocated result.
|
|
181228
181247
|
*/
|
|
181229
181248
|
closestPoint(spacePoint, extend, result) {
|
|
@@ -181265,8 +181284,11 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181265
181284
|
return result;
|
|
181266
181285
|
}
|
|
181267
181286
|
/** Reverse the sweep of the arc. */
|
|
181268
|
-
reverseInPlace() {
|
|
181269
|
-
|
|
181287
|
+
reverseInPlace() {
|
|
181288
|
+
this._sweep.reverseInPlace();
|
|
181289
|
+
}
|
|
181290
|
+
/**
|
|
181291
|
+
* Apply a transform to the arc basis vectors.
|
|
181270
181292
|
* * nonuniform (i.e. skewing) transforms are allowed.
|
|
181271
181293
|
* * The transformed vector0 and vector90 are NOT squared up as major minor axes. (This is a good feature!!)
|
|
181272
181294
|
*/
|
|
@@ -181288,18 +181310,14 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181288
181310
|
&& _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSmallMetricDistance(this._matrix.dotColumnX(normal))
|
|
181289
181311
|
&& _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSmallMetricDistance(this._matrix.dotColumnY(normal));
|
|
181290
181312
|
}
|
|
181291
|
-
/**
|
|
181292
|
-
* Return true if the vector0 and vector90 are of equal length and perpendicular.
|
|
181293
|
-
*/
|
|
181313
|
+
/** Return true if the vector0 and vector90 are of equal length and perpendicular. */
|
|
181294
181314
|
get isCircular() {
|
|
181295
181315
|
const axx = this._matrix.columnXMagnitudeSquared();
|
|
181296
181316
|
const ayy = this._matrix.columnYMagnitudeSquared();
|
|
181297
181317
|
const axy = this._matrix.columnXDotColumnY();
|
|
181298
181318
|
return _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_6__.Angle.isPerpendicularDotSet(axx, ayy, axy) && _Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSameCoordinateSquared(axx, ayy);
|
|
181299
181319
|
}
|
|
181300
|
-
/**
|
|
181301
|
-
* Return true if the vector0 and vector90 are of equal length and perpendicular.
|
|
181302
|
-
*/
|
|
181320
|
+
/** Return true if the vector0 and vector90 are of equal length and perpendicular. */
|
|
181303
181321
|
circularRadiusXY() {
|
|
181304
181322
|
const ux = this._matrix.at(0, 0);
|
|
181305
181323
|
const uy = this._matrix.at(1, 0);
|
|
@@ -181316,9 +181334,11 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181316
181334
|
return this.isCircular ? this._matrix.columnXMagnitude() : undefined;
|
|
181317
181335
|
}
|
|
181318
181336
|
/** Return the larger of the two defining vectors. */
|
|
181319
|
-
maxVectorLength() {
|
|
181337
|
+
maxVectorLength() {
|
|
181338
|
+
return Math.max(this._matrix.columnXMagnitude(), this._matrix.columnYMagnitude());
|
|
181339
|
+
}
|
|
181320
181340
|
/**
|
|
181321
|
-
*
|
|
181341
|
+
* Compute intersections with a plane.
|
|
181322
181342
|
* @param plane plane to intersect
|
|
181323
181343
|
* @param result array of locations on the curve.
|
|
181324
181344
|
*/
|
|
@@ -181382,9 +181402,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181382
181402
|
range.extend(highPoint);
|
|
181383
181403
|
}
|
|
181384
181404
|
/**
|
|
181385
|
-
|
|
181386
|
-
|
|
181387
|
-
|
|
181405
|
+
* Returns a (high accuracy) range of the curve between fractional positions
|
|
181406
|
+
* * Default implementation returns teh range of the curve from clonePartialCurve
|
|
181407
|
+
*/
|
|
181388
181408
|
rangeBetweenFractions(fraction0, fraction1, transform) {
|
|
181389
181409
|
const sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_1__.AngleSweep.createStartEndRadians(this.sweep.fractionToRadians(fraction0), this.sweep.fractionToRadians(fraction1));
|
|
181390
181410
|
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_12__.Range3d.create();
|
|
@@ -181407,9 +181427,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181407
181427
|
result.set(plane.altitude(this._center), plane.velocityXYZ(this._matrix.coffs[0], this._matrix.coffs[3], this._matrix.coffs[6]), plane.velocityXYZ(this._matrix.coffs[1], this._matrix.coffs[4], this._matrix.coffs[7]));
|
|
181408
181428
|
return result;
|
|
181409
181429
|
}
|
|
181410
|
-
/**
|
|
181411
|
-
* Create a new arc which is a unit circle centered at the origin.
|
|
181412
|
-
*/
|
|
181430
|
+
/** Create a new arc which is a unit circle centered at the origin. */
|
|
181413
181431
|
static createUnitCircle() {
|
|
181414
181432
|
return Arc3d.createRefs(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create(0, 0, 0), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createIdentity(), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_1__.AngleSweep.create360());
|
|
181415
181433
|
}
|
|
@@ -181440,8 +181458,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181440
181458
|
setVector0Vector90(vector0, vector90) {
|
|
181441
181459
|
this._matrix.setColumns(vector0, vector90, vector0.unitCrossProductWithDefault(vector90, 0, 0, 0));
|
|
181442
181460
|
}
|
|
181443
|
-
/** Return the arc definition with rigid matrix form with axis radii
|
|
181444
|
-
*/
|
|
181461
|
+
/** Return the arc definition with rigid matrix form with axis radii */
|
|
181445
181462
|
toScaledMatrix3d() {
|
|
181446
181463
|
const angleData = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_6__.Angle.dotProductsToHalfAngleTrigValues(this._matrix.columnXMagnitudeSquared(), this._matrix.columnYMagnitudeSquared(), this._matrix.columnXDotColumnY(), true);
|
|
181447
181464
|
const vector0A = this._matrix.multiplyXY(angleData.c, angleData.s);
|
|
@@ -181455,8 +181472,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181455
181472
|
sweep: this.sweep.cloneMinusRadians(angleData.radians),
|
|
181456
181473
|
};
|
|
181457
181474
|
}
|
|
181458
|
-
/** Return the arc definition with center, two vectors, and angle sweep;
|
|
181459
|
-
*/
|
|
181475
|
+
/** Return the arc definition with center, two vectors, and angle sweep; */
|
|
181460
181476
|
toVectors() {
|
|
181461
181477
|
return {
|
|
181462
181478
|
center: this.center,
|
|
@@ -181465,8 +181481,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181465
181481
|
sweep: this.sweep,
|
|
181466
181482
|
};
|
|
181467
181483
|
}
|
|
181468
|
-
/** Return the arc definition with center, two vectors, and angle sweep, optionally transformed.
|
|
181469
|
-
*/
|
|
181484
|
+
/** Return the arc definition with center, two vectors, and angle sweep, optionally transformed. */
|
|
181470
181485
|
toTransformedVectors(transform) {
|
|
181471
181486
|
return transform ? {
|
|
181472
181487
|
center: transform.multiplyPoint3d(this._center),
|
|
@@ -181481,8 +181496,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181481
181496
|
sweep: this.sweep,
|
|
181482
181497
|
};
|
|
181483
181498
|
}
|
|
181484
|
-
/** Return the arc definition with center, two vectors, and angle sweep, transformed to 4d points.
|
|
181485
|
-
*/
|
|
181499
|
+
/** Return the arc definition with center, two vectors, and angle sweep, transformed to 4d points. */
|
|
181486
181500
|
toTransformedPoint4d(matrix) {
|
|
181487
181501
|
return {
|
|
181488
181502
|
center: matrix.multiplyPoint3d(this._center, 1.0),
|
|
@@ -181526,9 +181540,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181526
181540
|
vector90: this._matrix.columnY().toJSON(),
|
|
181527
181541
|
};
|
|
181528
181542
|
}
|
|
181529
|
-
/**
|
|
181530
|
-
* Test if this arc is almost equal to another GeometryQuery object
|
|
181531
|
-
*/
|
|
181543
|
+
/** Test if this arc is almost equal to another GeometryQuery object */
|
|
181532
181544
|
isAlmostEqual(otherGeometry) {
|
|
181533
181545
|
if (otherGeometry instanceof Arc3d) {
|
|
181534
181546
|
const other = otherGeometry;
|
|
@@ -181551,7 +181563,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181551
181563
|
handler.endCurvePrimitive(this);
|
|
181552
181564
|
}
|
|
181553
181565
|
/**
|
|
181554
|
-
*
|
|
181566
|
+
* Return the stroke count required for given options.
|
|
181555
181567
|
* @param options StrokeOptions that determine count
|
|
181556
181568
|
*/
|
|
181557
181569
|
computeStrokeCountForOptions(options) {
|
|
@@ -181569,7 +181581,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181569
181581
|
dispatchToGeometryHandler(handler) {
|
|
181570
181582
|
return handler.handleArc3d(this);
|
|
181571
181583
|
}
|
|
181572
|
-
/**
|
|
181584
|
+
/**
|
|
181585
|
+
* Return (if possible) an arc which is a portion of this curve.
|
|
181573
181586
|
* @param fractionA [in] start fraction
|
|
181574
181587
|
* @param fractionB [in] end fraction
|
|
181575
181588
|
*/
|
|
@@ -181583,8 +181596,10 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181583
181596
|
arcB.sweep.setStartEndRadians(this.sweep.fractionToRadians(fractionA), this.sweep.fractionToRadians(fractionB));
|
|
181584
181597
|
return arcB;
|
|
181585
181598
|
}
|
|
181586
|
-
/**
|
|
181587
|
-
*
|
|
181599
|
+
/**
|
|
181600
|
+
* Return an arc whose basis vectors are rotated by given angle within the current basis space.
|
|
181601
|
+
* * the result arc will have its zero-degree point (new `vector0`) at the current
|
|
181602
|
+
* `vector0 * cos(theta) + vector90 * sin(theta)`
|
|
181588
181603
|
* * the result sweep is adjusted so all fractional coordinates (e.g. start and end) evaluate to the same xyz.
|
|
181589
181604
|
* * Specifically, theta is subtracted from the original start and end angles.
|
|
181590
181605
|
* @param theta the angle (in the input arc space) which is to become the 0-degree point in the new arc.
|
|
@@ -181601,7 +181616,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181601
181616
|
/**
|
|
181602
181617
|
* Find intervals of this CurvePrimitive that are interior to a clipper
|
|
181603
181618
|
* @param clipper clip structure (e.g.clip planes)
|
|
181604
|
-
* @param announce(optional) function to be called announcing fractional intervals"
|
|
181619
|
+
* @param announce(optional) function to be called announcing fractional intervals"
|
|
181620
|
+
* ` announce(fraction0, fraction1, curvePrimitive)`
|
|
181605
181621
|
* @returns true if any "in" segments are announced.
|
|
181606
181622
|
*/
|
|
181607
181623
|
announceClipIntervals(clipper, announce) {
|
|
@@ -181622,8 +181638,10 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181622
181638
|
* * Return the arc along with the fractional positions of the tangency points.
|
|
181623
181639
|
* * In the returned object:
|
|
181624
181640
|
* * `arc` is the (bounded) arc
|
|
181625
|
-
* * `fraction10` is the tangency point's position as an interpolating fraction of the line segment from
|
|
181626
|
-
*
|
|
181641
|
+
* * `fraction10` is the tangency point's position as an interpolating fraction of the line segment from
|
|
181642
|
+
* `point1` (backwards) to `point0`
|
|
181643
|
+
* * `fraction12` is the tangency point's position as an interpolating fraction of the line segment from
|
|
181644
|
+
* `point1` (forward) to `point2`
|
|
181627
181645
|
* * `point` is the `point1` input.
|
|
181628
181646
|
* * If unable to construct the arc:
|
|
181629
181647
|
* * `point` is the `point1` input.
|
|
@@ -181697,7 +181715,9 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181697
181715
|
const r0new = r0 - sign * options.leftOffsetDistance;
|
|
181698
181716
|
const r90 = this.isCircular ? r0 : arcXY.matrixRef.columnYMagnitude();
|
|
181699
181717
|
const r90new = this.isCircular ? r0new : r90 - sign * options.leftOffsetDistance;
|
|
181700
|
-
if (!_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSmallMetricDistance(r0new)
|
|
181718
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSmallMetricDistance(r0new)
|
|
181719
|
+
&& (r0 * r0new > 0.0)
|
|
181720
|
+
&& (this.isCircular || (!_Geometry__WEBPACK_IMPORTED_MODULE_4__.Geometry.isSmallMetricDistance(r90new) && (r90 * r90new > 0.0)))) {
|
|
181701
181721
|
const factor0 = r0new / r0;
|
|
181702
181722
|
const factor90 = this.isCircular ? factor0 : r90new / r90;
|
|
181703
181723
|
const matrix = arcXY.matrixClone();
|
|
@@ -181713,7 +181733,8 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive
|
|
|
181713
181733
|
this.emitStrokableParts(handler, options.strokeOptions);
|
|
181714
181734
|
return handler.claimResult();
|
|
181715
181735
|
}
|
|
181716
|
-
/**
|
|
181736
|
+
/**
|
|
181737
|
+
* Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection.
|
|
181717
181738
|
* @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
|
|
181718
181739
|
* @param lowHigh optional receiver for output
|
|
181719
181740
|
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the end of the ray.
|
|
@@ -181727,9 +181748,9 @@ Arc3d._workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Poi
|
|
|
181727
181748
|
Arc3d._workPointC = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create();
|
|
181728
181749
|
Arc3d._workVectorU = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Vector3d.create();
|
|
181729
181750
|
Arc3d._workVectorV = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Vector3d.create();
|
|
181730
|
-
// !! misspelled Gauss in the published static
|
|
181751
|
+
// !! misspelled Gauss in the published static !! Declare it ok.
|
|
181731
181752
|
// cspell::word Guass
|
|
181732
|
-
/** Gauss point quadrature count for evaluating curve length.
|
|
181753
|
+
/** Gauss point quadrature count for evaluating curve length. (The number of intervals is adjusted to the arc sweep) */
|
|
181733
181754
|
Arc3d.quadratureGuassCount = 5;
|
|
181734
181755
|
/** In quadrature for arc length, use this interval (divided by quickEccentricity) */
|
|
181735
181756
|
Arc3d.quadratureIntervalAngleDegrees = 10.0;
|
|
@@ -182925,7 +182946,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
182925
182946
|
|
|
182926
182947
|
/**
|
|
182927
182948
|
* A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:
|
|
182928
|
-
* - `CurveChain` is a (non-instantiable) intermediate class for a sequence of `CurvePrimitive
|
|
182949
|
+
* - `CurveChain` is a (non-instantiable) intermediate class for a sequence of `CurvePrimitive` joining head-to-tail.
|
|
182950
|
+
* The two instantiable forms of `CurveChain` are
|
|
182929
182951
|
* - `Path` - A chain not required to close, and not enclosing a planar area
|
|
182930
182952
|
* - `Loop` - A chain required to close from last to first so that a planar area is enclosed.
|
|
182931
182953
|
* - `ParityRegion` -- a collection of coplanar `Loop`s, with "in/out" classification by parity rules
|
|
@@ -182941,11 +182963,13 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
|
|
|
182941
182963
|
/** String name for schema properties */
|
|
182942
182964
|
this.geometryCategory = "curveCollection";
|
|
182943
182965
|
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
182944
|
-
/**
|
|
182966
|
+
/** Flag for inner loop status. Only used by `Loop`. */
|
|
182945
182967
|
this.isInner = false;
|
|
182946
182968
|
}
|
|
182947
182969
|
/** Return the sum of the lengths of all contained curves. */
|
|
182948
|
-
sumLengths() {
|
|
182970
|
+
sumLengths() {
|
|
182971
|
+
return _internalContexts_SumLengthsContext__WEBPACK_IMPORTED_MODULE_1__.SumLengthsContext.sumLengths(this);
|
|
182972
|
+
}
|
|
182949
182973
|
/** Return the closest point on the contained curves */
|
|
182950
182974
|
closestPoint(spacePoint) {
|
|
182951
182975
|
let detailA;
|
|
@@ -182963,17 +182987,24 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
|
|
|
182963
182987
|
}
|
|
182964
182988
|
return detailA;
|
|
182965
182989
|
}
|
|
182966
|
-
/**
|
|
182967
|
-
*
|
|
182990
|
+
/**
|
|
182991
|
+
* Return the max gap between adjacent primitives in Path and Loop collections.
|
|
182968
182992
|
* * In a Path, gaps are computed between consecutive primitives.
|
|
182969
182993
|
* * In a Loop, gaps are computed between consecutive primitives and between last and first.
|
|
182970
|
-
* * gaps are NOT computed between consecutive CurvePrimitives in "unstructured" collections. The type is
|
|
182994
|
+
* * gaps are NOT computed between consecutive CurvePrimitives in "unstructured" collections. The type is
|
|
182995
|
+
* "unstructured" so gaps should not be semantically meaningful.
|
|
182971
182996
|
*/
|
|
182972
|
-
maxGap() {
|
|
182973
|
-
|
|
182974
|
-
|
|
182997
|
+
maxGap() {
|
|
182998
|
+
return _internalContexts_GapSearchContext__WEBPACK_IMPORTED_MODULE_4__.GapSearchContext.maxGap(this);
|
|
182999
|
+
}
|
|
183000
|
+
/** Return true if the curve collection has any primitives other than LineSegment3d and LineString3d */
|
|
183001
|
+
checkForNonLinearPrimitives() {
|
|
183002
|
+
return _internalContexts_CountLinearPartsSearchContext__WEBPACK_IMPORTED_MODULE_5__.CountLinearPartsSearchContext.hasNonLinearPrimitives(this);
|
|
183003
|
+
}
|
|
182975
183004
|
/** Apply transform recursively to children */
|
|
182976
|
-
tryTransformInPlace(transform) {
|
|
183005
|
+
tryTransformInPlace(transform) {
|
|
183006
|
+
return _internalContexts_TransformInPlaceContext__WEBPACK_IMPORTED_MODULE_6__.TransformInPlaceContext.tryTransformInPlace(this, transform);
|
|
183007
|
+
}
|
|
182977
183008
|
/** Return a deep copy. */
|
|
182978
183009
|
clone() {
|
|
182979
183010
|
return _internalContexts_CloneCurvesContext__WEBPACK_IMPORTED_MODULE_7__.CloneCurvesContext.clone(this);
|
|
@@ -182999,15 +183030,18 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
|
|
|
182999
183030
|
}
|
|
183000
183031
|
/**
|
|
183001
183032
|
* Return an array containing only the curve primitives.
|
|
183002
|
-
* @param collectorArray optional array to receive primitives.
|
|
183003
|
-
*
|
|
183033
|
+
* @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without
|
|
183034
|
+
* clearing the array.)
|
|
183035
|
+
* @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,
|
|
183036
|
+
* it recurses to its (otherwise hidden) children.
|
|
183004
183037
|
*/
|
|
183005
183038
|
collectCurvePrimitives(collectorArray, smallestPossiblePrimitives = false, explodeLineStrings = false) {
|
|
183006
183039
|
const results = collectorArray === undefined ? [] : collectorArray;
|
|
183007
183040
|
this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLineStrings);
|
|
183008
183041
|
return results;
|
|
183009
183042
|
}
|
|
183010
|
-
/**
|
|
183043
|
+
/**
|
|
183044
|
+
* Return true for planar region types:
|
|
183011
183045
|
* * `Loop`
|
|
183012
183046
|
* * `ParityRegion`
|
|
183013
183047
|
* * `UnionRegion`
|
|
@@ -183015,12 +183049,12 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
|
|
|
183015
183049
|
get isAnyRegionType() {
|
|
183016
183050
|
return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 5 || this.dgnBoundaryType() === 4;
|
|
183017
183051
|
}
|
|
183018
|
-
/** Return true for a `Path`, i.e. a chain of curves joined head-to-tail
|
|
183019
|
-
*/
|
|
183052
|
+
/** Return true for a `Path`, i.e. a chain of curves joined head-to-tail */
|
|
183020
183053
|
get isOpenPath() {
|
|
183021
183054
|
return this.dgnBoundaryType() === 1;
|
|
183022
183055
|
}
|
|
183023
|
-
/**
|
|
183056
|
+
/**
|
|
183057
|
+
* Return true for a single-loop planar region type, i.e. `Loop`.
|
|
183024
183058
|
* * This is _not- a test for physical closure of a `Path`
|
|
183025
183059
|
*/
|
|
183026
183060
|
get isClosedPath() {
|
|
@@ -183055,19 +183089,25 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
|
|
|
183055
183089
|
}
|
|
183056
183090
|
return undefined;
|
|
183057
183091
|
}
|
|
183058
|
-
/**
|
|
183092
|
+
/**
|
|
183093
|
+
* Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters
|
|
183094
|
+
* of projection.
|
|
183059
183095
|
* @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
|
|
183060
183096
|
* @param lowHigh optional receiver for output
|
|
183061
|
-
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
|
|
183097
|
+
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
|
|
183098
|
+
* end of the ray.
|
|
183062
183099
|
*/
|
|
183063
183100
|
projectedParameterRange(ray, lowHigh) {
|
|
183064
183101
|
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_9__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
183065
183102
|
}
|
|
183066
183103
|
}
|
|
183067
|
-
/**
|
|
183104
|
+
/**
|
|
183105
|
+
* Shared base class for use by both open and closed paths.
|
|
183068
183106
|
* - A `CurveChain` contains only curvePrimitives. No other paths, loops, or regions allowed.
|
|
183069
|
-
* - A single entry in the chain can in fact contain multiple curve primitives if the entry itself is (for instance)
|
|
183070
|
-
*
|
|
183107
|
+
* - A single entry in the chain can in fact contain multiple curve primitives if the entry itself is (for instance)
|
|
183108
|
+
* `CurveChainWithDistanceIndex`
|
|
183109
|
+
* which presents itself (through method interface) as a CurvePrimitive with well defined mappings from fraction
|
|
183110
|
+
* to xyz, but in fact does all the
|
|
183071
183111
|
* calculations over multiple primitives.
|
|
183072
183112
|
* - The specific derived classes are `Path` and `Loop`
|
|
183073
183113
|
* - `CurveChain` is an intermediate class. It is not instantiable on its own.
|
|
@@ -183100,7 +183140,8 @@ class CurveChain extends CurveCollection {
|
|
|
183100
183140
|
}
|
|
183101
183141
|
return undefined;
|
|
183102
183142
|
}
|
|
183103
|
-
/**
|
|
183143
|
+
/**
|
|
183144
|
+
* Stroke the chain into a simple xyz array.
|
|
183104
183145
|
* @param options tolerance parameters controlling the stroking.
|
|
183105
183146
|
*/
|
|
183106
183147
|
getPackedStrokes(options) {
|
|
@@ -183125,7 +183166,8 @@ class CurveChain extends CurveCollection {
|
|
|
183125
183166
|
return strokes;
|
|
183126
183167
|
}
|
|
183127
183168
|
*/
|
|
183128
|
-
/**
|
|
183169
|
+
/**
|
|
183170
|
+
* Add a child curve.
|
|
183129
183171
|
* * Returns false if the given child is not a CurvePrimitive.
|
|
183130
183172
|
*/
|
|
183131
183173
|
tryAddChild(child) {
|
|
@@ -183141,7 +183183,7 @@ class CurveChain extends CurveCollection {
|
|
|
183141
183183
|
return this._curves[i];
|
|
183142
183184
|
return undefined;
|
|
183143
183185
|
}
|
|
183144
|
-
/**
|
|
183186
|
+
/** Invoke `curve.extendRange(range, transform)` for each child */
|
|
183145
183187
|
extendRange(range, transform) {
|
|
183146
183188
|
for (const curve of this._curves)
|
|
183147
183189
|
curve.extendRange(range, transform);
|
|
@@ -183155,7 +183197,8 @@ class CurveChain extends CurveCollection {
|
|
|
183155
183197
|
curve.reverseInPlace();
|
|
183156
183198
|
this._curves.reverse();
|
|
183157
183199
|
}
|
|
183158
|
-
/**
|
|
183200
|
+
/**
|
|
183201
|
+
* Return the index where target is found in the array of children
|
|
183159
183202
|
* @param alsoSearchProxies whether to also check proxy curves of the children
|
|
183160
183203
|
*/
|
|
183161
183204
|
childIndex(target, alsoSearchProxies) {
|
|
@@ -183174,8 +183217,7 @@ class CurveChain extends CurveCollection {
|
|
|
183174
183217
|
}
|
|
183175
183218
|
return undefined;
|
|
183176
183219
|
}
|
|
183177
|
-
/** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive.
|
|
183178
|
-
*/
|
|
183220
|
+
/** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */
|
|
183179
183221
|
primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(index, fraction, cyclic = false, result) {
|
|
183180
183222
|
const primitive = this.cyclicCurvePrimitive(index, cyclic);
|
|
183181
183223
|
if (primitive) {
|
|
@@ -183190,8 +183232,10 @@ class CurveChain extends CurveCollection {
|
|
|
183190
183232
|
* @public
|
|
183191
183233
|
*/
|
|
183192
183234
|
class BagOfCurves extends CurveCollection {
|
|
183193
|
-
/**
|
|
183194
|
-
isSameGeometryClass(other) {
|
|
183235
|
+
/** Test if `other` is an instance of `BagOfCurves` */
|
|
183236
|
+
isSameGeometryClass(other) {
|
|
183237
|
+
return other instanceof BagOfCurves;
|
|
183238
|
+
}
|
|
183195
183239
|
/** Construct an empty `BagOfCurves` */
|
|
183196
183240
|
constructor() {
|
|
183197
183241
|
super();
|
|
@@ -183200,8 +183244,10 @@ class BagOfCurves extends CurveCollection {
|
|
|
183200
183244
|
this._children = [];
|
|
183201
183245
|
}
|
|
183202
183246
|
/** Return the (reference to) array of children */
|
|
183203
|
-
get children() {
|
|
183204
|
-
|
|
183247
|
+
get children() {
|
|
183248
|
+
return this._children;
|
|
183249
|
+
}
|
|
183250
|
+
/** Create with given curves. */
|
|
183205
183251
|
static create(...data) {
|
|
183206
183252
|
const result = new BagOfCurves();
|
|
183207
183253
|
for (const child of data) {
|
|
@@ -183210,8 +183256,10 @@ class BagOfCurves extends CurveCollection {
|
|
|
183210
183256
|
return result;
|
|
183211
183257
|
}
|
|
183212
183258
|
/** Return the boundary type (0) of a corresponding MicroStation CurveVector */
|
|
183213
|
-
dgnBoundaryType() {
|
|
183214
|
-
|
|
183259
|
+
dgnBoundaryType() {
|
|
183260
|
+
return 0;
|
|
183261
|
+
}
|
|
183262
|
+
/** Invoke `processor.announceBagOfCurves(this, indexInParent);` */
|
|
183215
183263
|
announceToCurveProcessor(processor, indexInParent = -1) {
|
|
183216
183264
|
return processor.announceBagOfCurves(this, indexInParent);
|
|
183217
183265
|
}
|
|
@@ -183235,7 +183283,9 @@ class BagOfCurves extends CurveCollection {
|
|
|
183235
183283
|
return clone;
|
|
183236
183284
|
}
|
|
183237
183285
|
/** Return an empty `BagOfCurves` */
|
|
183238
|
-
cloneEmptyPeer() {
|
|
183286
|
+
cloneEmptyPeer() {
|
|
183287
|
+
return new BagOfCurves();
|
|
183288
|
+
}
|
|
183239
183289
|
/** Add a child */
|
|
183240
183290
|
tryAddChild(child) {
|
|
183241
183291
|
if (child)
|
|
@@ -186422,7 +186472,7 @@ var CurveSearchStatus;
|
|
|
186422
186472
|
CurveSearchStatus[CurveSearchStatus["stoppedAtBoundary"] = 2] = "stoppedAtBoundary";
|
|
186423
186473
|
})(CurveSearchStatus || (CurveSearchStatus = {}));
|
|
186424
186474
|
/**
|
|
186425
|
-
*
|
|
186475
|
+
* Use to update a vector in case where source and prior result are both possibly undefined.
|
|
186426
186476
|
* * Any undefined source returns undefined.
|
|
186427
186477
|
* * For defined source, reuse optional result if available.
|
|
186428
186478
|
* @param source optional source
|
|
@@ -186441,6 +186491,7 @@ function optionalVectorUpdate(source, result) {
|
|
|
186441
186491
|
* @public
|
|
186442
186492
|
*/
|
|
186443
186493
|
class CurveLocationDetail {
|
|
186494
|
+
/** constructor */
|
|
186444
186495
|
constructor() {
|
|
186445
186496
|
this.pointQ = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
|
|
186446
186497
|
this.fraction = 0;
|
|
@@ -186456,21 +186507,22 @@ class CurveLocationDetail {
|
|
|
186456
186507
|
this.fraction1 = fraction1;
|
|
186457
186508
|
this.point1 = point1;
|
|
186458
186509
|
}
|
|
186459
|
-
/**
|
|
186510
|
+
/** Test if this pair has fraction1 defined */
|
|
186460
186511
|
get hasFraction1() {
|
|
186461
186512
|
return this.fraction1 !== undefined;
|
|
186462
186513
|
}
|
|
186463
|
-
/**
|
|
186514
|
+
/** Test if this is an isolated point. This is true if intervalRole is any of (undefined, isolated, isolatedAtVertex) */
|
|
186464
186515
|
get isIsolated() {
|
|
186465
186516
|
return this.intervalRole === undefined
|
|
186466
186517
|
|| this.intervalRole === CurveIntervalRole.isolated
|
|
186467
186518
|
|| this.intervalRole === CurveIntervalRole.isolatedAtVertex;
|
|
186468
186519
|
}
|
|
186469
|
-
/**
|
|
186520
|
+
/** Return the fraction delta. (0 if no fraction1) */
|
|
186470
186521
|
get fractionDelta() {
|
|
186471
186522
|
return this.fraction1 !== undefined ? this.fraction1 - this.fraction : 0.0;
|
|
186472
186523
|
}
|
|
186473
|
-
/**
|
|
186524
|
+
/**
|
|
186525
|
+
* If (fraction1, point1) are defined, make them the primary (and only) data.
|
|
186474
186526
|
* * No action if undefined.
|
|
186475
186527
|
*/
|
|
186476
186528
|
collapseToEnd() {
|
|
@@ -186483,14 +186535,16 @@ class CurveLocationDetail {
|
|
|
186483
186535
|
this.point1 = undefined;
|
|
186484
186536
|
}
|
|
186485
186537
|
}
|
|
186486
|
-
/**
|
|
186538
|
+
/**
|
|
186539
|
+
* Make (fraction, point) the primary (and only) data.
|
|
186487
186540
|
* * No action if undefined.
|
|
186488
186541
|
*/
|
|
186489
186542
|
collapseToStart() {
|
|
186490
186543
|
this.fraction1 = undefined;
|
|
186491
186544
|
this.point1 = undefined;
|
|
186492
186545
|
}
|
|
186493
|
-
/**
|
|
186546
|
+
/**
|
|
186547
|
+
* Return a complete copy, WITH CAVEATS . . .
|
|
186494
186548
|
* * curve member is copied as a reference.
|
|
186495
186549
|
* * point and vector members are cloned.
|
|
186496
186550
|
*/
|
|
@@ -186534,22 +186588,19 @@ class CurveLocationDetail {
|
|
|
186534
186588
|
setFR(fraction, ray, a = 0) {
|
|
186535
186589
|
return this.setFP(fraction, ray.origin, ray.direction, a);
|
|
186536
186590
|
}
|
|
186537
|
-
/** Set the CurvePrimitive pointer, leaving all other properties untouched.
|
|
186538
|
-
*/
|
|
186591
|
+
/** Set the CurvePrimitive pointer, leaving all other properties untouched. */
|
|
186539
186592
|
setCurve(curve) { this.curve = curve; }
|
|
186540
186593
|
/** record the distance from the CurveLocationDetail's point to the parameter point. */
|
|
186541
186594
|
setDistanceTo(point) {
|
|
186542
186595
|
this.a = this.point.distance(point);
|
|
186543
186596
|
}
|
|
186544
|
-
/**
|
|
186545
|
-
*/
|
|
186597
|
+
/** Create with a CurvePrimitive pointer but no coordinate data. */
|
|
186546
186598
|
static create(curve, result) {
|
|
186547
186599
|
result = result ? result : new CurveLocationDetail();
|
|
186548
186600
|
result.curve = curve;
|
|
186549
186601
|
return result;
|
|
186550
186602
|
}
|
|
186551
|
-
/**
|
|
186552
|
-
*/
|
|
186603
|
+
/** Create with CurvePrimitive pointer, fraction, and point coordinates. */
|
|
186553
186604
|
static createCurveFractionPoint(curve, fraction, point, result) {
|
|
186554
186605
|
result = result ? result : new CurveLocationDetail();
|
|
186555
186606
|
result.curve = curve;
|
|
@@ -186560,9 +186611,7 @@ class CurveLocationDetail {
|
|
|
186560
186611
|
result.curveSearchStatus = undefined;
|
|
186561
186612
|
return result;
|
|
186562
186613
|
}
|
|
186563
|
-
/**
|
|
186564
|
-
* Create a new detail with only ray, fraction, and point.
|
|
186565
|
-
*/
|
|
186614
|
+
/** Create a new detail with only ray, fraction, and point. */
|
|
186566
186615
|
static createRayFractionPoint(ray, fraction, point, result) {
|
|
186567
186616
|
result = result ? result : new CurveLocationDetail();
|
|
186568
186617
|
result.fraction = fraction;
|
|
@@ -186570,8 +186619,7 @@ class CurveLocationDetail {
|
|
|
186570
186619
|
result.point.setFromPoint3d(point);
|
|
186571
186620
|
return result;
|
|
186572
186621
|
}
|
|
186573
|
-
/**
|
|
186574
|
-
*/
|
|
186622
|
+
/** Create with CurvePrimitive pointer, fraction, and point coordinates */
|
|
186575
186623
|
static createCurveFractionPointDistanceCurveSearchStatus(curve, fraction, point, distance, status, result) {
|
|
186576
186624
|
result = result ? result : new CurveLocationDetail();
|
|
186577
186625
|
result.curve = curve;
|
|
@@ -186582,9 +186630,7 @@ class CurveLocationDetail {
|
|
|
186582
186630
|
result.curveSearchStatus = status;
|
|
186583
186631
|
return result;
|
|
186584
186632
|
}
|
|
186585
|
-
/**
|
|
186586
|
-
* *
|
|
186587
|
-
*/
|
|
186633
|
+
/** Create with curveSearchStatus affected by allowExtension. */
|
|
186588
186634
|
static createConditionalMoveSignedDistance(allowExtension, curve, startFraction, endFraction, requestedSignedDistance, result) {
|
|
186589
186635
|
let a = requestedSignedDistance;
|
|
186590
186636
|
let status = CurveSearchStatus.success;
|
|
@@ -186610,8 +186656,7 @@ class CurveLocationDetail {
|
|
|
186610
186656
|
result.curveSearchStatus = status;
|
|
186611
186657
|
return result;
|
|
186612
186658
|
}
|
|
186613
|
-
/**
|
|
186614
|
-
*/
|
|
186659
|
+
/** Create with CurvePrimitive pointer and fraction for evaluation. */
|
|
186615
186660
|
static createCurveEvaluatedFraction(curve, fraction, result) {
|
|
186616
186661
|
result = result ? result : new CurveLocationDetail();
|
|
186617
186662
|
result.curve = curve;
|
|
@@ -186622,8 +186667,7 @@ class CurveLocationDetail {
|
|
|
186622
186667
|
result.a = 0.0;
|
|
186623
186668
|
return result;
|
|
186624
186669
|
}
|
|
186625
|
-
/**
|
|
186626
|
-
*/
|
|
186670
|
+
/** Create with CurvePrimitive pointer and fraction for evaluation. */
|
|
186627
186671
|
static createCurveEvaluatedFractionPointAndDerivative(curve, fraction, result) {
|
|
186628
186672
|
result = result ? result : new CurveLocationDetail();
|
|
186629
186673
|
result.curve = curve;
|
|
@@ -186635,8 +186679,7 @@ class CurveLocationDetail {
|
|
|
186635
186679
|
result.a = 0.0;
|
|
186636
186680
|
return result;
|
|
186637
186681
|
}
|
|
186638
|
-
/**
|
|
186639
|
-
*/
|
|
186682
|
+
/** Create with CurvePrimitive pointer and 2 fractions for evaluation. */
|
|
186640
186683
|
static createCurveEvaluatedFractionFraction(curve, fraction0, fraction1, result) {
|
|
186641
186684
|
result = result ? result : new CurveLocationDetail();
|
|
186642
186685
|
result.curve = curve;
|
|
@@ -186649,8 +186692,7 @@ class CurveLocationDetail {
|
|
|
186649
186692
|
result.a = 0.0;
|
|
186650
186693
|
return result;
|
|
186651
186694
|
}
|
|
186652
|
-
/**
|
|
186653
|
-
*/
|
|
186695
|
+
/** Create with CurvePrimitive pointer, fraction, and point coordinates. */
|
|
186654
186696
|
static createCurveFractionPointDistance(curve, fraction, point, a, result) {
|
|
186655
186697
|
result = result ? result : new CurveLocationDetail();
|
|
186656
186698
|
result.curve = curve;
|
|
@@ -186661,7 +186703,8 @@ class CurveLocationDetail {
|
|
|
186661
186703
|
result.curveSearchStatus = undefined;
|
|
186662
186704
|
return result;
|
|
186663
186705
|
}
|
|
186664
|
-
/**
|
|
186706
|
+
/**
|
|
186707
|
+
* Update or create if closer than current contents.
|
|
186665
186708
|
* @param curve candidate curve
|
|
186666
186709
|
* @param fraction candidate fraction
|
|
186667
186710
|
* @param point candidate point
|
|
@@ -186675,7 +186718,7 @@ class CurveLocationDetail {
|
|
|
186675
186718
|
return true;
|
|
186676
186719
|
}
|
|
186677
186720
|
/**
|
|
186678
|
-
*
|
|
186721
|
+
* Exchange the (fraction,fraction1) and (point, point1) pairs.
|
|
186679
186722
|
* * (Skip each swap if its "1" value is undefined)
|
|
186680
186723
|
*/
|
|
186681
186724
|
swapFractionsAndPoints() {
|
|
@@ -186691,7 +186734,7 @@ class CurveLocationDetail {
|
|
|
186691
186734
|
}
|
|
186692
186735
|
}
|
|
186693
186736
|
/**
|
|
186694
|
-
*
|
|
186737
|
+
* Return the fraction where f falls between fraction and fraction1.
|
|
186695
186738
|
* * ASSUME fraction1 defined
|
|
186696
186739
|
*/
|
|
186697
186740
|
inverseInterpolateFraction(f, defaultFraction = 0) {
|
|
@@ -186714,7 +186757,8 @@ class CurveLocationDetail {
|
|
|
186714
186757
|
return detailB;
|
|
186715
186758
|
}
|
|
186716
186759
|
}
|
|
186717
|
-
/**
|
|
186760
|
+
/**
|
|
186761
|
+
* Enumeration of configurations for intersections and min/max distance-between-curve
|
|
186718
186762
|
* @public
|
|
186719
186763
|
*/
|
|
186720
186764
|
var CurveCurveApproachType;
|
|
@@ -186728,7 +186772,8 @@ var CurveCurveApproachType;
|
|
|
186728
186772
|
/** Completely parallel geometry. */
|
|
186729
186773
|
CurveCurveApproachType[CurveCurveApproachType["ParallelGeometry"] = 3] = "ParallelGeometry";
|
|
186730
186774
|
})(CurveCurveApproachType || (CurveCurveApproachType = {}));
|
|
186731
|
-
/**
|
|
186775
|
+
/**
|
|
186776
|
+
* A pair of CurveLocationDetail.
|
|
186732
186777
|
* @public
|
|
186733
186778
|
*/
|
|
186734
186779
|
class CurveLocationDetailPair {
|
|
@@ -186743,7 +186788,8 @@ class CurveLocationDetailPair {
|
|
|
186743
186788
|
result.detailB = detailB;
|
|
186744
186789
|
return result;
|
|
186745
186790
|
}
|
|
186746
|
-
/**
|
|
186791
|
+
/**
|
|
186792
|
+
* Create a curve detail pair using references to two CurveLocationDetails.
|
|
186747
186793
|
* * optionally install in reversed positions
|
|
186748
186794
|
*/
|
|
186749
186795
|
static createCaptureOptionalReverse(detailA, detailB, reversed, result) {
|
|
@@ -186822,20 +186868,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
186822
186868
|
|
|
186823
186869
|
|
|
186824
186870
|
/**
|
|
186825
|
-
* A curve primitive is bounded
|
|
186871
|
+
* A curve primitive is bounded.
|
|
186826
186872
|
* A curve primitive maps fractions in 0..1 to points in space.
|
|
186827
186873
|
* As the fraction proceeds from 0 towards 1, the point moves "forward" along the curve.
|
|
186828
186874
|
* True distance along the curve is not always strictly proportional to fraction.
|
|
186829
|
-
* * LineSegment3d always has proportional fraction and distance
|
|
186830
|
-
* *
|
|
186831
|
-
* *
|
|
186832
|
-
* * A Spiral3d is proportional
|
|
186875
|
+
* * A LineSegment3d always has proportional fraction and distance.
|
|
186876
|
+
* * An Arc3d which is true circular has proportional fraction and distance.
|
|
186877
|
+
* * A LineString3d is not proportional (except for special case of all segments of equal length).
|
|
186878
|
+
* * A Spiral3d is proportional.
|
|
186833
186879
|
* * A BsplineCurve3d is only proportional for special cases.
|
|
186834
|
-
*
|
|
186835
|
-
*
|
|
186880
|
+
* For fractions outside 0..1, the curve primitive class may either (a) return the near endpoint or (b) evaluate
|
|
186881
|
+
* an extended curve.
|
|
186836
186882
|
* @public
|
|
186837
186883
|
*/
|
|
186838
186884
|
class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.GeometryQuery {
|
|
186885
|
+
/** Constructor */
|
|
186839
186886
|
constructor() {
|
|
186840
186887
|
super();
|
|
186841
186888
|
/** String name for schema properties */
|
|
@@ -186863,30 +186910,35 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
186863
186910
|
const b = data.vectorU.magnitude();
|
|
186864
186911
|
return _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.conditionalDivideFraction(a, b * b * b);
|
|
186865
186912
|
}
|
|
186866
|
-
/**
|
|
186913
|
+
/**
|
|
186914
|
+
* Construct a frenet frame:
|
|
186867
186915
|
* * origin at the point on the curve
|
|
186868
186916
|
* * x axis is unit vector along the curve (tangent)
|
|
186869
|
-
* * y axis is perpendicular and in the plane of the osculating circle.
|
|
186870
|
-
* * z axis perpendicular to those.
|
|
186917
|
+
* * y axis is perpendicular and in the plane of the osculating circle. y axis is called "main normal"
|
|
186918
|
+
* * z axis perpendicular to those. z axis is called "bi-normal"
|
|
186871
186919
|
*/
|
|
186872
186920
|
fractionToFrenetFrame(fraction, result) {
|
|
186873
186921
|
const plane = this.fractionToPointAnd2Derivatives(fraction);
|
|
186874
186922
|
if (!plane)
|
|
186875
186923
|
return undefined;
|
|
186924
|
+
// first derivative (plane.vectorU) and second derivative (plane.vectorV) are not essentially
|
|
186925
|
+
// perpendicular so we use createRigidFromColumns to make 3 perpendicular vectors.
|
|
186876
186926
|
let axes = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createRigidFromColumns(plane.vectorU, plane.vectorV, _Geometry__WEBPACK_IMPORTED_MODULE_2__.AxisOrder.XYZ);
|
|
186877
186927
|
if (axes)
|
|
186878
186928
|
return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_4__.Transform.createRefs(plane.origin, axes, result);
|
|
186879
|
-
// 2nd derivative not distinct
|
|
186929
|
+
// 2nd derivative not distinct. for example if curve is linear at fraction so second derivative is 0.
|
|
186930
|
+
// in this case we find perpendicular vector to plane.vectorU and pass it to createRigidFromColumns.
|
|
186880
186931
|
const perpVector = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createPerpendicularVectorFavorXYPlane(plane.vectorU, plane.vectorV);
|
|
186881
186932
|
axes = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_3__.Matrix3d.createRigidFromColumns(plane.vectorU, perpVector, _Geometry__WEBPACK_IMPORTED_MODULE_2__.AxisOrder.XYZ);
|
|
186882
186933
|
if (axes)
|
|
186883
186934
|
return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_4__.Transform.createRefs(plane.origin, axes, result);
|
|
186884
186935
|
return undefined;
|
|
186885
186936
|
}
|
|
186886
|
-
/**
|
|
186887
|
-
*
|
|
186888
|
-
* *
|
|
186889
|
-
* *
|
|
186937
|
+
/**
|
|
186938
|
+
* Construct signed distance from a point on the planar curve to its center of curvature (in xy only).
|
|
186939
|
+
* * Positive distance means the center is to the left of the curve at fraction.
|
|
186940
|
+
* * Negative distance means the center is to the right of the curve at fraction.
|
|
186941
|
+
* * Zero distance means curve is linear at fraction.
|
|
186890
186942
|
*/
|
|
186891
186943
|
fractionToSignedXYRadiusOfCurvature(fraction) {
|
|
186892
186944
|
const plane = this.fractionToPointAnd2Derivatives(fraction);
|
|
@@ -186911,7 +186963,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
186911
186963
|
return ray.fractionToPoint(distance);
|
|
186912
186964
|
}
|
|
186913
186965
|
/**
|
|
186914
|
-
*
|
|
186966
|
+
* Return the length of the curve.
|
|
186915
186967
|
* * Curve length is always positive.
|
|
186916
186968
|
*/
|
|
186917
186969
|
curveLength() {
|
|
@@ -186920,9 +186972,9 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
186920
186972
|
return context.getSum();
|
|
186921
186973
|
}
|
|
186922
186974
|
/**
|
|
186923
|
-
* Returns a (high accuracy) length of the curve between fractional positions
|
|
186975
|
+
* Returns a (high accuracy) length of the curve between fractional positions.
|
|
186924
186976
|
* * Curve length is always positive.
|
|
186925
|
-
* * Default implementation applies a generic
|
|
186977
|
+
* * Default implementation applies a generic Gaussian integration.
|
|
186926
186978
|
* * Most curve classes (certainly LineSegment, LineString, Arc) are expected to provide efficient implementations.
|
|
186927
186979
|
*/
|
|
186928
186980
|
curveLengthBetweenFractions(fraction0, fraction1) {
|
|
@@ -186930,7 +186982,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
186930
186982
|
return 0.0;
|
|
186931
186983
|
const scale = this.getFractionToDistanceScale();
|
|
186932
186984
|
if (scale !== undefined) {
|
|
186933
|
-
// We are in luck! simple proportions determine it all
|
|
186985
|
+
// We are in luck! simple proportions determine it all !!!
|
|
186934
186986
|
// (for example, a LineSegment3d or a circular arc)
|
|
186935
186987
|
const totalLength = this.curveLength();
|
|
186936
186988
|
return Math.abs((fraction1 - fraction0) * totalLength);
|
|
@@ -186941,14 +186993,14 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
186941
186993
|
}
|
|
186942
186994
|
/**
|
|
186943
186995
|
* Returns a (high accuracy) range of the curve between fractional positions
|
|
186944
|
-
* * Default implementation returns
|
|
186996
|
+
* * Default implementation returns the range of the curve from clonePartialCurve
|
|
186945
186997
|
*/
|
|
186946
186998
|
rangeBetweenFractions(fraction0, fraction1, transform) {
|
|
186947
186999
|
return this.rangeBetweenFractionsByClone(fraction0, fraction1, transform);
|
|
186948
187000
|
}
|
|
186949
187001
|
/**
|
|
186950
187002
|
* Returns a (high accuracy) range of the curve between fractional positions
|
|
186951
|
-
* * Default implementation returns
|
|
187003
|
+
* * Default implementation returns the range of the curve from clonePartialCurve
|
|
186952
187004
|
*/
|
|
186953
187005
|
rangeBetweenFractionsByClone(fraction0, fraction1, transform) {
|
|
186954
187006
|
if (fraction0 === fraction1)
|
|
@@ -186962,12 +187014,16 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
186962
187014
|
* Returns an approximate range based on a fixed number of evaluations
|
|
186963
187015
|
* * Default implementation returns a range determined by evaluating a specified number of points on the curve.
|
|
186964
187016
|
* * Optional evaluate again at interval midpoints and extrapolate any increase
|
|
186965
|
-
* * For a smooth curve, Richardson extrapolation suggests each subdivision moves 3/4 of the way to final. So
|
|
186966
|
-
*
|
|
187017
|
+
* * For a smooth curve, Richardson extrapolation suggests each subdivision moves 3/4 of the way to final. So
|
|
187018
|
+
* extrapolationFactor of 1/3 gets speculatively moves closer to the tight range, and larger multipliers increase
|
|
187019
|
+
* confidence in being safely larger.
|
|
187020
|
+
* * This function is faster version to compute the range of a portion of a curve (because some curves can be
|
|
187021
|
+
* expensive to compute the partial curve and/or to compute the partial curve's range.
|
|
186967
187022
|
* @param fraction0 start fraction for evaluation
|
|
186968
187023
|
* @param fraction1 end fraction for evaluation
|
|
186969
187024
|
* @param count number of points to evaluate
|
|
186970
|
-
* @param extrapolationFactor if positive, evaluate again at interval midpoints and apply this fraction multiplier
|
|
187025
|
+
* @param extrapolationFactor if positive, evaluate again at interval midpoints and apply this fraction multiplier
|
|
187026
|
+
* to any increase in size.
|
|
186971
187027
|
*/
|
|
186972
187028
|
rangeBetweenFractionsByCount(fraction0, fraction1, count, transform, extrapolationFactor = 0.0) {
|
|
186973
187029
|
const range = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__.Range3d.createNull();
|
|
@@ -186992,8 +187048,8 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
186992
187048
|
evaluateSteps(fraction0 + globalFractionStep, globalFractionStep, interiorCount);
|
|
186993
187049
|
}
|
|
186994
187050
|
if (extrapolationFactor > 0.0) {
|
|
186995
|
-
// Evaluate at midpoints. Where this makes the range larger, apply extrapolationFactor to move it to safer
|
|
186996
|
-
// same interior step, but shift to interval midpoints
|
|
187051
|
+
// Evaluate at midpoints. Where this makes the range larger, apply extrapolationFactor to move it to safer
|
|
187052
|
+
// excess value. same interior step, but shift to interval midpoints.
|
|
186997
187053
|
const baseRange = range.clone();
|
|
186998
187054
|
const interiorCount1 = interiorCount + 1;
|
|
186999
187055
|
const localFraction0 = 0.5 / interiorCount1; // we only evaluate at new midpoints.
|
|
@@ -187004,13 +187060,13 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187004
187060
|
return range;
|
|
187005
187061
|
}
|
|
187006
187062
|
/**
|
|
187007
|
-
*
|
|
187008
|
-
* * Run an integration (with a default gaussian quadrature) with a fixed fractional step
|
|
187063
|
+
* Run an integration (with a default Gaussian quadrature) with a fixed fractional step
|
|
187009
187064
|
* * This is typically called by specific curve type implementations of curveLengthBetweenFractions.
|
|
187010
|
-
*
|
|
187065
|
+
* * For example, in Arc3d implementation of curveLengthBetweenFractions:
|
|
187011
187066
|
* * If the Arc3d is true circular, it the arc is true circular, use the direct `arcLength = radius * sweepRadians`
|
|
187012
|
-
* * If the Arc3d is not true circular, call this method with an interval count appropriate to eccentricity and
|
|
187013
|
-
*
|
|
187067
|
+
* * If the Arc3d is not true circular, call this method with an interval count appropriate to eccentricity and
|
|
187068
|
+
* sweepRadians.
|
|
187069
|
+
* @returns Returns the curve length via an integral estimated by numerical quadrature between the fractional positions.
|
|
187014
187070
|
* @param fraction0 start fraction for integration
|
|
187015
187071
|
* @param fraction1 end fraction for integration
|
|
187016
187072
|
* @param numInterval number of quadrature intervals
|
|
@@ -187026,33 +187082,39 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187026
187082
|
return Math.abs(context.getSum());
|
|
187027
187083
|
}
|
|
187028
187084
|
/**
|
|
187029
|
-
*
|
|
187030
|
-
* * (Attempt to) find a position on the curve at a signed distance from start fraction.
|
|
187085
|
+
* (Attempt to) find a position on the curve at a signed distance from start fraction.
|
|
187031
187086
|
* * Return the position as a CurveLocationDetail.
|
|
187032
187087
|
* * In the `CurveLocationDetail`, record:
|
|
187033
187088
|
* * `fraction` = fractional position
|
|
187034
187089
|
* * `point` = coordinates of the point
|
|
187035
|
-
* * `a` = (signed!) distance moved. If `allowExtension` is false and the move reached the start or end of the
|
|
187090
|
+
* * `a` = (signed!) distance moved. If `allowExtension` is false and the move reached the start or end of the
|
|
187091
|
+
* curve, this distance is smaller than the requested signedDistance.
|
|
187036
187092
|
* * `curveSearchStatus` indicates one of:
|
|
187037
187093
|
* * `error` (unusual) computation failed not supported for this curve.
|
|
187038
187094
|
* * `success` full movement completed
|
|
187039
187095
|
* * `stoppedAtBoundary` partial movement completed. This can be due to either
|
|
187040
187096
|
* * `allowExtension` parameter sent as `false`
|
|
187041
187097
|
* * the curve type (e.g. bspline) does not support extended range.
|
|
187042
|
-
* * if `allowExtension` is true, movement may still end at the startPoint or end point for curves that do not support
|
|
187043
|
-
*
|
|
187098
|
+
* * if `allowExtension` is true, movement may still end at the startPoint or end point for curves that do not support
|
|
187099
|
+
* extended geometry (specifically bsplines)
|
|
187100
|
+
* * if the curve returns a value (i.e. not `undefined`) for `curve.getFractionToDistanceScale()`, the base class
|
|
187101
|
+
* carries out the computation
|
|
187044
187102
|
* and returns a final location.
|
|
187045
187103
|
* * LineSegment3d relies on this.
|
|
187046
|
-
* * If the curve does not implement the computation or the curve has zero length, the returned `CurveLocationDetail`
|
|
187104
|
+
* * If the curve does not implement the computation or the curve has zero length, the returned `CurveLocationDetail`
|
|
187105
|
+
* has
|
|
187047
187106
|
* * `fraction` = the value of `startFraction`
|
|
187048
187107
|
* * `point` = result of `curve.fractionToPoint(startFraction)`
|
|
187049
187108
|
* * `a` = 0
|
|
187050
187109
|
* * `curveStartState` = `CurveSearchStatus.error`
|
|
187051
187110
|
* @param startFraction fractional position where the move starts
|
|
187052
187111
|
* @param signedDistance distance to move. Negative distance is backwards in the fraction space
|
|
187053
|
-
* @param allowExtension if true, all the move to go beyond the startPoint or endpoint of the curve. If false, do not
|
|
187112
|
+
* @param allowExtension if true, all the move to go beyond the startPoint or endpoint of the curve. If false, do not
|
|
187113
|
+
* allow movement beyond the startPoint or endpoint
|
|
187054
187114
|
* @param result optional result.
|
|
187055
|
-
* @returns A CurveLocationDetail annotated as above.
|
|
187115
|
+
* @returns A CurveLocationDetail annotated as above. Note that if the curve does not support the calculation, there is
|
|
187116
|
+
* still a result which contains the point at the input startFraction, with failure indicated in the `curveStartState`
|
|
187117
|
+
* member
|
|
187056
187118
|
*/
|
|
187057
187119
|
moveSignedDistanceFromFraction(startFraction, signedDistance, allowExtension, result) {
|
|
187058
187120
|
const scale = this.getFractionToDistanceScale();
|
|
@@ -187072,13 +187134,14 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187072
187134
|
* Generic algorithm to search for point at signed distance from a fractional startPoint.
|
|
187073
187135
|
* * This will work for well for smooth curves.
|
|
187074
187136
|
* * Curves with tangent or other low-order-derivative discontinuities may need to implement specialized algorithms.
|
|
187075
|
-
* * We need to find an endFraction which is the end-of-interval (usually upper) limit of integration of the tangent
|
|
187137
|
+
* * We need to find an endFraction which is the end-of-interval (usually upper) limit of integration of the tangent
|
|
187138
|
+
* magnitude from startFraction to endFraction
|
|
187076
187139
|
* * That integral is a function of endFraction.
|
|
187077
187140
|
* * The derivative of that integral with respect to end fraction is the tangent magnitude at end fraction.
|
|
187078
187141
|
* * Use that function and (easily evaluated!) derivative for a Newton iteration
|
|
187079
|
-
* * TO ALL WHO HAVE FUZZY MEMORIES OF CALCULUS CLASS: "The derivative of the integral wrt upper limit is the value
|
|
187080
|
-
*
|
|
187081
|
-
*
|
|
187142
|
+
* * TO ALL WHO HAVE FUZZY MEMORIES OF CALCULUS CLASS: "The derivative of the integral wrt upper limit is the value
|
|
187143
|
+
* of the integrand there" is the fundamental theorem of integral calculus !!! The fundamental theorem is not just
|
|
187144
|
+
* an abstraction !!! It is being used here in its barest possible form !!!
|
|
187082
187145
|
* * See https://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus
|
|
187083
187146
|
* @param startFraction
|
|
187084
187147
|
* @param signedDistance
|
|
@@ -187159,20 +187222,25 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187159
187222
|
return result;
|
|
187160
187223
|
}
|
|
187161
187224
|
/**
|
|
187162
|
-
* * Returns true if the curve
|
|
187225
|
+
* * Returns true if the curve can be easily extended past its start/end point (i.e., beyond the usual
|
|
187226
|
+
* fraction space [0,1]). Otherwise, returns false.
|
|
187163
187227
|
* * Base class default implementation returns false.
|
|
187164
|
-
* * These
|
|
187228
|
+
* * These classes (and perhaps others in the future) will return true:
|
|
187165
187229
|
* * LineSegment3d
|
|
187166
187230
|
* * LineString3d
|
|
187167
187231
|
* * Arc3d
|
|
187168
187232
|
*/
|
|
187169
|
-
get isExtensibleFractionSpace() {
|
|
187170
|
-
|
|
187171
|
-
|
|
187233
|
+
get isExtensibleFractionSpace() {
|
|
187234
|
+
return false;
|
|
187235
|
+
}
|
|
187236
|
+
/**
|
|
187237
|
+
* Search for a point on the curve that is closest to the spacePoint.
|
|
187172
187238
|
* * If the space point is exactly on the curve, this is the reverse of fractionToPoint.
|
|
187173
|
-
* * Since CurvePrimitive should always have start and end available as candidate points, this method should always
|
|
187239
|
+
* * Since CurvePrimitive should always have start and end available as candidate points, this method should always
|
|
187240
|
+
* succeed
|
|
187174
187241
|
* @param spacePoint point in space
|
|
187175
|
-
* @param extend true to extend the curve (if possible), false for no extend, single CurveExtendOptions (for both
|
|
187242
|
+
* @param extend true to extend the curve (if possible), false for no extend, single CurveExtendOptions (for both
|
|
187243
|
+
* directions), or array of distinct CurveExtendOptions for start and end.
|
|
187176
187244
|
* @returns Returns a CurveLocationDetail structure that holds the details of the close point.
|
|
187177
187245
|
*/
|
|
187178
187246
|
closestPoint(spacePoint, extend) {
|
|
@@ -187183,14 +187251,16 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187183
187251
|
/**
|
|
187184
187252
|
* Find intervals of this curvePrimitive that are interior to a clipper
|
|
187185
187253
|
* @param clipper clip structure (e.g. clip planes)
|
|
187186
|
-
* @param announce (optional) function to be called announcing fractional intervals
|
|
187254
|
+
* @param announce (optional) function to be called announcing fractional intervals
|
|
187255
|
+
* `announce(fraction0, fraction1, curvePrimitive)`
|
|
187187
187256
|
* @returns true if any "in" segments are announced.
|
|
187188
187257
|
*/
|
|
187189
187258
|
announceClipIntervals(_clipper, _announce) {
|
|
187190
187259
|
// DEFAULT IMPLEMENTATION -- no interior parts
|
|
187191
187260
|
return false;
|
|
187192
187261
|
}
|
|
187193
|
-
/**
|
|
187262
|
+
/**
|
|
187263
|
+
* Return (if possible) a curve primitive which is a portion of this curve.
|
|
187194
187264
|
* @param _fractionA [in] start fraction
|
|
187195
187265
|
* @param _fractionB [in] end fraction
|
|
187196
187266
|
*/
|
|
@@ -187198,8 +187268,8 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187198
187268
|
return undefined;
|
|
187199
187269
|
}
|
|
187200
187270
|
/**
|
|
187201
|
-
*
|
|
187202
|
-
*
|
|
187271
|
+
* If the curve primitive has distance-along-curve strictly proportional to curve fraction, return the scale factor.
|
|
187272
|
+
* If distance-along-the-curve is not proportional, return undefined.
|
|
187203
187273
|
* * When defined, the scale factor is always the length of the curve.
|
|
187204
187274
|
* * This scale factor is typically available for these curve types:
|
|
187205
187275
|
* * * All `LineSegment3d`
|
|
@@ -187210,12 +187280,14 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187210
187280
|
* * * bspline and bezier curves
|
|
187211
187281
|
* @returns scale factor or undefined
|
|
187212
187282
|
*/
|
|
187213
|
-
getFractionToDistanceScale() {
|
|
187283
|
+
getFractionToDistanceScale() {
|
|
187284
|
+
return undefined;
|
|
187285
|
+
}
|
|
187214
187286
|
/**
|
|
187215
|
-
* Compute intersections with a plane.
|
|
187287
|
+
* Compute intersections of the curve with a plane.
|
|
187216
187288
|
* * The intersections are appended to the result array.
|
|
187217
|
-
* * The base class implementation emits strokes to an AppendPlaneIntersectionStrokeHandler object, which uses a
|
|
187218
|
-
*
|
|
187289
|
+
* * The base class implementation emits strokes to an AppendPlaneIntersectionStrokeHandler object, which uses a
|
|
187290
|
+
* Newton iteration to get high-accuracy intersection points within strokes.
|
|
187219
187291
|
* * Derived classes should override this default implementation if there are easy analytic solutions.
|
|
187220
187292
|
* * Derived classes are free to implement extended intersections (e.g. arc!!!)
|
|
187221
187293
|
* @param plane The plane to be intersected.
|
|
@@ -187232,8 +187304,8 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187232
187304
|
* Examine contents of an array of CurveLocationDetail.
|
|
187233
187305
|
* Filter the intersections according to the parameters.
|
|
187234
187306
|
* @param allowExtend if false, remove points on the extension.
|
|
187235
|
-
* @param applySnappedCoordinates if true, change the stored fractions and coordinates to exact end values.
|
|
187236
|
-
*
|
|
187307
|
+
* @param applySnappedCoordinates if true, change the stored fractions and coordinates to exact end values.
|
|
187308
|
+
* Otherwise use the exact values only for purpose of updating the curveIntervalRole.
|
|
187237
187309
|
* @param startEndFractionTolerance if nonzero, adjust fraction to 0 or 1 with this tolerance.
|
|
187238
187310
|
* @param startEndXYZTolerance if nonzero, adjust to endpoint with this tolerance.
|
|
187239
187311
|
* @internal
|
|
@@ -187296,12 +187368,16 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187296
187368
|
if (acceptIndex < n0)
|
|
187297
187369
|
details.length = acceptIndex;
|
|
187298
187370
|
}
|
|
187299
|
-
/**
|
|
187300
|
-
startPoint(result) {
|
|
187301
|
-
|
|
187302
|
-
|
|
187371
|
+
/** Return the startPoint of the primitive. The default implementation returns fractionToPoint(0.0) */
|
|
187372
|
+
startPoint(result) {
|
|
187373
|
+
return this.fractionToPoint(0.0, result);
|
|
187374
|
+
}
|
|
187375
|
+
/** Return the end point of the primitive. The default implementation returns fractionToPoint(1.0) */
|
|
187376
|
+
endPoint(result) {
|
|
187377
|
+
return this.fractionToPoint(1.0, result);
|
|
187378
|
+
}
|
|
187303
187379
|
/**
|
|
187304
|
-
*
|
|
187380
|
+
* Attach StrokeCountMap structure to this primitive (and recursively to any children)
|
|
187305
187381
|
* * Base class implementation (here) gets the simple count from computeStrokeCountForOptions and attaches it.
|
|
187306
187382
|
* * LineString3d, arc3d, BezierCurve3d, BezierCurve3dH accept that default.
|
|
187307
187383
|
* * Subdivided primitives (linestring, bspline curve) implement themselves and attach a StrokeCountMap containing the
|
|
@@ -187309,7 +187385,8 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187309
187385
|
* * For CurvePrimitiveWithDistanceIndex, the top level gets (only) a total count, and each child gets
|
|
187310
187386
|
* its own StrokeCountMap with appropriate structure.
|
|
187311
187387
|
* @param options StrokeOptions that determine count
|
|
187312
|
-
* @param parentStrokeMap optional map from parent. Its count, curveLength, and a1 values are increased with count
|
|
187388
|
+
* @param parentStrokeMap optional map from parent. Its count, curveLength, and a1 values are increased with count
|
|
187389
|
+
* and distance from this primitive.
|
|
187313
187390
|
* @return sum of `a0+this.curveLength()`, for use as `a0` of successor in chain.
|
|
187314
187391
|
*/
|
|
187315
187392
|
computeAndAttachRecursiveStrokeCounts(options, parentMap) {
|
|
@@ -187318,8 +187395,9 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187318
187395
|
CurvePrimitive.installStrokeCountMap(this, _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_12__.StrokeCountMap.createWithCurvePrimitive(this, n, a, 0, a), parentMap);
|
|
187319
187396
|
}
|
|
187320
187397
|
/**
|
|
187321
|
-
*
|
|
187322
|
-
* * Base class implementation (here) gets the simple count from computeStrokeCountForOptions and strokes at
|
|
187398
|
+
* Evaluate strokes at fractions indicated in a StrokeCountMap.
|
|
187399
|
+
* * Base class implementation (here) gets the simple count from computeStrokeCountForOptions and strokes at
|
|
187400
|
+
* uniform fractions.
|
|
187323
187401
|
* * LineString3d, arc3d, BezierCurve3d, BezierCurve3dH accept that default.
|
|
187324
187402
|
* * Subdivided primitives (linestring, bspline curve) implement themselves and evaluate within components.
|
|
187325
187403
|
* * CurvePrimitiveWithDistanceIndex recurses to its children.
|
|
@@ -187339,7 +187417,7 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187339
187417
|
return linestring.numPoints() - numPoint0;
|
|
187340
187418
|
}
|
|
187341
187419
|
/**
|
|
187342
|
-
*
|
|
187420
|
+
* Final install step to save curveMap in curve. If parentMap is given, update its length, count, and a1 fields
|
|
187343
187421
|
* @param curve curve to receive the annotation
|
|
187344
187422
|
* @param map
|
|
187345
187423
|
* @param parentMap
|
|
@@ -187353,8 +187431,10 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187353
187431
|
* Return an array containing only the curve primitives.
|
|
187354
187432
|
* * This DEFAULT implementation simply pushes `this` to the collectorArray.
|
|
187355
187433
|
* @param collectorArray array to receive primitives (pushed -- the array is not cleared)
|
|
187356
|
-
* @param smallestPossiblePrimitives if true, a [[CurvePrimitiveWithDistanceIndex]] recurses on its (otherwise hidden)
|
|
187357
|
-
*
|
|
187434
|
+
* @param smallestPossiblePrimitives if true, a [[CurvePrimitiveWithDistanceIndex]] recurses on its (otherwise hidden)
|
|
187435
|
+
* children. If false, it returns only itself.
|
|
187436
|
+
* @param explodeLinestrings if true, push a [[LineSegment3d]] for each segment of a [[LineString3d]]. If false,
|
|
187437
|
+
* push only the [[LineString3d]].
|
|
187358
187438
|
*/
|
|
187359
187439
|
collectCurvePrimitivesGo(collectorArray, _smallestPossiblePrimitives, _explodeLinestrings = false) {
|
|
187360
187440
|
collectorArray.push(this);
|
|
@@ -187362,18 +187442,23 @@ class CurvePrimitive extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_1__.Geometr
|
|
|
187362
187442
|
/**
|
|
187363
187443
|
* Return an array containing only the curve primitives.
|
|
187364
187444
|
* * This DEFAULT implementation captures the optional collector and calls [[collectCurvePrimitivesGo]].
|
|
187365
|
-
* @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without
|
|
187366
|
-
*
|
|
187445
|
+
* @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without
|
|
187446
|
+
* clearing the array.)
|
|
187447
|
+
* @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,
|
|
187448
|
+
* it recurses to its (otherwise hidden) children.
|
|
187367
187449
|
*/
|
|
187368
187450
|
collectCurvePrimitives(collectorArray, smallestPossiblePrimitives = false, explodeLinestrings = false) {
|
|
187369
187451
|
const results = collectorArray === undefined ? [] : collectorArray;
|
|
187370
187452
|
this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);
|
|
187371
187453
|
return results;
|
|
187372
187454
|
}
|
|
187373
|
-
/**
|
|
187455
|
+
/**
|
|
187456
|
+
* Project instance geometry (via dispatch) onto the line of the given ray, and return the extreme fractional
|
|
187457
|
+
* parameters of projection.
|
|
187374
187458
|
* @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
|
|
187375
187459
|
* @param lowHigh optional receiver for output
|
|
187376
|
-
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
|
|
187460
|
+
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
|
|
187461
|
+
* end of the ray.
|
|
187377
187462
|
*/
|
|
187378
187463
|
projectedParameterRange(_ray, _lowHigh) {
|
|
187379
187464
|
return undefined; // common implementation delegated to subclasses to avoid circular dependency
|
|
@@ -187620,13 +187705,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187620
187705
|
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
187621
187706
|
|
|
187622
187707
|
|
|
187623
|
-
/** Queries to be supported by Curve, Surface, and Solid objects */
|
|
187624
187708
|
/**
|
|
187625
|
-
*
|
|
187709
|
+
* Queries to be supported by Curve, Surface, and Solid objects
|
|
187710
|
+
* * `GeometryQuery` is an abstract base class with (abstract) methods for querying curve, solid primitive, mesh,
|
|
187711
|
+
* and bspline surfaces
|
|
187626
187712
|
* @public
|
|
187627
187713
|
*/
|
|
187628
187714
|
class GeometryQuery {
|
|
187629
|
-
/**
|
|
187715
|
+
/** Return the range of the entire (tree) GeometryQuery */
|
|
187630
187716
|
range(transform, result) {
|
|
187631
187717
|
if (result)
|
|
187632
187718
|
result.setNull();
|
|
@@ -187634,17 +187720,17 @@ class GeometryQuery {
|
|
|
187634
187720
|
this.extendRange(range, transform);
|
|
187635
187721
|
return range;
|
|
187636
187722
|
}
|
|
187637
|
-
/**
|
|
187723
|
+
/** Try to move the geometry by dx,dy,dz */
|
|
187638
187724
|
tryTranslateInPlace(dx, dy = 0.0, dz = 0.0) {
|
|
187639
187725
|
return this.tryTransformInPlace(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslationXYZ(dx, dy, dz));
|
|
187640
187726
|
}
|
|
187641
|
-
/**
|
|
187642
|
-
*
|
|
187727
|
+
/**
|
|
187728
|
+
* Return GeometryQuery children for recursive queries.
|
|
187643
187729
|
* * leaf classes do not need to implement.
|
|
187644
187730
|
*/
|
|
187645
187731
|
get children() { return undefined; }
|
|
187646
|
-
/**
|
|
187647
|
-
*
|
|
187732
|
+
/**
|
|
187733
|
+
* Test for exact structure and nearly identical geometry.
|
|
187648
187734
|
* * Leaf classes must implement !!!
|
|
187649
187735
|
* * base class implementation recurses through children.
|
|
187650
187736
|
* * base implementation is complete for classes with children and no properties.
|
|
@@ -187673,7 +187759,8 @@ class GeometryQuery {
|
|
|
187673
187759
|
}
|
|
187674
187760
|
return false;
|
|
187675
187761
|
}
|
|
187676
|
-
/**
|
|
187762
|
+
/**
|
|
187763
|
+
* Apply instance method isAlmostEqual if both are defined.
|
|
187677
187764
|
* * both undefined returns true
|
|
187678
187765
|
* * single defined returns false
|
|
187679
187766
|
*/
|
|
@@ -187729,33 +187816,41 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
187729
187816
|
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
187730
187817
|
/**
|
|
187731
187818
|
* A LineSegment3d is:
|
|
187732
|
-
*
|
|
187733
187819
|
* * A 3d line segment represented by its start and end coordinates
|
|
187734
187820
|
* * startPoint
|
|
187735
187821
|
* * endPoint
|
|
187736
|
-
* * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. either of these
|
|
187822
|
+
* * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. either of these
|
|
187823
|
+
* equivalent forms to map fraction `f` to a point `X(f)`
|
|
187737
187824
|
* ```
|
|
187738
187825
|
* equation
|
|
187739
|
-
* X(f) = P_0 + f
|
|
187740
|
-
* X(f) = (1-f)*P_0
|
|
187826
|
+
* X(f) = P_0 + f*(P_1 - P_0)\newline
|
|
187827
|
+
* X(f) = (1-f)*P_0 + f*P_1
|
|
187741
187828
|
* ```
|
|
187742
187829
|
* @public
|
|
187743
187830
|
*/
|
|
187744
187831
|
class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive {
|
|
187745
|
-
/**
|
|
187746
|
-
isSameGeometryClass(other) {
|
|
187747
|
-
|
|
187748
|
-
|
|
187749
|
-
|
|
187750
|
-
|
|
187751
|
-
/** Return REFERENCE to the end point of this segment.
|
|
187832
|
+
/** Test if `other` is of class `LineSegment3d` */
|
|
187833
|
+
isSameGeometryClass(other) {
|
|
187834
|
+
return other instanceof LineSegment3d;
|
|
187835
|
+
}
|
|
187836
|
+
/**
|
|
187837
|
+
* Return REFERENCE to the start point of this segment.
|
|
187752
187838
|
* * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point
|
|
187753
187839
|
*/
|
|
187754
|
-
get
|
|
187840
|
+
get point0Ref() {
|
|
187841
|
+
return this._point0;
|
|
187842
|
+
}
|
|
187755
187843
|
/**
|
|
187756
|
-
*
|
|
187844
|
+
* Return REFERENCE to the end point of this segment.
|
|
187845
|
+
* * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point
|
|
187757
187846
|
*/
|
|
187758
|
-
get
|
|
187847
|
+
get point1Ref() {
|
|
187848
|
+
return this._point1;
|
|
187849
|
+
}
|
|
187850
|
+
/** A LineSegment3d extends along its infinite line. */
|
|
187851
|
+
get isExtensibleFractionSpace() {
|
|
187852
|
+
return true;
|
|
187853
|
+
}
|
|
187759
187854
|
/**
|
|
187760
187855
|
* CAPTURE point references as a `LineSegment3d`
|
|
187761
187856
|
* @param point0
|
|
@@ -187769,12 +187864,21 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187769
187864
|
this._point1 = point1;
|
|
187770
187865
|
}
|
|
187771
187866
|
/** Set the start and endpoints by capturing input references. */
|
|
187772
|
-
setRefs(point0, point1) {
|
|
187867
|
+
setRefs(point0, point1) {
|
|
187868
|
+
this._point0 = point0;
|
|
187869
|
+
this._point1 = point1;
|
|
187870
|
+
}
|
|
187773
187871
|
/** Set the start and endpoints by cloning the input parameters. */
|
|
187774
|
-
set(point0, point1) {
|
|
187775
|
-
|
|
187776
|
-
|
|
187777
|
-
|
|
187872
|
+
set(point0, point1) {
|
|
187873
|
+
this._point0 = point0.clone();
|
|
187874
|
+
this._point1 = point1.clone();
|
|
187875
|
+
}
|
|
187876
|
+
/** Copy (clone) data from other */
|
|
187877
|
+
setFrom(other) {
|
|
187878
|
+
this._point0.setFrom(other._point0);
|
|
187879
|
+
this._point1.setFrom(other._point1);
|
|
187880
|
+
}
|
|
187881
|
+
/** Return a (clone of) the start point (This is NOT a reference to the stored start point) */
|
|
187778
187882
|
startPoint(result) {
|
|
187779
187883
|
if (result) {
|
|
187780
187884
|
result.setFrom(this._point0);
|
|
@@ -187782,7 +187886,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187782
187886
|
}
|
|
187783
187887
|
return this._point0.clone();
|
|
187784
187888
|
}
|
|
187785
|
-
/** Return a (clone of) the end point
|
|
187889
|
+
/** Return a (clone of) the end point (This is NOT a reference to the stored end point) */
|
|
187786
187890
|
endPoint(result) {
|
|
187787
187891
|
if (result) {
|
|
187788
187892
|
result.setFrom(this._point1);
|
|
@@ -187797,7 +187901,8 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187797
187901
|
this._point0.interpolate(fraction, this._point1, result.origin);
|
|
187798
187902
|
return result;
|
|
187799
187903
|
}
|
|
187800
|
-
/**
|
|
187904
|
+
/**
|
|
187905
|
+
* Construct a plane with
|
|
187801
187906
|
* * origin at the fractional position along the line segment
|
|
187802
187907
|
* * x axis is the first derivative, i.e. along the line segment
|
|
187803
187908
|
* * y axis is the second derivative, i.e. 000
|
|
@@ -187810,7 +187915,9 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187810
187915
|
return result;
|
|
187811
187916
|
}
|
|
187812
187917
|
/** Clone the LineSegment3d */
|
|
187813
|
-
clone() {
|
|
187918
|
+
clone() {
|
|
187919
|
+
return LineSegment3d.create(this._point0, this._point1);
|
|
187920
|
+
}
|
|
187814
187921
|
/** Clone and apply transform to the clone. */
|
|
187815
187922
|
cloneTransformed(transform) {
|
|
187816
187923
|
const c = this.clone();
|
|
@@ -187829,7 +187936,8 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187829
187936
|
static createCapture(point0, point1) {
|
|
187830
187937
|
return new LineSegment3d(point0, point1);
|
|
187831
187938
|
}
|
|
187832
|
-
/**
|
|
187939
|
+
/**
|
|
187940
|
+
* Create a LineSegment3d from xy coordinates of start and end, with common z.
|
|
187833
187941
|
* @param x0 start point x coordinate.
|
|
187834
187942
|
* @param y0 start point y coordinate.
|
|
187835
187943
|
* @param x1 end point x coordinate.
|
|
@@ -187845,7 +187953,8 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187845
187953
|
}
|
|
187846
187954
|
return new LineSegment3d(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create(x0, y0, z), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create(x1, y1, z));
|
|
187847
187955
|
}
|
|
187848
|
-
/**
|
|
187956
|
+
/**
|
|
187957
|
+
* Create a LineSegment3d from xy coordinates of start and end, with common z.
|
|
187849
187958
|
* @param x0 start point x coordinate.
|
|
187850
187959
|
* @param y0 start point y coordinate.
|
|
187851
187960
|
* @param x1 end point x coordinate.
|
|
@@ -187862,19 +187971,26 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187862
187971
|
return new LineSegment3d(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create(x0, y0, z0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create(x1, y1, z1));
|
|
187863
187972
|
}
|
|
187864
187973
|
/** Return the point at fractional position along the line segment. */
|
|
187865
|
-
fractionToPoint(fraction, result) {
|
|
187974
|
+
fractionToPoint(fraction, result) {
|
|
187975
|
+
return this._point0.interpolate(fraction, this._point1, result);
|
|
187976
|
+
}
|
|
187866
187977
|
/** Return the length of the segment. */
|
|
187867
|
-
curveLength() {
|
|
187978
|
+
curveLength() {
|
|
187979
|
+
return this._point0.distance(this._point1);
|
|
187980
|
+
}
|
|
187868
187981
|
/** Return the length of the partial segment between fractions. */
|
|
187869
187982
|
curveLengthBetweenFractions(fraction0, fraction1) {
|
|
187870
187983
|
return Math.abs(fraction1 - fraction0) * this._point0.distance(this._point1);
|
|
187871
187984
|
}
|
|
187872
187985
|
/** Return the length of the segment. */
|
|
187873
|
-
quickLength() {
|
|
187986
|
+
quickLength() {
|
|
187987
|
+
return this.curveLength();
|
|
187988
|
+
}
|
|
187874
187989
|
/**
|
|
187875
187990
|
* Returns a curve location detail with both xyz and fractional coordinates of the closest point.
|
|
187876
187991
|
* @param spacePoint point in space
|
|
187877
|
-
* @param extend if false, only return points within the bounded line segment. If true, allow the point to be on
|
|
187992
|
+
* @param extend if false, only return points within the bounded line segment. If true, allow the point to be on
|
|
187993
|
+
* the unbounded line that contains the bounded segment.
|
|
187878
187994
|
*/
|
|
187879
187995
|
closestPoint(spacePoint, extend, result) {
|
|
187880
187996
|
let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);
|
|
@@ -187888,7 +188004,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187888
188004
|
result.a = result.point.distance(spacePoint);
|
|
187889
188005
|
return result;
|
|
187890
188006
|
}
|
|
187891
|
-
/**
|
|
188007
|
+
/** Swap the endpoint references. */
|
|
187892
188008
|
reverseInPlace() {
|
|
187893
188009
|
const a = this._point0;
|
|
187894
188010
|
this._point0 = this._point1;
|
|
@@ -187905,7 +188021,8 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187905
188021
|
return _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(plane.altitude(this._point0))
|
|
187906
188022
|
&& _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.isSmallMetricDistance(plane.altitude(this._point1));
|
|
187907
188023
|
}
|
|
187908
|
-
/**
|
|
188024
|
+
/**
|
|
188025
|
+
* Compute points of simple (transverse) with a plane.
|
|
187909
188026
|
* * Use isInPlane to test if the line segment is completely in the plane.
|
|
187910
188027
|
*/
|
|
187911
188028
|
appendPlaneIntersectionPoints(plane, result) {
|
|
@@ -187963,12 +188080,16 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187963
188080
|
}
|
|
187964
188081
|
}
|
|
187965
188082
|
/** A simple line segment's fraction and distance are proportional. */
|
|
187966
|
-
getFractionToDistanceScale() {
|
|
188083
|
+
getFractionToDistanceScale() {
|
|
188084
|
+
return this.curveLength();
|
|
188085
|
+
}
|
|
187967
188086
|
/**
|
|
187968
188087
|
* Place the lineSegment3d start and points in a json object
|
|
187969
188088
|
* @return {*} [[x,y,z],[x,y,z]]
|
|
187970
188089
|
*/
|
|
187971
|
-
toJSON() {
|
|
188090
|
+
toJSON() {
|
|
188091
|
+
return [this._point0.toJSON(), this._point1.toJSON()];
|
|
188092
|
+
}
|
|
187972
188093
|
/** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */
|
|
187973
188094
|
static fromJSON(json) {
|
|
187974
188095
|
const result = new LineSegment3d(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.createZero(), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_3__.Point3d.create());
|
|
@@ -187996,7 +188117,7 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
187996
188117
|
handler.endCurvePrimitive(this);
|
|
187997
188118
|
}
|
|
187998
188119
|
/**
|
|
187999
|
-
*
|
|
188120
|
+
* Return the stroke count required for given options.
|
|
188000
188121
|
* @param options StrokeOptions that determine count
|
|
188001
188122
|
*/
|
|
188002
188123
|
computeStrokeCountForOptions(options) {
|
|
@@ -188008,19 +188129,20 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
188008
188129
|
}
|
|
188009
188130
|
return numStroke;
|
|
188010
188131
|
}
|
|
188011
|
-
/** Second step of double dispatch:
|
|
188132
|
+
/** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */
|
|
188012
188133
|
dispatchToGeometryHandler(handler) {
|
|
188013
188134
|
return handler.handleLineSegment3d(this);
|
|
188014
188135
|
}
|
|
188015
188136
|
/**
|
|
188016
188137
|
* Find intervals of this curve primitive that are interior to a clipper
|
|
188017
188138
|
* @param clipper clip structure (e.g. clip planes)
|
|
188018
|
-
* @param announce function to be called announcing fractional intervals
|
|
188139
|
+
* @param announce function to be called announcing fractional intervals `announce(fraction0, fraction1, curvePrimitive)`
|
|
188019
188140
|
*/
|
|
188020
188141
|
announceClipIntervals(clipper, announce) {
|
|
188021
188142
|
return clipper.announceClippedSegmentIntervals(0.0, 1.0, this._point0, this._point1, announce ? (fraction0, fraction1) => announce(fraction0, fraction1, this) : undefined);
|
|
188022
188143
|
}
|
|
188023
|
-
/**
|
|
188144
|
+
/**
|
|
188145
|
+
* Return (if possible) a curve primitive which is a portion of this curve.
|
|
188024
188146
|
* @param fractionA [in] start fraction
|
|
188025
188147
|
* @param fractionB [in] end fraction
|
|
188026
188148
|
*/
|
|
@@ -188060,10 +188182,13 @@ class LineSegment3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePr
|
|
|
188060
188182
|
}
|
|
188061
188183
|
return undefined;
|
|
188062
188184
|
}
|
|
188063
|
-
/**
|
|
188185
|
+
/**
|
|
188186
|
+
* Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of
|
|
188187
|
+
* projection.
|
|
188064
188188
|
* @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
|
|
188065
188189
|
* @param lowHigh optional receiver for output
|
|
188066
|
-
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
|
|
188190
|
+
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
|
|
188191
|
+
* end of the ray.
|
|
188067
188192
|
*/
|
|
188068
188193
|
projectedParameterRange(ray, lowHigh) {
|
|
188069
188194
|
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_10__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
@@ -188124,11 +188249,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
188124
188249
|
|
|
188125
188250
|
|
|
188126
188251
|
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
188127
|
-
|
|
188128
|
-
|
|
188129
|
-
|
|
188130
|
-
|
|
188131
|
-
|
|
188252
|
+
/**
|
|
188253
|
+
* Starting with baseIndex and moving index by stepDirection:
|
|
188254
|
+
* If the vector from baseIndex to baseIndex +1 crossed with vectorA can be normalized, accumulate it (scaled) to normal.
|
|
188255
|
+
* Return when successful.
|
|
188256
|
+
* (Do nothing if everything is parallel through limits of the array)
|
|
188257
|
+
*/
|
|
188132
188258
|
function accumulateGoodUnitPerpendicular(points, vectorA, baseIndex, stepDirection, weight, normal, workVector) {
|
|
188133
188259
|
const n = points.length;
|
|
188134
188260
|
if (stepDirection > 0) {
|
|
@@ -188156,43 +188282,67 @@ function accumulateGoodUnitPerpendicular(points, vectorA, baseIndex, stepDirecti
|
|
|
188156
188282
|
return false;
|
|
188157
188283
|
}
|
|
188158
188284
|
/**
|
|
188159
|
-
* * A LineString3d (sometimes called a PolyLine) is a sequence of xyz coordinates that are to be joined by line
|
|
188160
|
-
*
|
|
188285
|
+
* * A LineString3d (sometimes called a PolyLine) is a sequence of xyz coordinates that are to be joined by line
|
|
188286
|
+
* segments.
|
|
188287
|
+
* * The point coordinates are stored in a GrowableXYZArray, not as full point objects.
|
|
188161
188288
|
* * The parameterization of "fraction along" is
|
|
188162
|
-
* * In a linestring with `N` segments (i.e. `N+1` points), each segment (regardless of physical length) occupies
|
|
188289
|
+
* * In a linestring with `N` segments (i.e. `N+1` points), each segment (regardless of physical length) occupies
|
|
188290
|
+
* the same fraction (1/N) of the 0-to-1 fraction space.
|
|
188163
188291
|
* * Within segment `i`, the fraction interval `i/N` to `(i+1)/N` is mapped proportionally to the segment
|
|
188164
188292
|
* * Note that this `fraction` is therefore NOT fraction of true distance along.
|
|
188165
|
-
*
|
|
188293
|
+
* * Use `moveSignedDistanceFromFraction` to do true-length evaluations.
|
|
188166
188294
|
* @public
|
|
188167
188295
|
*/
|
|
188168
188296
|
class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePrimitive {
|
|
188169
188297
|
/** test if `other` is an instance of `LineString3d` */
|
|
188170
|
-
isSameGeometryClass(other) {
|
|
188171
|
-
|
|
188172
|
-
|
|
188173
|
-
|
|
188174
|
-
get isExtensibleFractionSpace() {
|
|
188175
|
-
|
|
188176
|
-
|
|
188298
|
+
isSameGeometryClass(other) {
|
|
188299
|
+
return other instanceof LineString3d;
|
|
188300
|
+
}
|
|
188301
|
+
/** A LineString3d extends along its first and final segments. */
|
|
188302
|
+
get isExtensibleFractionSpace() {
|
|
188303
|
+
return true;
|
|
188304
|
+
}
|
|
188305
|
+
/** Return the points array (cloned). */
|
|
188306
|
+
get points() {
|
|
188307
|
+
return this._points.getPoint3dArray();
|
|
188308
|
+
}
|
|
188177
188309
|
/** Return (reference to) point data in packed GrowableXYZArray. */
|
|
188178
|
-
get packedPoints() {
|
|
188179
|
-
|
|
188310
|
+
get packedPoints() {
|
|
188311
|
+
return this._points;
|
|
188312
|
+
}
|
|
188313
|
+
/**
|
|
188314
|
+
* Return array of fraction parameters.
|
|
188180
188315
|
* * These Are only present during certain constructions such as faceting.
|
|
188181
|
-
* * When present, these fractions are fractions of some other curve being stroked, and are NOT related to the
|
|
188316
|
+
* * When present, these fractions are fractions of some other curve being stroked, and are NOT related to the
|
|
188317
|
+
* linestring fraction parameters.
|
|
188182
188318
|
*/
|
|
188183
|
-
get fractions() {
|
|
188319
|
+
get fractions() {
|
|
188320
|
+
return this._fractions;
|
|
188321
|
+
}
|
|
188184
188322
|
/** Return the (optional) array of derivatives. These Are only present during certain constructions such as faceting. */
|
|
188185
|
-
get packedDerivatives() {
|
|
188323
|
+
get packedDerivatives() {
|
|
188324
|
+
return this._derivatives;
|
|
188325
|
+
}
|
|
188186
188326
|
/** Return the (optional) array of uv params. These Are only present during certain constructions such as faceting. */
|
|
188187
|
-
get packedUVParams() {
|
|
188327
|
+
get packedUVParams() {
|
|
188328
|
+
return this._uvParams;
|
|
188329
|
+
}
|
|
188188
188330
|
/** Return the (optional) array of surface normals. These Are only present during certain constructions such as faceting. */
|
|
188189
|
-
get packedSurfaceNormals() {
|
|
188331
|
+
get packedSurfaceNormals() {
|
|
188332
|
+
return this._surfaceNormals;
|
|
188333
|
+
}
|
|
188190
188334
|
/** Return the (optional) array of normal indices. These Are only present during certain constructions such as faceting. */
|
|
188191
|
-
get normalIndices() {
|
|
188335
|
+
get normalIndices() {
|
|
188336
|
+
return this._normalIndices;
|
|
188337
|
+
}
|
|
188192
188338
|
/** Return the (optional) array of param indices. These Are only present during certain constructions such as faceting. */
|
|
188193
|
-
get paramIndices() {
|
|
188339
|
+
get paramIndices() {
|
|
188340
|
+
return this._uvIndices;
|
|
188341
|
+
}
|
|
188194
188342
|
/** Return the (optional) array of point indices. These Are only present during certain constructions such as faceting. */
|
|
188195
|
-
get pointIndices() {
|
|
188343
|
+
get pointIndices() {
|
|
188344
|
+
return this._pointIndices;
|
|
188345
|
+
}
|
|
188196
188346
|
constructor(points) {
|
|
188197
188347
|
super();
|
|
188198
188348
|
/** String name for schema properties */
|
|
@@ -188208,7 +188358,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188208
188358
|
c.tryTransformInPlace(transform);
|
|
188209
188359
|
return c;
|
|
188210
188360
|
}
|
|
188211
|
-
/**
|
|
188361
|
+
/**
|
|
188362
|
+
* Create a linestring, using flex length arg list and any typical combination of points such as
|
|
188212
188363
|
* Point3d, Point2d, `[1,2,3]', array of any of those, or GrowableXYZArray
|
|
188213
188364
|
*/
|
|
188214
188365
|
static create(...points) {
|
|
@@ -188216,7 +188367,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188216
188367
|
result.addPoints(points);
|
|
188217
188368
|
return result;
|
|
188218
188369
|
}
|
|
188219
|
-
/**
|
|
188370
|
+
/**
|
|
188371
|
+
* Create a linestring, capturing the given GrowableXYZArray as the points.
|
|
188220
188372
|
* Point3d, Point2d, `[1,2,3]', array of any of those, or GrowableXYZArray
|
|
188221
188373
|
*/
|
|
188222
188374
|
static createCapture(points) {
|
|
@@ -188241,7 +188393,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188241
188393
|
}
|
|
188242
188394
|
return result;
|
|
188243
188395
|
}
|
|
188244
|
-
/**
|
|
188396
|
+
/**
|
|
188397
|
+
* Add points to the linestring.
|
|
188245
188398
|
* Valid inputs are:
|
|
188246
188399
|
* * a Point2d
|
|
188247
188400
|
* * a point3d
|
|
@@ -188393,9 +188546,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188393
188546
|
this._surfaceNormals = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_1__.GrowableXYZArray();
|
|
188394
188547
|
this._surfaceNormals.push(vector);
|
|
188395
188548
|
}
|
|
188396
|
-
/**
|
|
188397
|
-
* If the linestring is not already closed, add a closure point.
|
|
188398
|
-
*/
|
|
188549
|
+
/** If the linestring is not already closed, add a closure point. */
|
|
188399
188550
|
addClosurePoint() {
|
|
188400
188551
|
const distance = this._points.distanceIndexIndex(0, this._points.length - 1);
|
|
188401
188552
|
if (distance !== undefined && !_Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSameCoordinate(distance, 0))
|
|
@@ -188409,7 +188560,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188409
188560
|
computeUVFromXYZTransform(transform) {
|
|
188410
188561
|
this._uvParams = _geometry3d_GrowableXYArray__WEBPACK_IMPORTED_MODULE_4__.GrowableXYArray.createFromGrowableXYZArray(this._points, transform);
|
|
188411
188562
|
}
|
|
188412
|
-
/**
|
|
188563
|
+
/**
|
|
188564
|
+
* Create the linestring for a rectangle parallel to the xy plane.
|
|
188413
188565
|
* * The z coordinate from `point0` is used for all points.
|
|
188414
188566
|
* * `ax` and `ay` are signed.
|
|
188415
188567
|
* * The point sequence is:
|
|
@@ -188440,7 +188592,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188440
188592
|
* @param center center of the polygon.
|
|
188441
188593
|
* @param edgeCount number of edges.
|
|
188442
188594
|
* @param radius distance to vertex or edge (see `radiusToVertices`)
|
|
188443
|
-
* @param radiusToVertices true if polygon is inscribed in circle (radius measured to vertices); false if polygon
|
|
188595
|
+
* @param radiusToVertices true if polygon is inscribed in circle (radius measured to vertices); false if polygon
|
|
188596
|
+
* is outside circle (radius to edges)
|
|
188444
188597
|
*/
|
|
188445
188598
|
static createRegularPolygonXY(center, edgeCount, radius, radiusToVertices = true) {
|
|
188446
188599
|
if (edgeCount < 3)
|
|
@@ -188522,7 +188675,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188522
188675
|
retVal.setFrom(this);
|
|
188523
188676
|
return retVal;
|
|
188524
188677
|
}
|
|
188525
|
-
/**
|
|
188678
|
+
/**
|
|
188679
|
+
* Set point coordinates from a json array, e.g. `[[1,2,3],[4,5,6] . . .]`
|
|
188526
188680
|
* * The `json` parameter must be an array.
|
|
188527
188681
|
* * Each member `i` of the array is converted to a point with `Point3d.fromJSON(json[i]`)
|
|
188528
188682
|
*/
|
|
@@ -188547,7 +188701,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188547
188701
|
}
|
|
188548
188702
|
return value;
|
|
188549
188703
|
}
|
|
188550
|
-
/**
|
|
188704
|
+
/**
|
|
188705
|
+
* Construct a new linestring.
|
|
188551
188706
|
* * See `LineString3d.setFromJSON ()` for remarks on `json` structure.
|
|
188552
188707
|
*/
|
|
188553
188708
|
static fromJSON(json) {
|
|
@@ -188637,7 +188792,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188637
188792
|
}
|
|
188638
188793
|
/**
|
|
188639
188794
|
* Convert a global fraction to a segment index and local fraction.
|
|
188640
|
-
* @param globalFraction a fraction f in [0,1] in the linestring parameterization, where the i_th segment
|
|
188795
|
+
* @param globalFraction a fraction f in [0,1] in the linestring parameterization, where the i_th segment
|
|
188796
|
+
* (0 <= i < N) is parameterized by i/N <= f <= (i+1)/N.
|
|
188641
188797
|
*/
|
|
188642
188798
|
globalFractionToSegmentIndexAndLocalFraction(globalFraction) {
|
|
188643
188799
|
const numSegment = this._points.length - 1;
|
|
@@ -188701,7 +188857,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188701
188857
|
return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_9__.Transform.createOriginAndMatrix(origin, matrix, result);
|
|
188702
188858
|
return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_9__.Transform.createTranslation(origin, result);
|
|
188703
188859
|
}
|
|
188704
|
-
/**
|
|
188860
|
+
/** Evaluate the start point of the linestring. */
|
|
188705
188861
|
startPoint() {
|
|
188706
188862
|
if (this._points.length === 0)
|
|
188707
188863
|
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.createZero();
|
|
@@ -188713,8 +188869,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188713
188869
|
return this._points.getPoint3dAtUncheckedPointIndex(i, result);
|
|
188714
188870
|
return undefined;
|
|
188715
188871
|
}
|
|
188716
|
-
/** If i and j are both valid indices, return the vector from point i to point j
|
|
188717
|
-
*/
|
|
188872
|
+
/** If i and j are both valid indices, return the vector from point i to point j */
|
|
188718
188873
|
vectorBetween(i, j, result) {
|
|
188719
188874
|
return this._points.vectorIndexIndex(i, j, result);
|
|
188720
188875
|
}
|
|
@@ -188731,8 +188886,10 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188731
188886
|
return undefined;
|
|
188732
188887
|
}
|
|
188733
188888
|
/** Return the number of points in this linestring. */
|
|
188734
|
-
numPoints() {
|
|
188735
|
-
|
|
188889
|
+
numPoints() {
|
|
188890
|
+
return this._points.length;
|
|
188891
|
+
}
|
|
188892
|
+
/** Evaluate the end point of the linestring. */
|
|
188736
188893
|
endPoint() {
|
|
188737
188894
|
if (this._points.length === 0)
|
|
188738
188895
|
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.createZero();
|
|
@@ -188756,7 +188913,9 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188756
188913
|
return true;
|
|
188757
188914
|
}
|
|
188758
188915
|
/** Sum the lengths of segments within the linestring */
|
|
188759
|
-
curveLength() {
|
|
188916
|
+
curveLength() {
|
|
188917
|
+
return this._points.sumLengths();
|
|
188918
|
+
}
|
|
188760
188919
|
/** Sum the lengths of segments between fractional positions on a linestring. */
|
|
188761
188920
|
curveLengthBetweenFractions(fraction0, fraction1) {
|
|
188762
188921
|
const numSegments = this._points.length - 1;
|
|
@@ -188855,10 +189014,10 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188855
189014
|
return _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveLocationDetail.createCurveFractionPointDistanceCurveSearchStatus(this, context.fraction0, context.point0, -context.distance0, context.distanceStatus(), result);
|
|
188856
189015
|
}
|
|
188857
189016
|
}
|
|
188858
|
-
/**
|
|
189017
|
+
/** Sum lengths of segments in the linestring. (This is a true length.) */
|
|
188859
189018
|
quickLength() { return this.curveLength(); }
|
|
188860
189019
|
/**
|
|
188861
|
-
*
|
|
189020
|
+
* Compute and normalize cross product among 3 points on the linestring.
|
|
188862
189021
|
* * "any" 3 points are acceptable -- no test for positive overall sense.
|
|
188863
189022
|
* * This is appropriate for polygon known to be convex.
|
|
188864
189023
|
* * use points spread at index step n/3, hopefully avoiding colinear points.
|
|
@@ -188897,7 +189056,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188897
189056
|
if (!extend1 || i < lastIndex)
|
|
188898
189057
|
segmentFraction = 1.0;
|
|
188899
189058
|
}
|
|
188900
|
-
this._points.getPoint3dAtUncheckedPointIndex(i - 1)
|
|
189059
|
+
this._points.getPoint3dAtUncheckedPointIndex(i - 1)
|
|
189060
|
+
.interpolate(segmentFraction, this._points.getPoint3dAtUncheckedPointIndex(i), result.pointQ);
|
|
188901
189061
|
d = result.pointQ.distance(spacePoint);
|
|
188902
189062
|
if (d < result.a) {
|
|
188903
189063
|
result.setFP(this.segmentIndexAndLocalFractionToGlobalFraction(i - 1, segmentFraction), result.pointQ, undefined, d);
|
|
@@ -188911,8 +189071,9 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188911
189071
|
isInPlane(plane) {
|
|
188912
189072
|
return this._points.isCloseToPlane(plane, _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance);
|
|
188913
189073
|
}
|
|
188914
|
-
/**
|
|
188915
|
-
*
|
|
189074
|
+
/**
|
|
189075
|
+
* Push a hit, fixing up the prior entry if needed.
|
|
189076
|
+
* Return the incremented counter.
|
|
188916
189077
|
*/
|
|
188917
189078
|
static pushVertexHit(result, counter, cp, fraction, point) {
|
|
188918
189079
|
const detail = _CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveLocationDetail.createCurveFractionPoint(cp, fraction, point);
|
|
@@ -188929,7 +189090,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188929
189090
|
detail.setIntervalRole(_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_12__.CurveIntervalRole.intervalEnd);
|
|
188930
189091
|
}
|
|
188931
189092
|
}
|
|
188932
|
-
/**
|
|
189093
|
+
/**
|
|
189094
|
+
* Find intersections with a plane.
|
|
188933
189095
|
* Intersections within segments are recorded as CurveIntervalRole.isolated
|
|
188934
189096
|
* Intersections at isolated "on" vertex are recoded as CurveIntervalRole.isolatedAtVertex.
|
|
188935
189097
|
*/
|
|
@@ -188966,7 +189128,9 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188966
189128
|
return result.length - initialLength;
|
|
188967
189129
|
}
|
|
188968
189130
|
/** Extend `rangeToExtend` to include all points of this linestring. */
|
|
188969
|
-
extendRange(rangeToExtend, transform) {
|
|
189131
|
+
extendRange(rangeToExtend, transform) {
|
|
189132
|
+
this._points.extendRange(rangeToExtend, transform);
|
|
189133
|
+
}
|
|
188970
189134
|
/** Test if each point of this linestring isAlmostEqual with corresponding point in `other`. */
|
|
188971
189135
|
isAlmostEqual(other) {
|
|
188972
189136
|
if (!(other instanceof LineString3d))
|
|
@@ -188975,7 +189139,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188975
189139
|
return false;
|
|
188976
189140
|
return true;
|
|
188977
189141
|
}
|
|
188978
|
-
/**
|
|
189142
|
+
/**
|
|
189143
|
+
* Append (clone of) one point.
|
|
188979
189144
|
* * BUT ... skip if duplicates the tail of prior points.
|
|
188980
189145
|
* * if fraction is given, "duplicate" considers both point and fraction.
|
|
188981
189146
|
*/
|
|
@@ -188995,8 +189160,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
188995
189160
|
this.addFraction(fraction);
|
|
188996
189161
|
}
|
|
188997
189162
|
}
|
|
188998
|
-
/** Compress out duplicate points (according to point.isAlmostEqual)
|
|
188999
|
-
*/
|
|
189163
|
+
/** Compress out duplicate points (according to point.isAlmostEqual) */
|
|
189000
189164
|
removeDuplicatePoints(tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
189001
189165
|
const n = this._points.length;
|
|
189002
189166
|
if (n < 2)
|
|
@@ -189019,7 +189183,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189019
189183
|
if (this._derivatives)
|
|
189020
189184
|
this._derivatives.resize(n1);
|
|
189021
189185
|
}
|
|
189022
|
-
/**
|
|
189186
|
+
/**
|
|
189187
|
+
* Append a suitable evaluation of a curve ..
|
|
189023
189188
|
* * always append the curve point
|
|
189024
189189
|
* * if fraction array is present, append the fraction
|
|
189025
189190
|
* * if derivative array is present, append the derivative
|
|
@@ -189042,7 +189207,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189042
189207
|
}
|
|
189043
189208
|
}
|
|
189044
189209
|
/**
|
|
189045
|
-
*
|
|
189210
|
+
* Clear all array data:
|
|
189046
189211
|
* * points
|
|
189047
189212
|
* * optional fractions.
|
|
189048
189213
|
* * optional derivatives.
|
|
@@ -189076,7 +189241,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189076
189241
|
}
|
|
189077
189242
|
return ls;
|
|
189078
189243
|
}
|
|
189079
|
-
/**
|
|
189244
|
+
/**
|
|
189245
|
+
* Evaluate a curve at uniform fractions. Append the evaluations to this linestring.
|
|
189080
189246
|
* @param curve primitive to evaluate.
|
|
189081
189247
|
* @param numStrokes number of strokes (edges).
|
|
189082
189248
|
* @param fraction0 starting fraction coordinate
|
|
@@ -189096,7 +189262,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189096
189262
|
this.appendFractionToPoint(curve, fraction0 + i * df);
|
|
189097
189263
|
}
|
|
189098
189264
|
}
|
|
189099
|
-
/**
|
|
189265
|
+
/**
|
|
189266
|
+
* Append points constructed as interpolation between two points.
|
|
189100
189267
|
* @param numStrokes number of strokes.
|
|
189101
189268
|
* @param point0 first point
|
|
189102
189269
|
* @param point1 last point
|
|
@@ -189142,7 +189309,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189142
189309
|
}
|
|
189143
189310
|
}
|
|
189144
189311
|
}
|
|
189145
|
-
/**
|
|
189312
|
+
/**
|
|
189313
|
+
* Emit strokable parts of the curve to a caller-supplied handler.
|
|
189146
189314
|
* If the stroke options does not have a maxEdgeLength, one stroke is emitted for each segment of the linestring.
|
|
189147
189315
|
* If the stroke options has a maxEdgeLength, smaller segments are emitted as needed.
|
|
189148
189316
|
*/
|
|
@@ -189169,7 +189337,7 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189169
189337
|
handler.endCurvePrimitive(this);
|
|
189170
189338
|
}
|
|
189171
189339
|
/**
|
|
189172
|
-
*
|
|
189340
|
+
* Return the stroke count required for given options.
|
|
189173
189341
|
* @param options StrokeOptions that determine count
|
|
189174
189342
|
*/
|
|
189175
189343
|
computeStrokeCountForOptions(options) {
|
|
@@ -189208,7 +189376,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189208
189376
|
/**
|
|
189209
189377
|
* Find intervals of this CurvePrimitive that are interior to a clipper
|
|
189210
189378
|
* @param clipper clip structure (e.g. clip planes)
|
|
189211
|
-
* @param announce (optional) function to be called announcing fractional intervals"
|
|
189379
|
+
* @param announce (optional) function to be called announcing fractional intervals"
|
|
189380
|
+
* ` announce(fraction0, fraction1, curvePrimitive)`
|
|
189212
189381
|
* @returns true if any "in" segments are announced.
|
|
189213
189382
|
*/
|
|
189214
189383
|
announceClipIntervals(clipper, announce) {
|
|
@@ -189252,7 +189421,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189252
189421
|
this._points.interpolate(index, fraction, index + 1, LineString3d._indexPoint);
|
|
189253
189422
|
dest.push(LineString3d._indexPoint);
|
|
189254
189423
|
}
|
|
189255
|
-
/**
|
|
189424
|
+
/**
|
|
189425
|
+
* Return a LineString which is a portion of this curve.
|
|
189256
189426
|
* * Fractions outside [0,1] extend the relevant end segment.
|
|
189257
189427
|
* @param fractionA [in] start fraction
|
|
189258
189428
|
* @param fractionB [in] end fraction
|
|
@@ -189312,14 +189482,12 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189312
189482
|
return _LineSegment3d__WEBPACK_IMPORTED_MODULE_15__.LineSegment3d.create(this._points.getPoint3dAtCheckedPointIndex(index), this._points.getPoint3dAtCheckedPointIndex(index + 1));
|
|
189313
189483
|
return undefined;
|
|
189314
189484
|
}
|
|
189315
|
-
/**
|
|
189316
|
-
* Returns true if first and last points are within metric tolerance.
|
|
189317
|
-
*/
|
|
189485
|
+
/** Returns true if first and last points are within metric tolerance. */
|
|
189318
189486
|
get isPhysicallyClosed() {
|
|
189319
189487
|
return this._points.length > 0 && _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.isSmallMetricDistance(this._points.distanceIndexIndex(0, this._points.length - 1));
|
|
189320
189488
|
}
|
|
189321
189489
|
/**
|
|
189322
|
-
*
|
|
189490
|
+
* Evaluate strokes at fractions indicated in a StrokeCountMap.
|
|
189323
189491
|
* * The map must have an array of component counts corresponding to the segment of this linestring.
|
|
189324
189492
|
* * "fractions" in the output are mapped within a0,a1 of the map.componentData
|
|
189325
189493
|
* @param map = stroke count data.
|
|
@@ -189356,7 +189524,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189356
189524
|
}
|
|
189357
189525
|
return destLinestring.numPoints() - numPoint0;
|
|
189358
189526
|
}
|
|
189359
|
-
/**
|
|
189527
|
+
/**
|
|
189528
|
+
* Convert variant point data to a single level array of linestrings.
|
|
189360
189529
|
* * The result is always an array of LineString3d.
|
|
189361
189530
|
* * Single linestring is NOT bubbled out as a special case.
|
|
189362
189531
|
* * data with no point is an empty array.
|
|
@@ -189391,7 +189560,8 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189391
189560
|
}
|
|
189392
189561
|
/**
|
|
189393
189562
|
* Construct an offset of each segment as viewed in the xy-plane (ignoring z).
|
|
189394
|
-
* * No attempt is made to join the offset segments. Use RegionOps.constructCurveXYOffset() to return a fully
|
|
189563
|
+
* * No attempt is made to join the offset segments. Use RegionOps.constructCurveXYOffset() to return a fully
|
|
189564
|
+
* joined offset.
|
|
189395
189565
|
* @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
|
|
189396
189566
|
*/
|
|
189397
189567
|
constructOffsetXY(offsetDistanceOrOptions) {
|
|
@@ -189408,10 +189578,13 @@ class LineString3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_0__.CurvePri
|
|
|
189408
189578
|
}
|
|
189409
189579
|
return offsets;
|
|
189410
189580
|
}
|
|
189411
|
-
/**
|
|
189581
|
+
/**
|
|
189582
|
+
* Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters
|
|
189583
|
+
* of projection.
|
|
189412
189584
|
* @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
|
|
189413
189585
|
* @param lowHigh optional receiver for output
|
|
189414
|
-
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is
|
|
189586
|
+
* @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is
|
|
189587
|
+
* the end of the ray.
|
|
189415
189588
|
*/
|
|
189416
189589
|
projectedParameterRange(ray, lowHigh) {
|
|
189417
189590
|
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_18__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
@@ -189423,14 +189596,15 @@ LineString3d._workPointC = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_
|
|
|
189423
189596
|
LineString3d._workRay = _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_7__.Ray3d.createXAxis();
|
|
189424
189597
|
LineString3d._indexPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_6__.Point3d.create(); // private point for addResolvedPoint
|
|
189425
189598
|
|
|
189426
|
-
/**
|
|
189599
|
+
/**
|
|
189600
|
+
* An AnnotatedLineString3d is a linestring with additional surface-related data attached to each point
|
|
189427
189601
|
* * This is useful in facet construction.
|
|
189428
189602
|
* @internal
|
|
189429
189603
|
*/
|
|
189430
189604
|
class AnnotatedLineString3d {
|
|
189431
189605
|
}
|
|
189432
189606
|
/**
|
|
189433
|
-
*
|
|
189607
|
+
* Context to be called to incrementally accumulate distance along line segments.
|
|
189434
189608
|
*/
|
|
189435
189609
|
class MoveByDistanceContext {
|
|
189436
189610
|
/** CAPTURE point0, fraction0, targetDistance */
|
|
@@ -191425,15 +191599,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
191425
191599
|
*/
|
|
191426
191600
|
|
|
191427
191601
|
/**
|
|
191428
|
-
*
|
|
191429
|
-
* * For a simple primitive (
|
|
191602
|
+
* Data carrier interface for per-primitive stroke counts and distances used by PolyfaceBuilder.
|
|
191603
|
+
* * For a simple primitive (line segment or arc) that is stroked with uniform fraction, the members are:
|
|
191430
191604
|
* * `numStroke` = total number of strokes
|
|
191431
191605
|
* * `curveLength` = length of this curve
|
|
191432
191606
|
* * `a0` = external mapped coordinate for fraction 0 on this primitive or component
|
|
191433
191607
|
* * `a1` = external mapped coordinate for fraction 1 on this primitive or component
|
|
191434
191608
|
*
|
|
191435
191609
|
* * For linestring and bspline curve, those numbers are totals for the overall curve, and breakdown within
|
|
191436
|
-
*
|
|
191610
|
+
* the components (line segments or bezier spans) is recorded on the optional array `componentData[]`
|
|
191437
191611
|
* * Members of the array are annotated with componentIndex within the linestring or bspline curve
|
|
191438
191612
|
* @public
|
|
191439
191613
|
*/
|
|
@@ -191483,7 +191657,7 @@ class StrokeCountMap {
|
|
|
191483
191657
|
return result;
|
|
191484
191658
|
}
|
|
191485
191659
|
/**
|
|
191486
|
-
*
|
|
191660
|
+
* Create a StrokeCountMap, optionally
|
|
191487
191661
|
* * (a) use parent a1 as new a0
|
|
191488
191662
|
* * (b) attach a (usually empty) array for component counts.
|
|
191489
191663
|
* @param parentMap optional map whose a1 becomes a0 in the new map.
|
|
@@ -191511,8 +191685,9 @@ class StrokeCountMap {
|
|
|
191511
191685
|
this.curveLength += curveLength;
|
|
191512
191686
|
this.a1 = a2;
|
|
191513
191687
|
}
|
|
191514
|
-
/**
|
|
191515
|
-
*
|
|
191688
|
+
/**
|
|
191689
|
+
* Return true if `other` has the same component structure as `this`
|
|
191690
|
+
* * Testing recurses through corresponding members of componentData arrays.
|
|
191516
191691
|
*/
|
|
191517
191692
|
isCompatibleComponentStructure(other, enforceCounts) {
|
|
191518
191693
|
if (enforceCounts && this.numStroke !== other.numStroke)
|
|
@@ -191533,7 +191708,7 @@ class StrokeCountMap {
|
|
|
191533
191708
|
return false;
|
|
191534
191709
|
}
|
|
191535
191710
|
/**
|
|
191536
|
-
*
|
|
191711
|
+
* Clone all data from root.
|
|
191537
191712
|
* * clone componentData arrays recursively.
|
|
191538
191713
|
*/
|
|
191539
191714
|
clone() {
|
|
@@ -191546,7 +191721,7 @@ class StrokeCountMap {
|
|
|
191546
191721
|
return a;
|
|
191547
191722
|
}
|
|
191548
191723
|
/**
|
|
191549
|
-
*
|
|
191724
|
+
* Interpolate in the a0,a1 mapping.
|
|
191550
191725
|
* @param fraction fractional position between a0 and a1
|
|
191551
191726
|
*/
|
|
191552
191727
|
fractionToA(fraction) {
|
|
@@ -193223,7 +193398,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193223
193398
|
|
|
193224
193399
|
|
|
193225
193400
|
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
193226
|
-
/**
|
|
193401
|
+
/**
|
|
193402
|
+
* Tolerance blob for various stroking methods.
|
|
193227
193403
|
*
|
|
193228
193404
|
* * Across many applications, the critical concepts are: chordTol, angleTol, maxEdgeLength
|
|
193229
193405
|
* * Chord error is an distance measured from a curve or facet to its approximating stroke or facet.
|
|
@@ -193246,26 +193422,40 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
193246
193422
|
*/
|
|
193247
193423
|
class StrokeOptions {
|
|
193248
193424
|
constructor() {
|
|
193249
|
-
/**
|
|
193425
|
+
/** Whether or not to triangulate each added facet */
|
|
193250
193426
|
this.shouldTriangulate = false;
|
|
193251
|
-
/**
|
|
193427
|
+
/** Default number of strokes for a circle. */
|
|
193252
193428
|
this.defaultCircleStrokes = 16;
|
|
193253
193429
|
}
|
|
193254
193430
|
/** Whether params are requested. */
|
|
193255
|
-
get needParams() {
|
|
193256
|
-
|
|
193431
|
+
get needParams() {
|
|
193432
|
+
return this._needParams !== undefined ? this._needParams : false;
|
|
193433
|
+
}
|
|
193434
|
+
set needParams(value) {
|
|
193435
|
+
this._needParams = value;
|
|
193436
|
+
}
|
|
193257
193437
|
/** Whether normals are requested */
|
|
193258
|
-
get needNormals() {
|
|
193438
|
+
get needNormals() {
|
|
193439
|
+
return this._needNormals !== undefined ? this._needNormals : false;
|
|
193440
|
+
}
|
|
193259
193441
|
set needNormals(value) { this._needNormals = value; }
|
|
193260
193442
|
/** Whether twoSided is requested. */
|
|
193261
|
-
get needTwoSided() {
|
|
193443
|
+
get needTwoSided() {
|
|
193444
|
+
return this._needTwoSided !== undefined ? this._needTwoSided : false;
|
|
193445
|
+
}
|
|
193262
193446
|
set needTwoSided(value) { this._needTwoSided = value; }
|
|
193263
|
-
/**
|
|
193264
|
-
get hasAngleTol() {
|
|
193265
|
-
|
|
193266
|
-
|
|
193267
|
-
/**
|
|
193268
|
-
get
|
|
193447
|
+
/** Ask if angleTol is specified */
|
|
193448
|
+
get hasAngleTol() {
|
|
193449
|
+
return this.angleTol !== undefined && Math.abs(this.angleTol.radians) > 0.0;
|
|
193450
|
+
}
|
|
193451
|
+
/** Ask if chordTol is specified */
|
|
193452
|
+
get hasChordTol() {
|
|
193453
|
+
return this.chordTol !== undefined && this.chordTol > 0.0;
|
|
193454
|
+
}
|
|
193455
|
+
/** Ask if maxEdgeLength is specified */
|
|
193456
|
+
get hasMaxEdgeLength() {
|
|
193457
|
+
return this.maxEdgeLength !== undefined && this.maxEdgeLength > 0.0;
|
|
193458
|
+
}
|
|
193269
193459
|
/** Return a deep clone */
|
|
193270
193460
|
clone() {
|
|
193271
193461
|
const options = new StrokeOptions();
|
|
@@ -193282,7 +193472,7 @@ class StrokeOptions {
|
|
|
193282
193472
|
options.defaultCircleStrokes = this.defaultCircleStrokes;
|
|
193283
193473
|
return options;
|
|
193284
193474
|
}
|
|
193285
|
-
/**
|
|
193475
|
+
/** Return stroke count which is the larger of the minCount or count needed for edge length condition. */
|
|
193286
193476
|
applyMaxEdgeLength(minCount, totalLength) {
|
|
193287
193477
|
totalLength = Math.abs(totalLength);
|
|
193288
193478
|
if (this.maxEdgeLength && this.maxEdgeLength > 0.0 && minCount * this.maxEdgeLength < totalLength) {
|
|
@@ -193291,14 +193481,16 @@ class StrokeOptions {
|
|
|
193291
193481
|
return minCount;
|
|
193292
193482
|
}
|
|
193293
193483
|
/**
|
|
193294
|
-
*
|
|
193484
|
+
* Return stroke count which is the larger of the existing count or count needed for angle condition for given
|
|
193485
|
+
* sweepRadians.
|
|
193295
193486
|
* * defaultStepRadians is assumed to be larger than zero.
|
|
193296
193487
|
*/
|
|
193297
193488
|
applyAngleTol(minCount, sweepRadians, defaultStepRadians) {
|
|
193298
193489
|
return StrokeOptions.applyAngleTol(this, minCount, sweepRadians, defaultStepRadians);
|
|
193299
193490
|
}
|
|
193300
193491
|
/**
|
|
193301
|
-
*
|
|
193492
|
+
* Return stroke count which is the larger of minCount and the count required to turn sweepRadians, using tolerance
|
|
193493
|
+
* from the options.
|
|
193302
193494
|
*/
|
|
193303
193495
|
static applyAngleTol(options, minCount, sweepRadians, defaultStepRadians) {
|
|
193304
193496
|
sweepRadians = Math.abs(sweepRadians);
|
|
@@ -193326,7 +193518,8 @@ class StrokeOptions {
|
|
|
193326
193518
|
return minCount;
|
|
193327
193519
|
}
|
|
193328
193520
|
/**
|
|
193329
|
-
* Determine a stroke count for a (partial) circular arc of given radius. This considers angle, maxEdgeLength,
|
|
193521
|
+
* Determine a stroke count for a (partial) circular arc of given radius. This considers angle, maxEdgeLength,
|
|
193522
|
+
* chord, and minimum stroke.
|
|
193330
193523
|
*/
|
|
193331
193524
|
applyTolerancesToArc(radius, sweepRadians = Math.PI * 2) {
|
|
193332
193525
|
let numStrokes = 1;
|
|
@@ -193336,7 +193529,7 @@ class StrokeOptions {
|
|
|
193336
193529
|
numStrokes = this.applyMinStrokesPerPrimitive(numStrokes);
|
|
193337
193530
|
return numStrokes;
|
|
193338
193531
|
}
|
|
193339
|
-
/**
|
|
193532
|
+
/** Return stroke count which is the larger of existing count or count needed for circular arc chord tolerance condition. */
|
|
193340
193533
|
applyChordTol(minCount, radius, sweepRadians) {
|
|
193341
193534
|
if (this.chordTol && this.chordTol > 0.0 && this.chordTol < radius) {
|
|
193342
193535
|
const a = this.chordTol;
|
|
@@ -193345,7 +193538,9 @@ class StrokeOptions {
|
|
|
193345
193538
|
}
|
|
193346
193539
|
return minCount;
|
|
193347
193540
|
}
|
|
193348
|
-
/**
|
|
193541
|
+
/**
|
|
193542
|
+
* Return stroke count which is the larger of existing count or count needed for circular arc chord tol with given
|
|
193543
|
+
* arc length and radians
|
|
193349
193544
|
*/
|
|
193350
193545
|
applyChordTolToLengthAndRadians(minCount, length, sweepRadians) {
|
|
193351
193546
|
if (this.chordTol && this.chordTol > 0.0) {
|
|
@@ -193355,14 +193550,15 @@ class StrokeOptions {
|
|
|
193355
193550
|
}
|
|
193356
193551
|
return minCount;
|
|
193357
193552
|
}
|
|
193358
|
-
/**
|
|
193553
|
+
/** Return stroke count which is the larger of existing count or `this.minStrokesPerPrimitive` */
|
|
193359
193554
|
applyMinStrokesPerPrimitive(minCount) {
|
|
193360
193555
|
if (this.minStrokesPerPrimitive !== undefined && Number.isFinite(this.minStrokesPerPrimitive)
|
|
193361
193556
|
&& this.minStrokesPerPrimitive > minCount)
|
|
193362
193557
|
minCount = this.minStrokesPerPrimitive;
|
|
193363
193558
|
return minCount;
|
|
193364
193559
|
}
|
|
193365
|
-
/**
|
|
193560
|
+
/**
|
|
193561
|
+
* Create `StrokeOptions` with defaults appropriate for curves.
|
|
193366
193562
|
* * angle tolerance of 15 degrees.
|
|
193367
193563
|
* * all others inactive.
|
|
193368
193564
|
*/
|
|
@@ -193371,7 +193567,8 @@ class StrokeOptions {
|
|
|
193371
193567
|
options.angleTol = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(15.0);
|
|
193372
193568
|
return options;
|
|
193373
193569
|
}
|
|
193374
|
-
/**
|
|
193570
|
+
/**
|
|
193571
|
+
* Create `StrokeOptions` with defaults appropriate for surfaces facets
|
|
193375
193572
|
* * angle tolerance of 22.5 degrees.
|
|
193376
193573
|
* * all others inactive.
|
|
193377
193574
|
*/
|
|
@@ -205414,8 +205611,8 @@ class Matrix3d {
|
|
|
205414
205611
|
}
|
|
205415
205612
|
/**
|
|
205416
205613
|
* Create a matrix from column vectors, shuffled into place per axisOrder
|
|
205417
|
-
* For example, if axisOrder = XYZ then it returns [vectorU, vectorV, vectorW]
|
|
205418
|
-
* Another example, if axisOrder = YZX then it returns [vectorW, vectorU, vectorV] because
|
|
205614
|
+
* * For example, if axisOrder = XYZ then it returns [vectorU, vectorV, vectorW]
|
|
205615
|
+
* * Another example, if axisOrder = YZX then it returns [vectorW, vectorU, vectorV] because
|
|
205419
205616
|
* Y is at index 0 so vectorU goes to the column Y (column 2), Z is at index 1 so vectorV goes
|
|
205420
205617
|
* to the column Z (column 3), and X is at index 2 so vectorW goes to the column X (column 1)
|
|
205421
205618
|
*/
|
|
@@ -274798,7 +274995,7 @@ class TestContext {
|
|
|
274798
274995
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
274799
274996
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
274800
274997
|
await core_frontend_1.NoRenderApp.startup({
|
|
274801
|
-
applicationVersion: "4.1.0-dev.
|
|
274998
|
+
applicationVersion: "4.1.0-dev.5",
|
|
274802
274999
|
applicationId: this.settings.gprid,
|
|
274803
275000
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
274804
275001
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -283879,9 +284076,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
283879
284076
|
/* harmony export */ "DialogProperty": () => (/* reexport safe */ _appui_abstract_dialogs_DialogItem__WEBPACK_IMPORTED_MODULE_4__.DialogProperty),
|
|
283880
284077
|
/* harmony export */ "DisplayMessageType": () => (/* reexport safe */ _appui_abstract_notification_MessagePresenter__WEBPACK_IMPORTED_MODULE_14__.DisplayMessageType),
|
|
283881
284078
|
/* harmony export */ "FunctionKey": () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_1__.FunctionKey),
|
|
283882
|
-
/* harmony export */ "FuzzyScore": () => (/* reexport safe */
|
|
284079
|
+
/* harmony export */ "FuzzyScore": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.FuzzyScore),
|
|
283883
284080
|
/* harmony export */ "GenericUiEvent": () => (/* reexport safe */ _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_0__.GenericUiEvent),
|
|
283884
|
-
/* harmony export */ "IconSpecUtilities": () => (/* reexport safe */
|
|
284081
|
+
/* harmony export */ "IconSpecUtilities": () => (/* reexport safe */ _appui_abstract_utils_IconSpecUtilities__WEBPACK_IMPORTED_MODULE_27__.IconSpecUtilities),
|
|
283885
284082
|
/* harmony export */ "MessageSeverity": () => (/* reexport safe */ _appui_abstract_notification_MessageSeverity__WEBPACK_IMPORTED_MODULE_15__.MessageSeverity),
|
|
283886
284083
|
/* harmony export */ "PropertyChangeStatus": () => (/* reexport safe */ _appui_abstract_dialogs_UiDataProvider__WEBPACK_IMPORTED_MODULE_6__.PropertyChangeStatus),
|
|
283887
284084
|
/* harmony export */ "PropertyDescriptionHelper": () => (/* reexport safe */ _appui_abstract_properties_Description__WEBPACK_IMPORTED_MODULE_16__.PropertyDescriptionHelper),
|
|
@@ -283898,17 +284095,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
283898
284095
|
/* harmony export */ "ToolbarItemUtilities": () => (/* reexport safe */ _appui_abstract_toolbars_ToolbarItem__WEBPACK_IMPORTED_MODULE_24__.ToolbarItemUtilities),
|
|
283899
284096
|
/* harmony export */ "UiAdmin": () => (/* reexport safe */ _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_0__.UiAdmin),
|
|
283900
284097
|
/* harmony export */ "UiDataProvider": () => (/* reexport safe */ _appui_abstract_dialogs_UiDataProvider__WEBPACK_IMPORTED_MODULE_6__.UiDataProvider),
|
|
283901
|
-
/* harmony export */ "UiError": () => (/* reexport safe */
|
|
283902
|
-
/* harmony export */ "UiEvent": () => (/* reexport safe */
|
|
283903
|
-
/* harmony export */ "UiEventDispatcher": () => (/* reexport safe */
|
|
284098
|
+
/* harmony export */ "UiError": () => (/* reexport safe */ _appui_abstract_utils_UiError__WEBPACK_IMPORTED_MODULE_29__.UiError),
|
|
284099
|
+
/* harmony export */ "UiEvent": () => (/* reexport safe */ _appui_abstract_utils_UiEvent__WEBPACK_IMPORTED_MODULE_31__.UiEvent),
|
|
284100
|
+
/* harmony export */ "UiEventDispatcher": () => (/* reexport safe */ _appui_abstract_utils_UiEventDispatcher__WEBPACK_IMPORTED_MODULE_30__.UiEventDispatcher),
|
|
283904
284101
|
/* harmony export */ "UiLayoutDataProvider": () => (/* reexport safe */ _appui_abstract_dialogs_UiLayoutDataProvider__WEBPACK_IMPORTED_MODULE_5__.UiLayoutDataProvider),
|
|
283905
|
-
/* harmony export */ "UiSyncEvent": () => (/* reexport safe */
|
|
283906
|
-
/* harmony export */ "convertSimple2RegExpPattern": () => (/* reexport safe */
|
|
283907
|
-
/* harmony export */ "createMatches": () => (/* reexport safe */
|
|
283908
|
-
/* harmony export */ "equalsIgnoreCase": () => (/* reexport safe */
|
|
283909
|
-
/* harmony export */ "fuzzyScore": () => (/* reexport safe */
|
|
283910
|
-
/* harmony export */ "fuzzyScoreGraceful": () => (/* reexport safe */
|
|
283911
|
-
/* harmony export */ "fuzzyScoreGracefulAggressive": () => (/* reexport safe */
|
|
284102
|
+
/* harmony export */ "UiSyncEvent": () => (/* reexport safe */ _appui_abstract_utils_UiEventDispatcher__WEBPACK_IMPORTED_MODULE_30__.UiSyncEvent),
|
|
284103
|
+
/* harmony export */ "convertSimple2RegExpPattern": () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_34__.convertSimple2RegExpPattern),
|
|
284104
|
+
/* harmony export */ "createMatches": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.createMatches),
|
|
284105
|
+
/* harmony export */ "equalsIgnoreCase": () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_34__.equalsIgnoreCase),
|
|
284106
|
+
/* harmony export */ "fuzzyScore": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.fuzzyScore),
|
|
284107
|
+
/* harmony export */ "fuzzyScoreGraceful": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.fuzzyScoreGraceful),
|
|
284108
|
+
/* harmony export */ "fuzzyScoreGracefulAggressive": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.fuzzyScoreGracefulAggressive),
|
|
283912
284109
|
/* harmony export */ "getClassName": () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_26__.getClassName),
|
|
283913
284110
|
/* harmony export */ "isArrowKey": () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_1__.isArrowKey),
|
|
283914
284111
|
/* harmony export */ "isButtonGroupEditorParams": () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_17__.isButtonGroupEditorParams),
|
|
@@ -283916,22 +284113,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
283916
284113
|
/* harmony export */ "isCustomFormattedNumberParams": () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_17__.isCustomFormattedNumberParams),
|
|
283917
284114
|
/* harmony export */ "isIconListEditorParams": () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_17__.isIconListEditorParams),
|
|
283918
284115
|
/* harmony export */ "isInputEditorSizeParams": () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_17__.isInputEditorSizeParams),
|
|
283919
|
-
/* harmony export */ "
|
|
283920
|
-
/* harmony export */ "
|
|
283921
|
-
/* harmony export */ "isPatternInWord": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_34__.isPatternInWord),
|
|
284116
|
+
/* harmony export */ "isLowerAsciiLetter": () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_34__.isLowerAsciiLetter),
|
|
284117
|
+
/* harmony export */ "isPatternInWord": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.isPatternInWord),
|
|
283922
284118
|
/* harmony export */ "isSuppressLabelEditorParams": () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_17__.isSuppressLabelEditorParams),
|
|
283923
|
-
/* harmony export */ "isUpperAsciiLetter": () => (/* reexport safe */
|
|
284119
|
+
/* harmony export */ "isUpperAsciiLetter": () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_34__.isUpperAsciiLetter),
|
|
283924
284120
|
/* harmony export */ "loggerCategory": () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_26__.loggerCategory),
|
|
283925
|
-
/* harmony export */ "matchesCamelCase": () => (/* reexport safe */
|
|
283926
|
-
/* harmony export */ "matchesContiguousSubString": () => (/* reexport safe */
|
|
283927
|
-
/* harmony export */ "matchesFuzzy": () => (/* reexport safe */
|
|
283928
|
-
/* harmony export */ "matchesFuzzy2": () => (/* reexport safe */
|
|
283929
|
-
/* harmony export */ "matchesPrefix": () => (/* reexport safe */
|
|
283930
|
-
/* harmony export */ "matchesStrictPrefix": () => (/* reexport safe */
|
|
283931
|
-
/* harmony export */ "matchesSubString": () => (/* reexport safe */
|
|
283932
|
-
/* harmony export */ "matchesWords": () => (/* reexport safe */
|
|
283933
|
-
/* harmony export */ "or": () => (/* reexport safe */
|
|
283934
|
-
/* harmony export */ "startsWithIgnoreCase": () => (/* reexport safe */
|
|
284121
|
+
/* harmony export */ "matchesCamelCase": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.matchesCamelCase),
|
|
284122
|
+
/* harmony export */ "matchesContiguousSubString": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.matchesContiguousSubString),
|
|
284123
|
+
/* harmony export */ "matchesFuzzy": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.matchesFuzzy),
|
|
284124
|
+
/* harmony export */ "matchesFuzzy2": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.matchesFuzzy2),
|
|
284125
|
+
/* harmony export */ "matchesPrefix": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.matchesPrefix),
|
|
284126
|
+
/* harmony export */ "matchesStrictPrefix": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.matchesStrictPrefix),
|
|
284127
|
+
/* harmony export */ "matchesSubString": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.matchesSubString),
|
|
284128
|
+
/* harmony export */ "matchesWords": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.matchesWords),
|
|
284129
|
+
/* harmony export */ "or": () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__.or),
|
|
284130
|
+
/* harmony export */ "startsWithIgnoreCase": () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_34__.startsWithIgnoreCase)
|
|
283935
284131
|
/* harmony export */ });
|
|
283936
284132
|
/* harmony import */ var _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appui-abstract/UiAdmin */ "../../ui/appui-abstract/lib/esm/appui-abstract/UiAdmin.js");
|
|
283937
284133
|
/* harmony import */ var _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appui-abstract/common/KeyboardKey */ "../../ui/appui-abstract/lib/esm/appui-abstract/common/KeyboardKey.js");
|
|
@@ -283960,15 +284156,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
283960
284156
|
/* harmony import */ var _appui_abstract_toolbars_ToolbarItem__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./appui-abstract/toolbars/ToolbarItem */ "../../ui/appui-abstract/lib/esm/appui-abstract/toolbars/ToolbarItem.js");
|
|
283961
284157
|
/* harmony import */ var _appui_abstract_utils_callbacks__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./appui-abstract/utils/callbacks */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/callbacks.js");
|
|
283962
284158
|
/* harmony import */ var _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./appui-abstract/utils/misc */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js");
|
|
283963
|
-
/* harmony import */ var
|
|
283964
|
-
/* harmony import */ var
|
|
283965
|
-
/* harmony import */ var
|
|
283966
|
-
/* harmony import */ var
|
|
283967
|
-
/* harmony import */ var
|
|
283968
|
-
/* harmony import */ var
|
|
283969
|
-
/* harmony import */ var
|
|
283970
|
-
/* harmony import */ var
|
|
283971
|
-
/* harmony import */ var _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./appui-abstract/utils/filter/strings */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js");
|
|
284159
|
+
/* harmony import */ var _appui_abstract_utils_IconSpecUtilities__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./appui-abstract/utils/IconSpecUtilities */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/IconSpecUtilities.js");
|
|
284160
|
+
/* harmony import */ var _appui_abstract_utils_PointProps__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./appui-abstract/utils/PointProps */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/PointProps.js");
|
|
284161
|
+
/* harmony import */ var _appui_abstract_utils_UiError__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./appui-abstract/utils/UiError */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiError.js");
|
|
284162
|
+
/* harmony import */ var _appui_abstract_utils_UiEventDispatcher__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./appui-abstract/utils/UiEventDispatcher */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiEventDispatcher.js");
|
|
284163
|
+
/* harmony import */ var _appui_abstract_utils_UiEvent__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./appui-abstract/utils/UiEvent */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiEvent.js");
|
|
284164
|
+
/* harmony import */ var _appui_abstract_utils_filter_charCode__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./appui-abstract/utils/filter/charCode */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js");
|
|
284165
|
+
/* harmony import */ var _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./appui-abstract/utils/filter/filters */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/filters.js");
|
|
284166
|
+
/* harmony import */ var _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./appui-abstract/utils/filter/strings */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js");
|
|
283972
284167
|
/*---------------------------------------------------------------------------------------------
|
|
283973
284168
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
283974
284169
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -284006,7 +284201,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
284006
284201
|
|
|
284007
284202
|
|
|
284008
284203
|
|
|
284009
|
-
|
|
284010
284204
|
|
|
284011
284205
|
|
|
284012
284206
|
/** @docs-package-description
|
|
@@ -287435,36 +287629,6 @@ function startsWithIgnoreCase(str, candidate) {
|
|
|
287435
287629
|
}
|
|
287436
287630
|
|
|
287437
287631
|
|
|
287438
|
-
/***/ }),
|
|
287439
|
-
|
|
287440
|
-
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/isLetter.js":
|
|
287441
|
-
/*!************************************************************************!*\
|
|
287442
|
-
!*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/isLetter.js ***!
|
|
287443
|
-
\************************************************************************/
|
|
287444
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
287445
|
-
|
|
287446
|
-
"use strict";
|
|
287447
|
-
__webpack_require__.r(__webpack_exports__);
|
|
287448
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
287449
|
-
/* harmony export */ "isLetter": () => (/* binding */ isLetter)
|
|
287450
|
-
/* harmony export */ });
|
|
287451
|
-
/*---------------------------------------------------------------------------------------------
|
|
287452
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
287453
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
287454
|
-
*--------------------------------------------------------------------------------------------*/
|
|
287455
|
-
/** @packageDocumentation
|
|
287456
|
-
* @module Utilities
|
|
287457
|
-
*/
|
|
287458
|
-
/** Uses ECMAScript case transformation (toLowerCase() and toUpperCase()) to check whether or not a given character is a letter.
|
|
287459
|
-
* Beyond the English alphabet, this solution will also work for most Greek, Armenian, Cyrillic, and Latin characters.
|
|
287460
|
-
* But, it will not work for Chinese or Japanese characters since those languages do not have uppercase and lowercase letters.
|
|
287461
|
-
* @alpha
|
|
287462
|
-
*/
|
|
287463
|
-
function isLetter(char) {
|
|
287464
|
-
return char.length === 1 && char.toLowerCase() !== char.toUpperCase();
|
|
287465
|
-
}
|
|
287466
|
-
|
|
287467
|
-
|
|
287468
287632
|
/***/ }),
|
|
287469
287633
|
|
|
287470
287634
|
/***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js":
|
|
@@ -292856,7 +293020,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
292856
293020
|
/***/ ((module) => {
|
|
292857
293021
|
|
|
292858
293022
|
"use strict";
|
|
292859
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.1.0-dev.
|
|
293023
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.1.0-dev.5","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","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","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/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-eslintrc -c \\"./node_modules/@itwin/eslint-plugin/dist/configs/extension-exports-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"},"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.1.0-dev.5","@itwin/core-bentley":"workspace:^4.1.0-dev.5","@itwin/core-common":"workspace:^4.1.0-dev.5","@itwin/core-geometry":"workspace:^4.1.0-dev.5","@itwin/core-orbitgt":"workspace:^4.1.0-dev.5","@itwin/core-quantity":"workspace:^4.1.0-dev.5"},"//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.33","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.36.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","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/object-storage-azure":"^1.5.0","@itwin/cloud-agnostic-core":"^1.5.0","@itwin/object-storage-core":"^1.5.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","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
|
|
292860
293024
|
|
|
292861
293025
|
/***/ }),
|
|
292862
293026
|
|