@itwin/ecschema-rpcinterface-tests 4.0.0-dev.54 → 4.0.0-dev.56
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/_d48c.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +473 -424
- 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.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_5_0_node_modules_itwin_obj-e3e81d.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_1_node_modules_loaders_gl_draco_di-d3af41.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 +15 -15
|
@@ -173845,7 +173845,11 @@ class Geometry {
|
|
|
173845
173845
|
static resolveToUndefined(value, targetValue) {
|
|
173846
173846
|
return value === targetValue ? undefined : value;
|
|
173847
173847
|
}
|
|
173848
|
-
/**
|
|
173848
|
+
/**
|
|
173849
|
+
* Simple interpolation between values, but choosing (based on fraction) a or b as starting
|
|
173850
|
+
* point for maximum accuracy.
|
|
173851
|
+
* * If `f = 0`, then `a` is returned and if `f = 1`, then `b` is returned.
|
|
173852
|
+
*/
|
|
173849
173853
|
static interpolate(a, f, b) {
|
|
173850
173854
|
return f <= 0.5 ? a + f * (b - a) : b - (1.0 - f) * (b - a);
|
|
173851
173855
|
}
|
|
@@ -202672,11 +202676,11 @@ class Angle {
|
|
|
202672
202676
|
}
|
|
202673
202677
|
}
|
|
202674
202678
|
/**
|
|
202675
|
-
|
|
202676
|
-
|
|
202677
|
-
|
|
202678
|
-
|
|
202679
|
-
|
|
202679
|
+
* Create an Angle from a JSON object
|
|
202680
|
+
* @param json object from JSON.parse. If a number, value is in *DEGREES*
|
|
202681
|
+
* @param defaultValRadians if json is undefined, default value in radians.
|
|
202682
|
+
* @return a new Angle
|
|
202683
|
+
*/
|
|
202680
202684
|
static fromJSON(json, defaultValRadians) {
|
|
202681
202685
|
const val = new Angle();
|
|
202682
202686
|
val.setFromJSON(json, defaultValRadians);
|
|
@@ -202731,21 +202735,15 @@ class Angle {
|
|
|
202731
202735
|
// all larger radians reference from 360 degrees (2PI)
|
|
202732
202736
|
return 360.0 + 180 * ((radians - 2.0 * pi) / pi);
|
|
202733
202737
|
}
|
|
202734
|
-
/**
|
|
202735
|
-
* Return the cosine of this Angle object's angle.
|
|
202736
|
-
*/
|
|
202738
|
+
/** Return the cosine of this Angle object's angle */
|
|
202737
202739
|
cos() {
|
|
202738
202740
|
return Math.cos(this._radians);
|
|
202739
202741
|
}
|
|
202740
|
-
/**
|
|
202741
|
-
* Return the sine of this Angle object's angle.
|
|
202742
|
-
*/
|
|
202742
|
+
/** Return the sine of this Angle object's angle */
|
|
202743
202743
|
sin() {
|
|
202744
202744
|
return Math.sin(this._radians);
|
|
202745
202745
|
}
|
|
202746
|
-
/**
|
|
202747
|
-
* Return the tangent of this Angle object's angle.
|
|
202748
|
-
*/
|
|
202746
|
+
/** Return the tangent of this Angle object's angle */
|
|
202749
202747
|
tan() {
|
|
202750
202748
|
return Math.tan(this._radians);
|
|
202751
202749
|
}
|
|
@@ -202757,11 +202755,11 @@ class Angle {
|
|
|
202757
202755
|
static isHalfCircleRadians(radians) {
|
|
202758
202756
|
return Math.abs(Math.abs(radians) - Math.PI) <= _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallAngleRadians;
|
|
202759
202757
|
}
|
|
202760
|
-
/**
|
|
202758
|
+
/** Test if the angle is a full circle */
|
|
202761
202759
|
get isFullCircle() {
|
|
202762
202760
|
return Angle.isFullCircleRadians(this._radians);
|
|
202763
202761
|
}
|
|
202764
|
-
/**
|
|
202762
|
+
/** Test if the angle is a half circle (in either direction) */
|
|
202765
202763
|
get isHalfCircle() {
|
|
202766
202764
|
return Angle.isHalfCircleRadians(this._radians);
|
|
202767
202765
|
}
|
|
@@ -202830,7 +202828,7 @@ class Angle {
|
|
|
202830
202828
|
// fall through for NaN disaster.
|
|
202831
202829
|
return 0;
|
|
202832
202830
|
}
|
|
202833
|
-
/**
|
|
202831
|
+
/** Return a (newly allocated) Angle object with value 0 radians */
|
|
202834
202832
|
static zero() {
|
|
202835
202833
|
return new Angle(0);
|
|
202836
202834
|
}
|
|
@@ -202984,19 +202982,19 @@ class Angle {
|
|
|
202984
202982
|
return value;
|
|
202985
202983
|
}
|
|
202986
202984
|
/**
|
|
202987
|
-
|
|
202988
|
-
|
|
202989
|
-
|
|
202990
|
-
|
|
202991
|
-
|
|
202992
|
-
|
|
202993
|
-
|
|
202994
|
-
|
|
202995
|
-
|
|
202996
|
-
|
|
202997
|
-
|
|
202998
|
-
|
|
202999
|
-
|
|
202985
|
+
* Return the half angle cosine, sine, and radians for given dot products between vectors. The vectors define
|
|
202986
|
+
* an ellipse using x(t) = c + U cos(t) + V sin(t) so U and V are at angle t=0 degree and t=90 degree. The
|
|
202987
|
+
* half angle t0 is an angle such that x(t0) is one of the ellipse semi-axis.
|
|
202988
|
+
* * This construction arises e.g. in `Arc3d.toScaledMatrix3d`.
|
|
202989
|
+
* * Given ellipse x(t) = c + U cos(t) + V sin(t), find t0 such that radial vector W(t0) = x(t0) - c is
|
|
202990
|
+
* perpendicular to the ellipse.
|
|
202991
|
+
* * Then 0 = W(t0).x'(t0) = (U cos(t0) + V sin(t0)).(V cos(t0) - U sin(t0)) = U.V cos(2t0) + 0.5 (V.V - U.U) sin(2t0)
|
|
202992
|
+
* implies sin(2t0) / cos(2t0) = 2 U.V / (U.U - V.V), i.e., t0 can be computed given the three dot products on the RHS.
|
|
202993
|
+
* math details can be found at docs/learning/geometry/Angle.md
|
|
202994
|
+
* @param dotUU dot product of vectorU with itself
|
|
202995
|
+
* @param dotVV dot product of vectorV with itself
|
|
202996
|
+
* @param dotUV dot product of vectorU with vectorV
|
|
202997
|
+
*/
|
|
203000
202998
|
static dotProductsToHalfAngleTrigValues(dotUU, dotVV, dotUV, favorZero = true) {
|
|
203001
202999
|
const cos2t0 = dotUU - dotVV;
|
|
203002
203000
|
const sin2t0 = 2.0 * dotUV;
|
|
@@ -203005,9 +203003,8 @@ class Angle {
|
|
|
203005
203003
|
return Angle.trigValuesToHalfAngleTrigValues(cos2t0, sin2t0);
|
|
203006
203004
|
}
|
|
203007
203005
|
/**
|
|
203008
|
-
*
|
|
203006
|
+
* Returns the angle between two vectors, with the vectors given as xyz components
|
|
203009
203007
|
* * The returned angle is between 0 and PI
|
|
203010
|
-
*
|
|
203011
203008
|
* @param ux x component of vector u
|
|
203012
203009
|
* @param uy y component of vector u
|
|
203013
203010
|
* @param uz z component of vector u
|
|
@@ -203020,7 +203017,8 @@ class Angle {
|
|
|
203020
203017
|
return Math.atan2(_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductMagnitude(ux, uy, uz, vx, vy, vz), uDotV);
|
|
203021
203018
|
}
|
|
203022
203019
|
/**
|
|
203023
|
-
*
|
|
203020
|
+
* Returns the angle between two vectors, with the vectors given as xyz components, and an up vector to resolve
|
|
203021
|
+
* angle to a full 2PI range.
|
|
203024
203022
|
* * The returned angle is (-PI < radians <= PI) or (0 <= radians < 2 * PI)
|
|
203025
203023
|
* * The angle is in the plane of the U and V vectors.
|
|
203026
203024
|
* * The upVector determines a positive side of the plane but need not be strictly perpendicular to the plane.
|
|
@@ -203034,7 +203032,8 @@ class Angle {
|
|
|
203034
203032
|
* @param upVectorX x component of vector to positive side of plane.
|
|
203035
203033
|
* @param upVectorY y component of vector to positive side of plane.
|
|
203036
203034
|
* @param upVectorZ z component of vector to positive side of plane.
|
|
203037
|
-
* @param adjustToAllPositive if true, return strictly non-negative sweep (0 <= radians < 2*PI).
|
|
203035
|
+
* @param adjustToAllPositive if true, return strictly non-negative sweep (0 <= radians < 2*PI). If false, return
|
|
203036
|
+
* signed (-PI < radians <= PI)
|
|
203038
203037
|
*/
|
|
203039
203038
|
static orientedRadiansBetweenVectorsXYZ(ux, uy, uz, vx, vy, vz, upVectorX, upVectorY, upVectorZ, adjustToPositive = false) {
|
|
203040
203039
|
const uDotV = ux * vx + uy * vy + uz * vz;
|
|
@@ -203045,8 +203044,8 @@ class Angle {
|
|
|
203045
203044
|
const crossMagnitude = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.hypotenuseXYZ(wx, wy, wz);
|
|
203046
203045
|
if (upDotW < 0.0) {
|
|
203047
203046
|
if (adjustToPositive) {
|
|
203048
|
-
// The turn is greater than 180 degrees. Take a peculiarly oriented atan2 to get the excess-180 part as
|
|
203049
|
-
// This gives the smoothest numerical transition passing PI.
|
|
203047
|
+
// The turn is greater than 180 degrees. Take a peculiarly oriented atan2 to get the excess-180 part as
|
|
203048
|
+
// addition to PI. This gives the smoothest numerical transition passing PI.
|
|
203050
203049
|
return Math.PI + Math.atan2(crossMagnitude, -uDotV);
|
|
203051
203050
|
}
|
|
203052
203051
|
else {
|
|
@@ -203161,7 +203160,8 @@ class AngleSweep {
|
|
|
203161
203160
|
get endAngle() {
|
|
203162
203161
|
return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createRadians(this._radians1);
|
|
203163
203162
|
}
|
|
203164
|
-
/**
|
|
203163
|
+
/**
|
|
203164
|
+
* Create a sweep as one of
|
|
203165
203165
|
* * A clone of a given sweep
|
|
203166
203166
|
* * 0 to given angle
|
|
203167
203167
|
* * full circle if no arg given (sweep 0 to 360 degrees)
|
|
@@ -203173,7 +203173,8 @@ class AngleSweep {
|
|
|
203173
203173
|
return new AngleSweep(0, data.radians);
|
|
203174
203174
|
return AngleSweep.create360();
|
|
203175
203175
|
}
|
|
203176
|
-
/**
|
|
203176
|
+
/**
|
|
203177
|
+
* (private) constructor with start and end angles in radians.
|
|
203177
203178
|
* * Use explicitly named static methods to clarify intent and units of inputs:
|
|
203178
203179
|
*
|
|
203179
203180
|
* * createStartEndRadians (startRadians:number, endRadians:number)
|
|
@@ -203188,9 +203189,9 @@ class AngleSweep {
|
|
|
203188
203189
|
this._radians1 = endRadians;
|
|
203189
203190
|
}
|
|
203190
203191
|
/**
|
|
203191
|
-
*
|
|
203192
|
+
* Directly set the start and end angles in radians
|
|
203192
203193
|
* * If the difference between startRadians and endRadians is greater than 360, the function limits the angle sweep to 360.
|
|
203193
|
-
|
|
203194
|
+
*/
|
|
203194
203195
|
setStartEndRadians(startRadians = 0, endRadians = 2.0 * Math.PI) {
|
|
203195
203196
|
const delta = endRadians - startRadians;
|
|
203196
203197
|
if (_Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isFullCircleRadians(delta)) {
|
|
@@ -203199,14 +203200,14 @@ class AngleSweep {
|
|
|
203199
203200
|
this._radians0 = startRadians;
|
|
203200
203201
|
this._radians1 = endRadians;
|
|
203201
203202
|
}
|
|
203202
|
-
/**
|
|
203203
|
+
/** Directly set the start and end angles in degrees */
|
|
203203
203204
|
setStartEndDegrees(startDegrees = 0, endDegrees = 360.0) {
|
|
203204
203205
|
this.setStartEndRadians(_Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.degreesToRadians(startDegrees), _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.degreesToRadians(endDegrees));
|
|
203205
203206
|
}
|
|
203206
203207
|
/**
|
|
203207
|
-
*
|
|
203208
|
+
* Create an AngleSweep from start and end angles given in radians.
|
|
203208
203209
|
* * If the difference between startRadians and endRadians is greater than 360, the function limits the angle sweep to 360.
|
|
203209
|
-
|
|
203210
|
+
*/
|
|
203210
203211
|
static createStartEndRadians(startRadians = 0, endRadians = 2.0 * Math.PI, result) {
|
|
203211
203212
|
result = result ? result : new AngleSweep();
|
|
203212
203213
|
result.setStartEndRadians(startRadians, endRadians);
|
|
@@ -203216,23 +203217,23 @@ class AngleSweep {
|
|
|
203216
203217
|
cloneMinusRadians(radians) {
|
|
203217
203218
|
return new AngleSweep(this._radians0 - radians, this._radians1 - radians);
|
|
203218
203219
|
}
|
|
203219
|
-
/**
|
|
203220
|
+
/** Create an AngleSweep from start and end angles given in degrees. */
|
|
203220
203221
|
static createStartEndDegrees(startDegrees = 0, endDegrees = 360, result) {
|
|
203221
203222
|
return AngleSweep.createStartEndRadians(_Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.degreesToRadians(startDegrees), _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.degreesToRadians(endDegrees), result);
|
|
203222
203223
|
}
|
|
203223
|
-
/**
|
|
203224
|
+
/** Create an angle sweep from strongly typed start and end angles */
|
|
203224
203225
|
static createStartEnd(startAngle, endAngle, result) {
|
|
203225
203226
|
result = result ? result : new AngleSweep();
|
|
203226
203227
|
result.setStartEndRadians(startAngle.radians, endAngle.radians);
|
|
203227
203228
|
return result;
|
|
203228
203229
|
}
|
|
203229
|
-
/**
|
|
203230
|
+
/** Create an AngleSweep from start and end angles given in radians. */
|
|
203230
203231
|
static createStartSweepRadians(startRadians = 0, sweepRadians = Math.PI, result) {
|
|
203231
203232
|
result = result ? result : new AngleSweep();
|
|
203232
203233
|
result.setStartEndRadians(startRadians, startRadians + sweepRadians);
|
|
203233
203234
|
return result;
|
|
203234
203235
|
}
|
|
203235
|
-
/**
|
|
203236
|
+
/** Create an AngleSweep from start and sweep given in degrees. */
|
|
203236
203237
|
static createStartSweepDegrees(startDegrees = 0, sweepDegrees = 360, result) {
|
|
203237
203238
|
return AngleSweep.createStartEndRadians(_Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.degreesToRadians(startDegrees), _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.degreesToRadians(startDegrees + sweepDegrees), result);
|
|
203238
203239
|
}
|
|
@@ -203244,17 +203245,17 @@ class AngleSweep {
|
|
|
203244
203245
|
interpolate(fraction, other) {
|
|
203245
203246
|
return new AngleSweep(_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(this._radians0, fraction, other._radians0), _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolate(this._radians1, fraction, other._radians1));
|
|
203246
203247
|
}
|
|
203247
|
-
/**
|
|
203248
|
+
/** Copy from other AngleSweep. */
|
|
203248
203249
|
setFrom(other) {
|
|
203249
203250
|
this._radians0 = other._radians0;
|
|
203250
203251
|
this._radians1 = other._radians1;
|
|
203251
203252
|
}
|
|
203252
|
-
/**
|
|
203253
|
+
/** Create a full circle sweep (CCW). startRadians defaults to 0 */
|
|
203253
203254
|
static create360(startRadians) {
|
|
203254
203255
|
startRadians = startRadians ? startRadians : 0.0;
|
|
203255
203256
|
return new AngleSweep(startRadians, startRadians + 2.0 * Math.PI);
|
|
203256
203257
|
}
|
|
203257
|
-
/**
|
|
203258
|
+
/** Create a sweep from the south pole to the north pole (-90 to +90). */
|
|
203258
203259
|
static createFullLatitude() {
|
|
203259
203260
|
return AngleSweep.createStartEndRadians(-0.5 * Math.PI, 0.5 * Math.PI);
|
|
203260
203261
|
}
|
|
@@ -203264,7 +203265,8 @@ class AngleSweep {
|
|
|
203264
203265
|
this._radians0 = this._radians1;
|
|
203265
203266
|
this._radians1 = tmp;
|
|
203266
203267
|
}
|
|
203267
|
-
/**
|
|
203268
|
+
/**
|
|
203269
|
+
* Return a sweep for the "other" part of the circle.
|
|
203268
203270
|
* @param reverseDirection true to move backwards (CW) from start to end, false to more forwards (CCW) from start to end.
|
|
203269
203271
|
*/
|
|
203270
203272
|
cloneComplement(reverseDirection = false, result) {
|
|
@@ -203274,9 +203276,7 @@ class AngleSweep {
|
|
|
203274
203276
|
else
|
|
203275
203277
|
return AngleSweep.createStartEndRadians(this.endRadians, this.startRadians + s * Math.PI, result);
|
|
203276
203278
|
}
|
|
203277
|
-
/**
|
|
203278
|
-
* Restrict start and end angles into the range (-90,+90) in degrees.
|
|
203279
|
-
* */
|
|
203279
|
+
/** Restrict start and end angles into the range (-90,+90) in degrees */
|
|
203280
203280
|
capLatitudeInPlace() {
|
|
203281
203281
|
const limit = 0.5 * Math.PI;
|
|
203282
203282
|
this._radians0 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.clampToStartEnd(this._radians0, -limit, limit);
|
|
@@ -203296,7 +203296,7 @@ class AngleSweep {
|
|
|
203296
203296
|
return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this._radians0, -a)
|
|
203297
203297
|
&& _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this._radians1, a);
|
|
203298
203298
|
}
|
|
203299
|
-
/**
|
|
203299
|
+
/** Return a clone of this sweep. */
|
|
203300
203300
|
clone() {
|
|
203301
203301
|
return new AngleSweep(this._radians0, this._radians1);
|
|
203302
203302
|
}
|
|
@@ -203310,15 +203310,16 @@ class AngleSweep {
|
|
|
203310
203310
|
fractionToAngle(fraction) {
|
|
203311
203311
|
return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createRadians(this.fractionToRadians(fraction));
|
|
203312
203312
|
}
|
|
203313
|
-
/**
|
|
203313
|
+
/**
|
|
203314
|
+
* Return 2PI divided by the sweep radians (i.e. 360 degrees divided by sweep angle).
|
|
203314
203315
|
* * This is the number of fractional intervals required to cover a whole circle.
|
|
203315
203316
|
*/
|
|
203316
203317
|
fractionPeriod() {
|
|
203317
203318
|
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.safeDivideFraction(Math.PI * 2.0, Math.abs(this._radians1 - this._radians0), 1.0);
|
|
203318
203319
|
}
|
|
203319
|
-
/**
|
|
203320
|
+
/**
|
|
203321
|
+
* Return the fractionalized position of the given angle (as Angle) computed without consideration of
|
|
203320
203322
|
* 2PI period and without consideration of angle sweep direction (CW or CCW).
|
|
203321
|
-
*
|
|
203322
203323
|
* * the start angle is at fraction 0
|
|
203323
203324
|
* * the end angle is at fraction 1
|
|
203324
203325
|
* * interior angles are between 0 and 1
|
|
@@ -203331,8 +203332,8 @@ class AngleSweep {
|
|
|
203331
203332
|
angleToUnboundedFraction(theta) {
|
|
203332
203333
|
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.safeDivideFraction(theta.radians - this._radians0, this._radians1 - this._radians0, 1.0);
|
|
203333
203334
|
}
|
|
203334
|
-
/**
|
|
203335
|
-
*
|
|
203335
|
+
/**
|
|
203336
|
+
* Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.
|
|
203336
203337
|
* * consider radians0 as `start` angle of the sweep and radians1 as `end` angle of the sweep
|
|
203337
203338
|
* * fraction is always positive
|
|
203338
203339
|
* * the start angle is at fraction 0
|
|
@@ -203357,8 +203358,8 @@ class AngleSweep {
|
|
|
203357
203358
|
const fraction2 = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.safeDivideFraction(delta2, -sweep, zeroSweepDefault);
|
|
203358
203359
|
return fraction2;
|
|
203359
203360
|
}
|
|
203360
|
-
/**
|
|
203361
|
-
*
|
|
203361
|
+
/**
|
|
203362
|
+
* Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.
|
|
203362
203363
|
* * fraction is always positive
|
|
203363
203364
|
* * the start angle is at fraction 0
|
|
203364
203365
|
* * the end angle is at fraction 1
|
|
@@ -203369,8 +203370,8 @@ class AngleSweep {
|
|
|
203369
203370
|
radiansToPositivePeriodicFraction(radians, zeroSweepDefault = 0.0) {
|
|
203370
203371
|
return AngleSweep.radiansToPositivePeriodicFractionStartEnd(radians, this._radians0, this._radians1, zeroSweepDefault);
|
|
203371
203372
|
}
|
|
203372
|
-
/**
|
|
203373
|
-
*
|
|
203373
|
+
/**
|
|
203374
|
+
* Return the fractionalized position of the given angle (as Angle), computed with consideration of 2PI period.
|
|
203374
203375
|
* * fraction is always positive
|
|
203375
203376
|
* * the start angle is at fraction 0
|
|
203376
203377
|
* * the end angle is at fraction 1
|
|
@@ -203381,8 +203382,8 @@ class AngleSweep {
|
|
|
203381
203382
|
angleToPositivePeriodicFraction(theta) {
|
|
203382
203383
|
return this.radiansToPositivePeriodicFraction(theta.radians);
|
|
203383
203384
|
}
|
|
203384
|
-
/**
|
|
203385
|
-
*
|
|
203385
|
+
/**
|
|
203386
|
+
* Return the fractionalized position of the given array of angles (as radian), computed with consideration of 2PI period.
|
|
203386
203387
|
* * fraction is always positive
|
|
203387
203388
|
* * the start angle is at fraction 0
|
|
203388
203389
|
* * the end angle is at fraction 1
|
|
@@ -203396,9 +203397,9 @@ class AngleSweep {
|
|
|
203396
203397
|
data.reassign(i, this.radiansToPositivePeriodicFraction(data.atUncheckedIndex(i)));
|
|
203397
203398
|
}
|
|
203398
203399
|
}
|
|
203399
|
-
/**
|
|
203400
|
+
/**
|
|
203401
|
+
* Return the fractionalized position of the given angle (as radian) computed with consideration of
|
|
203400
203402
|
* 2PI period and with consideration of angle sweep direction (CW or CCW).
|
|
203401
|
-
*
|
|
203402
203403
|
* * the start angle is at fraction 0
|
|
203403
203404
|
* * the end angle is at fraction 1
|
|
203404
203405
|
* * interior angles are between 0 and 1
|
|
@@ -203422,9 +203423,9 @@ class AngleSweep {
|
|
|
203422
203423
|
const fraction = 0.5 + _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.safeDivideFraction(delta2, -sweep, 0.0);
|
|
203423
203424
|
return fraction;
|
|
203424
203425
|
}
|
|
203425
|
-
/**
|
|
203426
|
+
/**
|
|
203427
|
+
* Return the fractionalized position of the given angle (as Angle) computed with consideration of
|
|
203426
203428
|
* 2PI period and with consideration of angle sweep direction (CW or CCW).
|
|
203427
|
-
*
|
|
203428
203429
|
* * the start angle is at fraction 0
|
|
203429
203430
|
* * the end angle is at fraction 1
|
|
203430
203431
|
* * interior angles are between 0 and 1
|
|
@@ -203435,7 +203436,7 @@ class AngleSweep {
|
|
|
203435
203436
|
angleToSignedPeriodicFraction(theta) {
|
|
203436
203437
|
return this.radiansToSignedPeriodicFraction(theta.radians);
|
|
203437
203438
|
}
|
|
203438
|
-
/**
|
|
203439
|
+
/** Test if the given angle (as radians) is within sweep (between radians0 and radians1) */
|
|
203439
203440
|
static isRadiansInStartEnd(radians, radians0, radians1, allowPeriodShift = true) {
|
|
203440
203441
|
const delta0 = radians - radians0;
|
|
203441
203442
|
const delta1 = radians - radians1;
|
|
@@ -203445,16 +203446,16 @@ class AngleSweep {
|
|
|
203445
203446
|
return allowPeriodShift ? _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians0) : _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(radians, radians0);
|
|
203446
203447
|
return allowPeriodShift ? this.radiansToPositivePeriodicFractionStartEnd(radians, radians0, radians1, 1000.0) <= 1.0 : false;
|
|
203447
203448
|
}
|
|
203448
|
-
/**
|
|
203449
|
+
/** Test if the given angle (as radians) is within sweep */
|
|
203449
203450
|
isRadiansInSweep(radians, allowPeriodShift = true) {
|
|
203450
203451
|
return AngleSweep.isRadiansInStartEnd(radians, this.startRadians, this.endRadians, allowPeriodShift);
|
|
203451
203452
|
}
|
|
203452
|
-
/**
|
|
203453
|
+
/** Test if the given angle (as Angle) is within the sweep */
|
|
203453
203454
|
isAngleInSweep(angle) {
|
|
203454
203455
|
return this.isRadiansInSweep(angle.radians);
|
|
203455
203456
|
}
|
|
203456
|
-
/**
|
|
203457
|
-
*
|
|
203457
|
+
/**
|
|
203458
|
+
* Set this AngleSweep from various sources:
|
|
203458
203459
|
* * if json is undefined, a full-circle sweep is returned.
|
|
203459
203460
|
* * If json is an AngleSweep object, it is cloned
|
|
203460
203461
|
* * If json is an array of 2 numbers, those numbers are start and end angles in degrees.
|
|
@@ -203476,7 +203477,7 @@ class AngleSweep {
|
|
|
203476
203477
|
else
|
|
203477
203478
|
this.setStartEndRadians(); // default full circle
|
|
203478
203479
|
}
|
|
203479
|
-
/**
|
|
203480
|
+
/** Create an AngleSweep from a json object. */
|
|
203480
203481
|
static fromJSON(json) {
|
|
203481
203482
|
const result = AngleSweep.create360();
|
|
203482
203483
|
result.setFromJSON(json);
|
|
@@ -203489,7 +203490,8 @@ class AngleSweep {
|
|
|
203489
203490
|
toJSON() {
|
|
203490
203491
|
return [this.startDegrees, this.endDegrees];
|
|
203491
203492
|
}
|
|
203492
|
-
/**
|
|
203493
|
+
/**
|
|
203494
|
+
* Test if this angle sweep and other angle sweep match with radians tolerance.
|
|
203493
203495
|
* * Period shifts are allowed.
|
|
203494
203496
|
*/
|
|
203495
203497
|
isAlmostEqualAllowPeriodShift(other) {
|
|
@@ -203498,14 +203500,16 @@ class AngleSweep {
|
|
|
203498
203500
|
return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians0, other._radians0)
|
|
203499
203501
|
&& _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0);
|
|
203500
203502
|
}
|
|
203501
|
-
/**
|
|
203503
|
+
/**
|
|
203504
|
+
* Test if this angle sweep and other angle sweep match with radians tolerance.
|
|
203502
203505
|
* * Period shifts are not allowed.
|
|
203503
203506
|
*/
|
|
203504
203507
|
isAlmostEqualNoPeriodShift(other) {
|
|
203505
203508
|
return _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this._radians0, other._radians0)
|
|
203506
203509
|
&& _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.isAlmostEqualRadiansNoPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0);
|
|
203507
203510
|
}
|
|
203508
|
-
/**
|
|
203511
|
+
/**
|
|
203512
|
+
* Test if start and end angles match with radians tolerance.
|
|
203509
203513
|
* * Period shifts are not allowed.
|
|
203510
203514
|
* * This function is equivalent to isAlmostEqualNoPeriodShift. It is present for consistency with other classes.
|
|
203511
203515
|
* However, it is recommended to use isAlmostEqualNoPeriodShift which has a clearer name.
|
|
@@ -210772,7 +210776,7 @@ class Matrix3d {
|
|
|
210772
210776
|
return undefined;
|
|
210773
210777
|
}
|
|
210774
210778
|
/**
|
|
210775
|
-
* Multiply `matrixInverse * [x,y,z]` and return result as `Point4d` the
|
|
210779
|
+
* Multiply `matrixInverse * [x,y,z]` and return result as a `Point4d` with the given weight as the last coordinate.
|
|
210776
210780
|
* * Equivalent to solving `matrix * result = [x,y,z]` for an unknown `result`.
|
|
210777
210781
|
* * Result is `undefined` if the matrix is singular (e.g. has parallel columns or a zero magnitude column)
|
|
210778
210782
|
* @return result as a Point4d with the same weight.
|
|
@@ -210908,20 +210912,17 @@ class Matrix3d {
|
|
|
210908
210912
|
}
|
|
210909
210913
|
/**
|
|
210910
210914
|
* Multiply `this` Matrix3d (considered to be a Transform with 0 `origin`) times `other` Transform.
|
|
210911
|
-
* **Note:** If `other = [B b]`, then
|
|
210912
|
-
* Then `this * other` is defined as [A*B Aa]. That's because we create a 4x4 matrix for each Transform
|
|
210913
|
-
* with the 3x3 `matrix` and `origin` as upper 3x4 part of a 4x4 matrix and 0001 as the final row. Then we
|
|
210914
|
-
* multiply those two 4x4 matrixes:
|
|
210915
|
+
* * **Note:** If `this = [A 0]` and `other = [B b]`, then `this * other` is defined as [A*B Ab] because:
|
|
210915
210916
|
* ```
|
|
210916
210917
|
* equation
|
|
210917
210918
|
* \begin{matrix}
|
|
210918
|
-
* \text{
|
|
210919
|
-
* \text{
|
|
210919
|
+
* \text{this matrix }\bold{A}\text{ promoted to block Transform} & \blockTransform{A}{0} \\
|
|
210920
|
+
* \text{other Transform with `matrix` part }\bold{B}\text{ and origin part }\bold{b} & \blockTransform{B}{b}\\
|
|
210920
210921
|
* \text{product}& \blockTransform{A}{0}\blockTransform{B}{b}=\blockTransform{AB}{Ab}
|
|
210921
210922
|
* \end{matrix}
|
|
210922
210923
|
* ```
|
|
210923
210924
|
* @param other the `other` Transform to be multiplied to `this` matrix.
|
|
210924
|
-
* @param result optional preallocated result to reuse.
|
|
210925
|
+
* @param result optional preallocated `result` to reuse.
|
|
210925
210926
|
*/
|
|
210926
210927
|
multiplyMatrixTransform(other, result) {
|
|
210927
210928
|
if (!result)
|
|
@@ -211704,7 +211705,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
211704
211705
|
|
|
211705
211706
|
/* cspell:word cxcz, cxsz, cxcy, cxsy, sxcz, sxsz, sxcy, sxsy, cycz, cysz, sycz, sysz */
|
|
211706
211707
|
/**
|
|
211707
|
-
*
|
|
211708
|
+
* Represents a non-trivial rotation using three simple axis rotation angles and an order in which to apply them.
|
|
211708
211709
|
* * This class accommodates application-specific interpretation of "multiplying 3 rotation matrices" with regard to
|
|
211709
211710
|
* * Whether a "vector" is a "row" or a "column"
|
|
211710
211711
|
* * The order in which the X,Y,Z rotations are applied.
|
|
@@ -211762,7 +211763,7 @@ class OrderedRotationAngles {
|
|
|
211762
211763
|
get zRadians() {
|
|
211763
211764
|
return this._z.radians;
|
|
211764
211765
|
}
|
|
211765
|
-
/**
|
|
211766
|
+
/** The flag controlling whether vectors are treated as rows or as columns */
|
|
211766
211767
|
static get treatVectorsAsColumns() {
|
|
211767
211768
|
return OrderedRotationAngles._sTreatVectorsAsColumns;
|
|
211768
211769
|
}
|
|
@@ -211845,7 +211846,7 @@ class OrderedRotationAngles {
|
|
|
211845
211846
|
* * In the failure case the method's return value is `undefined`.
|
|
211846
211847
|
* * In the failure case, if the optional result was supplied, that result will nonetheless be filled with
|
|
211847
211848
|
* a set of angles.
|
|
211848
|
-
|
|
211849
|
+
*/
|
|
211849
211850
|
static createFromMatrix3d(matrix, order, result) {
|
|
211850
211851
|
// treat vector as columns
|
|
211851
211852
|
let m11 = matrix.coffs[0], m12 = matrix.coffs[1], m13 = matrix.coffs[2];
|
|
@@ -212642,21 +212643,19 @@ class Point2dArrayCarrier extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_
|
|
|
212642
212643
|
return undefined;
|
|
212643
212644
|
}
|
|
212644
212645
|
/**
|
|
212645
|
-
|
|
212646
|
-
|
|
212647
|
-
|
|
212648
|
-
|
|
212649
|
-
|
|
212650
|
-
|
|
212651
|
-
|
|
212646
|
+
* Return the cross product of vectors from point at originIndex to points at indexA and indexB
|
|
212647
|
+
* @param originIndex index of origin
|
|
212648
|
+
* @param indexA index of first target within the array
|
|
212649
|
+
* @param indexB index of second target within the array
|
|
212650
|
+
* @param result caller-allocated vector.
|
|
212651
|
+
* @returns return true if indexA, indexB both valid
|
|
212652
|
+
*/
|
|
212652
212653
|
crossProductIndexIndexIndex(originIndex, indexA, indexB) {
|
|
212653
212654
|
if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))
|
|
212654
212655
|
return _Point2dVector2d__WEBPACK_IMPORTED_MODULE_1__.XY.crossProductToPoints(this.data[originIndex], this.data[indexA], this.data[indexB]);
|
|
212655
212656
|
return undefined;
|
|
212656
212657
|
}
|
|
212657
|
-
/**
|
|
212658
|
-
* read-only property for number of XYZ in the collection.
|
|
212659
|
-
*/
|
|
212658
|
+
/** Read-only property for number of XYZ in the collection. */
|
|
212660
212659
|
get length() {
|
|
212661
212660
|
return this.data.length;
|
|
212662
212661
|
}
|
|
@@ -212702,10 +212701,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
212702
212701
|
* @module CartesianGeometry
|
|
212703
212702
|
*/
|
|
212704
212703
|
// cspell:word JSONXY
|
|
212705
|
-
// cspell:word CWXY
|
|
212704
|
+
// cspell:word CWXY CCWXY
|
|
212706
212705
|
|
|
212707
212706
|
|
|
212708
|
-
/**
|
|
212707
|
+
/**
|
|
212708
|
+
* Minimal object containing x,y and operations that are meaningful without change in both point and vector.
|
|
212709
212709
|
* * `XY` is not instantiable.
|
|
212710
212710
|
* * The derived (instantiable) classes are
|
|
212711
212711
|
* * `Point2d`
|
|
@@ -212750,11 +212750,11 @@ class XY {
|
|
|
212750
212750
|
isAlmostEqualXY(x, y, tol) {
|
|
212751
212751
|
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.x, x, tol) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(this.y, y, tol);
|
|
212752
212752
|
}
|
|
212753
|
-
/**
|
|
212753
|
+
/** Return a json array `[x,y]` */
|
|
212754
212754
|
toJSON() {
|
|
212755
212755
|
return [this.x, this.y];
|
|
212756
212756
|
}
|
|
212757
|
-
/**
|
|
212757
|
+
/** Return a json object `{x: 1, y:2}` */
|
|
212758
212758
|
toJSONXY() {
|
|
212759
212759
|
return { x: this.x, y: this.y };
|
|
212760
212760
|
}
|
|
@@ -212762,7 +212762,7 @@ class XY {
|
|
|
212762
212762
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
212763
212763
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
212764
212764
|
* @param json the JSON input
|
|
212765
|
-
|
|
212765
|
+
*/
|
|
212766
212766
|
setFromJSON(json) {
|
|
212767
212767
|
if (Array.isArray(json)) {
|
|
212768
212768
|
this.set(json[0] || 0, json[1] || 0);
|
|
@@ -212790,17 +212790,13 @@ class XY {
|
|
|
212790
212790
|
maxDiff(other) {
|
|
212791
212791
|
return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y));
|
|
212792
212792
|
}
|
|
212793
|
-
/**
|
|
212794
|
-
* Return the x,y component corresponding to 0,1.
|
|
212795
|
-
*/
|
|
212793
|
+
/** Return the x,y component corresponding to 0,1 */
|
|
212796
212794
|
at(index) {
|
|
212797
212795
|
if (index < 0.5)
|
|
212798
212796
|
return this.x;
|
|
212799
212797
|
return this.y;
|
|
212800
212798
|
}
|
|
212801
|
-
/**
|
|
212802
|
-
* Set value at index 0 or 1.
|
|
212803
|
-
*/
|
|
212799
|
+
/** Set value at index 0 or 1 */
|
|
212804
212800
|
setAt(index, value) {
|
|
212805
212801
|
if (index < 0.5)
|
|
212806
212802
|
this.x = value;
|
|
@@ -212817,7 +212813,7 @@ class XY {
|
|
|
212817
212813
|
}
|
|
212818
212814
|
return index;
|
|
212819
212815
|
}
|
|
212820
|
-
/**
|
|
212816
|
+
/** Returns true if the x,y components are both small by metric metric tolerance */
|
|
212821
212817
|
get isAlmostZero() {
|
|
212822
212818
|
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.x) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.y);
|
|
212823
212819
|
}
|
|
@@ -212833,11 +212829,11 @@ class XY {
|
|
|
212833
212829
|
magnitudeSquared() {
|
|
212834
212830
|
return this.x * this.x + this.y * this.y;
|
|
212835
212831
|
}
|
|
212836
|
-
/**
|
|
212832
|
+
/** Returns true if the x,y components are exactly equal. */
|
|
212837
212833
|
isExactEqual(other) {
|
|
212838
212834
|
return this.x === other.x && this.y === other.y;
|
|
212839
212835
|
}
|
|
212840
|
-
/**
|
|
212836
|
+
/** Returns true if x,y match `other` within metric tolerance */
|
|
212841
212837
|
isAlmostEqualMetric(other, distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
|
|
212842
212838
|
return this.maxDiff(other) <= distanceTol;
|
|
212843
212839
|
}
|
|
@@ -212849,7 +212845,7 @@ class XY {
|
|
|
212849
212845
|
unitVectorTo(other, result) {
|
|
212850
212846
|
return this.vectorTo(other, result).normalize(result);
|
|
212851
212847
|
}
|
|
212852
|
-
/**
|
|
212848
|
+
/** Cross product of vectors from origin to targets */
|
|
212853
212849
|
static crossProductToPoints(origin, targetA, targetB) {
|
|
212854
212850
|
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(targetA.x - origin.x, targetA.y - origin.y, targetB.x - origin.x, targetB.y - origin.y);
|
|
212855
212851
|
}
|
|
@@ -212862,7 +212858,7 @@ class Point2d extends XY {
|
|
|
212862
212858
|
constructor(x = 0, y = 0) {
|
|
212863
212859
|
super(x, y);
|
|
212864
212860
|
}
|
|
212865
|
-
/**
|
|
212861
|
+
/** Return a new Point2d with x,y coordinates from this. */
|
|
212866
212862
|
clone(result) {
|
|
212867
212863
|
return Point2d.create(this.x, this.y, result);
|
|
212868
212864
|
}
|
|
@@ -212884,7 +212880,7 @@ class Point2d extends XY {
|
|
|
212884
212880
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
212885
212881
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
212886
212882
|
* @param json the JSON input
|
|
212887
|
-
|
|
212883
|
+
*/
|
|
212888
212884
|
static fromJSON(json) {
|
|
212889
212885
|
const val = new Point2d();
|
|
212890
212886
|
val.setFromJSON(json);
|
|
@@ -212900,7 +212896,8 @@ class Point2d extends XY {
|
|
|
212900
212896
|
static createZero(result) {
|
|
212901
212897
|
return Point2d.create(0, 0, result);
|
|
212902
212898
|
}
|
|
212903
|
-
/**
|
|
212899
|
+
/**
|
|
212900
|
+
* Starting at this point, move along vector by tangentFraction of the vector length, and then
|
|
212904
212901
|
* to the left by leftFraction of the perpendicular vector length.
|
|
212905
212902
|
* @param tangentFraction distance to move along the vector, as a fraction of vector
|
|
212906
212903
|
* @param leftFraction distance to move perpendicular to the vector, as a fraction of the rotated vector
|
|
@@ -212911,7 +212908,8 @@ class Point2d extends XY {
|
|
|
212911
212908
|
const dy = vector.y;
|
|
212912
212909
|
return Point2d.create(this.x + tangentFraction * dx - leftFraction * dy, this.y + tangentFraction * dy + leftFraction * dx);
|
|
212913
212910
|
}
|
|
212914
|
-
/**
|
|
212911
|
+
/**
|
|
212912
|
+
* Interpolate at tangentFraction between this instance and point, and then Move by leftFraction
|
|
212915
212913
|
* along the xy perpendicular of the vector between the points.
|
|
212916
212914
|
*/
|
|
212917
212915
|
forwardLeftInterpolate(tangentFraction, leftFraction, point) {
|
|
@@ -212974,7 +212972,8 @@ class Point2d extends XY {
|
|
|
212974
212972
|
const y2 = target2.y - this.y;
|
|
212975
212973
|
return x1 * y2 - y1 * x2;
|
|
212976
212974
|
}
|
|
212977
|
-
/**
|
|
212975
|
+
/**
|
|
212976
|
+
* Return the fractional coordinate of the projection of this instance x,y onto the
|
|
212978
212977
|
* line from startPoint to endPoint.
|
|
212979
212978
|
* @param startPoint start point of line
|
|
212980
212979
|
* @param endPoint end point of line
|
|
@@ -212988,7 +212987,8 @@ class Point2d extends XY {
|
|
|
212988
212987
|
return numerator / denominator;
|
|
212989
212988
|
}
|
|
212990
212989
|
}
|
|
212991
|
-
/**
|
|
212990
|
+
/**
|
|
212991
|
+
* 2D vector with `x`,`y` as properties
|
|
212992
212992
|
* @public
|
|
212993
212993
|
*/
|
|
212994
212994
|
class Vector2d extends XY {
|
|
@@ -213026,7 +213026,7 @@ class Vector2d extends XY {
|
|
|
213026
213026
|
static createZero(result) {
|
|
213027
213027
|
return Vector2d.create(0, 0, result);
|
|
213028
213028
|
}
|
|
213029
|
-
/**
|
|
213029
|
+
/** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d, or leading entries of Float64Array */
|
|
213030
213030
|
static createFrom(data, result) {
|
|
213031
213031
|
if (data instanceof Float64Array) {
|
|
213032
213032
|
if (data.length >= 2)
|
|
@@ -213041,7 +213041,7 @@ class Vector2d extends XY {
|
|
|
213041
213041
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
213042
213042
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
213043
213043
|
* @param json the JSON input
|
|
213044
|
-
|
|
213044
|
+
*/
|
|
213045
213045
|
static fromJSON(json) {
|
|
213046
213046
|
const val = new Vector2d();
|
|
213047
213047
|
val.setFromJSON(json);
|
|
@@ -213073,7 +213073,8 @@ class Vector2d extends XY {
|
|
|
213073
213073
|
}
|
|
213074
213074
|
return undefined;
|
|
213075
213075
|
}
|
|
213076
|
-
/**
|
|
213076
|
+
/**
|
|
213077
|
+
* Return a (new or optionally reused) vector which is `this` divided by `denominator`
|
|
213077
213078
|
* * return undefined if denominator is zero.
|
|
213078
213079
|
*/
|
|
213079
213080
|
safeDivideOrNull(denominator, result) {
|
|
@@ -213094,7 +213095,7 @@ class Vector2d extends XY {
|
|
|
213094
213095
|
* it's returning the length of the projection as a fraction of the target magnitude.
|
|
213095
213096
|
* @param target the target vector
|
|
213096
213097
|
* @param defaultFraction the returned value in case magnitude square of target vector is very small
|
|
213097
|
-
|
|
213098
|
+
*/
|
|
213098
213099
|
fractionOfProjectionToVector(target, defaultFraction) {
|
|
213099
213100
|
/*
|
|
213100
213101
|
* projection length is (this.target)/||target||
|
|
@@ -213149,7 +213150,7 @@ class Vector2d extends XY {
|
|
|
213149
213150
|
}
|
|
213150
213151
|
return result;
|
|
213151
213152
|
}
|
|
213152
|
-
/**
|
|
213153
|
+
/** Return a new Vector2d rotated CCW by given angle */
|
|
213153
213154
|
rotateXY(angle, result) {
|
|
213154
213155
|
const s = angle.sin();
|
|
213155
213156
|
const c = angle.cos();
|
|
@@ -213161,7 +213162,8 @@ class Vector2d extends XY {
|
|
|
213161
213162
|
result.y = xx * s + yy * c;
|
|
213162
213163
|
return result;
|
|
213163
213164
|
}
|
|
213164
|
-
/**
|
|
213165
|
+
/**
|
|
213166
|
+
* Return a vector computed at fractional position between this vector and vectorB
|
|
213165
213167
|
* @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.
|
|
213166
213168
|
* True fractions are "between", negatives are "before this", beyond 1 is "beyond vectorB".
|
|
213167
213169
|
* @param vectorB second vector
|
|
@@ -213184,14 +213186,14 @@ class Vector2d extends XY {
|
|
|
213184
213186
|
}
|
|
213185
213187
|
return result;
|
|
213186
213188
|
}
|
|
213187
|
-
/**
|
|
213189
|
+
/** Return {this + vector}. */
|
|
213188
213190
|
plus(vector, result) {
|
|
213189
213191
|
result = result ? result : new Vector2d();
|
|
213190
213192
|
result.x = this.x + vector.x;
|
|
213191
213193
|
result.y = this.y + vector.y;
|
|
213192
213194
|
return result;
|
|
213193
213195
|
}
|
|
213194
|
-
/**
|
|
213196
|
+
/** Return {this - vector}. */
|
|
213195
213197
|
minus(vector, result) {
|
|
213196
213198
|
result = result ? result : new Vector2d();
|
|
213197
213199
|
result.x = this.x - vector.x;
|
|
@@ -213226,34 +213228,34 @@ class Vector2d extends XY {
|
|
|
213226
213228
|
result.y = this.y * scale;
|
|
213227
213229
|
return result;
|
|
213228
213230
|
}
|
|
213229
|
-
/**
|
|
213231
|
+
/** Return a vector parallel to this but with specified length */
|
|
213230
213232
|
scaleToLength(length, result) {
|
|
213231
213233
|
const mag = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.correctSmallMetricDistance(this.magnitude());
|
|
213232
213234
|
if (mag === 0)
|
|
213233
213235
|
return undefined;
|
|
213234
213236
|
return this.scale(length / mag, result);
|
|
213235
213237
|
}
|
|
213236
|
-
/**
|
|
213238
|
+
/** Return the dot product of this with vectorB */
|
|
213237
213239
|
dotProduct(vectorB) {
|
|
213238
213240
|
return this.x * vectorB.x + this.y * vectorB.y;
|
|
213239
213241
|
}
|
|
213240
|
-
/**
|
|
213242
|
+
/** Dot product with vector from pointA to pointB */
|
|
213241
213243
|
dotProductStartEnd(pointA, pointB) {
|
|
213242
213244
|
return this.x * (pointB.x - pointA.x) + this.y * (pointB.y - pointA.y);
|
|
213243
213245
|
}
|
|
213244
|
-
/**
|
|
213246
|
+
/** Vector cross product {this CROSS vectorB} */
|
|
213245
213247
|
crossProduct(vectorB) {
|
|
213246
213248
|
return this.x * vectorB.y - this.y * vectorB.x;
|
|
213247
213249
|
}
|
|
213248
213250
|
/**
|
|
213249
|
-
*
|
|
213251
|
+
* Return the radians (as a simple number, not strongly typed Angle) signed angle from this to vectorB.
|
|
213250
213252
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
213251
213253
|
*/
|
|
213252
213254
|
radiansTo(vectorB) {
|
|
213253
213255
|
return Math.atan2(this.crossProduct(vectorB), this.dotProduct(vectorB));
|
|
213254
213256
|
}
|
|
213255
213257
|
/**
|
|
213256
|
-
*
|
|
213258
|
+
* Return the (strongly typed) signed angle from this to vectorB.
|
|
213257
213259
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
213258
213260
|
*/
|
|
213259
213261
|
angleTo(vectorB) {
|
|
@@ -213341,7 +213343,7 @@ class Point3dArrayCarrier extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE
|
|
|
213341
213343
|
super();
|
|
213342
213344
|
this.data = data;
|
|
213343
213345
|
}
|
|
213344
|
-
/**
|
|
213346
|
+
/** Test if `index` is a valid index into the array. */
|
|
213345
213347
|
isValidIndex(index) {
|
|
213346
213348
|
return index >= 0 && index < this.data.length;
|
|
213347
213349
|
}
|
|
@@ -213383,23 +213385,23 @@ class Point3dArrayCarrier extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE
|
|
|
213383
213385
|
return undefined;
|
|
213384
213386
|
}
|
|
213385
213387
|
/**
|
|
213386
|
-
*
|
|
213388
|
+
* Access x of indexed point
|
|
213387
213389
|
* * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results
|
|
213388
|
-
|
|
213390
|
+
*/
|
|
213389
213391
|
getXAtUncheckedPointIndex(pointIndex) {
|
|
213390
213392
|
return this.data[pointIndex].x;
|
|
213391
213393
|
}
|
|
213392
213394
|
/**
|
|
213393
|
-
*
|
|
213395
|
+
* Access y of indexed point
|
|
213394
213396
|
* * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results
|
|
213395
|
-
|
|
213397
|
+
*/
|
|
213396
213398
|
getYAtUncheckedPointIndex(pointIndex) {
|
|
213397
213399
|
return this.data[pointIndex].y;
|
|
213398
213400
|
}
|
|
213399
213401
|
/**
|
|
213400
|
-
*
|
|
213402
|
+
* Access z of indexed point
|
|
213401
213403
|
* * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results
|
|
213402
|
-
|
|
213404
|
+
*/
|
|
213403
213405
|
getZAtUncheckedPointIndex(pointIndex) {
|
|
213404
213406
|
return this.data[pointIndex].z;
|
|
213405
213407
|
}
|
|
@@ -213466,10 +213468,7 @@ class Point3dArrayCarrier extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE
|
|
|
213466
213468
|
if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))
|
|
213467
213469
|
result.addCrossProductToTargetsInPlace(data[originIndex].x, data[originIndex].y, data[originIndex].z, data[indexA].x, data[indexA].y, data[indexA].z, data[indexB].x, data[indexB].y, data[indexB].z);
|
|
213468
213470
|
}
|
|
213469
|
-
/**
|
|
213470
|
-
* Accumulate scale times the x,y,z values at index to the sum.
|
|
213471
|
-
* No action if index is out of bounds.
|
|
213472
|
-
*/
|
|
213471
|
+
/** Accumulate scale times the x,y,z values at index to the sum. No action if index is out of bounds */
|
|
213473
213472
|
accumulateScaledXYZ(index, scale, sum) {
|
|
213474
213473
|
if (this.isValidIndex(index)) {
|
|
213475
213474
|
const point = this.data[index];
|
|
@@ -213478,20 +213477,19 @@ class Point3dArrayCarrier extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE
|
|
|
213478
213477
|
sum.z += scale * point.z;
|
|
213479
213478
|
}
|
|
213480
213479
|
}
|
|
213481
|
-
/**
|
|
213482
|
-
* read-only property for number of XYZ in the collection.
|
|
213483
|
-
*/
|
|
213480
|
+
/** Read-only property for number of XYZ in the collection */
|
|
213484
213481
|
get length() {
|
|
213485
213482
|
return this.data.length;
|
|
213486
213483
|
}
|
|
213487
|
-
/**
|
|
213484
|
+
/**
|
|
213485
|
+
* Push a (clone of) point onto the collection
|
|
213488
213486
|
* * point itself is not pushed -- xyz data is extracted into the native form of the collection.
|
|
213489
213487
|
*/
|
|
213490
213488
|
push(data) {
|
|
213491
213489
|
this.data.push(data.clone());
|
|
213492
213490
|
}
|
|
213493
213491
|
/**
|
|
213494
|
-
*
|
|
213492
|
+
* Push a new point (given by coordinates) onto the collection
|
|
213495
213493
|
* @param x x coordinate
|
|
213496
213494
|
* @param y y coordinate
|
|
213497
213495
|
* @param z z coordinate
|
|
@@ -213499,26 +213497,26 @@ class Point3dArrayCarrier extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE
|
|
|
213499
213497
|
pushXYZ(x, y, z) {
|
|
213500
213498
|
this.data.push(_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(x === undefined ? 0.0 : x, y === undefined ? 0.0 : y, z === undefined ? 0.0 : z));
|
|
213501
213499
|
}
|
|
213502
|
-
/**
|
|
213500
|
+
/** Extract (copy) the final point */
|
|
213503
213501
|
back(result) {
|
|
213504
213502
|
if (this.data.length > 0) {
|
|
213505
213503
|
return this.data[this.data.length - 1].clone(result);
|
|
213506
213504
|
}
|
|
213507
213505
|
return undefined;
|
|
213508
213506
|
}
|
|
213509
|
-
/**
|
|
213507
|
+
/** Extract (copy) the first point */
|
|
213510
213508
|
front(result) {
|
|
213511
213509
|
if (this.data.length > 0) {
|
|
213512
213510
|
return this.data[0].clone(result);
|
|
213513
213511
|
}
|
|
213514
213512
|
return undefined;
|
|
213515
213513
|
}
|
|
213516
|
-
/**
|
|
213514
|
+
/** Remove the final point. */
|
|
213517
213515
|
pop() {
|
|
213518
213516
|
if (this.data.length > 0)
|
|
213519
213517
|
this.data.pop();
|
|
213520
213518
|
}
|
|
213521
|
-
/**
|
|
213519
|
+
/** Remove all points. */
|
|
213522
213520
|
clear() {
|
|
213523
213521
|
this.data.length = 0;
|
|
213524
213522
|
}
|
|
@@ -213587,7 +213585,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
213587
213585
|
|
|
213588
213586
|
// cspell:words CWXY CCWXY arctan Rodrigues
|
|
213589
213587
|
/**
|
|
213590
|
-
*
|
|
213588
|
+
* * `XYZ` is a minimal object containing x,y,z and operations that are meaningful without change in both
|
|
213589
|
+
* point and vector.
|
|
213591
213590
|
* * `XYZ` is not instantiable.
|
|
213592
213591
|
* * The derived (instantiable) classes are
|
|
213593
213592
|
* * `Point3d`
|
|
@@ -213631,7 +213630,8 @@ class XYZ {
|
|
|
213631
213630
|
static isXYAndZ(arg) {
|
|
213632
213631
|
return this.isXAndY(arg) && this.hasZ(arg);
|
|
213633
213632
|
}
|
|
213634
|
-
/**
|
|
213633
|
+
/**
|
|
213634
|
+
* Test if arg is any of:
|
|
213635
213635
|
* * XAndY
|
|
213636
213636
|
* * XYAndZ
|
|
213637
213637
|
* * [number,number]
|
|
@@ -213640,7 +213640,8 @@ class XYZ {
|
|
|
213640
213640
|
static isAnyImmediatePointType(arg) {
|
|
213641
213641
|
return Point3d.isXAndY(arg) || _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isNumberArray(arg, 2);
|
|
213642
213642
|
}
|
|
213643
|
-
/**
|
|
213643
|
+
/**
|
|
213644
|
+
* Look for (in order) an x coordinate present as:
|
|
213644
213645
|
* * arg.x
|
|
213645
213646
|
* * arg[0]
|
|
213646
213647
|
*/
|
|
@@ -213651,7 +213652,8 @@ class XYZ {
|
|
|
213651
213652
|
return arg[0];
|
|
213652
213653
|
return defaultValue;
|
|
213653
213654
|
}
|
|
213654
|
-
/**
|
|
213655
|
+
/**
|
|
213656
|
+
* Look for (in order) an x coordinate present as:
|
|
213655
213657
|
* * arg.y
|
|
213656
213658
|
* * arg[1]
|
|
213657
213659
|
*/
|
|
@@ -213662,7 +213664,8 @@ class XYZ {
|
|
|
213662
213664
|
return arg[1];
|
|
213663
213665
|
return defaultValue;
|
|
213664
213666
|
}
|
|
213665
|
-
/**
|
|
213667
|
+
/**
|
|
213668
|
+
* Look for (in order) an x coordinate present as:
|
|
213666
213669
|
* * arg.z
|
|
213667
213670
|
* * arg[2]
|
|
213668
213671
|
*/
|
|
@@ -213725,7 +213728,8 @@ class XYZ {
|
|
|
213725
213728
|
this.setZero();
|
|
213726
213729
|
}
|
|
213727
213730
|
}
|
|
213728
|
-
/**
|
|
213731
|
+
/**
|
|
213732
|
+
* Returns true if this and other have equal x,y,z parts within Geometry.smallMetricDistance.
|
|
213729
213733
|
* @param other The other XYAndZ to compare
|
|
213730
213734
|
* @param tol The tolerance for the comparison. If undefined, use [[Geometry.smallMetricDistance]]
|
|
213731
213735
|
*/
|
|
@@ -213806,9 +213810,7 @@ class XYZ {
|
|
|
213806
213810
|
maxDiff(other) {
|
|
213807
213811
|
return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y), Math.abs(this.z - other.z));
|
|
213808
213812
|
}
|
|
213809
|
-
/**
|
|
213810
|
-
* Return the x,y, z component corresponding to 0,1,2.
|
|
213811
|
-
*/
|
|
213813
|
+
/** Return the x,y, z component corresponding to 0,1,2 */
|
|
213812
213814
|
at(index) {
|
|
213813
213815
|
if (index < 0.5)
|
|
213814
213816
|
return this.x;
|
|
@@ -213816,9 +213818,7 @@ class XYZ {
|
|
|
213816
213818
|
return this.z;
|
|
213817
213819
|
return this.y;
|
|
213818
213820
|
}
|
|
213819
|
-
/**
|
|
213820
|
-
* Set value at index 0 or 1 or 2.
|
|
213821
|
-
*/
|
|
213821
|
+
/** Set value at index 0 or 1 or 2 */
|
|
213822
213822
|
setAt(index, value) {
|
|
213823
213823
|
if (index < 0.5)
|
|
213824
213824
|
this.x = value;
|
|
@@ -213872,27 +213872,27 @@ class XYZ {
|
|
|
213872
213872
|
magnitudeSquaredXY() {
|
|
213873
213873
|
return this.x * this.x + this.y * this.y;
|
|
213874
213874
|
}
|
|
213875
|
-
/**
|
|
213875
|
+
/** Exact equality test. */
|
|
213876
213876
|
isExactEqual(other) {
|
|
213877
213877
|
return this.x === other.x && this.y === other.y && this.z === other.z;
|
|
213878
213878
|
}
|
|
213879
|
-
/**
|
|
213879
|
+
/** Equality test with Geometry.smallMetricDistance tolerance */
|
|
213880
213880
|
isAlmostEqualMetric(other) {
|
|
213881
213881
|
return this.maxDiff(other) <= _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance;
|
|
213882
213882
|
}
|
|
213883
|
-
/**
|
|
213883
|
+
/** Add x,y,z from other in place. */
|
|
213884
213884
|
addInPlace(other) {
|
|
213885
213885
|
this.x += other.x;
|
|
213886
213886
|
this.y += other.y;
|
|
213887
213887
|
this.z += other.z;
|
|
213888
213888
|
}
|
|
213889
|
-
/**
|
|
213889
|
+
/** Add x,y,z from other in place. */
|
|
213890
213890
|
subtractInPlace(other) {
|
|
213891
213891
|
this.x -= other.x;
|
|
213892
213892
|
this.y -= other.y;
|
|
213893
213893
|
this.z -= other.z;
|
|
213894
213894
|
}
|
|
213895
|
-
/**
|
|
213895
|
+
/** Add (in place) the scaled x,y,z of other */
|
|
213896
213896
|
addScaledInPlace(other, scale) {
|
|
213897
213897
|
this.x += scale * other.x;
|
|
213898
213898
|
this.y += scale * other.y;
|
|
@@ -213904,7 +213904,7 @@ class XYZ {
|
|
|
213904
213904
|
this.y *= scale;
|
|
213905
213905
|
this.z *= scale;
|
|
213906
213906
|
}
|
|
213907
|
-
/**
|
|
213907
|
+
/** Add to x, y, z parts */
|
|
213908
213908
|
addXYZInPlace(dx = 0.0, dy = 0.0, dz = 0.0) {
|
|
213909
213909
|
this.x += dx;
|
|
213910
213910
|
this.y += dy;
|
|
@@ -213922,7 +213922,8 @@ class XYZ {
|
|
|
213922
213922
|
scaledVectorTo(other, scale, result) {
|
|
213923
213923
|
return Vector3d.create(scale * (other.x - this.x), scale * (other.y - this.y), scale * (other.z - this.z), result);
|
|
213924
213924
|
}
|
|
213925
|
-
/**
|
|
213925
|
+
/**
|
|
213926
|
+
* Return a unit vector from this vector to other. Return a 000 vector if the input is too small to normalize.
|
|
213926
213927
|
* @param other target of created vector.
|
|
213927
213928
|
* @param result optional result vector.
|
|
213928
213929
|
*/
|
|
@@ -213933,7 +213934,7 @@ class XYZ {
|
|
|
213933
213934
|
freeze() {
|
|
213934
213935
|
return Object.freeze(this);
|
|
213935
213936
|
}
|
|
213936
|
-
/**
|
|
213937
|
+
/** Access x part of XYZProps (which may be .x or [0]) */
|
|
213937
213938
|
static x(xyz, defaultValue = 0) {
|
|
213938
213939
|
if (xyz === undefined)
|
|
213939
213940
|
return defaultValue;
|
|
@@ -213943,7 +213944,7 @@ class XYZ {
|
|
|
213943
213944
|
return xyz.x;
|
|
213944
213945
|
return defaultValue;
|
|
213945
213946
|
}
|
|
213946
|
-
/**
|
|
213947
|
+
/** Access x part of XYZProps (which may be .x or [0]) */
|
|
213947
213948
|
static y(xyz, defaultValue = 0) {
|
|
213948
213949
|
if (xyz === undefined)
|
|
213949
213950
|
return defaultValue;
|
|
@@ -213953,7 +213954,7 @@ class XYZ {
|
|
|
213953
213954
|
return xyz.y;
|
|
213954
213955
|
return defaultValue;
|
|
213955
213956
|
}
|
|
213956
|
-
/**
|
|
213957
|
+
/** Access x part of XYZProps (which may be .x or [0]) */
|
|
213957
213958
|
static z(xyz, defaultValue = 0) {
|
|
213958
213959
|
if (xyz === undefined)
|
|
213959
213960
|
return defaultValue;
|
|
@@ -213988,7 +213989,8 @@ class Point3d extends XYZ {
|
|
|
213988
213989
|
clone(result) {
|
|
213989
213990
|
return Point3d.create(this.x, this.y, this.z, result);
|
|
213990
213991
|
}
|
|
213991
|
-
/**
|
|
213992
|
+
/**
|
|
213993
|
+
* Create a new Point3d with given coordinates
|
|
213992
213994
|
* @param x x part
|
|
213993
213995
|
* @param y y part
|
|
213994
213996
|
* @param z z part
|
|
@@ -214061,8 +214063,8 @@ class Point3d extends XYZ {
|
|
|
214061
214063
|
static createZero(result) {
|
|
214062
214064
|
return Point3d.create(0, 0, 0, result);
|
|
214063
214065
|
}
|
|
214064
|
-
/**
|
|
214065
|
-
*
|
|
214066
|
+
/**
|
|
214067
|
+
* Return the cross product of the vectors from this to pointA and pointB
|
|
214066
214068
|
* * the result is a vector
|
|
214067
214069
|
* * the result is perpendicular to both vectors, with right hand orientation
|
|
214068
214070
|
* * the magnitude of the vector is twice the area of the triangle.
|
|
@@ -214070,21 +214072,20 @@ class Point3d extends XYZ {
|
|
|
214070
214072
|
crossProductToPoints(pointA, pointB, result) {
|
|
214071
214073
|
return Vector3d.createCrossProduct(pointA.x - this.x, pointA.y - this.y, pointA.z - this.z, pointB.x - this.x, pointB.y - this.y, pointB.z - this.z, result);
|
|
214072
214074
|
}
|
|
214073
|
-
/** Return the magnitude of the cross product of the vectors from this to pointA and pointB
|
|
214074
|
-
*/
|
|
214075
|
+
/** Return the magnitude of the cross product of the vectors from this to pointA and pointB */
|
|
214075
214076
|
crossProductToPointsMagnitude(pointA, pointB) {
|
|
214076
214077
|
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductMagnitude(pointA.x - this.x, pointA.y - this.y, pointA.z - this.z, pointB.x - this.x, pointB.y - this.y, pointB.z - this.z);
|
|
214077
214078
|
}
|
|
214078
|
-
/**
|
|
214079
|
-
*
|
|
214079
|
+
/**
|
|
214080
|
+
* Return the triple product of the vectors from this to pointA, pointB, pointC
|
|
214080
214081
|
* * This is a scalar (number)
|
|
214081
214082
|
* * This is 6 times the (signed) volume of the tetrahedron on the 4 points.
|
|
214082
214083
|
*/
|
|
214083
214084
|
tripleProductToPoints(pointA, pointB, pointC) {
|
|
214084
214085
|
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.tripleProduct(pointA.x - this.x, pointA.y - this.y, pointA.z - this.z, pointB.x - this.x, pointB.y - this.y, pointB.z - this.z, pointC.x - this.x, pointC.y - this.y, pointC.z - this.z);
|
|
214085
214086
|
}
|
|
214086
|
-
/**
|
|
214087
|
-
*
|
|
214087
|
+
/**
|
|
214088
|
+
* Return the cross product of the vectors from this to pointA and pointB
|
|
214088
214089
|
* * the result is a scalar
|
|
214089
214090
|
* * the magnitude of the vector is twice the signed area of the triangle.
|
|
214090
214091
|
* * this is positive for counter-clockwise order of the points, negative for clockwise.
|
|
@@ -214094,8 +214095,8 @@ class Point3d extends XYZ {
|
|
|
214094
214095
|
}
|
|
214095
214096
|
/**
|
|
214096
214097
|
* Return a point interpolated between `this` point and the `other` point.
|
|
214097
|
-
* *
|
|
214098
|
-
|
|
214098
|
+
* * Fraction specifies where the interpolated point is located on the line passing `this` and `other`.
|
|
214099
|
+
*/
|
|
214099
214100
|
interpolate(fraction, other, result) {
|
|
214100
214101
|
if (fraction <= 0.5)
|
|
214101
214102
|
return Point3d.create(this.x + fraction * (other.x - this.x), this.y + fraction * (other.y - this.y), this.z + fraction * (other.z - this.z), result);
|
|
@@ -214148,7 +214149,8 @@ class Point3d extends XYZ {
|
|
|
214148
214149
|
static createScale(source, scale, result) {
|
|
214149
214150
|
return Point3d.create(source.x * scale, source.y * scale, source.z * scale, result);
|
|
214150
214151
|
}
|
|
214151
|
-
/**
|
|
214152
|
+
/**
|
|
214153
|
+
* Create a point that is a linear combination (weighted sum) of 2 input points.
|
|
214152
214154
|
* @param pointA first input point
|
|
214153
214155
|
* @param scaleA scale factor for pointA
|
|
214154
214156
|
* @param pointB second input point
|
|
@@ -214186,7 +214188,8 @@ class Point3d extends XYZ {
|
|
|
214186
214188
|
return startPoint.dotVectorsToTargets(endPoint, this) / denominator;
|
|
214187
214189
|
}
|
|
214188
214190
|
}
|
|
214189
|
-
/**
|
|
214191
|
+
/**
|
|
214192
|
+
* 3D vector with `x`,`y`,`z` as properties
|
|
214190
214193
|
* @public
|
|
214191
214194
|
*/
|
|
214192
214195
|
class Vector3d extends XYZ {
|
|
@@ -214211,7 +214214,7 @@ class Vector3d extends XYZ {
|
|
|
214211
214214
|
return Vector3d.create(this.x, this.y, this.z, result);
|
|
214212
214215
|
}
|
|
214213
214216
|
/**
|
|
214214
|
-
*
|
|
214217
|
+
* Return a Vector3d (new or reused from optional result)
|
|
214215
214218
|
* @param x x component
|
|
214216
214219
|
* @param y y component
|
|
214217
214220
|
* @param z z component
|
|
@@ -214264,7 +214267,6 @@ class Vector3d extends XYZ {
|
|
|
214264
214267
|
}
|
|
214265
214268
|
/**
|
|
214266
214269
|
* Return the cross product of the vectors from origin to pointA and pointB.
|
|
214267
|
-
*
|
|
214268
214270
|
* * the result is a vector
|
|
214269
214271
|
* * the result is perpendicular to both vectors, with right hand orientation
|
|
214270
214272
|
* * the magnitude of the vector is twice the area of the triangle.
|
|
@@ -214441,7 +214443,8 @@ class Vector3d extends XYZ {
|
|
|
214441
214443
|
this.z *= a;
|
|
214442
214444
|
return true;
|
|
214443
214445
|
}
|
|
214444
|
-
/**
|
|
214446
|
+
/**
|
|
214447
|
+
* Create a normalized vector from the inputs.
|
|
214445
214448
|
* @param result optional result
|
|
214446
214449
|
* @returns undefined if and only if normalization fails
|
|
214447
214450
|
*/
|
|
@@ -214475,7 +214478,8 @@ class Vector3d extends XYZ {
|
|
|
214475
214478
|
return defaultFraction;
|
|
214476
214479
|
return numerator / denominator;
|
|
214477
214480
|
}
|
|
214478
|
-
/**
|
|
214481
|
+
/**
|
|
214482
|
+
* Return a new vector with components negated from the calling instance.
|
|
214479
214483
|
* @param result optional result vector.
|
|
214480
214484
|
*/
|
|
214481
214485
|
negate(result) {
|
|
@@ -214557,7 +214561,8 @@ class Vector3d extends XYZ {
|
|
|
214557
214561
|
const normal = this.crossProduct(target).normalize();
|
|
214558
214562
|
return normal ? normal.crossProduct(this, result) : undefined;
|
|
214559
214563
|
}
|
|
214560
|
-
/**
|
|
214564
|
+
/**
|
|
214565
|
+
* Rotate this vector 90 degrees around an axis vector.
|
|
214561
214566
|
* * Note that simple cross is in the plane perpendicular to axis -- it loses the part
|
|
214562
214567
|
* of "this" that is along the axis. The unit and scale is supposed to fix that.
|
|
214563
214568
|
* This matches with Rodrigues' rotation formula because cos(theta) = 0 and sin(theta) = 1
|
|
@@ -214646,8 +214651,10 @@ class Vector3d extends XYZ {
|
|
|
214646
214651
|
static createAdd2Scaled(vectorA, scaleA, vectorB, scaleB, result) {
|
|
214647
214652
|
return Vector3d.create(vectorA.x * scaleA + vectorB.x * scaleB, vectorA.y * scaleA + vectorB.y * scaleB, vectorA.z * scaleA + vectorB.z * scaleB, result);
|
|
214648
214653
|
}
|
|
214649
|
-
/**
|
|
214650
|
-
*
|
|
214654
|
+
/**
|
|
214655
|
+
* Return the (strongly typed Vector3d) `thisVector3d + vectorA * scalarA + vectorB * scalarB`
|
|
214656
|
+
* with all components presented as numbers
|
|
214657
|
+
*/
|
|
214651
214658
|
static createAdd2ScaledXYZ(ax, ay, az, scaleA, bx, by, bz, scaleB, result) {
|
|
214652
214659
|
return Vector3d.create(ax * scaleA + bx * scaleB, ay * scaleA + by * scaleB, az * scaleA + bz * scaleB, result);
|
|
214653
214660
|
}
|
|
@@ -214674,7 +214681,8 @@ class Vector3d extends XYZ {
|
|
|
214674
214681
|
return undefined;
|
|
214675
214682
|
return this.scale(length / mag, result);
|
|
214676
214683
|
}
|
|
214677
|
-
/**
|
|
214684
|
+
/**
|
|
214685
|
+
* Compute the cross product of this vector with `vectorB`. Immediately pass it to `normalize`.
|
|
214678
214686
|
* @param vectorB second vector for cross product.
|
|
214679
214687
|
* @returns see `Vector3d` method `normalize()` for error condition.
|
|
214680
214688
|
*/
|
|
@@ -214761,7 +214769,8 @@ class Vector3d extends XYZ {
|
|
|
214761
214769
|
crossProductMagnitude(vectorB) {
|
|
214762
214770
|
return Math.sqrt(this.crossProductMagnitudeSquared(vectorB));
|
|
214763
214771
|
}
|
|
214764
|
-
/**
|
|
214772
|
+
/**
|
|
214773
|
+
* Return the dot product of this vector with vectorB.
|
|
214765
214774
|
* @param vectorB second vector of cross product
|
|
214766
214775
|
* @returns the dot product of this instance with vectorB
|
|
214767
214776
|
*/
|
|
@@ -214817,7 +214826,8 @@ class Vector3d extends XYZ {
|
|
|
214817
214826
|
return this.x * (pointB.x - pointA.x)
|
|
214818
214827
|
+ this.y * (pointB.y - pointA.y);
|
|
214819
214828
|
}
|
|
214820
|
-
/**
|
|
214829
|
+
/**
|
|
214830
|
+
* Dot product with vector from pointA to pointB, with pointB given as (weighted) wx,wy,wz,w
|
|
214821
214831
|
* * We need to unweight pointB (which is a homogeneous point) to be able to participate in the
|
|
214822
214832
|
* vector dot product
|
|
214823
214833
|
* * if the weight is near zero metric, the return is zero.
|
|
@@ -214861,7 +214871,7 @@ class Vector3d extends XYZ {
|
|
|
214861
214871
|
return Vector3d.createCrossProduct(this.x, this.y, this.z, vectorB.x, vectorB.y, vectorB.z, result);
|
|
214862
214872
|
}
|
|
214863
214873
|
/**
|
|
214864
|
-
*
|
|
214874
|
+
* Return cross product of `this` with the vector `(x, y, z)`
|
|
214865
214875
|
* @param x x component of second vector
|
|
214866
214876
|
* @param y y component of second vector
|
|
214867
214877
|
* @param z z component of second vector
|
|
@@ -214871,12 +214881,12 @@ class Vector3d extends XYZ {
|
|
|
214871
214881
|
return Vector3d.createCrossProduct(this.x, this.y, this.z, x, y, z, result);
|
|
214872
214882
|
}
|
|
214873
214883
|
/**
|
|
214874
|
-
|
|
214875
|
-
|
|
214876
|
-
|
|
214877
|
-
|
|
214878
|
-
|
|
214879
|
-
|
|
214884
|
+
* Return the angle in radians (not as strongly typed Angle) from this vector to vectorB.
|
|
214885
|
+
* * The returned angle is between 0 and `Math.PI`.
|
|
214886
|
+
* * The returned angle is measured in the plane containing the two vectors.
|
|
214887
|
+
* * Use `planarRadiansTo` and `signedRadiansTo` to return an angle measured in a specific plane.
|
|
214888
|
+
* @param vectorB target vector.
|
|
214889
|
+
*/
|
|
214880
214890
|
radiansTo(vectorB) {
|
|
214881
214891
|
// ||axb|| = ||a|| ||b|| |sin(t)| and a.b = ||a|| ||b|| cos(t) ==>
|
|
214882
214892
|
// ||axb|| / a.b = sin(t)/cos(t) = tan(t) ==> t = arctan(||axb|| / a.b).
|
|
@@ -214912,16 +214922,16 @@ class Vector3d extends XYZ {
|
|
|
214912
214922
|
return _Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createAtan2(this.crossProductXY(vectorB), this.dotProductXY(vectorB));
|
|
214913
214923
|
}
|
|
214914
214924
|
/**
|
|
214915
|
-
|
|
214916
|
-
|
|
214917
|
-
|
|
214918
|
-
|
|
214919
|
-
|
|
214920
|
-
|
|
214921
|
-
|
|
214922
|
-
|
|
214923
|
-
|
|
214924
|
-
|
|
214925
|
+
* Return the angle in radians (not as strongly-typed Angle) from this vector to vectorB, measured
|
|
214926
|
+
* in their containing plane whose normal lies in the same half-space as vectorW.
|
|
214927
|
+
* * The returned angle is between `-Math.PI` and `Math.PI`.
|
|
214928
|
+
* * If the cross product of this vector and vectorB lies on the same side of the plane as vectorW,
|
|
214929
|
+
* this function returns `radiansTo(vectorB)`; otherwise, it returns `-radiansTo(vectorB)`.
|
|
214930
|
+
* * `vectorW` does not have to be perpendicular to the plane.
|
|
214931
|
+
* * Use `planarRadiansTo` to measure the angle between vectors that are projected to another plane.
|
|
214932
|
+
* @param vectorB target vector.
|
|
214933
|
+
* @param vectorW determines the side of the plane in which the returned angle is measured
|
|
214934
|
+
*/
|
|
214925
214935
|
signedRadiansTo(vectorB, vectorW) {
|
|
214926
214936
|
const p = this.crossProduct(vectorB);
|
|
214927
214937
|
const theta = Math.atan2(p.magnitude(), this.dotProduct(vectorB));
|
|
@@ -214930,7 +214940,8 @@ class Vector3d extends XYZ {
|
|
|
214930
214940
|
else
|
|
214931
214941
|
return theta;
|
|
214932
214942
|
}
|
|
214933
|
-
/**
|
|
214943
|
+
/**
|
|
214944
|
+
* Return the (strongly-typed) angle from this vector to vectorB, measured
|
|
214934
214945
|
* in their containing plane whose normal lies in the same half-space as vectorW.
|
|
214935
214946
|
* * The returned angle is between -180 and 180 degrees.
|
|
214936
214947
|
* * If the cross product of this vector and vectorB lies on the same side of the plane as vectorW,
|
|
@@ -214973,15 +214984,19 @@ class Vector3d extends XYZ {
|
|
|
214973
214984
|
planarAngleTo(vectorB, planeNormal) {
|
|
214974
214985
|
return _Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createRadians(this.planarRadiansTo(vectorB, planeNormal));
|
|
214975
214986
|
}
|
|
214976
|
-
/**
|
|
214977
|
-
|
|
214987
|
+
/**
|
|
214988
|
+
* Return the smallest angle (in radians) from the (bidirectional) line containing `this`
|
|
214989
|
+
* to the (bidirectional) line containing `vectorB`
|
|
214990
|
+
*/
|
|
214978
214991
|
smallerUnorientedRadiansTo(vectorB) {
|
|
214979
214992
|
const c = this.dotProduct(vectorB);
|
|
214980
214993
|
const s = this.crossProductMagnitude(vectorB);
|
|
214981
214994
|
return Math.atan2(Math.abs(s), Math.abs(c));
|
|
214982
214995
|
}
|
|
214983
|
-
/**
|
|
214984
|
-
*
|
|
214996
|
+
/**
|
|
214997
|
+
* Return the smallest (strongly typed) angle from the (bidirectional) line containing `this`
|
|
214998
|
+
* to the (bidirectional) line containing `vectorB`
|
|
214999
|
+
*/
|
|
214985
215000
|
smallerUnorientedAngleTo(vectorB) {
|
|
214986
215001
|
return _Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createRadians(this.smallerUnorientedRadiansTo(vectorB));
|
|
214987
215002
|
}
|
|
@@ -220882,7 +220897,7 @@ class Transform {
|
|
|
220882
220897
|
}
|
|
220883
220898
|
/**
|
|
220884
220899
|
* Return a modified copy of `this` Transform so that its `matrix` part is rigid (`origin` part is untouched).
|
|
220885
|
-
* *
|
|
220900
|
+
* * @see [[Matrix3d.axisOrderCrossProductsInPlace]] documentation for details of how the matrix is modified to rigid.
|
|
220886
220901
|
*/
|
|
220887
220902
|
cloneRigid(axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.XYZ) {
|
|
220888
220903
|
const modifiedMatrix = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createRigidFromMatrix3d(this.matrix, axisOrder);
|
|
@@ -220890,7 +220905,7 @@ class Transform {
|
|
|
220890
220905
|
return undefined;
|
|
220891
220906
|
return new Transform(this.origin.cloneAsPoint3d(), modifiedMatrix);
|
|
220892
220907
|
}
|
|
220893
|
-
/** Create a Transform with the given `origin` and `matrix`. */
|
|
220908
|
+
/** Create a Transform with the given `origin` and `matrix`. Inputs are captured, not cloned. */
|
|
220894
220909
|
static createRefs(origin, matrix, result) {
|
|
220895
220910
|
if (!origin)
|
|
220896
220911
|
origin = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero();
|
|
@@ -220901,7 +220916,7 @@ class Transform {
|
|
|
220901
220916
|
}
|
|
220902
220917
|
return new Transform(origin, matrix);
|
|
220903
220918
|
}
|
|
220904
|
-
/** Create a Transform with complete contents given */
|
|
220919
|
+
/** Create a Transform with complete contents given. `q` inputs make the matrix and `a` inputs make the origin */
|
|
220905
220920
|
static createRowValues(qxx, qxy, qxz, ax, qyx, qyy, qyz, ay, qzx, qzy, qzz, az, result) {
|
|
220906
220921
|
if (result) {
|
|
220907
220922
|
result._origin.set(ax, ay, az);
|
|
@@ -220916,6 +220931,8 @@ class Transform {
|
|
|
220916
220931
|
}
|
|
220917
220932
|
/**
|
|
220918
220933
|
* Create a Transform with translation provided by x,y,z parts.
|
|
220934
|
+
* * Translation Transform maps any vector `v` to `v + p` where `p = (x,y,z)`
|
|
220935
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/MoveCube
|
|
220919
220936
|
* @param x x part of translation
|
|
220920
220937
|
* @param y y part of translation
|
|
220921
220938
|
* @param z z part of translation
|
|
@@ -220927,6 +220944,8 @@ class Transform {
|
|
|
220927
220944
|
}
|
|
220928
220945
|
/**
|
|
220929
220946
|
* Create a Transform with specified `translation` part.
|
|
220947
|
+
* * Translation Transform maps any vector `v` to `v + translation`
|
|
220948
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/MoveCube
|
|
220930
220949
|
* @param translation x,y,z parts of the translation
|
|
220931
220950
|
* @param result optional pre-allocated Transform
|
|
220932
220951
|
* @returns new or updated transform
|
|
@@ -220973,6 +220992,7 @@ class Transform {
|
|
|
220973
220992
|
* local-to-world mapping.
|
|
220974
220993
|
* * This function is a closely related to `createFixedPointAndMatrix` whose point input is the fixed point
|
|
220975
220994
|
* of the world-to-world transformation.
|
|
220995
|
+
* * If origin is `undefined`, (0,0,0) is used. If matrix is `undefined` the identity matrix is used.
|
|
220976
220996
|
*/
|
|
220977
220997
|
static createOriginAndMatrix(origin, matrix, result) {
|
|
220978
220998
|
if (result) {
|
|
@@ -220998,7 +221018,7 @@ class Transform {
|
|
|
220998
221018
|
}
|
|
220999
221019
|
/**
|
|
221000
221020
|
* Create a Transform such that its `matrix` part is rigid.
|
|
221001
|
-
*
|
|
221021
|
+
* @see [[Matrix3d.createRigidFromColumns]] for details of how the matrix is created to be rigid.
|
|
221002
221022
|
*/
|
|
221003
221023
|
static createRigidFromOriginAndColumns(origin, vectorX, vectorY, axisOrder, result) {
|
|
221004
221024
|
const matrix = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createRigidFromColumns(vectorX, vectorY, axisOrder, result ? result._matrix : undefined);
|
|
@@ -221010,10 +221030,10 @@ class Transform {
|
|
|
221010
221030
|
return result;
|
|
221011
221031
|
}
|
|
221012
221032
|
/**
|
|
221013
|
-
* We don't want to pass "origin" to createRefs because createRefs does not clone "origin"
|
|
221014
|
-
*
|
|
221015
|
-
*
|
|
221016
|
-
*
|
|
221033
|
+
* We don't want to pass "origin" to createRefs because createRefs does not clone "origin". That means if "origin"
|
|
221034
|
+
* is changed via Transform at any point, the initial "origin" passed by the user is also changed. To avoid that,
|
|
221035
|
+
* we pass "undefined" to createRefs so that it allocates a new point which then we set it to the "origin" which
|
|
221036
|
+
* is passed by user in the next line.
|
|
221017
221037
|
*/
|
|
221018
221038
|
result = Transform.createRefs(undefined, matrix);
|
|
221019
221039
|
result._origin.setFromPoint3d(origin);
|
|
@@ -221036,18 +221056,19 @@ class Transform {
|
|
|
221036
221056
|
return Transform.createRefs(undefined, matrix.clone());
|
|
221037
221057
|
}
|
|
221038
221058
|
/**
|
|
221039
|
-
* Create a transform with the specified `matrix` and points `a` and `b`. The returned Transform
|
|
221040
|
-
* point `p` to `M*(p-a) + b` (i.e., `Tp = M*(p-a) + b`) so
|
|
221059
|
+
* Create a transform with the specified `matrix` and points `a` and `b`. The returned Transform maps
|
|
221060
|
+
* point `p` to `M*(p-a) + b` (i.e., `Tp = M*(p-a) + b`), so maps `a` to 'b'.
|
|
221041
221061
|
*/
|
|
221042
221062
|
static createMatrixPickupPutdown(matrix, a, b, result) {
|
|
221043
|
-
// we define the origin o = b - M*a so Tp = M*p + o = M*p + (b - M*a) = M*(
|
|
221063
|
+
// we define the origin o = b - M*a so Tp = M*p + o = M*p + (b - M*a) = M*(p-a) + b
|
|
221044
221064
|
const origin = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzMinusMatrixTimesXYZ(b, matrix, a);
|
|
221045
221065
|
return Transform.createRefs(origin, matrix.clone(), result);
|
|
221046
221066
|
}
|
|
221047
221067
|
/**
|
|
221048
221068
|
* Create a Transform which leaves the fixedPoint unchanged and scales everything else around it by
|
|
221049
|
-
* a single scale factor. The returned Transform
|
|
221069
|
+
* a single scale factor. The returned Transform maps a point `p` to `M*p + (f - M*f)`
|
|
221050
221070
|
* where `f` is the fixedPoint and M is the scale matrix (i.e., `Tp = M*(p-f) + f`).
|
|
221071
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/ScaleCube
|
|
221051
221072
|
*/
|
|
221052
221073
|
static createScaleAboutPoint(fixedPoint, scale, result) {
|
|
221053
221074
|
const matrix = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createScale(scale, scale, scale);
|
|
@@ -221089,8 +221110,7 @@ class Transform {
|
|
|
221089
221110
|
return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesCoordinates(this._origin, this._matrix, x, y, z, result);
|
|
221090
221111
|
}
|
|
221091
221112
|
/**
|
|
221092
|
-
* Multiply a specific row (component) of the
|
|
221093
|
-
* at the same row. Return the result.
|
|
221113
|
+
* Multiply a specific row (component) of the 3x4 instance times (x,y,z,1). Return the result.
|
|
221094
221114
|
*/
|
|
221095
221115
|
multiplyComponentXYZ(componentIndex, x, y, z = 0) {
|
|
221096
221116
|
const coffs = this._matrix.coffs;
|
|
@@ -221098,8 +221118,7 @@ class Transform {
|
|
|
221098
221118
|
return this.origin.at(componentIndex) + (coffs[idx] * x) + (coffs[idx + 1] * y) + (coffs[idx + 2] * z);
|
|
221099
221119
|
}
|
|
221100
221120
|
/**
|
|
221101
|
-
* Multiply a specific row (component) of the
|
|
221102
|
-
* at the same row times w. Return the result.
|
|
221121
|
+
* Multiply a specific row (component) of the 3x4 instance times (x,y,z,w). Return the result.
|
|
221103
221122
|
*/
|
|
221104
221123
|
multiplyComponentXYZW(componentIndex, x, y, z, w) {
|
|
221105
221124
|
const coffs = this._matrix.coffs;
|
|
@@ -221107,31 +221126,38 @@ class Transform {
|
|
|
221107
221126
|
return (this.origin.at(componentIndex) * w) + (coffs[idx] * x) + (coffs[idx + 1] * y) + (coffs[idx + 2] * z);
|
|
221108
221127
|
}
|
|
221109
221128
|
/**
|
|
221110
|
-
*
|
|
221111
|
-
*
|
|
221129
|
+
* Transform the homogeneous point. Return as a new `Point4d`, or in the pre-allocated result (if result is given).
|
|
221130
|
+
* * If `p = (x,y,z)` then this method computes `Tp = M*p + o*w` and returns the `Point4d` formed by `Tp` in the
|
|
221131
|
+
* first three coordinates, and `w` in the fourth.
|
|
221132
|
+
* * Logically, this is multiplication by the 4x4 matrix formed from the 3x4 instance augmented with fourth row 0001.
|
|
221112
221133
|
*/
|
|
221113
221134
|
multiplyXYZW(x, y, z, w, result) {
|
|
221114
221135
|
return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesWeightedCoordinates(this._origin, this._matrix, x, y, z, w, result);
|
|
221115
221136
|
}
|
|
221116
221137
|
/**
|
|
221117
|
-
*
|
|
221118
|
-
*
|
|
221119
|
-
* (
|
|
221138
|
+
* Transform the homogeneous point. Return as new `Float64Array` with size 4, or in the pre-allocated result (if
|
|
221139
|
+
* result is given).
|
|
221140
|
+
* * If `p = (x,y,z)` then this method computes `Tp = M*p + o*w` and returns the `Float64Array` formed by `Tp`
|
|
221141
|
+
* in the first 3 numbers of the array and `w` as the fourth.
|
|
221142
|
+
* * Logically, this is multiplication by the 4x4 matrix formed from the 3x4 instance augmented with fourth row 0001.
|
|
221120
221143
|
*/
|
|
221121
221144
|
multiplyXYZWToFloat64Array(x, y, z, w, result) {
|
|
221122
221145
|
return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesWeightedCoordinatesToFloat64Array(this._origin, this._matrix, x, y, z, w, result);
|
|
221123
221146
|
}
|
|
221124
221147
|
/**
|
|
221125
|
-
*
|
|
221126
|
-
*
|
|
221148
|
+
* * Transform the point. Return as new `Float64Array` with size 3, or in the pre-allocated result (if result is given).
|
|
221149
|
+
* * If `p = (x,y,z)` then this method computes `Tp = M*p + o` and returns it as the first 3 elements of the array.
|
|
221127
221150
|
*/
|
|
221128
221151
|
multiplyXYZToFloat64Array(x, y, z, result) {
|
|
221129
221152
|
return _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.xyzPlusMatrixTimesCoordinatesToFloat64Array(this._origin, this._matrix, x, y, z, result);
|
|
221130
221153
|
}
|
|
221131
221154
|
/**
|
|
221132
|
-
*
|
|
221133
|
-
*
|
|
221134
|
-
*
|
|
221155
|
+
* Multiply the homogeneous point by the transpose of `this` Transform. Return as a new `Point4d` or in the
|
|
221156
|
+
* pre-allocated result (if result is given).
|
|
221157
|
+
* * If `p = (x,y,z)` then this method computes `M^t*p` and returns it in the first three coordinates of the `Point4d`,
|
|
221158
|
+
* and `o*p + w` in the fourth.
|
|
221159
|
+
* * Logically, this is multiplication by the transpose of the 4x4 matrix formed from the 3x4 instance augmented with
|
|
221160
|
+
* fourth row 0001.
|
|
221135
221161
|
*/
|
|
221136
221162
|
multiplyTransposeXYZW(x, y, z, w, result) {
|
|
221137
221163
|
const coffs = this._matrix.coffs;
|
|
@@ -221150,9 +221176,9 @@ class Transform {
|
|
|
221150
221176
|
this.multiplyPoint3dArrayInPlace(chain);
|
|
221151
221177
|
}
|
|
221152
221178
|
/**
|
|
221153
|
-
*
|
|
221154
|
-
* `p = MInverse
|
|
221155
|
-
*
|
|
221179
|
+
* Multiply the point by the inverse Transform.
|
|
221180
|
+
* * If for a point `p` we have `Tp = M*p + o = q`, then `p = MInverse*(q - o) = TInverse q` so `TInverse`
|
|
221181
|
+
* Transform has matrix part `MInverse` and origin part `-MInverse*o`.
|
|
221156
221182
|
* * Return as a new point or in the optional `result`.
|
|
221157
221183
|
* * Returns `undefined` if the `matrix` part if this Transform is singular.
|
|
221158
221184
|
*/
|
|
@@ -221160,9 +221186,13 @@ class Transform {
|
|
|
221160
221186
|
return this._matrix.multiplyInverseXYZAsPoint3d(point.x - this._origin.x, point.y - this._origin.y, point.z - this._origin.z, result);
|
|
221161
221187
|
}
|
|
221162
221188
|
/**
|
|
221163
|
-
*
|
|
221164
|
-
* `p =
|
|
221165
|
-
*
|
|
221189
|
+
* Multiply the homogenous point by the inverse Transform.
|
|
221190
|
+
* * If for a point `p` we have `Tp = M*p + o = q`, then `p = MInverse*(q - o) = TInverse q` so `TInverse` Transform
|
|
221191
|
+
* has matrix part `MInverse` and origin part `-MInverse*o`.
|
|
221192
|
+
* * This method computes `TInverse p = MInverse*p - w*MInverse*o` and returns the `Point4d` formed by `TInverse*p`
|
|
221193
|
+
* in the first three coordinates, and `w` in the fourth.
|
|
221194
|
+
* * Logically, this is multiplication by the inverse of the 4x4 matrix formed from the 3x4 instance augmented with
|
|
221195
|
+
* fourth row 0001. This is equivalent to the 4x4 matrix formed in similar fashion from the inverse of this instance.
|
|
221166
221196
|
* * Return as a new point or in the optional `result`.
|
|
221167
221197
|
* * Returns `undefined` if the `matrix` part if this Transform is singular.
|
|
221168
221198
|
*/
|
|
@@ -221171,9 +221201,9 @@ class Transform {
|
|
|
221171
221201
|
return this._matrix.multiplyInverseXYZW(weightedPoint.x - w * this.origin.x, weightedPoint.y - w * this.origin.y, weightedPoint.z - w * this.origin.z, w, result);
|
|
221172
221202
|
}
|
|
221173
221203
|
/**
|
|
221174
|
-
*
|
|
221175
|
-
* `p = MInverse
|
|
221176
|
-
*
|
|
221204
|
+
* Multiply the point by the inverse Transform.
|
|
221205
|
+
* * If for a point `p` we have `Tp = M*p + o = q`, then `p = MInverse*(q - o) = TInverse q` so `TInverse` Transform
|
|
221206
|
+
* has matrix part `MInverse` and origin part `-MInverse*o`.
|
|
221177
221207
|
* * Return as a new point or in the optional `result`.
|
|
221178
221208
|
* * Returns `undefined` if the `matrix` part if this Transform is singular.
|
|
221179
221209
|
*/
|
|
@@ -221212,35 +221242,35 @@ class Transform {
|
|
|
221212
221242
|
return numSource;
|
|
221213
221243
|
}
|
|
221214
221244
|
/**
|
|
221215
|
-
*
|
|
221216
|
-
*
|
|
221217
|
-
*
|
|
221218
|
-
* * If `
|
|
221219
|
-
* * If `
|
|
221245
|
+
* Multiply each point in the array by the inverse of `this` Transform.
|
|
221246
|
+
* * For a transform `T = [M o]` the inverse transform `T' = [M' -M'o]` exists if and only if `M` has an inverse
|
|
221247
|
+
* `M'`. Indeed, for any point `p`, we have `T'Tp = T'(Mp + o) = M'(Mp + o) - M'o = M'Mp + M'o - M'o = p.`
|
|
221248
|
+
* * If `result` is given, resize it to match the input `points` array and update it with original points `p[]`.
|
|
221249
|
+
* * If `result` is not given, return a new array.
|
|
221220
221250
|
* * Returns `undefined` if the `matrix` part if this Transform is singular.
|
|
221221
221251
|
*/
|
|
221222
|
-
multiplyInversePoint3dArray(points,
|
|
221252
|
+
multiplyInversePoint3dArray(points, result) {
|
|
221223
221253
|
if (!this._matrix.computeCachedInverse(true))
|
|
221224
221254
|
return undefined;
|
|
221225
221255
|
const originX = this.origin.x;
|
|
221226
221256
|
const originY = this.origin.y;
|
|
221227
221257
|
const originZ = this.origin.z;
|
|
221228
|
-
if (
|
|
221229
|
-
const n = Transform.matchArrayLengths(points,
|
|
221258
|
+
if (result) {
|
|
221259
|
+
const n = Transform.matchArrayLengths(points, result, _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero);
|
|
221230
221260
|
for (let i = 0; i < n; i++)
|
|
221231
|
-
this._matrix.multiplyInverseXYZAsPoint3d(points[i].x - originX, points[i].y - originY, points[i].z - originZ,
|
|
221261
|
+
this._matrix.multiplyInverseXYZAsPoint3d(points[i].x - originX, points[i].y - originY, points[i].z - originZ, result[i]);
|
|
221262
|
+
return result;
|
|
221232
221263
|
}
|
|
221233
|
-
|
|
221264
|
+
result = [];
|
|
221234
221265
|
for (const point of points)
|
|
221235
|
-
|
|
221236
|
-
return
|
|
221266
|
+
result.push(this._matrix.multiplyInverseXYZAsPoint3d(point.x - originX, point.y - originY, point.z - originZ));
|
|
221267
|
+
return result;
|
|
221237
221268
|
}
|
|
221238
221269
|
/**
|
|
221239
|
-
*
|
|
221240
|
-
*
|
|
221241
|
-
*
|
|
221242
|
-
*
|
|
221243
|
-
* * Returns `true` if the `matrix` part if this Transform is invertible and `false if singular.
|
|
221270
|
+
* Multiply each point in the array by the inverse of `this` Transform in place.
|
|
221271
|
+
* * For a transform `T = [M o]` the inverse transform `T' = [M' -M'o]` exists if and only if `M` has an inverse
|
|
221272
|
+
* `M'`. Indeed, for any point `p`, we have `T'Tp = T'(Mp + o) = M'(Mp + o) - M'o = M'Mp + M'o - M'o = p.`
|
|
221273
|
+
* * Returns `true` if the `matrix` part if this Transform is invertible and `false` if singular.
|
|
221244
221274
|
*/
|
|
221245
221275
|
multiplyInversePoint3dArrayInPlace(points) {
|
|
221246
221276
|
if (!this._matrix.computeCachedInverse(true))
|
|
@@ -221309,7 +221339,8 @@ class Transform {
|
|
|
221309
221339
|
/**
|
|
221310
221340
|
* Calculate `transformA * transformB` and store it into the calling instance (`this`).
|
|
221311
221341
|
* * **Note:** If `transformA = [A a]` and `transformB = [B b]` then `transformA * transformB` is defined as
|
|
221312
|
-
* `[A*B Ab+a]`.
|
|
221342
|
+
* `[A*B Ab+a]`.
|
|
221343
|
+
* * @see [[multiplyTransformTransform]] documentation for math details.
|
|
221313
221344
|
* @param transformA first operand
|
|
221314
221345
|
* @param transformB second operand
|
|
221315
221346
|
*/
|
|
@@ -221319,19 +221350,17 @@ class Transform {
|
|
|
221319
221350
|
}
|
|
221320
221351
|
/**
|
|
221321
221352
|
* Multiply `this` Transform times `other` Transform.
|
|
221322
|
-
* **Note:** If `this = [A a]` and `other = [B b]` then `this * other` is defined as [A*B Ab+a]
|
|
221323
|
-
* That's because we create a 4x4 matrix for each Transform with the 3x3 `matrix` and `origin`
|
|
221324
|
-
* as upper 3x4 part of a 4x4 matrix and 0001 as the final row. Then we multiply those two 4x4 matrixes:
|
|
221353
|
+
* * **Note:** If `this = [A a]` and `other = [B b]` then `this * other` is defined as [A*B Ab+a] because:
|
|
221325
221354
|
* ```
|
|
221326
221355
|
* equation
|
|
221327
221356
|
* \begin{matrix}
|
|
221328
|
-
* \text{
|
|
221329
|
-
* \text{
|
|
221357
|
+
* \text{this Transform with matrix part }\bold{A}\text{ and origin part }\bold{a} & \blockTransform{A}{a}\\
|
|
221358
|
+
* \text{other Transform with matrix part }\bold{B}\text{ and origin part }\bold{b} & \blockTransform{B}{b} \\
|
|
221330
221359
|
* \text{product}& \blockTransform{A}{a}\blockTransform{B}{b}=\blockTransform{AB}{Ab + a}
|
|
221331
221360
|
* \end{matrix}
|
|
221332
221361
|
* ```
|
|
221333
221362
|
* @param other the 'other` Transform to be multiplied to `this` Transform.
|
|
221334
|
-
* @param result optional preallocated result to reuse.
|
|
221363
|
+
* @param result optional preallocated `result` to reuse.
|
|
221335
221364
|
*/
|
|
221336
221365
|
multiplyTransformTransform(other, result) {
|
|
221337
221366
|
if (!result)
|
|
@@ -221341,20 +221370,17 @@ class Transform {
|
|
|
221341
221370
|
}
|
|
221342
221371
|
/**
|
|
221343
221372
|
* Multiply `this` Transform times `other` Matrix3d (considered to be a Transform with 0 `origin`).
|
|
221344
|
-
* **Note:** If `this = [A a]`, then
|
|
221345
|
-
* Then `this * other` is defined as [A*B a]. That's because we create a 4x4 matrix for each Transform
|
|
221346
|
-
* with the 3x3 `matrix` and `origin` as upper 3x4 part of a 4x4 matrix and 0001 as the final row. Then we
|
|
221347
|
-
* multiply those two 4x4 matrixes:
|
|
221373
|
+
* * **Note:** If `this = [A a]` and `other = [B 0]`, then `this * other` is defined as [A*B a] because:
|
|
221348
221374
|
* ```
|
|
221349
221375
|
* equation
|
|
221350
221376
|
* \begin{matrix}
|
|
221351
|
-
* \text{
|
|
221352
|
-
* \text{
|
|
221377
|
+
* \text{this Transform with matrix part }\bold{A}\text{ and origin part }\bold{a} & \blockTransform{A}{a}\\
|
|
221378
|
+
* \text{other matrix }\bold{B}\text{ promoted to block Transform} & \blockTransform{B}{0} \\
|
|
221353
221379
|
* \text{product}& \blockTransform{A}{a}\blockTransform{B}{0}=\blockTransform{AB}{a}
|
|
221354
221380
|
* \end{matrix}
|
|
221355
221381
|
* ```
|
|
221356
221382
|
* @param other the `other` Matrix3d to be multiplied to `this` Transform.
|
|
221357
|
-
* @param result optional preallocated result to reuse.
|
|
221383
|
+
* @param result optional preallocated `result` to reuse.
|
|
221358
221384
|
*/
|
|
221359
221385
|
multiplyTransformMatrix3d(other, result) {
|
|
221360
221386
|
if (!result)
|
|
@@ -221364,13 +221390,13 @@ class Transform {
|
|
|
221364
221390
|
return result;
|
|
221365
221391
|
}
|
|
221366
221392
|
/**
|
|
221367
|
-
* Return the
|
|
221393
|
+
* Return the range of the transformed corners.
|
|
221368
221394
|
* * The 8 corners are transformed individually.
|
|
221369
221395
|
* * **Note:** Suppose you have a geometry, a range box around that geometry, and your Transform is a rotation.
|
|
221370
221396
|
* If you rotate the range box and recompute a new range box around the rotated range box, then the new range
|
|
221371
221397
|
* box will have a larger volume than the original range box. However, if you rotate the geometry itself and
|
|
221372
221398
|
* then recompute the range box, it will be a tighter range box around the rotated geometry. `multiplyRange`
|
|
221373
|
-
* function creates the larger range box because it only has access to the range box and the geometry itself.
|
|
221399
|
+
* function creates the larger range box because it only has access to the range box and not the geometry itself.
|
|
221374
221400
|
*/
|
|
221375
221401
|
multiplyRange(range, result) {
|
|
221376
221402
|
if (range.isNull)
|
|
@@ -221394,7 +221420,7 @@ class Transform {
|
|
|
221394
221420
|
}
|
|
221395
221421
|
/**
|
|
221396
221422
|
* Return a Transform which is the inverse of `this` Transform.
|
|
221397
|
-
* * If `transform = [M o]` then `transformInverse = [MInverse MInverse
|
|
221423
|
+
* * If `transform = [M o]` then `transformInverse = [MInverse -MInverse*o]`
|
|
221398
221424
|
* * Return `undefined` if this Transform's matrix is singular.
|
|
221399
221425
|
*/
|
|
221400
221426
|
inverse(result) {
|
|
@@ -221409,14 +221435,14 @@ class Transform {
|
|
|
221409
221435
|
return Transform.createRefs(matrixInverse.multiplyXYZ(-this._origin.x, -this._origin.y, -this._origin.z), matrixInverse);
|
|
221410
221436
|
}
|
|
221411
221437
|
/**
|
|
221412
|
-
* Initialize 2 Transforms
|
|
221413
|
-
*
|
|
221414
|
-
* @param min the min corner of the box
|
|
221415
|
-
* @param max the max corner of the box
|
|
221416
|
-
* @param npcToGlobal maps
|
|
221417
|
-
*
|
|
221418
|
-
* @param globalToNpc maps
|
|
221419
|
-
*
|
|
221438
|
+
* Initialize 2 Transforms that map between the unit box (specified by 000 and 111) and the range box specified
|
|
221439
|
+
* by the input points.
|
|
221440
|
+
* @param min the min corner of the range box
|
|
221441
|
+
* @param max the max corner of the range box
|
|
221442
|
+
* @param npcToGlobal maps NPC coordinates into range box coordinates. Specifically, maps 000 to `min` and maps
|
|
221443
|
+
* 111 to `max`. This Transform is the inverse of `globalToNpc`. Object created by caller, re-initialized here.
|
|
221444
|
+
* @param globalToNpc maps range box coordinates into NPC coordinates. Specifically, maps `min` to 000 and maps
|
|
221445
|
+
* `max` to 111. This Transform is the inverse of `npcToGlobal`. Object created by caller, re-initialized here.
|
|
221420
221446
|
* * NPC stands for `Normalized Projection Coordinate`
|
|
221421
221447
|
*/
|
|
221422
221448
|
static initFromRange(min, max, npcToGlobal, globalToNpc) {
|
|
@@ -221669,11 +221695,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
221669
221695
|
*/
|
|
221670
221696
|
class YawPitchRollAngles {
|
|
221671
221697
|
/**
|
|
221672
|
-
*
|
|
221698
|
+
* Constructor
|
|
221673
221699
|
* @param yaw counterclockwise rotation angle around z
|
|
221674
221700
|
* @param pitch **clockwise** rotation angle around y
|
|
221675
221701
|
* @param roll counterclockwise rotation angle around x
|
|
221676
|
-
|
|
221702
|
+
*/
|
|
221677
221703
|
constructor(yaw = _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.zero(), pitch = _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.zero(), roll = _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.zero()) {
|
|
221678
221704
|
this.yaw = yaw;
|
|
221679
221705
|
this.pitch = pitch;
|
|
@@ -221687,29 +221713,29 @@ class YawPitchRollAngles {
|
|
|
221687
221713
|
return Object.freeze(this);
|
|
221688
221714
|
}
|
|
221689
221715
|
/**
|
|
221690
|
-
*
|
|
221716
|
+
* Constructor for YawPitchRollAngles with angles in degrees.
|
|
221691
221717
|
* @param yawDegrees counterclockwise rotation angle (in degrees) around z
|
|
221692
221718
|
* @param pitchDegrees **clockwise** rotation angle (in degrees) around y
|
|
221693
221719
|
* @param rollDegrees counterclockwise rotation angle (in degrees) around x
|
|
221694
|
-
|
|
221720
|
+
*/
|
|
221695
221721
|
static createDegrees(yawDegrees, pitchDegrees, rollDegrees) {
|
|
221696
221722
|
return new YawPitchRollAngles(_Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createDegrees(yawDegrees), _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createDegrees(pitchDegrees), _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createDegrees(rollDegrees));
|
|
221697
221723
|
}
|
|
221698
221724
|
/**
|
|
221699
|
-
*
|
|
221725
|
+
* Constructor for YawPitchRollAngles with angles in radians.
|
|
221700
221726
|
* @param yawRadians counterclockwise rotation angle (in radians) around z
|
|
221701
221727
|
* @param pitchRadians **clockwise** rotation angle (in radians) around y
|
|
221702
221728
|
* @param rollRadians counterclockwise rotation angle (in radians) around x
|
|
221703
|
-
|
|
221729
|
+
*/
|
|
221704
221730
|
static createRadians(yawRadians, pitchRadians, rollRadians) {
|
|
221705
221731
|
return new YawPitchRollAngles(_Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createRadians(yawRadians), _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createRadians(pitchRadians), _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.createRadians(rollRadians));
|
|
221706
221732
|
}
|
|
221707
|
-
/**
|
|
221733
|
+
/** Construct a `YawPitchRoll` object from an object with 3 named angles */
|
|
221708
221734
|
static fromJSON(json) {
|
|
221709
221735
|
json = json ? json : {};
|
|
221710
221736
|
return new YawPitchRollAngles(_Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.fromJSON(json.yaw), _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.fromJSON(json.pitch), _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.fromJSON(json.roll));
|
|
221711
221737
|
}
|
|
221712
|
-
/**
|
|
221738
|
+
/** Populate yaw, pitch and roll fields using `Angle.fromJSON` */
|
|
221713
221739
|
setFromJSON(json) {
|
|
221714
221740
|
json = json ? json : {};
|
|
221715
221741
|
this.yaw = _Angle__WEBPACK_IMPORTED_MODULE_0__.Angle.fromJSON(json.yaw);
|
|
@@ -221719,7 +221745,7 @@ class YawPitchRollAngles {
|
|
|
221719
221745
|
/**
|
|
221720
221746
|
* Convert to a JSON object of form { pitch: 20 , roll: 30 , yaw: 10 }. Angles are in degrees.
|
|
221721
221747
|
* Any values that are exactly zero (with tolerance `Geometry.smallAngleRadians`) are omitted.
|
|
221722
|
-
|
|
221748
|
+
*/
|
|
221723
221749
|
toJSON() {
|
|
221724
221750
|
const val = {};
|
|
221725
221751
|
if (!this.pitch.isAlmostZero)
|
|
@@ -221749,15 +221775,12 @@ class YawPitchRollAngles {
|
|
|
221749
221775
|
&& this.pitch.isAlmostEqualAllowPeriodShift(other.pitch)
|
|
221750
221776
|
&& this.roll.isAlmostEqualAllowPeriodShift(other.roll);
|
|
221751
221777
|
}
|
|
221752
|
-
/**
|
|
221753
|
-
* Make a copy of this YawPitchRollAngles.
|
|
221754
|
-
*/
|
|
221778
|
+
/** Make a copy of this YawPitchRollAngles */
|
|
221755
221779
|
clone() {
|
|
221756
221780
|
return new YawPitchRollAngles(this.yaw.clone(), this.pitch.clone(), this.roll.clone());
|
|
221757
221781
|
}
|
|
221758
221782
|
/**
|
|
221759
221783
|
* Expand the angles into a (rigid rotation) matrix.
|
|
221760
|
-
*
|
|
221761
221784
|
* * The returned matrix is "rigid" (i.e., it has unit length rows and columns, and its transpose is its inverse).
|
|
221762
221785
|
* * The rigid matrix is always a right handed coordinate system.
|
|
221763
221786
|
* @param result optional pre-allocated `Matrix3d`
|
|
@@ -221794,7 +221817,8 @@ class YawPitchRollAngles {
|
|
|
221794
221817
|
*/
|
|
221795
221818
|
return _Matrix3d__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRowValues(cz * cy, -(sz * cx + cz * sy * sx), (sz * sx - cz * sy * cx), sz * cy, (cz * cx - sz * sy * sx), -(cz * sx + sz * sy * cx), sy, cy * sx, cy * cx, result);
|
|
221796
221819
|
}
|
|
221797
|
-
/**
|
|
221820
|
+
/**
|
|
221821
|
+
* Returns true if this rotation does nothing.
|
|
221798
221822
|
* * If allowPeriodShift is false, any nonzero angle is considered a non-identity
|
|
221799
221823
|
* * If allowPeriodShift is true, all angles are individually allowed to be any multiple of 360 degrees.
|
|
221800
221824
|
*/
|
|
@@ -221839,7 +221863,8 @@ class YawPitchRollAngles {
|
|
|
221839
221863
|
angles: YawPitchRollAngles.createFromMatrix3d(transform.matrix),
|
|
221840
221864
|
};
|
|
221841
221865
|
}
|
|
221842
|
-
/**
|
|
221866
|
+
/**
|
|
221867
|
+
* Attempts to create a YawPitchRollAngles object from a Matrix3d
|
|
221843
221868
|
* * This conversion fails if the matrix is not rigid (unit rows and columns, and transpose is inverse)
|
|
221844
221869
|
* * In the failure case the method's return value is `undefined`.
|
|
221845
221870
|
* * In the failure case, if the optional result was supplied, that result will nonetheless be filled with
|
|
@@ -246151,19 +246176,22 @@ class SteppedIndexFunctionFactory {
|
|
|
246151
246176
|
static createConstant(value = 0) {
|
|
246152
246177
|
return (_i, _n) => value;
|
|
246153
246178
|
}
|
|
246154
|
-
/**
|
|
246179
|
+
/**
|
|
246180
|
+
* Return a function that steps linearly
|
|
246155
246181
|
* * f(i,n) = y0 + (i/n) * a
|
|
246156
246182
|
*/
|
|
246157
246183
|
static createLinear(a, f0 = 0) {
|
|
246158
246184
|
return (i, n) => (f0 + a * (i / n));
|
|
246159
246185
|
}
|
|
246160
|
-
/**
|
|
246186
|
+
/**
|
|
246187
|
+
* Return a function that steps with cosine of angles in sweep
|
|
246161
246188
|
* * f(i,n) = y0 + amplitude * cos(i/n)
|
|
246162
246189
|
*/
|
|
246163
246190
|
static createCosine(amplitude, sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.create360(), f0 = 0) {
|
|
246164
246191
|
return (i, n) => (f0 + amplitude * Math.cos(sweep.fractionToRadians(i / n)));
|
|
246165
246192
|
}
|
|
246166
|
-
/**
|
|
246193
|
+
/**
|
|
246194
|
+
* Return a function that steps with cosine of angles in sweep.
|
|
246167
246195
|
* * f(i,n) = y0 + amplitude * sin(i/n)
|
|
246168
246196
|
*/
|
|
246169
246197
|
static createSine(amplitude, sweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.create360(), f0 = 0) {
|
|
@@ -246175,7 +246203,8 @@ class SteppedIndexFunctionFactory {
|
|
|
246175
246203
|
* @alpha
|
|
246176
246204
|
*/
|
|
246177
246205
|
class Sample {
|
|
246178
|
-
/**
|
|
246206
|
+
/**
|
|
246207
|
+
* Return an array of Point3d, with x,y,z all stepping through a range of values.
|
|
246179
246208
|
* x varies fastest, then y then z
|
|
246180
246209
|
*/
|
|
246181
246210
|
static createPoint3dLattice(low, step, high) {
|
|
@@ -246186,7 +246215,8 @@ class Sample {
|
|
|
246186
246215
|
points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(x, y, z));
|
|
246187
246216
|
return points;
|
|
246188
246217
|
}
|
|
246189
|
-
/**
|
|
246218
|
+
/**
|
|
246219
|
+
* Return an array of Point2d, with x,y all stepping through a range of values.
|
|
246190
246220
|
* x varies fastest, then y
|
|
246191
246221
|
*/
|
|
246192
246222
|
static createPoint2dLattice(low, step, high) {
|
|
@@ -246234,7 +246264,8 @@ class Sample {
|
|
|
246234
246264
|
static createCenteredRectangleXY(cx, cy, ax, ay, z = 0) {
|
|
246235
246265
|
return this.createRectangleXY(cx - ax, cy - ay, 2 * ax, 2 * ay, z);
|
|
246236
246266
|
}
|
|
246237
|
-
/**
|
|
246267
|
+
/**
|
|
246268
|
+
* Access the last point in the array. push another shifted by dx,dy,dz.
|
|
246238
246269
|
* * No push if all are 0.
|
|
246239
246270
|
* * If array is empty, push a leading 000
|
|
246240
246271
|
*/
|
|
@@ -246256,7 +246287,8 @@ class Sample {
|
|
|
246256
246287
|
points.push(points[0].clone());
|
|
246257
246288
|
return points;
|
|
246258
246289
|
}
|
|
246259
|
-
/**
|
|
246290
|
+
/**
|
|
246291
|
+
* Create points for an L shaped polygon
|
|
246260
246292
|
* * lower left at x0,y0.
|
|
246261
246293
|
* * ax,ay are larger side lengths (lower left to corners along x and y directions)
|
|
246262
246294
|
* * bx,by are smaller side lengths (inner corner to points along x and y directions)
|
|
@@ -246281,7 +246313,7 @@ class Sample {
|
|
|
246281
246313
|
return [
|
|
246282
246314
|
plane0, plane1, plane2,
|
|
246283
246315
|
_clipping_ClipPlane__WEBPACK_IMPORTED_MODULE_6__.ClipPlane.createNormalAndDistance(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(3, 4, 0), 2.0),
|
|
246284
|
-
_clipping_ClipPlane__WEBPACK_IMPORTED_MODULE_6__.ClipPlane.createEdgeXY(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(24, 32, 0))
|
|
246316
|
+
_clipping_ClipPlane__WEBPACK_IMPORTED_MODULE_6__.ClipPlane.createEdgeXY(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(24, 32, 0)),
|
|
246285
246317
|
];
|
|
246286
246318
|
}
|
|
246287
246319
|
/**
|
|
@@ -246297,16 +246329,17 @@ class Sample {
|
|
|
246297
246329
|
const quadrant4 = _clipping_ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_7__.ConvexClipPlaneSet.createXYBox(0, -1, 1, 0);
|
|
246298
246330
|
result.push(_clipping_UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_8__.UnionOfConvexClipPlaneSets.createConvexSets([
|
|
246299
246331
|
quadrant1.clone(),
|
|
246300
|
-
quadrant4.clone()
|
|
246332
|
+
quadrant4.clone(),
|
|
246301
246333
|
]));
|
|
246302
246334
|
result.push(_clipping_UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_8__.UnionOfConvexClipPlaneSets.createConvexSets([
|
|
246303
246335
|
quadrant1.clone(),
|
|
246304
246336
|
quadrant2.clone(),
|
|
246305
|
-
quadrant4.clone()
|
|
246337
|
+
quadrant4.clone(),
|
|
246306
246338
|
]));
|
|
246307
246339
|
return result;
|
|
246308
246340
|
}
|
|
246309
|
-
/**
|
|
246341
|
+
/**
|
|
246342
|
+
* Create (unweighted) bspline curves.
|
|
246310
246343
|
* order varies from 2 to 5
|
|
246311
246344
|
*/
|
|
246312
246345
|
static createBsplineCurves(includeMultipleKnots = false) {
|
|
@@ -246343,7 +246376,8 @@ class Sample {
|
|
|
246343
246376
|
}
|
|
246344
246377
|
return result;
|
|
246345
246378
|
}
|
|
246346
|
-
/**
|
|
246379
|
+
/**
|
|
246380
|
+
* Create weighted bspline curves.
|
|
246347
246381
|
* order varies from 2 to 5
|
|
246348
246382
|
*/
|
|
246349
246383
|
static createBspline3dHCurves() {
|
|
@@ -246381,8 +246415,7 @@ class Sample {
|
|
|
246381
246415
|
}
|
|
246382
246416
|
return result;
|
|
246383
246417
|
}
|
|
246384
|
-
/** Create weighted bsplines for circular arcs.
|
|
246385
|
-
*/
|
|
246418
|
+
/** Create weighted bsplines for circular arcs. */
|
|
246386
246419
|
static createBspline3dHArcs() {
|
|
246387
246420
|
const result = [];
|
|
246388
246421
|
const halfRadians = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.degreesToRadians(60.0);
|
|
@@ -246397,14 +246430,15 @@ class Sample {
|
|
|
246397
246430
|
_geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create(-1, 0, 0, c),
|
|
246398
246431
|
_geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create(-c, -s, 0, 1),
|
|
246399
246432
|
_geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create(c, -s, 0, c),
|
|
246400
|
-
_geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create(1, 0, 0, 1)
|
|
246433
|
+
_geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_10__.Point4d.create(1, 0, 0, 1),
|
|
246401
246434
|
];
|
|
246402
246435
|
const knots = [0, 0, 1, 1, 2, 2, 3, 3];
|
|
246403
246436
|
const curve = _bspline_BSplineCurve3dH__WEBPACK_IMPORTED_MODULE_11__.BSplineCurve3dH.create(points, knots, 3);
|
|
246404
246437
|
result.push(curve);
|
|
246405
246438
|
return result;
|
|
246406
246439
|
}
|
|
246407
|
-
/**
|
|
246440
|
+
/**
|
|
246441
|
+
* Return array [x,y,z,w] bspline control points for an arc in 90 degree bspline spans.
|
|
246408
246442
|
* @param points array of [x,y,z,w]
|
|
246409
246443
|
* @param center center of arc
|
|
246410
246444
|
* @param axes matrix with 0 and 90 degree axes
|
|
@@ -246450,7 +246484,7 @@ class Sample {
|
|
|
246450
246484
|
result.push(b);
|
|
246451
246485
|
return result;
|
|
246452
246486
|
}
|
|
246453
|
-
/**
|
|
246487
|
+
/** Create a plane from origin and normal coordinates -- default to 001 normal if needed. */
|
|
246454
246488
|
static createPlane(x, y, z, u, v, w) {
|
|
246455
246489
|
const point = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(x, y, z);
|
|
246456
246490
|
const vector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(u, v, w).normalize();
|
|
@@ -246470,22 +246504,23 @@ class Sample {
|
|
|
246470
246504
|
return [
|
|
246471
246505
|
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_15__.LineString3d.createPoints([
|
|
246472
246506
|
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0),
|
|
246473
|
-
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 0, 0)
|
|
246507
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 0, 0),
|
|
246474
246508
|
]),
|
|
246475
246509
|
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_15__.LineString3d.createPoints([
|
|
246476
246510
|
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0),
|
|
246477
246511
|
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 0, 0),
|
|
246478
|
-
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 1, 0)
|
|
246512
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 1, 0),
|
|
246479
246513
|
]),
|
|
246480
246514
|
_curve_LineString3d__WEBPACK_IMPORTED_MODULE_15__.LineString3d.createPoints([
|
|
246481
246515
|
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0),
|
|
246482
246516
|
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 0, 0),
|
|
246483
246517
|
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 1, 0),
|
|
246484
|
-
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(2, 2, 0)
|
|
246485
|
-
])
|
|
246518
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(2, 2, 0),
|
|
246519
|
+
]),
|
|
246486
246520
|
];
|
|
246487
246521
|
}
|
|
246488
|
-
/**
|
|
246522
|
+
/**
|
|
246523
|
+
* Assorted Matrix3d:
|
|
246489
246524
|
* * identity
|
|
246490
246525
|
* * rotation around x
|
|
246491
246526
|
* * rotation around general vector
|
|
@@ -246510,10 +246545,11 @@ class Sample {
|
|
|
246510
246545
|
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createTranslationXYZ(1, 2, 0),
|
|
246511
246546
|
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createTranslationXYZ(1, 2, 3),
|
|
246512
246547
|
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createFixedPointAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(4, 1, -2), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createUniformScale(2.0)),
|
|
246513
|
-
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createFixedPointAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(4, 1, -2), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(1, 2, 3), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createRadians(10)))
|
|
246548
|
+
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createFixedPointAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(4, 1, -2), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(1, 2, 3), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createRadians(10))),
|
|
246514
246549
|
];
|
|
246515
246550
|
}
|
|
246516
|
-
/**
|
|
246551
|
+
/**
|
|
246552
|
+
* Return an array of Matrix3d with various skew and scale. This includes at least:
|
|
246517
246553
|
* * identity
|
|
246518
246554
|
* * 3 distinct diagonals.
|
|
246519
246555
|
* * The distinct diagonal base with smaller value added to other 6 spots in succession.
|
|
@@ -246532,9 +246568,10 @@ class Sample {
|
|
|
246532
246568
|
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRowValues(5, 2, 3, 2, 6, 1, -1, 2, 7),
|
|
246533
246569
|
];
|
|
246534
246570
|
}
|
|
246535
|
-
/**
|
|
246571
|
+
/**
|
|
246572
|
+
* Return an array of singular Matrix3d. This includes at least:
|
|
246536
246573
|
* * all zeros
|
|
246537
|
-
* * one
|
|
246574
|
+
* * one non-zero column
|
|
246538
246575
|
* * two independent columns, third is zero
|
|
246539
246576
|
* * two independent columns, third is sum of those
|
|
246540
246577
|
* * two independent columns, third is copy of one
|
|
@@ -246546,26 +246583,26 @@ class Sample {
|
|
|
246546
246583
|
const vector0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
|
|
246547
246584
|
return [
|
|
246548
246585
|
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createZero(),
|
|
246549
|
-
// one
|
|
246586
|
+
// one non-zero column
|
|
246550
246587
|
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorU, vector0, vector0),
|
|
246551
246588
|
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vector0, vectorU, vector0),
|
|
246552
|
-
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vector0, vector0,
|
|
246553
|
-
// two independent
|
|
246589
|
+
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vector0, vector0, vectorU),
|
|
246590
|
+
// two independent non-zero columns with one zero column
|
|
246554
246591
|
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorU, vectorV, vector0),
|
|
246555
246592
|
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vector0, vectorU, vectorV),
|
|
246556
|
-
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(
|
|
246557
|
-
//
|
|
246593
|
+
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorU, vector0, vectorV),
|
|
246594
|
+
// two independent columns with one dependent column
|
|
246558
246595
|
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorU, vectorV, vectorUPlusV),
|
|
246559
246596
|
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorU, vectorUPlusV, vectorV),
|
|
246560
|
-
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorUPlusV,
|
|
246561
|
-
// two independent with duplicate
|
|
246562
|
-
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorU, vectorV, vectorU),
|
|
246597
|
+
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorUPlusV, vectorU, vectorV),
|
|
246598
|
+
// two independent with columns with one duplicate column
|
|
246563
246599
|
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorU, vectorU, vectorV),
|
|
246564
|
-
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(
|
|
246600
|
+
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorU, vectorV, vectorU),
|
|
246601
|
+
_geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createColumns(vectorV, vectorU, vectorU),
|
|
246565
246602
|
];
|
|
246566
246603
|
}
|
|
246567
246604
|
/**
|
|
246568
|
-
*
|
|
246605
|
+
* Return an array of rigid transforms. This includes (at least)
|
|
246569
246606
|
* * Identity
|
|
246570
246607
|
* * translation with identity matrix
|
|
246571
246608
|
* * rotation around origin and arbitrary vector
|
|
@@ -246580,16 +246617,15 @@ class Sample {
|
|
|
246580
246617
|
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createTranslationXYZ(distanceScale3 * 1, distanceScale3 * 2, distanceScale3 * 3),
|
|
246581
246618
|
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createFixedPointAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitY(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(10))),
|
|
246582
246619
|
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createFixedPointAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(distanceScale4 * 4, distanceScale4 * 1, -distanceScale4 * 2), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(1, 2, 3), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(10))),
|
|
246583
|
-
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createFixedPointAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(distanceScale4 * 4, distanceScale4 * 1, -distanceScale4 * 2), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(-2, 1, 4), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(35)))
|
|
246620
|
+
_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createFixedPointAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(distanceScale4 * 4, distanceScale4 * 1, -distanceScale4 * 2), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(-2, 1, 4), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(35))),
|
|
246584
246621
|
];
|
|
246585
246622
|
}
|
|
246586
|
-
/**
|
|
246587
|
-
* Return a single rigid transform with all terms nonzero.
|
|
246588
|
-
*/
|
|
246623
|
+
/** Return a single rigid transform with all terms nonzero. */
|
|
246589
246624
|
static createMessyRigidTransform(fixedPoint) {
|
|
246590
246625
|
return _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createFixedPointAndMatrix(fixedPoint ? fixedPoint : _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 2, 3), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(0.3, -0.2, 1.2), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(15.7)));
|
|
246591
246626
|
}
|
|
246592
|
-
/**
|
|
246627
|
+
/**
|
|
246628
|
+
* Return various rigid matrices:
|
|
246593
246629
|
* * identity
|
|
246594
246630
|
* * small rotations around x, y, z
|
|
246595
246631
|
* * small rotation around (1,2,3)
|
|
@@ -246619,9 +246655,7 @@ class Sample {
|
|
|
246619
246655
|
}
|
|
246620
246656
|
return result;
|
|
246621
246657
|
}
|
|
246622
|
-
/**
|
|
246623
|
-
* Create full Map4d for each `Sample.createInvertibleTransforms ()`
|
|
246624
|
-
*/
|
|
246658
|
+
/** Create full Map4d for each `Sample.createInvertibleTransforms()` */
|
|
246625
246659
|
static createMap4ds() {
|
|
246626
246660
|
const result = [];
|
|
246627
246661
|
let transform;
|
|
@@ -246639,7 +246673,12 @@ class Sample {
|
|
|
246639
246673
|
static createSimplePaths(withGaps = false) {
|
|
246640
246674
|
const point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0);
|
|
246641
246675
|
const point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(10, 0, 0);
|
|
246642
|
-
const p1 = [
|
|
246676
|
+
const p1 = [
|
|
246677
|
+
point1, _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 10, 0),
|
|
246678
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(6, 10, 0),
|
|
246679
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(6, 10, 0),
|
|
246680
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 10, 0),
|
|
246681
|
+
];
|
|
246643
246682
|
const segment1 = _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(point0, point1);
|
|
246644
246683
|
const vectorU = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitX(3);
|
|
246645
246684
|
const vectorV = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitY(3);
|
|
@@ -246654,7 +246693,8 @@ class Sample {
|
|
|
246654
246693
|
simplePaths.push(_curve_Path__WEBPACK_IMPORTED_MODULE_21__.Path.create(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(10, 0, 0)), _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(10, 10, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(5, 0, 0))));
|
|
246655
246694
|
return simplePaths;
|
|
246656
246695
|
}
|
|
246657
|
-
/**
|
|
246696
|
+
/**
|
|
246697
|
+
* Assorted `Path` with lines and arcs.
|
|
246658
246698
|
* Specifically useful for offset tests.
|
|
246659
246699
|
*/
|
|
246660
246700
|
static createLineArcPaths() {
|
|
@@ -246683,12 +246723,16 @@ class Sample {
|
|
|
246683
246723
|
}
|
|
246684
246724
|
/** Assorted `PointString3d` objects. */
|
|
246685
246725
|
static createSimplePointStrings() {
|
|
246686
|
-
const p1 = [
|
|
246726
|
+
const p1 = [
|
|
246727
|
+
[_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 10, 0)],
|
|
246728
|
+
[_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(6, 10, 0)],
|
|
246729
|
+
[_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(6, 10, 0), [_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(6, 10, 0)]],
|
|
246730
|
+
];
|
|
246687
246731
|
const simplePaths = [
|
|
246688
246732
|
_curve_PointString3d__WEBPACK_IMPORTED_MODULE_22__.PointString3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 2, 0)),
|
|
246689
246733
|
_curve_PointString3d__WEBPACK_IMPORTED_MODULE_22__.PointString3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(10, 0, 0)),
|
|
246690
246734
|
_curve_PointString3d__WEBPACK_IMPORTED_MODULE_22__.PointString3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(10, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(10, 5, 0)),
|
|
246691
|
-
_curve_PointString3d__WEBPACK_IMPORTED_MODULE_22__.PointString3d.create(p1)
|
|
246735
|
+
_curve_PointString3d__WEBPACK_IMPORTED_MODULE_22__.PointString3d.create(p1),
|
|
246692
246736
|
];
|
|
246693
246737
|
return simplePaths;
|
|
246694
246738
|
}
|
|
@@ -246717,8 +246761,7 @@ class Sample {
|
|
|
246717
246761
|
* @param dx1 distance along x axis at y=dy
|
|
246718
246762
|
* @param numPhase number of phases of the jump.
|
|
246719
246763
|
* @param dyReturn y value for return to origin. If 0, the wave ends at y=0 after then final "down" with one extra horizontal dx0
|
|
246720
|
-
*
|
|
246721
|
-
*
|
|
246764
|
+
* If nonzero, rise to that y value, return to x=0, and return down to origin.
|
|
246722
246765
|
*/
|
|
246723
246766
|
static createSquareWave(origin, dx0, dy, dx1, numPhase, dyReturn) {
|
|
246724
246767
|
const result = [origin.clone()];
|
|
@@ -246779,7 +246822,7 @@ class Sample {
|
|
|
246779
246822
|
}
|
|
246780
246823
|
return points;
|
|
246781
246824
|
}
|
|
246782
|
-
/**
|
|
246825
|
+
/** Append sawtooth with x distances successively scaled by xFactor */
|
|
246783
246826
|
static appendVariableSawTooth(points, dxLow, riseX, riseY, dxHigh, numPhase, xFactor) {
|
|
246784
246827
|
let factor = 1.0;
|
|
246785
246828
|
for (let i = 0; i < numPhase; i++) {
|
|
@@ -246820,7 +246863,8 @@ class Sample {
|
|
|
246820
246863
|
data.push(data[0].clone());
|
|
246821
246864
|
return data;
|
|
246822
246865
|
}
|
|
246823
|
-
/**
|
|
246866
|
+
/**
|
|
246867
|
+
* Append to a linestring, taking steps along given vector directions
|
|
246824
246868
|
* If the linestring is empty, a 000 point is added.
|
|
246825
246869
|
* @param linestring LineString3d to receive points.
|
|
246826
246870
|
* @param numPhase number of phases of the sawtooth
|
|
@@ -246837,7 +246881,8 @@ class Sample {
|
|
|
246837
246881
|
}
|
|
246838
246882
|
}
|
|
246839
246883
|
}
|
|
246840
|
-
/**
|
|
246884
|
+
/**
|
|
246885
|
+
* Assorted regions with arc boundaries
|
|
246841
246886
|
* * full circle
|
|
246842
246887
|
* * with varying sweep:
|
|
246843
246888
|
* * partial arc with single chord closure
|
|
@@ -246864,7 +246909,8 @@ class Sample {
|
|
|
246864
246909
|
}
|
|
246865
246910
|
return result;
|
|
246866
246911
|
}
|
|
246867
|
-
/**
|
|
246912
|
+
/**
|
|
246913
|
+
* Assorted loops in xy plane:
|
|
246868
246914
|
* * unit square
|
|
246869
246915
|
* * rectangle
|
|
246870
246916
|
* * L shape
|
|
@@ -246904,10 +246950,14 @@ class Sample {
|
|
|
246904
246950
|
];
|
|
246905
246951
|
if (includeBCurves) {
|
|
246906
246952
|
const ey = 1.0;
|
|
246907
|
-
result.push(_curve_ParityRegion__WEBPACK_IMPORTED_MODULE_24__.ParityRegion.create(_curve_Loop__WEBPACK_IMPORTED_MODULE_23__.Loop.create(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(point0, pointA), _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__.BSplineCurve3d.createUniformKnots([
|
|
246953
|
+
result.push(_curve_ParityRegion__WEBPACK_IMPORTED_MODULE_24__.ParityRegion.create(_curve_Loop__WEBPACK_IMPORTED_MODULE_23__.Loop.create(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(point0, pointA), _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__.BSplineCurve3d.createUniformKnots([
|
|
246954
|
+
pointA,
|
|
246955
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(ax + 1, ey),
|
|
246908
246956
|
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(ax + 1, 2 * ey),
|
|
246909
246957
|
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(ax + 2, 3 * ey),
|
|
246910
|
-
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(ax + 1, 4 * ey),
|
|
246958
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(ax + 1, 4 * ey),
|
|
246959
|
+
pointB,
|
|
246960
|
+
], 3), _curve_Arc3d__WEBPACK_IMPORTED_MODULE_20__.Arc3d.createCircularStartMiddleEnd(pointB, pointC1, point0))));
|
|
246911
246961
|
}
|
|
246912
246962
|
return result;
|
|
246913
246963
|
}
|
|
@@ -246921,7 +246971,7 @@ class Sample {
|
|
|
246921
246971
|
const by = 2.0;
|
|
246922
246972
|
const result = [
|
|
246923
246973
|
_curve_UnionRegion__WEBPACK_IMPORTED_MODULE_25__.UnionRegion.create(_curve_Loop__WEBPACK_IMPORTED_MODULE_23__.Loop.create(_curve_LineString3d__WEBPACK_IMPORTED_MODULE_15__.LineString3d.createRectangleXY(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), ax, ay)), _curve_Loop__WEBPACK_IMPORTED_MODULE_23__.Loop.create(_curve_LineString3d__WEBPACK_IMPORTED_MODULE_15__.LineString3d.createRectangleXY(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 2 * ay, 0), bx, by))),
|
|
246924
|
-
_curve_UnionRegion__WEBPACK_IMPORTED_MODULE_25__.UnionRegion.create(_curve_Loop__WEBPACK_IMPORTED_MODULE_23__.Loop.create(_curve_LineString3d__WEBPACK_IMPORTED_MODULE_15__.LineString3d.create(Sample.createRectangleXY(parityRange.low.x, parityRange.high.y + 0.5, parityRange.xLength(), parityRange.yLength()))), parityRegions[0])
|
|
246974
|
+
_curve_UnionRegion__WEBPACK_IMPORTED_MODULE_25__.UnionRegion.create(_curve_Loop__WEBPACK_IMPORTED_MODULE_23__.Loop.create(_curve_LineString3d__WEBPACK_IMPORTED_MODULE_15__.LineString3d.create(Sample.createRectangleXY(parityRange.low.x, parityRange.high.y + 0.5, parityRange.xLength(), parityRange.yLength()))), parityRegions[0]),
|
|
246925
246975
|
];
|
|
246926
246976
|
return result;
|
|
246927
246977
|
}
|
|
@@ -246940,7 +246990,8 @@ class Sample {
|
|
|
246940
246990
|
];
|
|
246941
246991
|
return result;
|
|
246942
246992
|
}
|
|
246943
|
-
/**
|
|
246993
|
+
/**
|
|
246994
|
+
* Assorted smooth curve primitives:
|
|
246944
246995
|
* * line segments
|
|
246945
246996
|
* * arcs
|
|
246946
246997
|
*/
|
|
@@ -246955,7 +247006,7 @@ class Sample {
|
|
|
246955
247006
|
_curve_Arc3d__WEBPACK_IMPORTED_MODULE_20__.Arc3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(size, alpha * size, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(-alpha * beta * size, beta * size, 0), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(-40, 270)),
|
|
246956
247007
|
];
|
|
246957
247008
|
}
|
|
246958
|
-
/**
|
|
247009
|
+
/** Assorted small polyface grids, possibly expanded by gridMultiplier */
|
|
246959
247010
|
static createSimpleIndexedPolyfaces(gridMultiplier) {
|
|
246960
247011
|
const meshes = [
|
|
246961
247012
|
Sample.createTriangularUnitGridPolyface(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitX(), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitY(), gridMultiplier * 3, 2 * gridMultiplier, false, false, false),
|
|
@@ -247186,7 +247237,7 @@ class Sample {
|
|
|
247186
247237
|
}
|
|
247187
247238
|
return _bspline_BSplineSurface__WEBPACK_IMPORTED_MODULE_28__.BSplineSurface3dH.create(xyzPoles, weights, numU, orderU, undefined, numV, orderV, undefined);
|
|
247188
247239
|
}
|
|
247189
|
-
/**
|
|
247240
|
+
/** Assorted linear sweeps */
|
|
247190
247241
|
static createSimpleLinearSweeps() {
|
|
247191
247242
|
const result = [];
|
|
247192
247243
|
const base = _curve_Loop__WEBPACK_IMPORTED_MODULE_23__.Loop.create(_curve_LineString3d__WEBPACK_IMPORTED_MODULE_15__.LineString3d.createRectangleXY(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(), 2, 3));
|
|
@@ -247205,7 +247256,7 @@ class Sample {
|
|
|
247205
247256
|
const xyPoints = [
|
|
247206
247257
|
_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__.Point2d.create(0, 0),
|
|
247207
247258
|
_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__.Point2d.create(1, 0),
|
|
247208
|
-
_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__.Point2d.create(1, 1)
|
|
247259
|
+
_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__.Point2d.create(1, 1),
|
|
247209
247260
|
];
|
|
247210
247261
|
result.push(_solid_LinearSweep__WEBPACK_IMPORTED_MODULE_30__.LinearSweep.createZSweep(xyPoints, 1, 3, false));
|
|
247211
247262
|
// this forces artificial closure point . . .
|
|
@@ -247249,7 +247300,7 @@ class Sample {
|
|
|
247249
247300
|
for (const axis of [
|
|
247250
247301
|
_geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.createXYZUVW(0, 0, 0, 0, 1, 0),
|
|
247251
247302
|
_geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.createXYZUVW(5, 0, 0, 0, 1, 0),
|
|
247252
|
-
_geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.createXYZUVW(-1, 0, 0, -1, 1, 0)
|
|
247303
|
+
_geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_14__.Ray3d.createXYZUVW(-1, 0, 0, -1, 1, 0),
|
|
247253
247304
|
]) {
|
|
247254
247305
|
result.push(_solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_31__.RotationalSweep.create(base, axis, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(45.0), false));
|
|
247255
247306
|
result.push(_solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_31__.RotationalSweep.create(base, axis, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(150.0), true));
|
|
@@ -247274,7 +247325,7 @@ class Sample {
|
|
|
247274
247325
|
/** Create true (non-spherical) ellipsoids. */
|
|
247275
247326
|
static createEllipsoids() {
|
|
247276
247327
|
return [
|
|
247277
|
-
_solid_Sphere__WEBPACK_IMPORTED_MODULE_32__.Sphere.createEllipsoid(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createOriginAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRowValues(4, 1, 1, 1, 4, 1, 0.5, 0.2, 5)), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createFullLatitude(), true)
|
|
247328
|
+
_solid_Sphere__WEBPACK_IMPORTED_MODULE_32__.Sphere.createEllipsoid(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createOriginAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRowValues(4, 1, 1, 1, 4, 1, 0.5, 0.2, 5)), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createFullLatitude(), true),
|
|
247278
247329
|
];
|
|
247279
247330
|
}
|
|
247280
247331
|
/** Create assorted cones. */
|
|
@@ -247332,8 +247383,7 @@ class Sample {
|
|
|
247332
247383
|
result.push(_solid_Box__WEBPACK_IMPORTED_MODULE_35__.Box.createDgnBox(cornerA, frameY.columnX(), frameY.columnY(), cornerA.plusScaled(frameY.columnZ(), h), aX, aY, bX, bY, capped));
|
|
247333
247384
|
return result;
|
|
247334
247385
|
}
|
|
247335
|
-
/**
|
|
247336
|
-
*/
|
|
247386
|
+
/** Create an array of points for a rectangle with corners (x0,y0,z) and (x1,y1,z) */
|
|
247337
247387
|
static createRectangle(x0, y0, x1, y1, z = 0.0, closed = false) {
|
|
247338
247388
|
const points = [
|
|
247339
247389
|
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(x0, y0, z),
|
|
@@ -247345,8 +247395,7 @@ class Sample {
|
|
|
247345
247395
|
points.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(x0, y0, z));
|
|
247346
247396
|
return points;
|
|
247347
247397
|
}
|
|
247348
|
-
/**
|
|
247349
|
-
*/
|
|
247398
|
+
/** Create an array of points for a rectangle with corners of a Range2d. */
|
|
247350
247399
|
static createRectangleInRange2d(range, z = 0.0, closed = false) {
|
|
247351
247400
|
const x0 = range.low.x;
|
|
247352
247401
|
const x1 = range.high.x;
|
|
@@ -247455,8 +247504,9 @@ class Sample {
|
|
|
247455
247504
|
}
|
|
247456
247505
|
return points;
|
|
247457
247506
|
}
|
|
247458
|
-
/**
|
|
247459
|
-
*
|
|
247507
|
+
/**
|
|
247508
|
+
* Primary shape is a "triangle" with lower edge pushed in so it becomes a mild nonconvex quad.
|
|
247509
|
+
* Fractal effects are gentle.
|
|
247460
247510
|
*/
|
|
247461
247511
|
static nonConvexQuadSimpleFractal(numRecursion, perpendicularFactor) {
|
|
247462
247512
|
const pattern = [
|
|
@@ -247473,7 +247523,7 @@ class Sample {
|
|
|
247473
247523
|
];
|
|
247474
247524
|
return Sample.createRecursiveFractalPolygon(poles, pattern, numRecursion, perpendicularFactor);
|
|
247475
247525
|
}
|
|
247476
|
-
/**
|
|
247526
|
+
/** Create a diamond with convex fractal */
|
|
247477
247527
|
static createFractalDiamondConvexPattern(numRecursion, perpendicularFactor) {
|
|
247478
247528
|
const pattern = [
|
|
247479
247529
|
_geometry3d_Point2dVector2d__WEBPACK_IMPORTED_MODULE_2__.Point2d.create(),
|
|
@@ -247570,7 +247620,7 @@ class Sample {
|
|
|
247570
247620
|
];
|
|
247571
247621
|
return Sample.createRecursiveFractalPolygon(poles, pattern, numRecursion, perpendicularFactor);
|
|
247572
247622
|
}
|
|
247573
|
-
/**
|
|
247623
|
+
/** Append interpolated points from the array tail to the target. */
|
|
247574
247624
|
static appendSplits(points, target, numSplit, includeTarget) {
|
|
247575
247625
|
const pointA = points[points.length - 1];
|
|
247576
247626
|
for (let i = 0; i < numSplit; i++)
|
|
@@ -247614,7 +247664,8 @@ class Sample {
|
|
|
247614
247664
|
geometry.push(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.createXYZXYZ(x0, y1, z0, x0, y1, z1));
|
|
247615
247665
|
return geometry;
|
|
247616
247666
|
}
|
|
247617
|
-
/**
|
|
247667
|
+
/**
|
|
247668
|
+
* Assorted transition spirals
|
|
247618
247669
|
* * (All combinations of bearing radius bearing radius length subsets.)
|
|
247619
247670
|
*/
|
|
247620
247671
|
static createSimpleTransitionSpirals() {
|
|
@@ -247635,10 +247686,11 @@ class Sample {
|
|
|
247635
247686
|
_curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_41__.DirectSpiral3d.createFromLengthAndRadius("ChineseCubic", r0, r1, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(0), undefined, arcLength, undefined, _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createOriginAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 2, 0), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(15)))),
|
|
247636
247687
|
_curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_41__.DirectSpiral3d.createFromLengthAndRadius("JapaneseCubic", r0, r1, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(0), undefined, arcLength, undefined, _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createOriginAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 2, 0), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(15)))),
|
|
247637
247688
|
_curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_41__.DirectSpiral3d.createFromLengthAndRadius("DirectHalfCosine", r0, r1, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(0), undefined, arcLength, undefined, _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createOriginAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 2, 0), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundVector(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(15)))),
|
|
247638
|
-
_curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_41__.DirectSpiral3d.createCzechCubic(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createIdentity(), arcLength, r1)
|
|
247689
|
+
_curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_41__.DirectSpiral3d.createCzechCubic(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createIdentity(), arcLength, r1),
|
|
247639
247690
|
];
|
|
247640
247691
|
}
|
|
247641
|
-
/**
|
|
247692
|
+
/**
|
|
247693
|
+
* Create a Bezier curve with significant twist effects
|
|
247642
247694
|
* * r and theta are circle in xy plane at steps in thetaStepper
|
|
247643
247695
|
* * z varies with sin(phi) at steps in phiStepper.
|
|
247644
247696
|
*/
|
|
@@ -247694,18 +247746,10 @@ class Sample {
|
|
|
247694
247746
|
result.push(_curve_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_44__.CurveChainWithDistanceIndex.createCapture(_curve_Path__WEBPACK_IMPORTED_MODULE_21__.Path.create(// arc spline with smooth joins
|
|
247695
247747
|
_curve_Arc3d__WEBPACK_IMPORTED_MODULE_20__.Arc3d.createXY(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(5, 0), 5, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(180, 0)), _curve_Arc3d__WEBPACK_IMPORTED_MODULE_20__.Arc3d.createXY(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(15, 0), 5, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(180, 360)), _curve_Arc3d__WEBPACK_IMPORTED_MODULE_20__.Arc3d.createXY(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(25, 0), 5, _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(180, 0)))));
|
|
247696
247748
|
result.push(_curve_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_44__.CurveChainWithDistanceIndex.createCapture(_curve_Path__WEBPACK_IMPORTED_MODULE_21__.Path.create(// 2-pt Interpolation Curve
|
|
247697
|
-
_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3d.createCapture(_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3dOptions.create({
|
|
247698
|
-
fitPoints: [pointsA[0], pointsA[1]],
|
|
247699
|
-
})))));
|
|
247749
|
+
_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3d.createCapture(_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3dOptions.create({ fitPoints: [pointsA[0], pointsA[1]] })))));
|
|
247700
247750
|
result.push(_curve_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_44__.CurveChainWithDistanceIndex.createCapture(_curve_Path__WEBPACK_IMPORTED_MODULE_21__.Path.create(// 3-pt Interpolation Curve
|
|
247701
|
-
_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3d.createCapture(_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3dOptions.create({
|
|
247702
|
-
|
|
247703
|
-
})))));
|
|
247704
|
-
result.push(_curve_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_44__.CurveChainWithDistanceIndex.createCapture(_curve_Path__WEBPACK_IMPORTED_MODULE_21__.Path.create(_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3d.createCapture(_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3dOptions.create({
|
|
247705
|
-
fitPoints: pointsA,
|
|
247706
|
-
startTangent: _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, -1),
|
|
247707
|
-
endTangent: _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(-1, -1),
|
|
247708
|
-
})))));
|
|
247751
|
+
_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3d.createCapture(_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3dOptions.create({ fitPoints: [pointsA[0], pointsA[1], pointsA[2]] })))));
|
|
247752
|
+
result.push(_curve_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_44__.CurveChainWithDistanceIndex.createCapture(_curve_Path__WEBPACK_IMPORTED_MODULE_21__.Path.create(_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3d.createCapture(_bspline_InterpolationCurve3d__WEBPACK_IMPORTED_MODULE_45__.InterpolationCurve3dOptions.create({ fitPoints: pointsA, startTangent: _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, -1), endTangent: _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(-1, -1) })))));
|
|
247709
247753
|
result.push(_curve_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_44__.CurveChainWithDistanceIndex.createCapture(_curve_Path__WEBPACK_IMPORTED_MODULE_21__.Path.create(_curve_spiral_IntegratedSpiral3d__WEBPACK_IMPORTED_MODULE_39__.IntegratedSpiral3d.createRadiusRadiusBearingBearing(_geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_40__.Segment1d.create(0, 100), _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(10, 75), _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_40__.Segment1d.create(0, 1), _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createOriginAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero(), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundAxisIndex(2, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(30))), "bloss"))));
|
|
247710
247754
|
result.push(_curve_CurveChainWithDistanceIndex__WEBPACK_IMPORTED_MODULE_44__.CurveChainWithDistanceIndex.createCapture(_curve_Path__WEBPACK_IMPORTED_MODULE_21__.Path.create(_curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_41__.DirectSpiral3d.createDirectHalfCosine(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_16__.Transform.createOriginAndMatrix(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero(), _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_12__.Matrix3d.createRotationAroundAxisIndex(2, _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(110))), 50, 350, _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_40__.Segment1d.create(0, 1)))));
|
|
247711
247755
|
return result;
|
|
@@ -247789,7 +247833,7 @@ class Sample {
|
|
|
247789
247833
|
const sweep2 = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(160.0, 380.0);
|
|
247790
247834
|
for (const arcs of [
|
|
247791
247835
|
Sample.createArcs(1.0), Sample.createArcs(0.5),
|
|
247792
|
-
Sample.createArcs(1.0, sweep1), Sample.createArcs(0.3, sweep2)
|
|
247836
|
+
Sample.createArcs(1.0, sweep1), Sample.createArcs(0.3, sweep2),
|
|
247793
247837
|
]) {
|
|
247794
247838
|
for (const arc of arcs)
|
|
247795
247839
|
result.push(arc);
|
|
@@ -247892,10 +247936,10 @@ class Sample {
|
|
|
247892
247936
|
return points;
|
|
247893
247937
|
}
|
|
247894
247938
|
/**
|
|
247895
|
-
* *
|
|
247896
|
-
* *
|
|
247897
|
-
* *
|
|
247898
|
-
* *
|
|
247939
|
+
* * Let ay = 4
|
|
247940
|
+
* * Base polygon has vertices (0,0), (ax,0), (2*ax,0), (2* ax,ay), (ax,ay), (0,ay), (0,0).
|
|
247941
|
+
* * Shift the x coordinates of vertices 1,4 by indicated amounts (0-based numbering)
|
|
247942
|
+
* * Shift the y coordinates for points 1,2,3,4 by indicated amounts (in 0-based numbering)
|
|
247899
247943
|
* * This is useful for testing non-y-monotonic face situations.
|
|
247900
247944
|
* * Return as points.
|
|
247901
247945
|
* @param dy1
|
|
@@ -247915,7 +247959,7 @@ class Sample {
|
|
|
247915
247959
|
return points;
|
|
247916
247960
|
}
|
|
247917
247961
|
/**
|
|
247918
|
-
*
|
|
247962
|
+
* Make line segments for each pair of adjacent points.
|
|
247919
247963
|
* @param points array of points
|
|
247920
247964
|
* @param forceClosure if true, inspect coordinates to determine if a closure edge is needed.
|
|
247921
247965
|
*/
|
|
@@ -248031,7 +248075,8 @@ class Sample {
|
|
|
248031
248075
|
this.appendGeometry(this.createBagOfCurves(), result);
|
|
248032
248076
|
return result;
|
|
248033
248077
|
}
|
|
248034
|
-
/**
|
|
248078
|
+
/**
|
|
248079
|
+
* Create points on a sine wave
|
|
248035
248080
|
* Point i is origin + (i * xStep, a *sin(theta0 + i * dTheta), b * sin(beta0 + i * dBeta))
|
|
248036
248081
|
* * Default b is zero, so it is a simple sine wave
|
|
248037
248082
|
* * If the dTheta and dBeta are equal, it is a sine wave in a tilted plane.
|
|
@@ -248040,8 +248085,9 @@ class Sample {
|
|
|
248040
248085
|
static createPointSineWave(origin, numInterval = 24, xStep = Math.PI / 12, a = 1, thetaSweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(0, 360), b = 0, betaSweep = _geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(0, 180)) {
|
|
248041
248086
|
return this.createPointsByIndexFunctions(numInterval, SteppedIndexFunctionFactory.createLinear(xStep, origin ? origin.x : 0), SteppedIndexFunctionFactory.createCosine(a, thetaSweep, origin ? origin.y : 0), SteppedIndexFunctionFactory.createCosine(b, betaSweep, origin ? origin.z : 0));
|
|
248042
248087
|
}
|
|
248043
|
-
/**
|
|
248044
|
-
*
|
|
248088
|
+
/**
|
|
248089
|
+
* Create points with x,y,z independent functions of i and numInterval,
|
|
248090
|
+
* Point3d.create (fx(i,numInterval), fy(i,numInterval), fz(i, numInterval));
|
|
248045
248091
|
*/
|
|
248046
248092
|
static createPointsByIndexFunctions(numInterval, fx, fy, fz) {
|
|
248047
248093
|
const points = [];
|
|
@@ -248112,9 +248158,7 @@ class Sample {
|
|
|
248112
248158
|
builder.addGreedyTriangulationBetweenLineStrings(point0, point1);
|
|
248113
248159
|
return builder.claimPolyface();
|
|
248114
248160
|
}
|
|
248115
|
-
/**
|
|
248116
|
-
* create strokes on an arc at radius r0, then returning at radius r1.
|
|
248117
|
-
*/
|
|
248161
|
+
/** Create strokes on an arc at radius r0, then returning at radius r1. */
|
|
248118
248162
|
static createAnnulusPolyline(edgesPerQuadrant, center, r0, r1, theta0, theta1, addClosure) {
|
|
248119
248163
|
const point0 = [];
|
|
248120
248164
|
const point1 = [];
|
|
@@ -248184,7 +248228,12 @@ class Sample {
|
|
|
248184
248228
|
for (let yC = 0; yC + 1 <= ySweep; yC++) {
|
|
248185
248229
|
const yD = yC + 1;
|
|
248186
248230
|
if (acceptFunction(xA, yC))
|
|
248187
|
-
builder.addPolygon([
|
|
248231
|
+
builder.addPolygon([
|
|
248232
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(xA, yC, zA),
|
|
248233
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(xB, yC, zB),
|
|
248234
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(xB, yD, zB),
|
|
248235
|
+
_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(xA, yD, zA),
|
|
248236
|
+
]);
|
|
248188
248237
|
}
|
|
248189
248238
|
}
|
|
248190
248239
|
}
|
|
@@ -248242,7 +248291,7 @@ Sample.plane3dByOriginAndUnitNormal = [
|
|
|
248242
248291
|
_geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_13__.Plane3dByOriginAndUnitNormal.createYZPlane(),
|
|
248243
248292
|
_geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_13__.Plane3dByOriginAndUnitNormal.createZXPlane(),
|
|
248244
248293
|
Sample.createPlane(0, 0, 0, 3, 0, 1),
|
|
248245
|
-
Sample.createPlane(1, 2, 3, 2, 4, -1)
|
|
248294
|
+
Sample.createPlane(1, 2, 3, 2, 4, -1),
|
|
248246
248295
|
];
|
|
248247
248296
|
/** Assorted Ray3d, not all unit direction vectors. */
|
|
248248
248297
|
Sample.ray3d = [
|
|
@@ -248250,7 +248299,7 @@ Sample.ray3d = [
|
|
|
248250
248299
|
Sample.createRay(0, 0, 0, 0, 1, 0),
|
|
248251
248300
|
Sample.createRay(0, 0, 0, 0, 0, 1),
|
|
248252
248301
|
Sample.createRay(0, 0, 0, 1, 2, 0),
|
|
248253
|
-
Sample.createRay(1, 2, 3, 4, 2, -1)
|
|
248302
|
+
Sample.createRay(1, 2, 3, 4, 2, -1),
|
|
248254
248303
|
];
|
|
248255
248304
|
/** Assorted angles. All principal directions, some others included. */
|
|
248256
248305
|
Sample.angle = [
|
|
@@ -248259,7 +248308,7 @@ Sample.angle = [
|
|
|
248259
248308
|
_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(180),
|
|
248260
248309
|
_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(-90),
|
|
248261
248310
|
_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(30),
|
|
248262
|
-
_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(-105)
|
|
248311
|
+
_geometry3d_Angle__WEBPACK_IMPORTED_MODULE_3__.Angle.createDegrees(-105),
|
|
248263
248312
|
];
|
|
248264
248313
|
/** Assorted angle sweeps */
|
|
248265
248314
|
Sample.angleSweep = [
|
|
@@ -248268,35 +248317,35 @@ Sample.angleSweep = [
|
|
|
248268
248317
|
_geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(-90, 0),
|
|
248269
248318
|
_geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(0, -90),
|
|
248270
248319
|
_geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(0, 30),
|
|
248271
|
-
_geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(45, 110)
|
|
248320
|
+
_geometry3d_AngleSweep__WEBPACK_IMPORTED_MODULE_0__.AngleSweep.createStartEndDegrees(45, 110),
|
|
248272
248321
|
];
|
|
248273
|
-
/**
|
|
248322
|
+
/** Assorted line segments */
|
|
248274
248323
|
Sample.lineSegment3d = [
|
|
248275
248324
|
_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 0, 0)),
|
|
248276
248325
|
_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 1, 0)),
|
|
248277
248326
|
_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 0), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(0, 0, 1)),
|
|
248278
|
-
_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 2, 3), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(-2, -3, 0.5))
|
|
248327
|
+
_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_19__.LineSegment3d.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(1, 2, 3), _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(-2, -3, 0.5)),
|
|
248279
248328
|
];
|
|
248280
|
-
/** Assorted Range1d:
|
|
248329
|
+
/** Assorted Range1d: single point, null, simple forward, simple reverse */
|
|
248281
248330
|
Sample.range1d = [
|
|
248282
248331
|
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createX(1),
|
|
248283
248332
|
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createNull(),
|
|
248284
248333
|
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createXX(1, 2),
|
|
248285
|
-
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createXX(2, 1)
|
|
248334
|
+
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range1d.createXX(2, 1),
|
|
248286
248335
|
];
|
|
248287
248336
|
/** Assorted range2d: single point, null, 2 point with various creation orders. */
|
|
248288
248337
|
Sample.range2d = [
|
|
248289
248338
|
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range2d.createXY(1, 2),
|
|
248290
248339
|
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range2d.createNull(),
|
|
248291
248340
|
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range2d.createXYXY(1, 2, 0, 3),
|
|
248292
|
-
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range2d.createXYXY(1, 2, 3, 4)
|
|
248341
|
+
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range2d.createXYXY(1, 2, 3, 4),
|
|
248293
248342
|
];
|
|
248294
248343
|
/** Assorted range2d: single point, null, 2 point with various creation orders. */
|
|
248295
248344
|
Sample.range3d = [
|
|
248296
248345
|
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.createXYZ(1, 2, 3),
|
|
248297
248346
|
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.createNull(),
|
|
248298
248347
|
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.createXYZXYZ(1, 2, 0, 3, 4, 7),
|
|
248299
|
-
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.createXYZXYZ(1, 2, 3, -2, -4, -1)
|
|
248348
|
+
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_4__.Range3d.createXYZXYZ(1, 2, 3, -2, -4, -1),
|
|
248300
248349
|
];
|
|
248301
248350
|
|
|
248302
248351
|
|
|
@@ -288775,7 +288824,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
288775
288824
|
/***/ ((module) => {
|
|
288776
288825
|
|
|
288777
288826
|
"use strict";
|
|
288778
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.
|
|
288827
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.56","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","build:ci":"npm run -s build && 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/tree/master/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.0.0-dev.56","@itwin/core-bentley":"workspace:^4.0.0-dev.56","@itwin/core-common":"workspace:^4.0.0-dev.56","@itwin/core-geometry":"workspace:^4.0.0-dev.56","@itwin/core-orbitgt":"workspace:^4.0.0-dev.56","@itwin/core-quantity":"workspace:^4.0.0-dev.56"},"//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.32","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@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":"^7.11.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","deep-assign":"^2.0.0","fuse.js":"^3.3.0","qs":"^6.5.3","semver":"^7.3.5","superagent":"^7.1.5","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"}}]}}');
|
|
288779
288828
|
|
|
288780
288829
|
/***/ })
|
|
288781
288830
|
|